summaryrefslogtreecommitdiff
path: root/contrib/dialog
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2013-06-17 10:28:55 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2013-06-17 10:28:55 +0000
commit2a3e3873a1e4cd958f2b0f85d3b10cfa40575d30 (patch)
tree9f45a4b095479f9ca544ff3abb716d5aefc15eb1 /contrib/dialog
parentc8789c34fd1f02cffc3c0adffa305172e6ec25b5 (diff)
parentc1ba58ff2b09604bd03d15a844fb5c09e2e38ef6 (diff)
downloadsrc-test-2a3e3873a1e4cd958f2b0f85d3b10cfa40575d30.tar.gz
src-test-2a3e3873a1e4cd958f2b0f85d3b10cfa40575d30.zip
Update dialog to 1.2-20130523
Level up WARNS
Notes
Notes: svn path=/head/; revision=251843
Diffstat (limited to 'contrib/dialog')
-rw-r--r--contrib/dialog/CHANGES277
-rw-r--r--contrib/dialog/VERSION2
-rw-r--r--contrib/dialog/aclocal.m4652
-rw-r--r--contrib/dialog/argv.c10
-rw-r--r--contrib/dialog/arrows.c62
-rw-r--r--contrib/dialog/buildlist.c1111
-rw-r--r--contrib/dialog/buttons.c262
-rw-r--r--contrib/dialog/calendar.c62
-rw-r--r--contrib/dialog/checklist.c422
-rw-r--r--contrib/dialog/columns.c5
-rwxr-xr-xcontrib/dialog/config.guess202
-rwxr-xr-xcontrib/dialog/config.sub112
-rwxr-xr-xcontrib/dialog/configure4041
-rw-r--r--contrib/dialog/configure.in53
-rw-r--r--contrib/dialog/dialog-config.in5
-rw-r--r--contrib/dialog/dialog.1446
-rw-r--r--contrib/dialog/dialog.3592
-rw-r--r--contrib/dialog/dialog.c326
-rw-r--r--contrib/dialog/dialog.h108
-rw-r--r--contrib/dialog/dlg_colors.h18
-rw-r--r--contrib/dialog/dlg_keys.c119
-rw-r--r--contrib/dialog/dlg_keys.h42
-rw-r--r--contrib/dialog/editbox.c104
-rw-r--r--contrib/dialog/formbox.c141
-rw-r--r--contrib/dialog/fselect.c180
-rw-r--r--contrib/dialog/guage.c35
-rwxr-xr-xcontrib/dialog/headers-sh.in38
-rw-r--r--contrib/dialog/help.c17
-rw-r--r--contrib/dialog/inputbox.c39
-rw-r--r--contrib/dialog/inputstr.c31
-rw-r--r--contrib/dialog/makefile.in35
-rw-r--r--contrib/dialog/menubox.c465
-rw-r--r--contrib/dialog/mixedform.c7
-rw-r--r--contrib/dialog/mixedgauge.c40
-rw-r--r--contrib/dialog/mouse.c25
-rw-r--r--contrib/dialog/mousewget.c6
-rw-r--r--contrib/dialog/msgbox.c66
-rw-r--r--contrib/dialog/package/debian/changelog55
-rw-r--r--contrib/dialog/package/dialog.spec14
-rw-r--r--contrib/dialog/pause.c60
-rw-r--r--contrib/dialog/po/an.po111
-rw-r--r--contrib/dialog/po/cs.po54
-rw-r--r--contrib/dialog/po/el.po46
-rw-r--r--contrib/dialog/po/gl.po58
-rw-r--r--contrib/dialog/po/hr.po78
-rw-r--r--contrib/dialog/po/ia.po111
-rw-r--r--contrib/dialog/po/sr.po34
-rw-r--r--contrib/dialog/po/zh_TW.po36
-rw-r--r--contrib/dialog/prgbox.c28
-rw-r--r--contrib/dialog/progressbox.c75
-rw-r--r--contrib/dialog/rangebox.c419
-rw-r--r--contrib/dialog/rc.c60
-rwxr-xr-xcontrib/dialog/rename.sh5
-rw-r--r--contrib/dialog/samples/README35
-rwxr-xr-xcontrib/dialog/samples/buildlist20
-rwxr-xr-xcontrib/dialog/samples/buildlist242
-rwxr-xr-xcontrib/dialog/samples/checklist1244
-rwxr-xr-xcontrib/dialog/samples/copifuncs/admin.funcs200
-rw-r--r--contrib/dialog/samples/copifuncs/common.funcs338
-rwxr-xr-xcontrib/dialog/samples/copifuncs/copi.funcs1303
-rw-r--r--contrib/dialog/samples/copifuncs/copi.ifman129
-rw-r--r--contrib/dialog/samples/copifuncs/copi.ifman2137
-rw-r--r--contrib/dialog/samples/copifuncs/copi.ifmcfg268
-rw-r--r--contrib/dialog/samples/copifuncs/copi.ifmcfg430
-rw-r--r--contrib/dialog/samples/copifuncs/copi.ifmcfg514
-rwxr-xr-xcontrib/dialog/samples/copifuncs/copi.ifpoll19
-rw-r--r--contrib/dialog/samples/copifuncs/copi.ifpoll2107
-rwxr-xr-xcontrib/dialog/samples/copifuncs/copi.ifreq120
-rw-r--r--contrib/dialog/samples/copifuncs/copi.ifreq268
-rwxr-xr-xcontrib/dialog/samples/copifuncs/copi.rcnews79
-rwxr-xr-xcontrib/dialog/samples/copifuncs/copi.sendifm174
-rw-r--r--contrib/dialog/samples/copifuncs/copi.sendifm215
-rw-r--r--contrib/dialog/samples/copifuncs/copi.trnrc13
-rwxr-xr-xcontrib/dialog/samples/copifuncs/copi.wheel54
-rw-r--r--contrib/dialog/samples/copifuncs/ifpatch101
-rwxr-xr-xcontrib/dialog/samples/copismall296
-rw-r--r--contrib/dialog/samples/debian.rc54
-rwxr-xr-xcontrib/dialog/samples/dft-cancel3
-rwxr-xr-xcontrib/dialog/samples/dft-extra3
-rwxr-xr-xcontrib/dialog/samples/dft-help3
-rwxr-xr-xcontrib/dialog/samples/dft-no3
-rw-r--r--contrib/dialog/samples/dialog.py3
-rwxr-xr-xcontrib/dialog/samples/dselect11
-rwxr-xr-xcontrib/dialog/samples/form16
-rwxr-xr-xcontrib/dialog/samples/fselect011
-rwxr-xr-xcontrib/dialog/samples/inputmenu83
-rwxr-xr-xcontrib/dialog/samples/inputmenu-stdout86
-rwxr-xr-xcontrib/dialog/samples/inputmenu14
-rwxr-xr-xcontrib/dialog/samples/inputmenu24
-rwxr-xr-xcontrib/dialog/samples/inputmenu34
-rwxr-xr-xcontrib/dialog/samples/inputmenu44
-rw-r--r--contrib/dialog/samples/install/FDISK.TEST28
-rw-r--r--contrib/dialog/samples/install/makefile.in35
-rw-r--r--contrib/dialog/samples/install/setup.c371
-rw-r--r--contrib/dialog/samples/install/setup.help49
-rwxr-xr-xcontrib/dialog/samples/killall11
-rwxr-xr-xcontrib/dialog/samples/menubox1243
-rwxr-xr-xcontrib/dialog/samples/prgbox5
-rwxr-xr-xcontrib/dialog/samples/prgbox25
-rwxr-xr-xcontrib/dialog/samples/rangebox11
-rwxr-xr-xcontrib/dialog/samples/rangebox211
-rwxr-xr-xcontrib/dialog/samples/rangebox311
-rwxr-xr-xcontrib/dialog/samples/rangebox411
-rw-r--r--contrib/dialog/samples/report-button3
-rw-r--r--contrib/dialog/samples/report-edit3
-rw-r--r--contrib/dialog/samples/report-string3
-rw-r--r--contrib/dialog/samples/report-tempfile3
-rw-r--r--contrib/dialog/samples/report-yesno3
-rw-r--r--contrib/dialog/samples/setup-edit5
-rw-r--r--contrib/dialog/samples/setup-tempfile7
-rw-r--r--contrib/dialog/samples/setup-utf83
-rw-r--r--contrib/dialog/samples/setup-vars10
-rw-r--r--contrib/dialog/samples/slackware.rc47
-rw-r--r--contrib/dialog/samples/sourcemage.rc58
-rw-r--r--contrib/dialog/samples/suse.rc52
-rwxr-xr-xcontrib/dialog/samples/tailboxbg4
-rwxr-xr-xcontrib/dialog/samples/tailboxbg14
-rwxr-xr-xcontrib/dialog/samples/tailboxbg24
-rwxr-xr-xcontrib/dialog/samples/testdata-8bit11
-rwxr-xr-xcontrib/dialog/samples/treeview22
-rwxr-xr-xcontrib/dialog/samples/treeview252
-rw-r--r--contrib/dialog/samples/valgrind.log847
-rwxr-xr-xcontrib/dialog/samples/wheel6
-rw-r--r--contrib/dialog/samples/whiptail.rc56
-rwxr-xr-xcontrib/dialog/samples/with-dquotes3
-rwxr-xr-xcontrib/dialog/samples/with-squotes3
-rw-r--r--contrib/dialog/tailbox.c12
-rw-r--r--contrib/dialog/textbox.c82
-rw-r--r--contrib/dialog/timebox.c34
-rw-r--r--contrib/dialog/trace.c111
-rw-r--r--contrib/dialog/treeview.c672
-rw-r--r--contrib/dialog/ui_getc.c47
-rw-r--r--contrib/dialog/util.c384
-rw-r--r--contrib/dialog/yesno.c21
134 files changed, 9796 insertions, 8147 deletions
diff --git a/contrib/dialog/CHANGES b/contrib/dialog/CHANGES
index b8390882b7572..193fa2139fad1 100644
--- a/contrib/dialog/CHANGES
+++ b/contrib/dialog/CHANGES
@@ -1,9 +1,229 @@
--- $Id: CHANGES,v 1.360 2011/07/07 23:35:10 tom Exp $
+-- $Id: CHANGES,v 1.458 2013/05/24 00:23:22 tom Exp $
-- Thomas E. Dickey <dickey@invisible-island.net>
This version of dialog was originally from a Debian snapshot. I've done this
to it:
+2013/05/23
+ + modify ifdef in arrows.c to work around packages which use the
+ wide-character ncursesw headers with the ncurses library (report
+ by Aleksey Cheusov).
+ + correct workaround for xterm alternate-screen to work with/without
+ the fix made in ncurses that makes putp() always write to the
+ standard output (Debian #708829).
+ + improve limit-checks for checklist, in case the dialog is resized
+ (report by Ilya A Arkhipov).
+ + add --last-key option (adapted from patch by Jordi Pujol, Debian
+ #697607).
+
+2013/03/15
+ + update zh_TW.po, add an.po from
+ http://translationproject.org/latest/dialog/
+
+2012/12/30 - release 1.2
+ + improve some older changelog entries to help with HTML'izing content.
+ + various fixes/improvments for scrollbar appearance.
+ + add mappings for some equivalent options provided by whiptail;
+ add configure option --disable-whiptail to allow suppressing these.
+ + add configure option --disable-Xdialog2 to allow suppressing the
+ newer features, i.e., for cdialog 1.2
+ + add --no-items option, for consistency.
+ + add --no-tags option, like Xdialog.
+ + add buildlist, rangebox and treeview dialogs, like Xdialog.
+ + remove obsolete workaround for ncurses 4.2 scrolling in checklist
+ and menubox.
+ + improve dialog_helpfile() by preventing it from showing extra buttons
+ (suggested by xDog Walker).
+ + correct logic in formbox's scroll_next() function (report by xDog
+ Walker).
+ + fix a case with inputbox widget where preset input text is not shown
+ until moving the cursor within the text (report by xDog Walker).
+ + handle SIGCHLD in dialog_prgbox() to eliminate defunct processes
+ (report by xDog Walker).
+ + improve the way "hotkeys" are assigned to widget buttons by checking
+ if a given key has already been used in the row of buttons (Debian
+ #684933).
+ + amend fix for --trace parsing from 2012/07/03, which sometimes
+ skipped a parameter (report by xDog Walker).
+ + drop copismall and install files from samples, which were essentially
+ nonfunctional.
+ + correct secondary border colors in samples/slackware.rc and
+ samples/whiptail.rc
+ + update gl.po, add ia.po from
+ http://translationproject.org/latest/dialog/
+ + fix various issues reported by coverity scan.
+ + miscellaneous configure script fixes/updates:
+ + require autoconf 2.52+patches
+ + support --datarootdir option
+ + check for clang compiler
+ + check for tinfo library when looking for ncurses
+ + add 3rd parameter to AC_DEFINE for autoheader
+ + remove unused macros from aclocal.m4
+ + update config.guess, config.sub
+
+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 +307,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 +375,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 +470,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 +553,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
@@ -395,7 +615,8 @@ to it:
+ use $(INSTALL_SCRIPT) for installing dialog-config (report by
Santiago Vila).
-2007/02/27
+2007/02/27 - release 1.1
+ + mark as "dialog 1.1"
+ add dialog-config script, which provides applications with compile-
and link-information for using the dialog library.
+ move calls to dlg_trim_string() out of loop in dialog.c, so each
@@ -436,7 +657,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
@@ -628,8 +849,7 @@ to it:
+ modify tailboxbg by resetting tty modes at the point where it forks a
process to update the screen, rather than waiting until that process
exits. This improves user feedback by making it apparent that dialog
- is no longer processing input after that point (Redhat Bugzilla
- #142538).
+ is no longer processing input after that point (Redhat #142538).
+ minor updates to some .po files using Babel Fish, comparing with lynx.
+ update es.po (Santiago Vila).
+ work around bug in NetBSD 1.6 curses which seems to be confused by
@@ -815,8 +1035,7 @@ to it:
before dialog is invoked (Debian #244746).
+ correct dlg_match_char() function, which was broken during rewrite
to support wide-characters (Debian #244777).
- + improved ru.po, uses UTF-8 charset (Leonid Kanter, Redhat Bugzilla
- #119200).
+ + improved ru.po, uses UTF-8 charset (Leonid Kanter, Redhat #119200).
+ correct position of shadow drawn for dialogs, which appeared to work
for most versions of curses (other than NetBSD) but would have been
visible for certain color schemes (discussion with Julian Coleman).
@@ -1147,7 +1366,7 @@ to it:
the --stdout option does not work on HPUX but otherwise dialog works.
+ updated el.po (patch by kromJx <kromJx@crosswinds.net>).
-2002/05/19
+2002/05/19 - release 0.9b
+ add --no-collapse option to allow one to retain tabs and repeated
blanks in a message box (request by Roberto Simoni).
+ use DLG_EXIT_ESC constant rather than -1's in several places. This
@@ -1615,15 +1834,15 @@ to it:
Santiago Vila <sanvila@ctv.es>:
1999/10/07
- + add a password dialog box.
+ + add a password dialog box (Debian #45964, patch by Joey Hess).
+ implement "--defaultno" option to specify if the default for
- the yes/no box is "No".
+ the yes/no box is "No" (Debian #46076, patch by Joey Hess).
1999/03/10
+ modify input.c to clear the input field to the right of the
- given string (unclear: this seems redundant, since the
- dialog is drawn in a new window).
+ given string, to help with screen-refresh
1998/12/08
- + check for list_height less than one in checklist.c
+ + check for list_height less than one in checklist.c (Debian
+ #22239).
1998/10/21
+ use function wscrl() in preference to scroll() in checklist.c
and menubox.c (unclear: in ncurses, scroll() is a macro that
@@ -1633,12 +1852,14 @@ to it:
that directory.
1998/09/12
+ simplify menubox.c using new functions print_arrows() and
- print_items().
- + add logic to handle KEY_NPAGE and KEY_PPAGE.
- + change sample scripts to use Debian tempfile utility rather
- than putting files into /tmp.
- + change sample scripts to use 'dialog' from user's path rather
- than in the parent directory as in the build directory.
+ print_items(). add logic to handle KEY_NPAGE and KEY_PPAGE
+ (Debian #26326).
+ + modifications to provide sample scripts (Debian #26211):
+ + change sample scripts to use Debian tempfile utility rather
+ than putting files into /tmp.
+ + change sample scripts to use 'dialog' from user's path
+ rather than in the parent directory as in the build
+ directory.
+ use the system copy of GPL rather than that in the build
directory as an example for the textbox script.
@@ -1664,16 +1885,16 @@ The relevant portions of the Debian change log for the original version
1998/05/24
+ Replaced guage.c by the one in dialog 0.6z, which is known to work.
- Fixes Bug #18284: unstable dialog.
+ Fixes Debian #18284: unstable dialog.
1997/12/16
+ dialog.c: dialog_input_result printed with "%s" format. This was
- Bug #9913, fixed by Bill Mitchell, but the change was lost.
+ Debian #9913, fixed by Bill Mitchell, but the change was lost.
+ Pristine source, .depend is not removed in clean target. Instead, it
- is made zero lenght (otherwise it would not work *without* fakeroot).
- + Added '^U' support in input box (Bug #9915, patch by joey@debian.org).
- + Wrote patch to fix core-dumping problem (Bug #13170). Sven Rudolph
+ is made zero length (otherwise it would not work *without* fakeroot).
+ + Added '^U' support in input box (Debian #9915, patch by Joey Hess).
+ + Wrote patch to fix core-dumping problem (Debian #13170). Sven Rudolph
<sr1@inf.tu-dresden.de>:
-- vile:fk=8bit
diff --git a/contrib/dialog/VERSION b/contrib/dialog/VERSION
index 046245588a11b..4001e25ab3c0d 100644
--- a/contrib/dialog/VERSION
+++ b/contrib/dialog/VERSION
@@ -1 +1 @@
-10:0:0 1.1 20110707
+11:1:0 1.2 20130523
diff --git a/contrib/dialog/aclocal.m4 b/contrib/dialog/aclocal.m4
index 159b12f8ac591..4fb129ea47f15 100644
--- a/contrib/dialog/aclocal.m4
+++ b/contrib/dialog/aclocal.m4
@@ -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.90 2012/12/02 20:07:30 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
@@ -31,23 +31,21 @@ dnl see
dnl http://invisible-island.net/autoconf/
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
-dnl AM_GNU_GETTEXT version: 12 updated: 2010/06/19 07:02:11
+dnl AM_GNU_GETTEXT version: 13 updated: 2012/11/09 05:47:26
dnl --------------
dnl Usage: Just like AM_WITH_NLS, which see.
AC_DEFUN([AM_GNU_GETTEXT],
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
- AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
- AC_REQUIRE([AC_ISC_POSIX])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
- AC_REQUIRE([AC_C_CONST])dnl
AC_REQUIRE([AC_C_INLINE])dnl
AC_REQUIRE([AC_TYPE_OFF_T])dnl
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
AC_REQUIRE([AC_FUNC_MMAP])dnl
AC_REQUIRE([jm_GLIBC21])dnl
+ AC_REQUIRE([CF_PROG_CC])dnl
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
stdlib.h string.h unistd.h sys/param.h])
@@ -282,7 +280,7 @@ fi
AC_SUBST($1)dnl
])dnl
dnl ---------------------------------------------------------------------------
-dnl AM_WITH_NLS version: 24 updated: 2010/06/20 09:24:28
+dnl AM_WITH_NLS version: 25 updated: 2012/10/06 08:57:51
dnl -----------
dnl Inserted as requested by gettext 0.10.40
dnl File from /usr/share/aclocal
@@ -385,7 +383,7 @@ AC_DEFUN([AM_WITH_NLS],
LIBS="$cf_save_LIBS_1"
if test "$cf_cv_func_gettext" = yes ; then
- AC_DEFINE(HAVE_LIBINTL_H)
+ AC_DEFINE(HAVE_LIBINTL_H,1,[Define to 1 if we have libintl.h])
dnl If an already present or preinstalled GNU gettext() is found,
dnl use it. But if this macro is used in GNU gettext, and GNU
@@ -592,15 +590,30 @@ changequote([,])dnl
AC_SUBST(GENCAT)
])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
-dnl version of autoconf, or a patched version (using the ternary component as
-dnl the patch-version).
-define(CF_AC_PREREQ,
-[CF_PREREQ_COMPARE(
-AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)),
-AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1], [$2], [$3])])dnl
+dnl CF_ACVERSION_CHECK version: 3 updated: 2012/10/03 18:39:53
+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: 3 updated: 2012/10/03 18:39:53
+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_ADD_CFLAGS version: 10 updated: 2010/05/26 05:38:42
dnl -------------
@@ -876,12 +889,6 @@ dnl Allow user to disable a normally-on option.
AC_DEFUN([CF_ARG_DISABLE],
[CF_ARG_OPTION($1,[$2],[$3],[$4],yes)])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_ARG_ENABLE version: 3 updated: 1999/03/30 17:24:31
-dnl -------------
-dnl Allow user to enable a normally-off option.
-AC_DEFUN([CF_ARG_ENABLE],
-[CF_ARG_OPTION($1,[$2],[$3],[$4],no)])dnl
-dnl ---------------------------------------------------------------------------
dnl CF_ARG_MSG_ENABLE version: 2 updated: 2000/07/29 19:32:03
dnl -----------------
dnl Verbose form of AC_ARG_ENABLE:
@@ -927,7 +934,7 @@ ifelse([$3],,[ :]dnl
])dnl
])])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_BUNDLED_INTL version: 16 updated: 2010/10/23 15:55:05
+dnl CF_BUNDLED_INTL version: 17 updated: 2012/10/06 08:57:51
dnl ---------------
dnl Top-level macro for configuring an application with a bundled copy of
dnl the intl and po directories for gettext.
@@ -984,7 +991,7 @@ if test "$USE_NLS" = yes ; then
[ --with-textdomain=PKG NLS text-domain (default is package name)],
[NLS_TEXTDOMAIN=$withval],
[NLS_TEXTDOMAIN=$PACKAGE])
- AC_DEFINE_UNQUOTED(NLS_TEXTDOMAIN,"$NLS_TEXTDOMAIN")
+ AC_DEFINE_UNQUOTED(NLS_TEXTDOMAIN,"$NLS_TEXTDOMAIN",[Define to the nls textdomain value])
AC_SUBST(NLS_TEXTDOMAIN)
fi
@@ -1004,7 +1011,7 @@ if test "$USE_INCLUDED_LIBINTL" = yes ; then
INTLDIR_MAKE="#"
fi
if test -z "$INTLDIR_MAKE"; then
- AC_DEFINE(HAVE_LIBGETTEXT_H)
+ AC_DEFINE(HAVE_LIBGETTEXT_H,1,[Define to 1 if we have libgettext.h])
for cf_makefile in \
$srcdir/intl/Makefile.in \
$srcdir/intl/makefile.in
@@ -1047,17 +1054,43 @@ dnl own code, except ENABLE_NLS, which is too vague to be of any use.
if test "$USE_INCLUDED_LIBINTL" = yes ; then
if test "$nls_cv_force_use_gnu_gettext" = yes ; then
- AC_DEFINE(HAVE_GETTEXT)
+ AC_DEFINE(HAVE_GETTEXT,1,[Define to 1 if we have gettext function])
elif test "$nls_cv_use_gnu_gettext" = yes ; then
- AC_DEFINE(HAVE_GETTEXT)
+ AC_DEFINE(HAVE_GETTEXT,1,[Define to 1 if we have gettext function])
fi
if test -n "$nls_cv_header_intl" ; then
- AC_DEFINE(HAVE_LIBINTL_H)
+ AC_DEFINE(HAVE_LIBINTL_H,1,[Define to 1 if we have header-file for libintl])
fi
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CHECK_CACHE version: 11 updated: 2008/03/23 14:45:59
+dnl CF_CC_ENV_FLAGS version: 1 updated: 2012/10/03 05:25:49
+dnl ---------------
+dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
+dnl into CC. This will not help with broken scripts that wrap the compiler with
+dnl options, but eliminates a more common category of user confusion.
+AC_DEFUN([CF_CC_ENV_FLAGS],
+[
+# This should have been defined by AC_PROG_CC
+: ${CC:=cc}
+
+AC_MSG_CHECKING(\$CC variable)
+case "$CC" in #(vi
+*[[\ \ ]]-[[IUD]]*)
+ AC_MSG_RESULT(broken)
+ AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options)
+ # humor him...
+ cf_flags=`echo "$CC" | sed -e 's/^[[^ ]]*[[ ]]//'`
+ CC=`echo "$CC" | sed -e 's/[[ ]].*//'`
+ CF_ADD_CFLAGS($cf_flags)
+ ;;
+*)
+ AC_MSG_RESULT(ok)
+ ;;
+esac
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_CHECK_CACHE version: 12 updated: 2012/10/02 20:55:03
dnl --------------
dnl Check if we're accidentally using a cache from a different machine.
dnl Derive the system name, as a check for reusing the autoconf cache.
@@ -1080,7 +1113,7 @@ else
system_name="`(hostname) 2>/dev/null`"
fi
fi
-test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name")
+test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name",[Define to the system name.])
AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"])
test -z "$system_name" && system_name="$cf_cv_system_name"
@@ -1092,7 +1125,40 @@ if test ".$system_name" != ".$cf_cv_system_name" ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_CHTYPE version: 7 updated: 2010/10/23 15:54:49
+dnl CF_CLANG_COMPILER version: 1 updated: 2012/06/16 14:55:39
+dnl -----------------
+dnl Check if the given compiler is really clang. clang's C driver defines
+dnl __GNUC__ (fooling the configure script into setting $GCC to yes) but does
+dnl not ignore some gcc options.
+dnl
+dnl This macro should be run "soon" after AC_PROG_CC or AC_PROG_CPLUSPLUS, to
+dnl ensure that it is not mistaken for gcc/g++. It is normally invoked from
+dnl the wrappers for gcc and g++ warnings.
+dnl
+dnl $1 = GCC (default) or GXX
+dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS
+dnl $3 = CFLAGS (default) or CXXFLAGS
+AC_DEFUN([CF_CLANG_COMPILER],[
+ifelse([$2],,CLANG_COMPILER,[$2])=no
+
+if test "$ifelse([$1],,[$1],GCC)" = yes ; then
+ AC_MSG_CHECKING(if this is really Clang ifelse([$1],GXX,C++,C) compiler)
+ cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])"
+ ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -Qunused-arguments"
+ AC_TRY_COMPILE([],[
+#ifdef __clang__
+#else
+make an error
+#endif
+],[ifelse([$2],,CLANG_COMPILER,[$2])=yes
+cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
+],[])
+ ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS"
+ AC_MSG_RESULT($ifelse([$2],,CLANG_COMPILER,[$2]))
+fi
+])
+dnl ---------------------------------------------------------------------------
+dnl CF_CURSES_CHTYPE version: 8 updated: 2012/10/06 08:57:51
dnl ----------------
dnl Test if curses defines 'chtype' (usually a 'long' type for SysV curses).
AC_DEFUN([CF_CURSES_CHTYPE],
@@ -1104,14 +1170,14 @@ AC_CACHE_CHECK(for chtype typedef,cf_cv_chtype_decl,[
[cf_cv_chtype_decl=yes],
[cf_cv_chtype_decl=no])])
if test $cf_cv_chtype_decl = yes ; then
- AC_DEFINE(HAVE_TYPE_CHTYPE)
+ AC_DEFINE(HAVE_TYPE_CHTYPE,1,[Define to 1 if chtype is declared])
AC_CACHE_CHECK(if chtype is scalar or struct,cf_cv_chtype_type,[
AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>],
[chtype foo; long x = foo],
[cf_cv_chtype_type=scalar],
[cf_cv_chtype_type=struct])])
if test $cf_cv_chtype_type = scalar ; then
- AC_DEFINE(TYPE_CHTYPE_IS_SCALAR)
+ AC_DEFINE(TYPE_CHTYPE_IS_SCALAR,1,[Define to 1 if chtype is a scaler/integer])
fi
fi
])dnl
@@ -1227,7 +1293,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: 36 updated: 2012/07/07 21:02:48
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 +1373,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 tinfo termlib unknown
do
AC_CHECK_LIB($cf_term_lib,tgoto,[break])
done
@@ -1351,7 +1417,7 @@ fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_TERM_H version: 9 updated: 2011/04/09 18:19:55
+dnl CF_CURSES_TERM_H version: 10 updated: 2012/10/06 08:57:51
dnl ----------------
dnl SVr4 curses should have term.h as well (where it puts the definitions of
dnl the low-level interface). This may not be true in old/broken implementations,
@@ -1410,18 +1476,18 @@ esac
case $cf_cv_term_header in #(vi
term.h) #(vi
- AC_DEFINE(HAVE_TERM_H)
+ AC_DEFINE(HAVE_TERM_H,1,[Define to 1 if we have term.h])
;;
ncurses/term.h) #(vi
- AC_DEFINE(HAVE_NCURSES_TERM_H)
+ AC_DEFINE(HAVE_NCURSES_TERM_H,1,[Define to 1 if we have ncurses/term.h])
;;
ncursesw/term.h)
- AC_DEFINE(HAVE_NCURSESW_TERM_H)
+ AC_DEFINE(HAVE_NCURSESW_TERM_H,1,[Define to 1 if we have ncursesw/term.h])
;;
esac
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_UNCTRL_H version: 1 updated: 2011/04/09 18:19:55
+dnl CF_CURSES_UNCTRL_H version: 2 updated: 2012/10/06 08:57:51
dnl ------------------
dnl Any X/Open curses implementation must have unctrl.h, but ncurses packages
dnl may put it in a subdirectory (along with ncurses' other headers, of
@@ -1465,18 +1531,18 @@ esac
case $cf_cv_unctrl_header in #(vi
unctrl.h) #(vi
- AC_DEFINE(HAVE_UNCTRL_H)
+ AC_DEFINE(HAVE_UNCTRL_H,1,[Define to 1 if we have unctrl.h])
;;
ncurses/unctrl.h) #(vi
- AC_DEFINE(HAVE_NCURSES_UNCTRL_H)
+ AC_DEFINE(HAVE_NCURSES_UNCTRL_H,1,[Define to 1 if we have ncurses/unctrl.h])
;;
ncursesw/unctrl.h)
- AC_DEFINE(HAVE_NCURSESW_UNCTRL_H)
+ AC_DEFINE(HAVE_NCURSESW_UNCTRL_H,1,[Define to 1 if we have ncursesw/unctrl.h])
;;
esac
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_WACS_MAP version: 5 updated: 2011/01/15 11:28:59
+dnl CF_CURSES_WACS_MAP version: 6 updated: 2012/10/06 08:57:51
dnl ------------------
dnl Check for likely values of wacs_map[].
AC_DEFUN([CF_CURSES_WACS_MAP],
@@ -1495,10 +1561,10 @@ AC_CACHE_CHECK(for wide alternate character set array, cf_cv_curses_wacs_map,[
break])
done])
-test "$cf_cv_curses_wacs_map" != unknown && AC_DEFINE_UNQUOTED(CURSES_WACS_ARRAY,$cf_cv_curses_wacs_map)
+test "$cf_cv_curses_wacs_map" != unknown && AC_DEFINE_UNQUOTED(CURSES_WACS_ARRAY,$cf_cv_curses_wacs_map,[Define to name of (n)curses wide-character array])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_WACS_SYMBOLS version: 1 updated: 2011/01/15 11:28:59
+dnl CF_CURSES_WACS_SYMBOLS version: 2 updated: 2012/10/06 08:57:51
dnl ----------------------
dnl Do a check to see if the WACS_xxx constants are defined compatibly with
dnl X/Open Curses. In particular, NetBSD's implementation of the WACS_xxx
@@ -1530,7 +1596,31 @@ else
fi
])
-test "$cf_cv_curses_wacs_symbols" != no && AC_DEFINE(CURSES_WACS_SYMBOLS)
+test "$cf_cv_curses_wacs_symbols" != no && AC_DEFINE(CURSES_WACS_SYMBOLS,1,[Define to 1 if (n)curses supports wide-character WACS_ symbols])
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_CURSES_WGETPARENT version: 3 updated: 2012/10/06 08:57:51
+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,1,[Define to 1 if WINDOW struct has _parent member])
+ fi
+fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52
@@ -1538,7 +1628,7 @@ dnl ----------
dnl "dirname" is not portable, so we fake it with a shell script.
AC_DEFUN([CF_DIRNAME],[$1=`echo $2 | sed -e 's%/[[^/]]*$%%'`])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_DISABLE_ECHO version: 11 updated: 2009/12/13 13:16:57
+dnl CF_DISABLE_ECHO version: 12 updated: 2012/10/06 16:30:28
dnl ---------------
dnl You can always use "make -n" to see the actual options, but it's hard to
dnl pick out/analyze warning messages when the compile-line is long.
@@ -1553,7 +1643,7 @@ dnl
AC_DEFUN([CF_DISABLE_ECHO],[
AC_MSG_CHECKING(if you want to see long compiling messages)
CF_ARG_DISABLE(echo,
- [ --disable-echo display "compiling" commands],
+ [ --disable-echo do not display "compiling" commands],
[
ECHO_LT='--silent'
ECHO_LD='@echo linking [$]@;'
@@ -1618,38 +1708,6 @@ if test "$cf_disable_rpath_hack" = no ; then
fi
])
dnl ---------------------------------------------------------------------------
-dnl CF_FIND_HEADER version: 2 updated: 2007/07/29 11:32:00
-dnl --------------
-dnl Find a header file, searching for it if it is not already in the include
-dnl path.
-dnl
-dnl $1 = the header filename
-dnl $2 = the package name
-dnl $3 = action to perform if successful
-dnl $4 = action to perform if not successful
-AC_DEFUN([CF_FIND_HEADER],[
-AC_CHECK_HEADER([$1],
- cf_find_header=yes,[
- cf_find_header=no
-CF_HEADER_PATH(cf_search,$2)
-for cf_incdir in $cf_search
-do
- if test -f $cf_incdir/$1 ; then
- CF_ADD_INCDIR($cf_incdir)
- CF_VERBOSE(... found in $cf_incdir)
- cf_find_header=yes
- break
- fi
- CF_VERBOSE(... tested $cf_incdir)
-done
-])
-if test "$cf_find_header" = yes ; then
-ifelse([$3],,:,[$3])
-ifelse([$4],,,[else
-$4])
-fi
-])dnl
-dnl ---------------------------------------------------------------------------
dnl CF_FIND_LIBRARY version: 9 updated: 2008/03/23 14:48:54
dnl ---------------
dnl Look for a non-standard library, given parameters for AC_TRY_LINK. We
@@ -1830,7 +1888,7 @@ ifelse([$5],,AC_MSG_WARN(Cannot find $3 library),[$5])
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_FUNC_WAIT version: 2 updated: 1997/10/21 19:45:33
+dnl CF_FUNC_WAIT version: 3 updated: 2012/10/06 08:57:51
dnl ------------
dnl Test for the presence of <sys/wait.h>, 'union wait', arg-type of 'wait()'
dnl and/or 'waitpid()'.
@@ -1855,7 +1913,7 @@ if test $cf_cv_type_unionwait = yes; then
[cf_cv_arg_union_wait=no])
])
AC_MSG_RESULT($cf_cv_arg_union_wait)
- test $cf_cv_arg_union_wait = yes && AC_DEFINE(WAIT_USES_UNION)
+ test $cf_cv_arg_union_wait = yes && AC_DEFINE(WAIT_USES_UNION,1,[Define to 1 if wait() uses a union parameter])
AC_MSG_CHECKING(if union wait can be used as waitpid-arg)
AC_CACHE_VAL(cf_cv_arg_union_waitpid,[
@@ -1865,12 +1923,12 @@ if test $cf_cv_type_unionwait = yes; then
[cf_cv_arg_union_waitpid=no])
])
AC_MSG_RESULT($cf_cv_arg_union_waitpid)
- test $cf_cv_arg_union_waitpid = yes && AC_DEFINE(WAITPID_USES_UNION)
+ test $cf_cv_arg_union_waitpid = yes && AC_DEFINE(WAITPID_USES_UNION,1,[Define to 1 if waitpid() uses a union parameter])
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_GCC_ATTRIBUTES version: 14 updated: 2010/10/23 15:52:32
+dnl CF_GCC_ATTRIBUTES version: 16 updated: 2012/10/02 20:55:03
dnl -----------------
dnl Test for availability of useful gcc __attribute__ directives to quiet
dnl compiler warnings. Though useful, not all are supported -- and contrary
@@ -1948,27 +2006,27 @@ EOF
test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute)
cat conftest.h >>confdefs.h
case $cf_attribute in #(vi
+ noreturn) #(vi
+ AC_DEFINE_UNQUOTED(GCC_NORETURN,$cf_directive,[Define to noreturn-attribute for gcc])
+ ;;
printf) #(vi
- if test "$cf_printf_attribute" = no ; then
- cat >>confdefs.h <<EOF
-#define GCC_PRINTFLIKE(fmt,var) /* nothing */
-EOF
- else
- cat >>confdefs.h <<EOF
-#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
-EOF
+ cf_value='/* nothing */'
+ if test "$cf_printf_attribute" != no ; then
+ cf_value='__attribute__((format(printf,fmt,var)))'
+ AC_DEFINE(GCC_PRINTF,1,[Define to 1 if the compiler supports gcc-like printf attribute.])
fi
+ AC_DEFINE_UNQUOTED(GCC_PRINTFLIKE(fmt,var),$cf_value,[Define to printf-attribute for gcc])
;;
scanf) #(vi
- if test "$cf_scanf_attribute" = no ; then
- cat >>confdefs.h <<EOF
-#define GCC_SCANFLIKE(fmt,var) /* nothing */
-EOF
- else
- cat >>confdefs.h <<EOF
-#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
-EOF
+ cf_value='/* nothing */'
+ if test "$cf_scanf_attribute" != no ; then
+ cf_value='__attribute__((format(scanf,fmt,var)))'
+ AC_DEFINE(GCC_SCANF,1,[Define to 1 if the compiler supports gcc-like scanf attribute.])
fi
+ AC_DEFINE_UNQUOTED(GCC_SCANFLIKE(fmt,var),$cf_value,[Define to sscanf-attribute for gcc])
+ ;;
+ unused) #(vi
+ AC_DEFINE_UNQUOTED(GCC_UNUSED,$cf_directive,[Define to unused-attribute for gcc])
;;
esac
fi
@@ -1980,7 +2038,7 @@ rm -rf conftest*
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_GCC_VERSION version: 5 updated: 2010/04/24 11:02:31
+dnl CF_GCC_VERSION version: 7 updated: 2012/10/18 06:46:33
dnl --------------
dnl Find version of gcc
AC_DEFUN([CF_GCC_VERSION],[
@@ -1988,13 +2046,13 @@ AC_REQUIRE([AC_PROG_CC])
GCC_VERSION=none
if test "$GCC" = yes ; then
AC_MSG_CHECKING(version of $CC)
- GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
+ GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[[^)]]*) //' -e 's/^.*(Debian[[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
test -z "$GCC_VERSION" && GCC_VERSION=unknown
AC_MSG_RESULT($GCC_VERSION)
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_GCC_WARNINGS version: 27 updated: 2010/10/23 15:52:32
+dnl CF_GCC_WARNINGS version: 29 updated: 2012/06/16 14:55:39
dnl ---------------
dnl Check if the compiler supports useful warning options. There's a few that
dnl we don't use, simply because they're too noisy:
@@ -2017,6 +2075,7 @@ AC_DEFUN([CF_GCC_WARNINGS],
[
AC_REQUIRE([CF_GCC_VERSION])
CF_INTEL_COMPILER(GCC,INTEL_COMPILER,CFLAGS)
+CF_CLANG_COMPILER(GCC,CLANG_COMPILER,CFLAGS)
cat > conftest.$ac_ext <<EOF
#line __oline__ "${as_me:-configure}"
@@ -2092,6 +2151,13 @@ then
continue;;
esac
;;
+ Wpointer-arith) #(vi
+ case $GCC_VERSION in
+ [[12]].*)
+ CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
+ continue;;
+ esac
+ ;;
esac
EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
fi
@@ -2190,77 +2256,6 @@ test -d "$oldincludedir" && {
$1="[$]$1 $cf_header_path_list"
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_HELP_MESSAGE version: 3 updated: 1998/01/14 10:56:23
-dnl ---------------
-dnl Insert text into the help-message, for readability, from AC_ARG_WITH.
-AC_DEFUN([CF_HELP_MESSAGE],
-[AC_DIVERT_HELP([$1])dnl
-])dnl
-dnl ---------------------------------------------------------------------------
-dnl CF_INCLUDE_DIRS version: 6 updated: 2009/01/06 19:37:40
-dnl ---------------
-dnl Construct the list of include-options according to whether we're building
-dnl in the source directory or using '--srcdir=DIR' option. If we're building
-dnl with gcc, don't append the includedir if it happens to be /usr/include,
-dnl since that usually breaks gcc's shadow-includes.
-AC_DEFUN([CF_INCLUDE_DIRS],
-[
-CPPFLAGS="$CPPFLAGS -I. -I../include"
-if test "$srcdir" != "."; then
- CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
-fi
-if test "$GCC" != yes; then
- CPPFLAGS="$CPPFLAGS -I\${includedir}"
-elif test "$includedir" != "/usr/include"; then
- if test "$includedir" = '${prefix}/include' ; then
- if test $prefix != /usr ; then
- CPPFLAGS="$CPPFLAGS -I\${includedir}"
- fi
- else
- CPPFLAGS="$CPPFLAGS -I\${includedir}"
- fi
-fi
-AC_SUBST(CPPFLAGS)
-])dnl
-dnl ---------------------------------------------------------------------------
-dnl CF_INCLUDE_PATH version: 5 updated: 2010/01/17 20:36:17
-dnl ---------------
-dnl Adds to the include-path
-dnl
-dnl Autoconf 1.11 should have provided a way to add include path options to
-dnl the cpp-tests.
-dnl
-AC_DEFUN([CF_INCLUDE_PATH],
-[
-$1=
-for cf_path in $1
-do
- cf_result="no"
- AC_MSG_CHECKING(for directory $cf_path)
- if test -d $cf_path
- then
- INCLUDES="$INCLUDES -I$cf_path"
- ac_cpp="${ac_cpp} -I$cf_path"
- CFLAGS="$CFLAGS -I$cf_path"
- cf_result="yes"
- case $cf_path in
- /usr/include|/usr/include/*)
- ;;
- *)
- CF_DIRNAME(cf_temp,$cf_path)
- case $cf_temp in
- */include)
- INCLUDES="$INCLUDES -I$cf_temp"
- ac_cpp="${ac_cpp} -I$cf_temp"
- CFLAGS="$CFLAGS -I$cf_temp"
- ;;
- esac
- esac
- fi
- AC_MSG_RESULT($cf_result)
-done
-])dnl
-dnl ---------------------------------------------------------------------------
dnl CF_INTEL_COMPILER version: 4 updated: 2010/05/26 05:38:42
dnl -----------------
dnl Check if the given compiler is really the Intel compiler for Linux. It
@@ -2298,7 +2293,7 @@ cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_LARGEFILE version: 7 updated: 2007/06/02 11:58:50
+dnl CF_LARGEFILE version: 8 updated: 2012/10/06 08:57:51
dnl ------------
dnl Add checks for large file support.
AC_DEFUN([CF_LARGEFILE],[
@@ -2332,12 +2327,12 @@ ifdef([AC_FUNC_FSEEKO],[
[cf_cv_struct_dirent64=yes],
[cf_cv_struct_dirent64=no])
])
- test "$cf_cv_struct_dirent64" = yes && AC_DEFINE(HAVE_STRUCT_DIRENT64)
+ test "$cf_cv_struct_dirent64" = yes && AC_DEFINE(HAVE_STRUCT_DIRENT64,1,[Define to 1 if we have struct dirent64])
fi
])
])
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 +2356,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 +2415,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
@@ -2538,7 +2533,7 @@ ifelse($1,,[
fi
])
dnl ---------------------------------------------------------------------------
-dnl CF_MBSTATE_T version: 3 updated: 2007/03/25 15:55:36
+dnl CF_MBSTATE_T version: 4 updated: 2012/10/06 08:57:51
dnl ------------
dnl Check if mbstate_t is declared, and if so, which header file.
dnl This (including wchar.h) is needed on Tru64 5.0 to declare mbstate_t,
@@ -2566,15 +2561,15 @@ AC_TRY_COMPILE([
[cf_cv_mbstate_t=unknown])])])
if test "$cf_cv_mbstate_t" = yes ; then
- AC_DEFINE(NEED_WCHAR_H)
+ AC_DEFINE(NEED_WCHAR_H,1,[Define to 1 if we must include wchar.h])
fi
if test "$cf_cv_mbstate_t" != unknown ; then
- AC_DEFINE(HAVE_MBSTATE_T)
+ AC_DEFINE(HAVE_MBSTATE_T,1,[Define to 1 if mbstate_t is declared])
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_MIXEDCASE_FILENAMES version: 3 updated: 2003/09/20 17:07:55
+dnl CF_MIXEDCASE_FILENAMES version: 4 updated: 2012/10/02 20:55:03
dnl ----------------------
dnl Check if the file-system supports mixed-case filenames. If we're able to
dnl create a lowercase name and see it as uppercase, it doesn't support that.
@@ -2601,7 +2596,7 @@ else
rm -f conftest CONFTEST
fi
])
-test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES)
+test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES,1,[Define to 1 if filesystem supports mixed-case filenames.])
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_MSG_LOG version: 5 updated: 2010/10/23 15:52:32
@@ -2645,7 +2640,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: 10 updated: 2012/10/06 08:57:51
dnl -----------------
dnl Tie together the configure-script macros for ncurses.
dnl Prefer the "-config" script from ncurses 6.x, to simplify analysis.
@@ -2657,7 +2652,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
@@ -2668,7 +2666,7 @@ CF_ADD_LIBS(`$NCURSES_CONFIG --libs`)
CF_CURSES_HEADER(ifelse($1,,ncurses,$1))
dnl like CF_NCURSES_CPPFLAGS
-AC_DEFINE(NCURSES)
+AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries])
dnl like CF_NCURSES_LIBS
CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_ncuconfig_root)
@@ -2685,7 +2683,7 @@ CF_NCURSES_LIBS(ifelse($1,,ncurses,$1))
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_NCURSES_CPPFLAGS version: 20 updated: 2010/11/20 17:02:38
+dnl CF_NCURSES_CPPFLAGS version: 21 updated: 2012/10/06 08:57:51
dnl -------------------
dnl Look for the SVr4 curses clone 'ncurses' in the standard places, adjusting
dnl the CPPFLAGS variable so we can include its header.
@@ -2731,12 +2729,12 @@ CF_NCURSES_HEADER
CF_TERM_HEADER
# some applications need this, but should check for NCURSES_VERSION
-AC_DEFINE(NCURSES)
+AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries])
CF_NCURSES_VERSION
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_NCURSES_HEADER version: 2 updated: 2008/03/23 14:48:54
+dnl CF_NCURSES_HEADER version: 3 updated: 2012/10/06 08:57:51
dnl -----------------
dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common
dnl variations of ncurses' installs.
@@ -2787,16 +2785,16 @@ fi
case $cf_cv_ncurses_header in # (vi
*ncurses.h)
- AC_DEFINE(HAVE_NCURSES_H)
+ AC_DEFINE(HAVE_NCURSES_H,1,[Define to 1 if we have ncurses.h])
;;
esac
case $cf_cv_ncurses_header in # (vi
ncurses/curses.h|ncurses/ncurses.h)
- AC_DEFINE(HAVE_NCURSES_NCURSES_H)
+ AC_DEFINE(HAVE_NCURSES_NCURSES_H,1,[Define to 1 if we have ncurses/ncurses.h])
;;
ncursesw/curses.h|ncursesw/ncurses.h)
- AC_DEFINE(HAVE_NCURSESW_NCURSES_H)
+ AC_DEFINE(HAVE_NCURSESW_NCURSES_H,1,[Define to 1 if we have ncursesw/ncurses.h])
;;
esac
@@ -2870,7 +2868,7 @@ CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_nculib_root)
AC_DEFINE_UNQUOTED($cf_nculib_ROOT)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_NCURSES_VERSION version: 13 updated: 2010/10/23 15:54:49
+dnl CF_NCURSES_VERSION version: 14 updated: 2012/10/06 08:57:51
dnl ------------------
dnl Check for the version of ncurses, to aid in reporting bugs, etc.
dnl Call CF_CURSES_CPPFLAGS first, or CF_NCURSES_CPPFLAGS. We don't use
@@ -2929,17 +2927,17 @@ EOF
])
rm -f $cf_tempfile
])
-test "$cf_cv_ncurses_version" = no || AC_DEFINE(NCURSES)
+test "$cf_cv_ncurses_version" = no || AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_NO_LEAKS_OPTION version: 4 updated: 2006/12/16 14:24:05
+dnl CF_NO_LEAKS_OPTION version: 5 updated: 2012/10/02 20:55:03
dnl ------------------
dnl see CF_WITH_NO_LEAKS
AC_DEFUN([CF_NO_LEAKS_OPTION],[
AC_MSG_CHECKING(if you want to use $1 for testing)
AC_ARG_WITH($1,
[$2],
- [AC_DEFINE($3)ifelse([$4],,[
+ [AC_DEFINE_UNQUOTED($3,1,"Define to 1 if you want to use $1 for testing.")ifelse([$4],,[
$4
])
: ${with_cflags:=-g}
@@ -2998,20 +2996,23 @@ AC_SUBST(MSG_DIR_MAKE)
AC_SUBST(SUB_MAKEFILE)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_PATHSEP version: 5 updated: 2010/05/26 05:38:42
+dnl CF_PATHSEP version: 6 updated: 2012/09/29 18:38:12
dnl ----------
-dnl Provide a value for the $PATH and similar separator
+dnl Provide a value for the $PATH and similar separator (or amend the value
+dnl as provided in autoconf 2.5x).
AC_DEFUN([CF_PATHSEP],
[
+ AC_MSG_CHECKING(for PATH separator)
case $cf_cv_system_name in
os2*) PATH_SEPARATOR=';' ;;
- *) PATH_SEPARATOR=':' ;;
+ *) ${PATH_SEPARATOR:=':'} ;;
esac
ifelse([$1],,,[$1=$PATH_SEPARATOR])
AC_SUBST(PATH_SEPARATOR)
+ AC_MSG_RESULT($PATH_SEPARATOR)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_PATH_SYNTAX version: 13 updated: 2010/05/26 05:38:42
+dnl CF_PATH_SYNTAX version: 14 updated: 2012/06/19 20:58:54
dnl --------------
dnl Check the argument to see that it looks like a pathname. Rewrite it if it
dnl begins with one of the prefix/exec_prefix variables, and then again if the
@@ -3031,7 +3032,7 @@ case ".[$]$1" in #(vi
;;
.[[a-zA-Z]]:[[\\/]]*) #(vi OS/2 EMX
;;
-.\[$]{*prefix}*) #(vi
+.\[$]{*prefix}*|.\[$]{*dir}*) #(vi
eval $1="[$]$1"
case ".[$]$1" in #(vi
.NONE/*)
@@ -3121,32 +3122,20 @@ fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_PROG_CC_U_D version: 1 updated: 2005/07/14 16:59:30
-dnl --------------
-dnl Check if C (preprocessor) -U and -D options are processed in the order
-dnl given rather than by type of option. Some compilers insist on apply all
-dnl of the -U options after all of the -D options. Others allow mixing them,
-dnl and may predefine symbols that conflict with those we define.
-AC_DEFUN([CF_PROG_CC_U_D],
-[
-AC_CACHE_CHECK(if $CC -U and -D options work together,cf_cv_cc_u_d_options,[
- cf_save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
- AC_TRY_COMPILE([],[
-#ifndef U_D_OPTIONS
-make an undefined-error
-#endif
-#ifdef D_U_OPTIONS
-make a defined-error
-#endif
- ],[
- cf_cv_cc_u_d_options=yes],[
- cf_cv_cc_u_d_options=no])
- CPPFLAGS="$cf_save_CPPFLAGS"
-])
+dnl CF_PROG_CC version: 3 updated: 2012/10/06 15:31:55
+dnl ----------
+dnl standard check for CC, plus followup sanity checks
+dnl $1 = optional parameter to pass to AC_PROG_CC to specify compiler name
+AC_DEFUN([CF_PROG_CC],[
+ifelse($1,,[AC_PROG_CC],[AC_PROG_CC($1)])
+CF_GCC_VERSION
+CF_ACVERSION_CHECK(2.52,
+ [AC_PROG_CC_STDC],
+ [CF_ANSI_CC_REQD])
+CF_CC_ENV_FLAGS
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_PROG_EXT version: 10 updated: 2004/01/03 19:28:18
+dnl CF_PROG_EXT version: 11 updated: 2012/10/06 08:57:51
dnl -----------
dnl Compute $PROG_EXT, used for non-Unix ports, such as OS/2 EMX.
AC_DEFUN([CF_PROG_EXT],
@@ -3168,7 +3157,15 @@ AC_OBJEXT
PROG_EXT="$EXEEXT"
AC_SUBST(PROG_EXT)
-test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT")
+test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT",[Define to the program extension (normally blank)])
+])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
@@ -3320,58 +3317,7 @@ CF_ADD_SUBDIR_PATH($1,$2,$3,/opt,$prefix)
CF_ADD_SUBDIR_PATH($1,$2,$3,[$]HOME,$prefix)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_SUBST version: 4 updated: 2006/06/17 12:33:03
-dnl --------
-dnl Shorthand macro for substituting things that the user may override
-dnl with an environment variable.
-dnl
-dnl $1 = long/descriptive name
-dnl $2 = environment variable
-dnl $3 = default value
-AC_DEFUN([CF_SUBST],
-[AC_CACHE_VAL(cf_cv_subst_$2,[
-AC_MSG_CHECKING(for $1 (symbol $2))
-CF_SUBST_IF([-z "[$]$2"], [$2], [$3])
-cf_cv_subst_$2=[$]$2
-AC_MSG_RESULT([$]$2)
-])
-])dnl
-dnl ---------------------------------------------------------------------------
-dnl CF_SYSTYPE version: 3 updated: 2001/02/03 00:14:59
-dnl ----------
-dnl Derive the system-type (our main clue to the method of building shared
-dnl libraries).
-AC_DEFUN([CF_SYSTYPE],
-[
-AC_MSG_CHECKING(for system type)
-AC_CACHE_VAL(cf_cv_systype,[
-AC_ARG_WITH(system-type,
-[ --with-system-type=XXX test: override derived host system-type],
-[cf_cv_systype=$withval],
-[
-cf_cv_systype="`(uname -s || hostname || echo unknown) 2>/dev/null |sed -e s'/[[:\/.-]]/_/'g | sed 1q`"
-if test -z "$cf_cv_systype"; then cf_cv_systype=unknown;fi
-])])
-AC_MSG_RESULT($cf_cv_systype)
-])dnl
-dnl ---------------------------------------------------------------------------
-dnl CF_SYS_NAME version: 3 updated: 2008/03/23 14:48:54
-dnl -----------
-dnl Derive the system name, as a check for reusing the autoconf cache
-AC_DEFUN([CF_SYS_NAME],
-[
-SYS_NAME=`(uname -s -r || uname -a || hostname) 2>/dev/null | sed 1q`
-test -z "$SYS_NAME" && SYS_NAME=unknown
-AC_DEFINE_UNQUOTED(SYS_NAME,"$SYS_NAME")
-
-AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$SYS_NAME"])
-
-if test ".$SYS_NAME" != ".$cf_cv_system_name" ; then
- AC_MSG_RESULT("Cached system name does not agree with actual")
- AC_MSG_ERROR("Please remove config.cache and try again.")
-fi])
-dnl ---------------------------------------------------------------------------
-dnl CF_TERM_HEADER version: 2 updated: 2010/10/23 15:54:49
+dnl CF_TERM_HEADER version: 3 updated: 2012/10/06 08:57:51
dnl --------------
dnl Look for term.h, which is part of X/Open curses. It defines the interface
dnl to terminfo database. Usually it is in the same include-path as curses.h,
@@ -3404,21 +3350,60 @@ done
case $cf_cv_term_header in # (vi
*term.h)
- AC_DEFINE(HAVE_TERM_H)
+ AC_DEFINE(HAVE_TERM_H,1,[Define to 1 if we have term.h])
;;
esac
case $cf_cv_term_header in # (vi
ncurses/term.h) #(vi
- AC_DEFINE(HAVE_NCURSES_TERM_H)
+ AC_DEFINE(HAVE_NCURSES_TERM_H,1,[Define to 1 if we have ncurses/term.h])
;;
ncursesw/term.h)
- AC_DEFINE(HAVE_NCURSESW_TERM_H)
+ AC_DEFINE(HAVE_NCURSESW_TERM_H,1,[Define to 1 if we have ncursesw/term.h])
;;
esac
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_UNION_WAIT version: 5 updated: 1997/11/23 14:49:44
+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: 6 updated: 2012/10/06 08:57:51
dnl -------------
dnl Check to see if the BSD-style union wait is declared. Some platforms may
dnl use this, though it is deprecated in favor of the 'int' type in Posix.
@@ -3461,7 +3446,7 @@ AC_CACHE_VAL(cf_cv_type_unionwait,[
],
[cf_cv_type_unionwait=no])])])
AC_MSG_RESULT($cf_cv_type_unionwait)
-test $cf_cv_type_unionwait = yes && AC_DEFINE(HAVE_TYPE_UNIONWAIT)
+test $cf_cv_type_unionwait = yes && AC_DEFINE(HAVE_TYPE_UNIONWAIT,1,[Define to 1 if type unionwait is declared])
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_UPPER version: 5 updated: 2001/01/29 23:40:59
@@ -3473,7 +3458,7 @@ AC_DEFUN([CF_UPPER],
$1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_UTF8_LIB version: 7 updated: 2010/06/20 09:24:28
+dnl CF_UTF8_LIB version: 8 updated: 2012/10/06 08:57:51
dnl -----------
dnl Check for multibyte support, and if not found, utf8 compatibility library
AC_DEFUN([CF_UTF8_LIB],
@@ -3492,7 +3477,7 @@ AC_CACHE_CHECK(for multibyte character support,cf_cv_utf8_lib,[
# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
# ncurses/ncursesw:
if test "$cf_cv_utf8_lib" = "add-on" ; then
- AC_DEFINE(HAVE_LIBUTF8_H)
+ AC_DEFINE(HAVE_LIBUTF8_H,1,[Define to 1 if we should include libutf8.h])
CF_ADD_INCDIR($cf_cv_header_path_utf8)
CF_ADD_LIBDIR($cf_cv_library_path_utf8)
CF_ADD_LIBS($cf_cv_library_file_utf8)
@@ -3507,7 +3492,7 @@ AC_DEFUN([CF_VERBOSE],
CF_MSG_LOG([$1])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_VERSION_INFO version: 4 updated: 2011/01/02 19:09:47
+dnl CF_VERSION_INFO version: 5 updated: 2012/10/06 08:57:51
dnl ---------------
dnl Define several useful symbols derived from the VERSION file. A separate
dnl file is preferred to embedding the version numbers in various scripts.
@@ -3587,7 +3572,7 @@ dnl need the package name to ensure that the defined symbols are unique.
ifelse($1,,,[
cf_PACKAGE=$1
PACKAGE=ifelse($2,,$1,$2)
- AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
+ AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE",[Define to the package-name])
AC_SUBST(PACKAGE)
CF_UPPER(cf_PACKAGE,$cf_PACKAGE)
AC_DEFINE_UNQUOTED(${cf_PACKAGE}_VERSION,"${VERSION_MAJOR}.${VERSION_MINOR}")
@@ -3680,7 +3665,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 +3766,7 @@ ifdef([AC_PROG_LIBTOOL],[
# special hack to add -no-undefined (which libtool should do for itself)
LT_UNDEF=
case "$cf_cv_system_name" in #(vi
- cygwin*|mingw32*|uwin*|aix[[456]]) #(vi
+ cygwin*|mingw32*|uwin*|aix[[4-7]]) #(vi
LT_UNDEF=-no-undefined
;;
esac
@@ -3847,7 +3832,7 @@ esac
AC_SUBST(LIBTOOL_OPTS)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_WITH_NO_LEAKS version: 1 updated: 2006/12/14 18:00:21
+dnl CF_WITH_NO_LEAKS version: 2 updated: 2012/10/06 08:57:51
dnl ----------------
AC_DEFUN([CF_WITH_NO_LEAKS],[
@@ -3859,11 +3844,11 @@ AC_REQUIRE([CF_WITH_VALGRIND])
AC_MSG_CHECKING(if you want to perform memory-leak testing)
AC_ARG_WITH(no-leaks,
[ --with-no-leaks test: free permanent memory, analyze leaks],
- [AC_DEFINE(NO_LEAKS)
+ [AC_DEFINE(NO_LEAKS,1,[Define to 1 to enable leak-checking])
cf_doalloc=".${with_dmalloc}${with_dbmalloc}${with_purify}${with_valgrind}"
case ${cf_doalloc} in #(vi
*yes*) ;;
- *) AC_DEFINE(DOALLOC,10000) ;;
+ *) AC_DEFINE(DOALLOC,10000,[Define to size of malloc-array]) ;;
esac
with_no_leaks=yes],
[with_no_leaks=])
@@ -3950,7 +3935,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 +3951,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 +3962,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 +3980,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 +4010,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 +4022,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
diff --git a/contrib/dialog/argv.c b/contrib/dialog/argv.c
index c090290440629..7416054543bee 100644
--- a/contrib/dialog/argv.c
+++ b/contrib/dialog/argv.c
@@ -1,9 +1,9 @@
/*
- * $Id: argv.c,v 1.1 2011/03/02 09:56:39 tom Exp $
+ * $Id: argv.c,v 1.2 2012/11/30 20:28:23 tom Exp $
*
* argv - Reusable functions for argv-parsing.
*
- * Copyright 2011 Thomas E. Dickey
+ * Copyright 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
@@ -56,12 +56,6 @@ dlg_string_to_argv(char *blob)
}
} else if (blob[n] == '\\') {
if (quoted && !isspace(UCH(blob[n + 1]))) {
- if (!inparm) {
- if (pass)
- result[count] = param;
- ++count;
- inparm = TRUE;
- }
if (pass) {
*param++ = blob[n];
*param++ = blob[n + 1];
diff --git a/contrib/dialog/arrows.c b/contrib/dialog/arrows.c
index 6a25fd94f825c..5e5c7231f6b93 100644
--- a/contrib/dialog/arrows.c
+++ b/contrib/dialog/arrows.c
@@ -1,9 +1,9 @@
/*
- * $Id: arrows.c,v 1.36 2011/06/27 09:13:56 tom Exp $
+ * $Id: arrows.c,v 1.50 2013/05/24 00:05:21 tom Exp $
*
* arrows.c -- draw arrows to indicate end-of-range for lists
*
- * Copyright 2000-2010,2011 Thomas E. Dickey
+ * Copyright 2000-2012,2013 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -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, borderattr));
(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,43 +187,57 @@ 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);
}
}
-#define BARSIZE(num) (int) (((all_high * (num)) + all_high - 1) / total_data)
+#define BARSIZE(num) (int) (0.5 + (double) ((all_high * (int) (num)) / (double) total_data))
+#define ORDSIZE(num) (int) ((double) ((all_high * (int) (num)) / (double) all_diff))
if (dialog_state.use_scrollbar) {
int all_high = (bottom - top - 1);
+ this_data = MAX(0, this_data);
+
if (total_data > 0 && all_high > 0) {
+ int all_diff = (int) (total_data + 1);
+ int bar_diff = (int) (next_data + 1 - this_data);
int bar_high;
int bar_y;
- bar_high = BARSIZE(next_data - this_data);
+ bar_high = ORDSIZE(bar_diff);
if (bar_high <= 0)
bar_high = 1;
if (bar_high < all_high) {
+ int bar_last = BARSIZE(next_data);
+
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);
- if (bar_y > all_high - bar_high)
- bar_y = all_high - bar_high;
+ bar_y = ORDSIZE(this_data);
+ if (bar_y >= bar_last && bar_y > 0)
+ bar_y = bar_last - 1;
+ if (bar_last - bar_y > bar_high && bar_high > 1)
+ ++bar_y;
+ bar_last = MIN(bar_last, all_high);
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);
+#if defined(WACS_BLOCK) && defined(NCURSES_VERSION) && defined(USE_WIDE_CURSES)
+ wvline_set(win, WACS_BLOCK, bar_last - bar_y);
+#else
+ wvline(win, ACS_BLOCK, bar_last - bar_y);
+#endif
}
}
}
@@ -236,7 +250,7 @@ dlg_draw_scrollbar(WINDOW *win,
attr,
borderattr);
- wattrset(win, save);
+ (void) wattrset(win, save);
wmove(win, oldy, oldx);
}
@@ -255,6 +269,6 @@ dlg_draw_arrows(WINDOW *win,
x,
top,
bottom,
- menubox_attr,
+ menubox_border2_attr,
menubox_border_attr);
}
diff --git a/contrib/dialog/buildlist.c b/contrib/dialog/buildlist.c
new file mode 100644
index 0000000000000..cb7c6009d13c9
--- /dev/null
+++ b/contrib/dialog/buildlist.c
@@ -0,0 +1,1111 @@
+/*
+ * $Id: buildlist.c,v 1.57 2013/03/17 13:46:30 tom Exp $
+ *
+ * buildlist.c -- implements the buildlist dialog
+ *
+ * Copyright 2012,2013 Thomas E. Dickey
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License, version 2.1
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to
+ * Free Software Foundation, Inc.
+ * 51 Franklin St., Fifth Floor
+ * Boston, MA 02110, USA.
+ */
+
+#include <dialog.h>
+#include <dlg_keys.h>
+
+/*
+ * Visually like menubox, but two columns.
+ */
+
+#define sLEFT (-2)
+#define sRIGHT (-1)
+
+#define KEY_TOGGLE ' '
+#define KEY_LEFTCOL '^'
+#define KEY_RIGHTCOL '$'
+
+#define MIN_HIGH (1 + (5 * MARGIN))
+
+typedef struct {
+ WINDOW *win;
+ int box_y;
+ int box_x;
+ int top_index;
+ int cur_index;
+} MY_DATA;
+
+typedef struct {
+ DIALOG_LISTITEM *items;
+ int base_y; /* base for mouse coordinates */
+ int base_x;
+ int use_height; /* actual size of column box */
+ int use_width;
+ int item_no;
+ int check_x;
+ int item_x;
+ MY_DATA list[2];
+} ALL_DATA;
+
+/*
+ * Print list item. The 'selected' parameter is true if 'choice' is the
+ * current item. That one is colored differently from the other items.
+ */
+static void
+print_item(ALL_DATA * data,
+ WINDOW *win,
+ DIALOG_LISTITEM * item,
+ int choice,
+ int selected)
+{
+ chtype save = dlg_get_attrs(win);
+ int i;
+ bool both = (!dialog_vars.no_tags && !dialog_vars.no_items);
+ bool first = TRUE;
+ int climit = (data->item_x - data->check_x - 1);
+ const char *show = (dialog_vars.no_items
+ ? item->name
+ : item->text);
+
+ /* Clear 'residue' of last item */
+ (void) wattrset(win, menubox_attr);
+ (void) wmove(win, choice, 0);
+ for (i = 0; i < getmaxx(win); i++)
+ (void) waddch(win, ' ');
+
+ (void) wmove(win, choice, data->check_x);
+ (void) wattrset(win, menubox_attr);
+
+ if (both) {
+ dlg_print_listitem(win, item->name, climit, first, selected);
+ (void) waddch(win, ' ');
+ first = FALSE;
+ }
+
+ (void) wmove(win, choice, data->item_x);
+ climit = (getmaxx(win) - data->item_x + 1);
+ dlg_print_listitem(win, show, climit, first, selected);
+
+ if (selected) {
+ dlg_item_help(item->help);
+ }
+ (void) wattrset(win, save);
+}
+
+/*
+ * Prints either the left (unselected) or right (selected) list.
+ */
+static void
+print_1_list(ALL_DATA * data,
+ int choice,
+ int selected)
+{
+ MY_DATA *moi = data->list + selected;
+ WINDOW *win = moi->win;
+ int i, j;
+ int last = 0;
+ int max_rows = getmaxy(win);
+
+ for (i = j = 0; j < max_rows; i++) {
+ int ii = i + moi->top_index;
+ if (ii >= data->item_no) {
+ break;
+ } else if (!(selected ^ (data->items[ii].state != 0))) {
+ print_item(data,
+ win,
+ &data->items[ii],
+ j, ii == choice);
+ last = ++j;
+ }
+ }
+ if (wmove(win, last, 0) != ERR)
+ wclrtobot(win);
+ (void) wnoutrefresh(win);
+}
+
+/*
+ * Return the previous item from the list, staying in the same column. If no
+ * further movement is possible, return the same choice as given.
+ */
+static int
+prev_item(ALL_DATA * data, int choice, int selected)
+{
+ int result = choice;
+ int n;
+
+ for (n = choice - 1; n >= 0; --n) {
+ if ((data->items[n].state != 0) == selected) {
+ result = n;
+ break;
+ }
+ }
+ return result;
+}
+
+/*
+ * Return true if the given choice is on the first page in the current column.
+ */
+static bool
+stop_prev(ALL_DATA * data, int choice, int selected)
+{
+ return (prev_item(data, choice, selected) == choice);
+}
+
+static bool
+check_hotkey(DIALOG_LISTITEM * items, int choice, int selected)
+{
+ bool result = FALSE;
+
+ if ((items[choice].state != 0) == selected) {
+ if (dlg_match_char(dlg_last_getc(),
+ (dialog_vars.no_tags
+ ? items[choice].text
+ : items[choice].name))) {
+ result = TRUE;
+ }
+ }
+ return result;
+}
+
+/*
+ * Return the next item from the list, staying in the same column. If no
+ * further movement is possible, return the same choice as given.
+ */
+static int
+next_item(ALL_DATA * data, int choice, int selected)
+{
+ int result = choice;
+ int n;
+
+ for (n = choice + 1; n < data->item_no; ++n) {
+ if ((data->items[n].state != 0) == selected) {
+ result = n;
+ break;
+ }
+ }
+ dlg_trace_msg("next_item(%d) ->%d\n", choice, result);
+ return result;
+}
+
+/*
+ * Translate a choice from items[] to a row-number in an unbounded column,
+ * starting at zero.
+ */
+static int
+index2row(ALL_DATA * data, int choice, int selected)
+{
+ int result = -1;
+ int n;
+ for (n = 0; n < data->item_no; ++n) {
+ if ((data->items[n].state != 0) == selected) {
+ ++result;
+ }
+ if (n == choice)
+ break;
+ }
+ return result;
+}
+
+/*
+ * Return the first choice from items[] for the given column.
+ */
+static int
+first_item(ALL_DATA * data, int selected)
+{
+ int result = -1;
+ int n;
+
+ for (n = 0; n < data->item_no; ++n) {
+ if ((data->items[n].state != 0) == selected) {
+ result = n;
+ break;
+ }
+ }
+ return result;
+}
+
+/*
+ * Return the last choice from items[] for the given column.
+ */
+static int
+last_item(ALL_DATA * data, int selected)
+{
+ int result = -1;
+ int n;
+
+ for (n = data->item_no - 1; n >= 0; --n) {
+ if ((data->items[n].state != 0) == selected) {
+ result = n;
+ break;
+ }
+ }
+ return result;
+}
+
+/*
+ * Convert a row-number back to an item number, i.e., index into items[].
+ */
+static int
+row2index(ALL_DATA * data, int row, int selected)
+{
+ int result = -1;
+ int n;
+ for (n = 0; n < data->item_no; ++n) {
+ if ((data->items[n].state != 0) == selected) {
+ if (row-- <= 0) {
+ result = n;
+ break;
+ }
+ }
+ }
+ return result;
+}
+
+static int
+skip_rows(ALL_DATA * data, int row, int skip, int selected)
+{
+ int choice = row2index(data, row, selected);
+ int result = row;
+ int n;
+ if (skip > 0) {
+ for (n = choice + 1; n < data->item_no; ++n) {
+ if ((data->items[n].state != 0) == selected) {
+ ++result;
+ if (--skip <= 0)
+ break;
+ }
+ }
+ } else if (skip < 0) {
+ for (n = choice - 1; n >= 0; --n) {
+ if ((data->items[n].state != 0) == selected) {
+ --result;
+ if (++skip >= 0)
+ break;
+ }
+ }
+ }
+ return result;
+}
+
+/*
+ * Find the closest item in the given column starting with the given choice.
+ */
+static int
+closest_item(ALL_DATA * data, int choice, int selected)
+{
+ int prev = choice;
+ int next = choice;
+ int result = choice;
+ int n;
+
+ for (n = choice; n >= 0; --n) {
+ if ((data->items[n].state != 0) == selected) {
+ prev = n;
+ break;
+ }
+ }
+ for (n = choice; n < data->item_no; ++n) {
+ if ((data->items[n].state != 0) == selected) {
+ next = n;
+ break;
+ }
+ }
+ if (prev != choice) {
+ result = prev;
+ if (next != choice) {
+ if ((choice - prev) > (next - choice)) {
+ result = next;
+ }
+ }
+ } else if (next != choice) {
+ result = next;
+ }
+ return result;
+}
+
+static void
+print_both(ALL_DATA * data,
+ int choice)
+{
+ int selected;
+ int cur_y, cur_x;
+ WINDOW *dialog = wgetparent(data->list[0].win);
+
+ getyx(dialog, cur_y, cur_x);
+ for (selected = 0; selected < 2; ++selected) {
+ MY_DATA *moi = data->list + selected;
+ WINDOW *win = moi->win;
+ int thumb_top = index2row(data, moi->top_index, selected);
+ int thumb_max = index2row(data, -1, selected);
+ int thumb_end = thumb_top + getmaxy(win);
+
+ print_1_list(data, choice, selected);
+
+ dlg_mouse_setcode(selected * KEY_MAX);
+ dlg_draw_scrollbar(dialog,
+ (long) (moi->top_index),
+ (long) (thumb_top),
+ (long) MIN(thumb_end, thumb_max),
+ (long) thumb_max,
+ moi->box_x + data->check_x,
+ moi->box_x + getmaxx(win),
+ moi->box_y,
+ moi->box_y + getmaxy(win) + 1,
+ menubox_border2_attr,
+ menubox_border_attr);
+ }
+ (void) wmove(dialog, cur_y, cur_x);
+ dlg_mouse_setcode(0);
+}
+
+static void
+set_top_item(ALL_DATA * data, int value, int selected)
+{
+ if (value != data->list[selected].top_index) {
+ dlg_trace_msg("set top of %s column to %d\n",
+ selected ? "right" : "left",
+ value);
+ data->list[selected].top_index = value;
+ }
+}
+
+/*
+ * Adjust the top-index as needed to ensure that it and the given item are
+ * visible.
+ */
+static void
+fix_top_item(ALL_DATA * data, int cur_item, int selected)
+{
+ int top_item = data->list[selected].top_index;
+ int cur_row = index2row(data, cur_item, selected);
+ int top_row = index2row(data, top_item, selected);
+
+ if (cur_row < top_row) {
+ top_item = cur_item;
+ } else if ((cur_row - top_row) > data->use_height) {
+ top_item = row2index(data, cur_row + 1 - data->use_height, selected);
+ }
+ if (cur_row < data->use_height) {
+ top_item = row2index(data, 0, selected);
+ }
+ dlg_trace_msg("fix_top_item(cur_item %d, selected %d) ->top_item %d\n",
+ cur_item, selected, top_item);
+ set_top_item(data, top_item, selected);
+}
+
+/*
+ * This is an alternate interface to 'buildlist' which allows the application
+ * to read the list item states back directly without putting them in the
+ * output buffer.
+ */
+int
+dlg_buildlist(const char *title,
+ const char *cprompt,
+ int height,
+ int width,
+ int list_height,
+ int item_no,
+ DIALOG_LISTITEM * items,
+ const char *states,
+ int order_mode,
+ int *current_item)
+{
+ /* *INDENT-OFF* */
+ static DLG_KEYS_BINDING binding[] = {
+ HELPKEY_BINDINGS,
+ ENTERKEY_BINDINGS,
+ DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_RIGHT ),
+ DLG_KEYS_DATA( DLGK_FIELD_NEXT, TAB ),
+ DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
+ DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_LEFT ),
+ DLG_KEYS_DATA( DLGK_ITEM_FIRST, KEY_HOME ),
+ DLG_KEYS_DATA( DLGK_ITEM_LAST, KEY_END ),
+ DLG_KEYS_DATA( DLGK_ITEM_LAST, KEY_LL ),
+ DLG_KEYS_DATA( DLGK_ITEM_NEXT, '+' ),
+ DLG_KEYS_DATA( DLGK_ITEM_NEXT, KEY_DOWN ),
+ DLG_KEYS_DATA( DLGK_ITEM_NEXT, CHR_NEXT ),
+ DLG_KEYS_DATA( DLGK_ITEM_PREV, '-' ),
+ DLG_KEYS_DATA( DLGK_ITEM_PREV, KEY_UP ),
+ DLG_KEYS_DATA( DLGK_ITEM_PREV, CHR_PREVIOUS ),
+ DLG_KEYS_DATA( DLGK_PAGE_NEXT, KEY_NPAGE ),
+ DLG_KEYS_DATA( DLGK_PAGE_NEXT, DLGK_MOUSE(KEY_NPAGE) ),
+ DLG_KEYS_DATA( DLGK_PAGE_NEXT, DLGK_MOUSE(KEY_NPAGE+KEY_MAX) ),
+ DLG_KEYS_DATA( DLGK_PAGE_PREV, KEY_PPAGE ),
+ DLG_KEYS_DATA( DLGK_PAGE_PREV, DLGK_MOUSE(KEY_PPAGE) ),
+ DLG_KEYS_DATA( DLGK_PAGE_PREV, DLGK_MOUSE(KEY_PPAGE+KEY_MAX) ),
+ DLG_KEYS_DATA( DLGK_GRID_LEFT, KEY_LEFTCOL ),
+ DLG_KEYS_DATA( DLGK_GRID_RIGHT, KEY_RIGHTCOL ),
+ END_KEYS_BINDING
+ };
+ /* *INDENT-ON* */
+
+#ifdef KEY_RESIZE
+ int old_height = height;
+ int old_width = width;
+#endif
+ ALL_DATA all;
+ MY_DATA *data = all.list;
+ int i, j, k, key2, found, x, y, cur_x, cur_y;
+ int key = 0, fkey;
+ bool save_visit = dialog_state.visit_items;
+ int button;
+ int cur_item;
+ int was_mouse;
+ int name_width, text_width, full_width, list_width;
+ int result = DLG_EXIT_UNKNOWN;
+ int num_states;
+ bool first = TRUE;
+ WINDOW *dialog;
+ char *prompt = dlg_strclone(cprompt);
+ const char **buttons = dlg_ok_labels();
+ const char *widget_name = "buildlist";
+
+ (void) order_mode;
+
+ /*
+ * Unlike other uses of --visit-items, we have two windows to visit.
+ */
+ if (dialog_state.visit_cols)
+ dialog_state.visit_cols = 2;
+
+ memset(&all, 0, sizeof(all));
+ all.items = items;
+ all.item_no = item_no;
+
+ if (dialog_vars.default_item != 0) {
+ cur_item = dlg_default_listitem(items);
+ } else {
+ if ((cur_item = first_item(&all, 0)) < 0)
+ cur_item = first_item(&all, 1);
+ }
+ button = (dialog_state.visit_items
+ ? (items[cur_item].state ? sRIGHT : sLEFT)
+ : dlg_default_button());
+
+ dlg_does_output();
+ dlg_tab_correct_str(prompt);
+
+#ifdef KEY_RESIZE
+ retry:
+#endif
+
+ all.use_height = list_height;
+ all.use_width = (2 * (dlg_calc_list_width(item_no, items)
+ + 4
+ + 2 * MARGIN)
+ + 1);
+ all.use_width = MAX(26, all.use_width);
+ if (all.use_height == 0) {
+ /* calculate height without items (4) */
+ dlg_auto_size(title, prompt, &height, &width, MIN_HIGH, all.use_width);
+ dlg_calc_listh(&height, &all.use_height, item_no);
+ } else {
+ dlg_auto_size(title, prompt,
+ &height, &width,
+ MIN_HIGH + all.use_height, all.use_width);
+ }
+ dlg_button_layout(buttons, &width);
+ dlg_print_size(height, width);
+ dlg_ctl_size(height, width);
+
+ /* we need at least two states */
+ if (states == 0 || strlen(states) < 2)
+ states = " *";
+ num_states = (int) strlen(states);
+
+ x = dlg_box_x_ordinate(width);
+ y = dlg_box_y_ordinate(height);
+
+ dialog = dlg_new_window(height, width, y, x);
+ dlg_register_window(dialog, widget_name, binding);
+ dlg_register_buttons(dialog, widget_name, buttons);
+
+ dlg_mouse_setbase(all.base_x = x, all.base_y = y);
+
+ 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);
+
+ (void) wattrset(dialog, dialog_attr);
+ dlg_print_autowrap(dialog, prompt, height, width);
+
+ list_width = (width - 6 * MARGIN - 2) / 2;
+ getyx(dialog, cur_y, cur_x);
+ data[0].box_y = cur_y + 1;
+ data[0].box_x = MARGIN + 1;
+ data[1].box_y = cur_y + 1;
+ data[1].box_x = data[0].box_x + 1 + 2 * MARGIN + list_width;
+
+ /*
+ * After displaying the prompt, we know how much space we really have.
+ * Limit the list to avoid overwriting the ok-button.
+ */
+ if (all.use_height + MIN_HIGH > height - cur_y)
+ all.use_height = height - MIN_HIGH - cur_y;
+ if (all.use_height <= 0)
+ all.use_height = 1;
+
+ for (k = 0; k < 2; ++k) {
+ /* create new window for the list */
+ data[k].win = dlg_sub_window(dialog, all.use_height, list_width,
+ y + data[k].box_y + 1,
+ x + data[k].box_x + 1);
+
+ /* draw a box around the list items */
+ dlg_draw_box(dialog, data[k].box_y, data[k].box_x,
+ all.use_height + 2 * MARGIN,
+ list_width + 2 * MARGIN,
+ menubox_border_attr, menubox_border2_attr);
+ }
+
+ text_width = 0;
+ name_width = 0;
+ /* Find length of longest item to center buildlist */
+ for (i = 0; i < item_no; i++) {
+ text_width = MAX(text_width, dlg_count_columns(items[i].text));
+ name_width = MAX(name_width, dlg_count_columns(items[i].name));
+ }
+
+ /* If the name+text is wider than the list is allowed, then truncate
+ * one or both of them. If the name is no wider than 1/4 of the list,
+ * leave it intact.
+ */
+ all.use_width = (list_width - 6 * MARGIN);
+ if (dialog_vars.no_tags && !dialog_vars.no_items) {
+ full_width = MIN(all.use_width, text_width);
+ } else if (dialog_vars.no_items) {
+ full_width = MIN(all.use_width, name_width);
+ } else {
+ if (text_width >= 0
+ && name_width >= 0
+ && all.use_width > 0
+ && text_width + name_width > all.use_width) {
+ int need = (int) (0.25 * all.use_width);
+ if (name_width > need) {
+ int want = (int) (all.use_width * ((double) name_width) /
+ (text_width + name_width));
+ name_width = (want > need) ? want : need;
+ }
+ text_width = all.use_width - name_width;
+ }
+ full_width = text_width + name_width;
+ }
+
+ all.check_x = (all.use_width - full_width) / 2;
+ all.item_x = ((dialog_vars.no_tags
+ ? 0
+ : (dialog_vars.no_items
+ ? 0
+ : (name_width + 2)))
+ + all.check_x);
+
+ /* ensure we are scrolled to show the current choice */
+ j = MIN(all.use_height, item_no);
+ for (i = 0; i < 2; ++i) {
+ int top_item = 0;
+ if ((items[cur_item].state != 0) == i) {
+ top_item = cur_item - j + 1;
+ if (top_item < 0)
+ top_item = 0;
+ set_top_item(&all, top_item, i);
+ } else {
+ set_top_item(&all, 0, i);
+ }
+ }
+
+ /* register the new window, along with its borders */
+ for (i = 0; i < 2; ++i) {
+ dlg_mouse_mkbigregion(data[i].box_y + 1,
+ data[i].box_x,
+ all.use_height,
+ list_width + 2,
+ 2 * KEY_MAX + (i * (1 + all.use_height)),
+ 1, 1, 1 /* by lines */ );
+ }
+
+ dlg_draw_buttons(dialog, height - 2, 0, buttons, button, FALSE, width);
+
+ while (result == DLG_EXIT_UNKNOWN) {
+ int which = (items[cur_item].state != 0);
+ MY_DATA *moi = data + which;
+ int at_top = index2row(&all, moi->top_index, which);
+ int at_end = index2row(&all, -1, which);
+ int at_bot = skip_rows(&all, at_top, all.use_height, which);
+
+ dlg_trace_msg("\t** state %d:%d top %d (%d:%d:%d) %d\n",
+ cur_item, item_no - 1,
+ moi->top_index,
+ at_top, at_bot, at_end,
+ which);
+
+ if (first) {
+ print_both(&all, cur_item);
+ dlg_trace_win(dialog);
+ first = FALSE;
+ }
+
+ if (button < 0) { /* --visit-items */
+ int cur_row = index2row(&all, cur_item, which);
+ cur_y = (data[which].box_y
+ + cur_row
+ + 1);
+ if (at_top > 0)
+ cur_y -= at_top;
+ cur_x = (data[which].box_x
+ + all.check_x + 1);
+ dlg_trace_msg("\t...visit row %d (%d,%d)\n", cur_row, cur_y, cur_x);
+ wmove(dialog, cur_y, cur_x);
+ }
+
+ key = dlg_mouse_wgetch(dialog, &fkey);
+ if (dlg_result_key(key, fkey, &result))
+ break;
+
+ was_mouse = (fkey && is_DLGK_MOUSE(key));
+ if (was_mouse)
+ key -= M_EVENT;
+
+ if (!was_mouse) {
+ ;
+ } else if (key >= 2 * KEY_MAX) {
+ i = (key - 2 * KEY_MAX) % (1 + all.use_height);
+ j = (key - 2 * KEY_MAX) / (1 + all.use_height);
+ k = row2index(&all, i + at_top, j);
+ dlg_trace_msg("MOUSE column %d, row %d ->item %d\n", j, i, k);
+ if (k >= 0 && j < 2) {
+ if (j != which) {
+ /*
+ * Mouse click was in the other column.
+ */
+ moi = data + j;
+ fix_top_item(&all, k, j);
+ }
+ which = j;
+ at_top = index2row(&all, moi->top_index, which);
+ at_bot = skip_rows(&all, at_top, all.use_height, which);
+ cur_item = k;
+ print_both(&all, cur_item);
+ key = KEY_TOGGLE; /* force the selected item to toggle */
+ } else {
+ beep();
+ continue;
+ }
+ fkey = FALSE;
+ } else if (key >= KEY_MIN) {
+ if (key > KEY_MAX) {
+ if (which == 0) {
+ key = KEY_RIGHTCOL; /* switch to right-column */
+ fkey = FALSE;
+ } else {
+ key -= KEY_MAX;
+ }
+ } else {
+ if (which == 1) {
+ key = KEY_LEFTCOL; /* switch to left-column */
+ fkey = FALSE;
+ }
+ }
+ key = dlg_lookup_key(dialog, key, &fkey);
+ }
+
+ /*
+ * A space toggles the item status. Normally we put the cursor on
+ * the next available item in the same column. But if there are no
+ * more items in the column, move the cursor to the other column.
+ */
+ if (key == KEY_TOGGLE) {
+ int new_choice;
+ int new_state = items[cur_item].state + 1;
+
+ if ((new_choice = next_item(&all, cur_item, which)) == cur_item) {
+ new_choice = prev_item(&all, cur_item, which);
+ }
+ dlg_trace_msg("cur_item %d, new_choice:%d\n", cur_item, new_choice);
+ if (new_state >= num_states)
+ new_state = 0;
+
+ items[cur_item].state = new_state;
+ if (cur_item == moi->top_index) {
+ set_top_item(&all, new_choice, which);
+ }
+
+ if (new_choice >= 0) {
+ fix_top_item(&all, cur_item, !which);
+ cur_item = new_choice;
+ }
+ print_both(&all, cur_item);
+ dlg_trace_win(dialog);
+ continue; /* wait for another key press */
+ }
+
+ /*
+ * Check if key pressed matches first character of any item tag in
+ * list. If there is more than one match, we will cycle through
+ * each one as the same key is pressed repeatedly.
+ */
+ found = FALSE;
+ if (!fkey) {
+ if (button < 0 || !dialog_state.visit_items) {
+ for (j = cur_item + 1; j < item_no; j++) {
+ if (check_hotkey(items, j, which)) {
+ found = TRUE;
+ i = j;
+ break;
+ }
+ }
+ if (!found) {
+ for (j = 0; j <= cur_item; j++) {
+ if (check_hotkey(items, j, which)) {
+ found = TRUE;
+ i = j;
+ break;
+ }
+ }
+ }
+ if (found)
+ dlg_flush_getc();
+ } else if ((j = dlg_char_to_button(key, buttons)) >= 0) {
+ button = j;
+ ungetch('\n');
+ continue;
+ }
+ }
+
+ /*
+ * A single digit (1-9) positions the selection to that line in the
+ * current screen.
+ */
+ if (!found
+ && (key <= '9')
+ && (key > '0')
+ && (key - '1' < at_bot)) {
+ found = TRUE;
+ i = key - '1';
+ }
+
+ if (!found && fkey) {
+ switch (key) {
+ case DLGK_FIELD_PREV:
+ if ((button == sRIGHT) && dialog_state.visit_items) {
+ key = DLGK_GRID_LEFT;
+ button = sLEFT;
+ } else {
+ button = dlg_prev_button(buttons, button);
+ dlg_draw_buttons(dialog, height - 2, 0, buttons, button,
+ FALSE, width);
+ if (button == sRIGHT) {
+ key = DLGK_GRID_RIGHT;
+ } else {
+ continue;
+ }
+ }
+ break;
+ case DLGK_FIELD_NEXT:
+ if ((button == sLEFT) && dialog_state.visit_items) {
+ key = DLGK_GRID_RIGHT;
+ button = sRIGHT;
+ } else {
+ button = dlg_next_button(buttons, button);
+ dlg_draw_buttons(dialog, height - 2, 0, buttons, button,
+ FALSE, width);
+ if (button == sLEFT) {
+ key = DLGK_GRID_LEFT;
+ } else {
+ continue;
+ }
+ }
+ break;
+ }
+ }
+
+ if (!found && fkey) {
+ i = cur_item;
+ found = TRUE;
+ switch (key) {
+ case DLGK_GRID_LEFT:
+ i = closest_item(&all, cur_item, 0);
+ fix_top_item(&all, i, 0);
+ break;
+ case DLGK_GRID_RIGHT:
+ i = closest_item(&all, cur_item, 1);
+ fix_top_item(&all, i, 1);
+ break;
+ case DLGK_PAGE_PREV:
+ if (cur_item > moi->top_index) {
+ i = moi->top_index;
+ } else if (moi->top_index != 0) {
+ int temp = at_top;
+ if ((temp -= all.use_height) < 0)
+ temp = 0;
+ i = row2index(&all, temp, which);
+ }
+ break;
+ case DLGK_PAGE_NEXT:
+ if ((at_end - at_bot) < all.use_height) {
+ i = next_item(&all,
+ row2index(&all, at_end, which),
+ which);
+ } else {
+ i = next_item(&all,
+ row2index(&all, at_bot, which),
+ which);
+ at_top = at_bot;
+ set_top_item(&all,
+ next_item(&all,
+ row2index(&all, at_top, which),
+ which),
+ which);
+ at_bot = skip_rows(&all, at_top, all.use_height, which);
+ at_bot = MIN(at_bot, at_end);
+ }
+ break;
+ case DLGK_ITEM_FIRST:
+ i = first_item(&all, which);
+ break;
+ case DLGK_ITEM_LAST:
+ i = last_item(&all, which);
+ break;
+ case DLGK_ITEM_PREV:
+ i = prev_item(&all, cur_item, which);
+ if (stop_prev(&all, cur_item, which))
+ continue;
+ break;
+ case DLGK_ITEM_NEXT:
+ i = next_item(&all, cur_item, which);
+ break;
+ default:
+ found = FALSE;
+ break;
+ }
+ }
+
+ if (found) {
+ if (i != cur_item) {
+ int now_at = index2row(&all, i, which);
+ int oops = item_no;
+ int old_item;
+
+ dlg_trace_msg("<--CHOICE %d\n", i);
+ dlg_trace_msg("<--topITM %d\n", moi->top_index);
+ dlg_trace_msg("<--now_at %d\n", now_at);
+ dlg_trace_msg("<--at_top %d\n", at_top);
+ dlg_trace_msg("<--at_bot %d\n", at_bot);
+
+ if (now_at >= at_bot) {
+ while (now_at >= at_bot) {
+ if ((at_bot - at_top) >= all.use_height) {
+ set_top_item(&all,
+ next_item(&all, moi->top_index, which),
+ which);
+ }
+ at_top = index2row(&all, moi->top_index, which);
+ at_bot = skip_rows(&all, at_top, all.use_height, which);
+
+ dlg_trace_msg("...at_bot %d (now %d vs %d)\n",
+ at_bot, now_at, at_end);
+ dlg_trace_msg("...topITM %d\n", moi->top_index);
+ dlg_trace_msg("...at_top %d (diff %d)\n", at_top,
+ at_bot - at_top);
+
+ if (at_bot >= at_end) {
+ /*
+ * If we bumped into the end, move the top-item
+ * down by one line so that we can display the
+ * last item in the list.
+ */
+ if ((at_bot - at_top) > all.use_height) {
+ set_top_item(&all,
+ next_item(&all, moi->top_index, which),
+ which);
+ } else if (at_top > 0 &&
+ (at_bot - at_top) >= all.use_height) {
+ set_top_item(&all,
+ next_item(&all, moi->top_index, which),
+ which);
+ }
+ break;
+ }
+ if (--oops < 0) {
+ dlg_trace_msg("OOPS-forward\n");
+ break;
+ }
+ }
+ } else if (now_at < at_top) {
+ while (now_at < at_top) {
+ old_item = moi->top_index;
+ set_top_item(&all,
+ prev_item(&all, moi->top_index, which),
+ which);
+ at_top = index2row(&all, moi->top_index, which);
+
+ dlg_trace_msg("...at_top %d (now %d)\n", at_top, now_at);
+ dlg_trace_msg("...topITM %d\n", moi->top_index);
+
+ if (moi->top_index >= old_item)
+ break;
+ if (at_top <= now_at)
+ break;
+ if (--oops < 0) {
+ dlg_trace_msg("OOPS-backward\n");
+ break;
+ }
+ }
+ }
+ dlg_trace_msg("-->now_at %d\n", now_at);
+ cur_item = i;
+ print_both(&all, cur_item);
+ }
+ dlg_trace_win(dialog);
+ continue; /* wait for another key press */
+ }
+
+ if (fkey) {
+ switch (key) {
+ case DLGK_ENTER:
+ result = dlg_enter_buttoncode(button);
+ break;
+#ifdef KEY_RESIZE
+ case KEY_RESIZE:
+ /* reset data */
+ height = old_height;
+ width = old_width;
+ /* repaint */
+ dlg_clear();
+ dlg_del_window(dialog);
+ refresh();
+ dlg_mouse_free_regions();
+ goto retry;
+#endif
+ default:
+ if (was_mouse) {
+ if ((key2 = dlg_ok_buttoncode(key)) >= 0) {
+ result = key2;
+ break;
+ }
+ beep();
+ }
+ }
+ } else {
+ beep();
+ }
+ }
+
+ dialog_state.visit_cols = save_visit;
+ dlg_del_window(dialog);
+ dlg_mouse_free_regions();
+ free(prompt);
+ *current_item = cur_item;
+ return result;
+}
+
+/*
+ * Display a dialog box with a list of options that can be turned on or off
+ */
+int
+dialog_buildlist(const char *title,
+ const char *cprompt,
+ int height,
+ int width,
+ int list_height,
+ int item_no,
+ char **items,
+ int order_mode)
+{
+ int result;
+ int i, j;
+ DIALOG_LISTITEM *listitems;
+ bool separate_output = dialog_vars.separate_output;
+ bool show_status = FALSE;
+ int current = 0;
+
+ listitems = dlg_calloc(DIALOG_LISTITEM, (size_t) item_no + 1);
+ assert_ptr(listitems, "dialog_buildlist");
+
+ for (i = j = 0; i < item_no; ++i) {
+ listitems[i].name = items[j++];
+ listitems[i].text = (dialog_vars.no_items
+ ? dlg_strempty()
+ : items[j++]);
+ listitems[i].state = !dlg_strcmp(items[j++], "on");
+ listitems[i].help = ((dialog_vars.item_help)
+ ? items[j++]
+ : dlg_strempty());
+ }
+ dlg_align_columns(&listitems[0].text, (int) sizeof(DIALOG_LISTITEM), item_no);
+
+ result = dlg_buildlist(title,
+ cprompt,
+ height,
+ width,
+ list_height,
+ item_no,
+ listitems,
+ NULL,
+ order_mode,
+ &current);
+
+ switch (result) {
+ case DLG_EXIT_OK: /* FALLTHRU */
+ case DLG_EXIT_EXTRA:
+ show_status = TRUE;
+ break;
+ case DLG_EXIT_HELP:
+ dlg_add_result("HELP ");
+ show_status = dialog_vars.help_status;
+ if (USE_ITEM_HELP(listitems[current].help)) {
+ if (show_status) {
+ if (separate_output) {
+ dlg_add_string(listitems[current].help);
+ dlg_add_separator();
+ } else {
+ dlg_add_quoted(listitems[current].help);
+ }
+ } else {
+ dlg_add_string(listitems[current].help);
+ }
+ result = DLG_EXIT_ITEM_HELP;
+ } else {
+ if (show_status) {
+ if (separate_output) {
+ dlg_add_string(listitems[current].name);
+ dlg_add_separator();
+ } else {
+ dlg_add_quoted(listitems[current].name);
+ }
+ } else {
+ dlg_add_string(listitems[current].name);
+ }
+ }
+ break;
+ }
+
+ if (show_status) {
+ for (i = 0; i < item_no; i++) {
+ if (listitems[i].state) {
+ if (separate_output) {
+ dlg_add_string(listitems[i].name);
+ dlg_add_separator();
+ } else {
+ if (dlg_need_separator())
+ dlg_add_separator();
+ dlg_add_quoted(listitems[i].name);
+ }
+ }
+ }
+ dlg_add_last_key(-1);
+ }
+
+ dlg_free_columns(&listitems[0].text, (int) sizeof(DIALOG_LISTITEM), item_no);
+ free(listitems);
+ return result;
+}
diff --git a/contrib/dialog/buttons.c b/contrib/dialog/buttons.c
index 0241060819f43..d37cfe50118ff 100644
--- a/contrib/dialog/buttons.c
+++ b/contrib/dialog/buttons.c
@@ -1,9 +1,9 @@
/*
- * $Id: buttons.c,v 1.86 2011/06/28 10:46:46 tom Exp $
+ * $Id: buttons.c,v 1.94 2012/12/30 20:51:01 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
@@ -28,7 +28,7 @@
#include <wchar.h>
#endif
-#define MIN_BUTTON (dialog_state.visit_items ? -1 : 0)
+#define MIN_BUTTON (-dialog_state.visit_cols)
static void
center_label(char *buffer, int longest, const char *label)
@@ -86,11 +86,85 @@ string_to_char(const char **stringp)
return result;
}
+static size_t
+count_labels(const char **labels)
+{
+ size_t result = 0;
+ if (labels != 0) {
+ while (*labels++ != 0) {
+ ++result;
+ }
+ }
+ return result;
+}
+
+/*
+ * Check if the latest key should be added to the hotkey list.
+ */
+static int
+was_hotkey(int this_key, int *used_keys, size_t next)
+{
+ int result = FALSE;
+
+ if (next != 0) {
+ size_t n;
+ for (n = 0; n < next; ++n) {
+ if (used_keys[n] == this_key) {
+ result = TRUE;
+ break;
+ }
+ }
+ }
+ return result;
+}
+
+/*
+ * Determine the hot-keys for a set of button-labels. Normally these are
+ * the first uppercase character in each label. However, if more than one
+ * button has the same first-uppercase, then we will (attempt to) look for
+ * an alternate.
+ *
+ * This allocates data which must be freed by the caller.
+ */
+static int *
+get_hotkeys(const char **labels)
+{
+ int *result = 0;
+ size_t count = count_labels(labels);
+ size_t n;
+
+ if ((result = dlg_calloc(int, count + 1)) != 0) {
+ for (n = 0; n < count; ++n) {
+ const char *label = labels[n];
+ const int *indx = dlg_index_wchars(label);
+ int limit = dlg_count_wchars(label);
+ int i;
+
+ for (i = 0; i < limit; ++i) {
+ int first = indx[i];
+ int check = UCH(label[first]);
+#ifdef USE_WIDE_CURSES
+ int last = indx[i + 1];
+ if ((last - first) != 1) {
+ const char *temp = (label + first);
+ check = string_to_char(&temp);
+ }
+#endif
+ if (dlg_isupper(check) && !was_hotkey(check, result, n)) {
+ result[n] = check;
+ break;
+ }
+ }
+ }
+ }
+ return result;
+}
+
/*
* Print a button
*/
static void
-print_button(WINDOW *win, char *label, int y, int x, int selected)
+print_button(WINDOW *win, char *label, int hotkey, int y, int x, int selected)
{
int i;
int state = 0;
@@ -104,30 +178,27 @@ print_button(WINDOW *win, char *label, int y, int x, int selected)
: button_label_inactive_attr);
(void) wmove(win, y, x);
- wattrset(win, selected
- ? button_active_attr
- : button_inactive_attr);
+ (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 check;
int first = indx[i];
int last = indx[i + 1];
switch (state) {
case 0:
+ check = UCH(label[first]);
#ifdef USE_WIDE_CURSES
if ((last - first) != 1) {
const char *temp = (label + first);
- int cmp = string_to_char(&temp);
- if (dlg_isupper(cmp)) {
- wattrset(win, key_attr);
- state = 1;
- }
- break;
+ check = string_to_char(&temp);
}
#endif
- if (dlg_isupper(UCH(label[first]))) {
- wattrset(win, key_attr);
+ if (check == hotkey) {
+ (void) wattrset(win, key_attr);
state = 1;
}
break;
@@ -138,9 +209,9 @@ print_button(WINDOW *win, char *label, int y, int x, int selected)
}
waddnstr(win, label + first, last - first);
}
- wattrset(win, selected
- ? button_active_attr
- : button_inactive_attr);
+ (void) wattrset(win, selected
+ ? button_active_attr
+ : button_inactive_attr);
(void) waddstr(win, ">");
(void) wmove(win, y, x + ((int) strspn(label, " ")) + 1);
}
@@ -203,22 +274,27 @@ dlg_button_x_step(const char **labels, int limit, int *gap, int *margin, int *st
int length;
int unused;
int used;
+ int result;
- if (count == 0)
- return 0;
- dlg_button_sizes(labels, FALSE, &longest, &length);
- used = (length + (count * 2));
- unused = limit - used;
+ *margin = 0;
+ if (count != 0) {
+ dlg_button_sizes(labels, FALSE, &longest, &length);
+ used = (length + (count * 2));
+ unused = limit - used;
- if ((*gap = unused / (count + 3)) <= 0) {
- if ((*gap = unused / (count + 1)) <= 0)
- *gap = 1;
- *margin = *gap;
+ if ((*gap = unused / (count + 3)) <= 0) {
+ if ((*gap = unused / (count + 1)) <= 0)
+ *gap = 1;
+ *margin = *gap;
+ } else {
+ *margin = *gap * 2;
+ }
+ *step = *gap + (used + count - 1) / count;
+ result = (*gap > 0) && (unused >= 0);
} else {
- *margin = *gap * 2;
+ result = 0;
}
- *step = *gap + (used + count - 1) / count;
- return (*gap > 0) && (unused >= 0);
+ return result;
}
/*
@@ -282,35 +358,41 @@ dlg_draw_buttons(WINDOW *win,
* Allocate a buffer big enough for any label.
*/
need = (size_t) longest;
- for (n = 0; labels[n] != 0; ++n) {
- need += strlen(labels[n]) + 1;
- }
- buffer = dlg_malloc(char, need);
- assert_ptr(buffer, "dlg_draw_buttons");
-
- /*
- * Draw the labels.
- */
- for (n = 0; labels[n] != 0; n++) {
- center_label(buffer, longest, labels[n]);
- mouse_mkbutton(y, x, dlg_count_columns(buffer), n);
- print_button(win, buffer, y, x,
- (selected == n) || (n == 0 && selected < 0));
- if (selected == n)
- getyx(win, final_y, final_x);
+ if (need != 0) {
+ int *hotkeys = get_hotkeys(labels);
+ assert_ptr(hotkeys, "dlg_draw_buttons");
- if (vertical) {
- if ((y += step) > limit)
- break;
- } else {
- if ((x += step) > limit)
- break;
+ for (n = 0; labels[n] != 0; ++n) {
+ need += strlen(labels[n]) + 1;
+ }
+ buffer = dlg_malloc(char, need);
+ assert_ptr(buffer, "dlg_draw_buttons");
+
+ /*
+ * Draw the labels.
+ */
+ for (n = 0; labels[n] != 0; n++) {
+ center_label(buffer, longest, labels[n]);
+ mouse_mkbutton(y, x, dlg_count_columns(buffer), n);
+ print_button(win, buffer, hotkeys[n], y, x,
+ (selected == n) || (n == 0 && selected < 0));
+ if (selected == n)
+ getyx(win, final_y, final_x);
+
+ if (vertical) {
+ if ((y += step) > limit)
+ break;
+ } else {
+ if ((x += step) > limit)
+ break;
+ }
}
+ (void) wmove(win, final_y, final_x);
+ wrefresh(win);
+ (void) wattrset(win, save);
+ free(buffer);
+ free(hotkeys);
}
- (void) wmove(win, final_y, final_x);
- wrefresh(win);
- free(buffer);
- wattrset(win, save);
}
/*
@@ -364,19 +446,27 @@ dlg_button_to_char(const char *label)
int
dlg_char_to_button(int ch, const char **labels)
{
+ int result = DLG_EXIT_UNKNOWN;
+
if (labels != 0) {
+ int *hotkeys = get_hotkeys(labels);
int j;
ch = (int) dlg_toupper(dlg_last_getc());
- for (j = 0; labels[j] != 0; ++j) {
- int cmp = dlg_button_to_char(labels[j]);
- if (ch == cmp) {
- dlg_flush_getc();
- return j;
+
+ if (hotkeys != 0) {
+ for (j = 0; labels[j] != 0; ++j) {
+ if (ch == hotkeys[j]) {
+ dlg_flush_getc();
+ result = j;
+ break;
+ }
}
+ free(hotkeys);
}
}
- return DLG_EXIT_UNKNOWN;
+
+ return result;
}
static const char *
@@ -488,10 +578,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 +629,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 +668,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 +679,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;
}
@@ -642,10 +759,14 @@ dlg_yes_buttoncode(int button)
int
dlg_next_button(const char **labels, int button)
{
- if (labels[button + 1] != 0)
+ if (button < -1)
+ button = -1;
+
+ if (labels[button + 1] != 0) {
++button;
- else
+ } else {
button = MIN_BUTTON;
+ }
return button;
}
@@ -655,9 +776,12 @@ dlg_next_button(const char **labels, int button)
int
dlg_prev_button(const char **labels, int button)
{
- if (button > MIN_BUTTON)
+ if (button > MIN_BUTTON) {
--button;
- else {
+ } else {
+ if (button < -1)
+ button = -1;
+
while (labels[button + 1] != 0)
++button;
}
diff --git a/contrib/dialog/calendar.c b/contrib/dialog/calendar.c
index 45a40ab09bdcf..0a7061adf80e2 100644
--- a/contrib/dialog/calendar.c
+++ b/contrib/dialog/calendar.c
@@ -1,9 +1,9 @@
/*
- * $Id: calendar.c,v 1.62 2011/06/29 09:47:06 tom Exp $
+ * $Id: calendar.c,v 1.67 2013/03/17 15:03:41 tom Exp $
*
* calendar.c -- implements the calendar box
*
- * Copyright 2001-2010,2011 Thomas E. Dickey
+ * Copyright 2001-2012,2013 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -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,
- data->y - MARGIN, data->x - MARGIN,
- data->height + (2 * MARGIN), data->width + (2 * MARGIN),
- menubox_border_attr, menubox_attr); /* border of daybox */
-
- wattrset(data->window, menubox_attr); /* daynames headline */
+ dlg_draw_box2(data->parent,
+ data->y - MARGIN, data->x - MARGIN,
+ data->height + (2 * MARGIN), data->width + (2 * MARGIN),
+ menubox_attr,
+ menubox_border_attr,
+ menubox_border2_attr);
+
+ (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,
- 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 */
+ dlg_draw_box2(data->parent,
+ data->y - 1, data->x - 1,
+ data->height + 2, data->width + 2,
+ 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,
- 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 */
+ dlg_draw_box2(data->parent,
+ data->y - 1, data->x - 1,
+ data->height + 2, data->width + 2,
+ 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 :
@@ -674,6 +681,7 @@ dialog_calendar(const char *title,
dlg_add_result(buffer);
dlg_add_separator();
+ dlg_add_last_key(-1);
return CleanupResult(result, dialog, prompt, &save_vars);
}
diff --git a/contrib/dialog/checklist.c b/contrib/dialog/checklist.c
index 4b73cebdd90d4..0ae18a6d75e02 100644
--- a/contrib/dialog/checklist.c
+++ b/contrib/dialog/checklist.c
@@ -1,9 +1,9 @@
/*
- * $Id: checklist.c,v 1.127 2011/06/29 23:04:09 tom Exp $
+ * $Id: checklist.c,v 1.151 2013/03/23 10:51:48 tom Exp $
*
* checklist.c -- implements the checklist box
*
- * Copyright 2000-2010,2011 Thomas E. Dickey
+ * Copyright 2000-2012,2013 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -29,45 +29,32 @@
#include <dialog.h>
#include <dlg_keys.h>
-static int list_width, check_x, item_x, checkflag;
-
#define MIN_HIGH (1 + (5 * MARGIN))
-#define LLEN(n) ((n) * CHECKBOX_TAGS)
-#define ItemData(i) &items[LLEN(i)]
-#define ItemName(i) items[LLEN(i)]
-#define ItemText(i) items[LLEN(i) + 1]
-#define ItemStatus(i) items[LLEN(i) + 2]
-#define ItemHelp(i) items[LLEN(i) + 3]
-
-static void
-print_arrows(WINDOW *win,
- int box_x,
- int box_y,
- int scrollamt,
- int choice,
- int item_no,
- int list_height)
-{
- dlg_draw_scrollbar(win,
- (long) (scrollamt),
- (long) (scrollamt),
- (long) (scrollamt + choice),
- (long) (item_no),
- box_x + check_x,
- box_x + list_width,
- box_y,
- box_y + list_height + 1,
- menubox_attr,
- menubox_border_attr);
-}
+typedef struct {
+ /* the outer-window */
+ WINDOW *dialog;
+ int box_y;
+ int box_x;
+ int check_x;
+ int item_x;
+ int checkflag;
+ int use_height;
+ int use_width;
+ /* the inner-window */
+ WINDOW *list;
+ DIALOG_LISTITEM *items;
+ int item_no;
+ const char *states;
+} ALL_DATA;
/*
* Print list item. The 'selected' parameter is true if 'choice' is the
* current item. That one is colored differently from the other items.
*/
static void
-print_item(WINDOW *win,
+print_item(ALL_DATA * data,
+ WINDOW *win,
DIALOG_LISTITEM * item,
const char *states,
int choice,
@@ -75,58 +62,84 @@ print_item(WINDOW *win,
{
chtype save = dlg_get_attrs(win);
int i;
- chtype attr = A_NORMAL;
- const int *cols;
- const int *indx;
- int limit;
+ bool both = (!dialog_vars.no_tags && !dialog_vars.no_items);
+ bool first = TRUE;
+ int climit = (getmaxx(win) - data->check_x + 1);
+ const char *show = (dialog_vars.no_items
+ ? item->name
+ : item->text);
/* 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++)
+ for (i = 0; i < data->use_width; i++)
(void) waddch(win, ' ');
- (void) wmove(win, choice, check_x);
- wattrset(win, selected ? check_selected_attr : check_attr);
+ (void) wmove(win, choice, data->check_x);
+ (void) wattrset(win, selected ? check_selected_attr : check_attr);
(void) wprintw(win,
- (checkflag == FLAG_CHECK) ? "[%c]" : "(%c)",
+ (data->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);
+ if (both) {
+ dlg_print_listitem(win, item->name, climit, first, selected);
+ first = FALSE;
+ }
- wattrset(win, selected ? tag_key_selected_attr : tag_key_attr);
- (void) waddnstr(win, item->name, indx[1]);
+ (void) wmove(win, choice, data->item_x);
+ dlg_print_listitem(win, show, climit, first, selected);
- 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) waddnstr(win,
- item->name + indx[1],
- indx[limit] - indx[1]);
- }
- }
+ if (selected) {
+ dlg_item_help(item->help);
}
+ (void) wattrset(win, save);
+}
- if (strlen(item->text) != 0) {
- cols = dlg_index_columns(item->text);
- limit = dlg_limit_columns(item->text, (getmaxx(win) - item_x + 1), 0);
+static void
+print_list(ALL_DATA * data, int choice, int scrollamt, int max_choice)
+{
+ int i;
+ int cur_y, cur_x;
- if (limit > 0) {
- (void) wmove(win, choice, item_x);
- wattrset(win, selected ? item_selected_attr : item_attr);
- dlg_print_text(win, item->text, cols[limit], &attr);
- }
+ getyx(data->dialog, cur_y, cur_x);
+ for (i = 0; i < max_choice; i++) {
+ print_item(data,
+ data->list,
+ &data->items[i + scrollamt],
+ data->states,
+ i, i == choice);
}
+ (void) wnoutrefresh(data->list);
- if (selected) {
- dlg_item_help(item->help);
+ dlg_draw_scrollbar(data->dialog,
+ (long) (scrollamt),
+ (long) (scrollamt),
+ (long) (scrollamt + max_choice),
+ (long) (data->item_no),
+ data->box_x + data->check_x,
+ data->box_x + data->use_width,
+ data->box_y,
+ data->box_y + data->use_height + 1,
+ menubox_border2_attr,
+ menubox_border_attr);
+
+ (void) wmove(data->dialog, cur_y, cur_x);
+}
+
+static bool
+check_hotkey(DIALOG_LISTITEM * items, int choice)
+{
+ bool result = FALSE;
+
+ if (dlg_match_char(dlg_last_getc(),
+ (dialog_vars.no_tags
+ ? items[choice].text
+ : items[choice].name))) {
+ result = TRUE;
}
- wattrset(win, save);
+ return result;
}
/*
@@ -176,20 +189,25 @@ dlg_checklist(const char *title,
int old_height = height;
int old_width = width;
#endif
- int i, j, key2, found, x, y, cur_x, cur_y, box_x, box_y;
+ ALL_DATA all;
+ int i, j, key2, found, x, y, cur_x, cur_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;
int was_mouse;
- int use_height;
- int use_width, name_width, text_width;
+ int use_width, list_width, name_width, text_width;
int result = DLG_EXIT_UNKNOWN;
int num_states;
- WINDOW *dialog, *list;
+ WINDOW *dialog;
char *prompt = dlg_strclone(cprompt);
const char **buttons = dlg_ok_labels();
+ const char *widget_name;
+
+ memset(&all, 0, sizeof(all));
+ all.items = items;
+ all.item_no = item_no;
dlg_does_output();
dlg_tab_correct_str(prompt);
@@ -211,19 +229,25 @@ 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;
+ all.use_height = list_height;
+ use_width = dlg_calc_list_width(item_no, items) + 10;
+ use_width = MAX(26, use_width);
+ if (all.use_height == 0) {
/* calculate height without items (4) */
- dlg_auto_size(title, prompt, &height, &width, MIN_HIGH, MAX(26, use_width));
- dlg_calc_listh(&height, &use_height, item_no);
+ dlg_auto_size(title, prompt, &height, &width, MIN_HIGH, use_width);
+ dlg_calc_listh(&height, &all.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 + all.use_height, use_width);
}
dlg_button_layout(buttons, &width);
dlg_print_size(height, width);
@@ -233,50 +257,53 @@ dlg_checklist(const char *title,
if (states == 0 || strlen(states) < 2)
states = " *";
num_states = (int) strlen(states);
+ all.states = states;
- checkflag = flag;
+ all.checkflag = flag;
x = dlg_box_x_ordinate(width);
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);
+ all.dialog = dialog;
+ 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;
+ all.use_width = width - 6;
getyx(dialog, cur_y, cur_x);
- box_y = cur_y + 1;
- box_x = (width - list_width) / 2 - 1;
+ all.box_y = cur_y + 1;
+ all.box_x = (width - all.use_width) / 2 - 1;
/*
* After displaying the prompt, we know how much space we really have.
* Limit the list to avoid overwriting the ok-button.
*/
- if (use_height + MIN_HIGH > height - cur_y)
- use_height = height - MIN_HIGH - cur_y;
- if (use_height <= 0)
- use_height = 1;
+ if (all.use_height + MIN_HIGH > height - cur_y)
+ all.use_height = height - MIN_HIGH - cur_y;
+ if (all.use_height <= 0)
+ all.use_height = 1;
- max_choice = MIN(use_height, item_no);
+ max_choice = MIN(all.use_height, item_no);
+ max_choice = MAX(max_choice, 1);
/* create new window for the list */
- list = dlg_sub_window(dialog, use_height, list_width,
- y + box_y + 1, x + box_x + 1);
+ all.list = dlg_sub_window(dialog, all.use_height, all.use_width,
+ y + all.box_y + 1, x + all.box_x + 1);
/* draw a box around the list items */
- dlg_draw_box(dialog, box_y, box_x,
- use_height + 2 * MARGIN,
- list_width + 2 * MARGIN,
- menubox_border_attr, menubox_attr);
+ dlg_draw_box(dialog, all.box_y, all.box_x,
+ all.use_height + 2 * MARGIN,
+ all.use_width + 2 * MARGIN,
+ menubox_border_attr, menubox_border2_attr);
text_width = 0;
name_width = 0;
@@ -290,47 +317,54 @@ dlg_checklist(const char *title,
* one or both of them. If the name is no wider than 1/4 of the list,
* leave it intact.
*/
- use_width = (list_width - 6);
- if (text_width + name_width > use_width) {
- int need = (int) (0.25 * use_width);
- if (name_width > need) {
- int want = (int) (use_width * ((double) name_width) /
- (text_width + name_width));
- name_width = (want > need) ? want : need;
+ use_width = (all.use_width - 6);
+ if (dialog_vars.no_tags) {
+ list_width = MIN(all.use_width, text_width);
+ } else if (dialog_vars.no_items) {
+ list_width = MIN(all.use_width, name_width);
+ } else {
+ if (text_width >= 0
+ && name_width >= 0
+ && use_width > 0
+ && text_width + name_width > use_width) {
+ int need = (int) (0.25 * use_width);
+ if (name_width > need) {
+ int want = (int) (use_width * ((double) name_width) /
+ (text_width + name_width));
+ name_width = (want > need) ? want : need;
+ }
+ text_width = use_width - name_width;
}
- text_width = use_width - name_width;
+ list_width = (text_width + name_width);
}
- check_x = (use_width - (text_width + name_width)) / 2;
- item_x = name_width + check_x + 6;
+ all.check_x = (use_width - list_width) / 2;
+ all.item_x = ((dialog_vars.no_tags
+ ? 0
+ : (dialog_vars.no_items
+ ? 0
+ : (2 + name_width)))
+ + all.check_x + 4);
/* ensure we are scrolled to show the current choice */
- if (choice >= (max_choice + scrollamt)) {
- scrollamt = choice - max_choice + 1;
+ scrollamt = MIN(scrollamt, max_choice + item_no - 1);
+ if (choice >= (max_choice + scrollamt - 1)) {
+ scrollamt = MAX(0, choice - max_choice + 1);
choice = max_choice - 1;
}
- /* Print the list */
- for (i = 0; i < max_choice; i++) {
- print_item(list,
- &items[i + scrollamt],
- states,
- i, i == choice);
- }
- (void) wnoutrefresh(list);
+ print_list(&all, choice, scrollamt, max_choice);
/* register the new window, along with its borders */
- dlg_mouse_mkbigregion(box_y + 1, box_x, use_height, list_width + 2,
+ dlg_mouse_mkbigregion(all.box_y + 1, all.box_x,
+ all.use_height, all.use_width + 2,
KEY_MAX, 1, 1, 1 /* by lines */ );
- print_arrows(dialog,
- box_x, box_y,
- scrollamt, max_choice, item_no, use_height);
-
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);
+ wmove(dialog, all.box_y + choice + 1, all.box_x + all.check_x + 2);
key = dlg_mouse_wgetch(dialog, &fkey);
if (dlg_result_key(key, fkey, &result))
@@ -344,19 +378,8 @@ dlg_checklist(const char *title,
getyx(dialog, cur_y, cur_x);
i = (key - KEY_MAX);
if (i < max_choice) {
- /* De-highlight current item */
- print_item(list,
- &items[scrollamt + choice],
- states,
- choice, FALSE);
- /* Highlight new item */
choice = (key - KEY_MAX);
- print_item(list,
- &items[scrollamt + choice],
- states,
- choice, TRUE);
- (void) wnoutrefresh(list);
- (void) wmove(dialog, cur_y, cur_x);
+ print_list(&all, choice, scrollamt, max_choice);
key = ' '; /* force the selected item to toggle */
} else {
@@ -380,13 +403,15 @@ dlg_checklist(const char *title,
if (next >= num_states)
next = 0;
- getyx(dialog, cur_y, cur_x);
if (flag == FLAG_CHECK) { /* checklist? */
+ getyx(dialog, cur_y, cur_x);
items[current].state = next;
- print_item(list,
+ print_item(&all, all.list,
&items[scrollamt + choice],
states,
choice, TRUE);
+ (void) wnoutrefresh(all.list);
+ (void) wmove(dialog, cur_y, cur_x);
} else { /* radiolist */
for (i = 0; i < item_no; i++) {
if (i != current) {
@@ -394,23 +419,19 @@ dlg_checklist(const char *title,
}
}
if (items[current].state) {
+ getyx(dialog, cur_y, cur_x);
items[current].state = next ? next : 1;
- print_item(list,
+ print_item(&all, all.list,
&items[current],
states,
choice, TRUE);
+ (void) wnoutrefresh(all.list);
+ (void) wmove(dialog, cur_y, cur_x);
} else {
items[current].state = 1;
- for (i = 0; i < max_choice; i++)
- print_item(list,
- &items[scrollamt + i],
- states,
- i, i == choice);
+ print_list(&all, choice, scrollamt, max_choice);
}
}
- (void) wnoutrefresh(list);
- (void) wmove(dialog, cur_y, cur_x);
- wrefresh(dialog);
continue; /* wait for another key press */
}
@@ -423,7 +444,7 @@ dlg_checklist(const char *title,
if (!fkey) {
if (button < 0 || !dialog_state.visit_items) {
for (j = scrollamt + choice + 1; j < item_no; j++) {
- if (dlg_match_char(dlg_last_getc(), items[j].name)) {
+ if (check_hotkey(items, j)) {
found = TRUE;
i = j - scrollamt;
break;
@@ -431,7 +452,7 @@ dlg_checklist(const char *title,
}
if (!found) {
for (j = 0; j <= scrollamt + choice; j++) {
- if (dlg_match_char(dlg_last_getc(), items[j].name)) {
+ if (check_hotkey(items, j)) {
found = TRUE;
i = j - scrollamt;
break;
@@ -501,82 +522,17 @@ dlg_checklist(const char *title,
if (i != choice) {
getyx(dialog, cur_y, cur_x);
if (i < 0 || i >= max_choice) {
-#if defined(NCURSES_VERSION_MAJOR) && NCURSES_VERSION_MAJOR < 5
- /*
- * Using wscrl to assist ncurses scrolling is not needed
- * in version 5.x
- */
- if (i == -1) {
- if (use_height > 1) {
- /* De-highlight current first item */
- print_item(list,
- &items[scrollamt],
- states,
- 0, FALSE);
- scrollok(list, TRUE);
- wscrl(list, -1);
- scrollok(list, FALSE);
- }
- scrollamt--;
- print_item(list,
- &items[scrollamt],
- states,
- 0, TRUE);
- } else if (i == max_choice) {
- if (use_height > 1) {
- /* De-highlight current last item before scrolling up */
- print_item(list,
- &items[scrollamt + max_choice - 1],
- states,
- max_choice - 1, FALSE);
- scrollok(list, TRUE);
- wscrl(list, 1);
- scrollok(list, FALSE);
- }
- scrollamt++;
- print_item(list,
- &items[scrollamt + max_choice - 1],
- states,
- max_choice - 1, TRUE);
- } else
-#endif
- {
- if (i < 0) {
- scrollamt += i;
- choice = 0;
- } else {
- choice = max_choice - 1;
- scrollamt += (i - max_choice + 1);
- }
- for (i = 0; i < max_choice; i++) {
- print_item(list,
- &items[scrollamt + i],
- states,
- i, i == choice);
- }
+ if (i < 0) {
+ scrollamt += i;
+ choice = 0;
+ } else {
+ choice = max_choice - 1;
+ scrollamt += (i - max_choice + 1);
}
- (void) wnoutrefresh(list);
- print_arrows(dialog,
- box_x, box_y,
- scrollamt, max_choice, item_no, use_height);
+ print_list(&all, choice, scrollamt, max_choice);
} else {
- /* De-highlight current item */
- print_item(list,
- &items[scrollamt + choice],
- states,
- choice, FALSE);
- /* Highlight new item */
choice = i;
- print_item(list,
- &items[scrollamt + choice],
- states,
- choice, TRUE);
- (void) wnoutrefresh(list);
- print_arrows(dialog,
- box_x, box_y,
- scrollamt, max_choice, item_no, use_height);
- (void) wmove(dialog, cur_y, cur_x);
- wrefresh(dialog);
+ print_list(&all, choice, scrollamt, max_choice);
}
}
continue; /* wait for another key press */
@@ -645,7 +601,7 @@ dialog_checklist(const char *title,
int flag)
{
int result;
- int i;
+ int i, j;
DIALOG_LISTITEM *listitems;
bool separate_output = ((flag == FLAG_CHECK)
&& (dialog_vars.separate_output));
@@ -655,13 +611,15 @@ dialog_checklist(const char *title,
listitems = dlg_calloc(DIALOG_LISTITEM, (size_t) item_no + 1);
assert_ptr(listitems, "dialog_checklist");
- for (i = 0; i < item_no; ++i) {
- listitems[i].name = ItemName(i);
- listitems[i].text = ItemText(i);
+ for (i = j = 0; i < item_no; ++i) {
+ listitems[i].name = items[j++];
+ listitems[i].text = (dialog_vars.no_items
+ ? dlg_strempty()
+ : items[j++]);
+ listitems[i].state = !dlg_strcmp(items[j++], "on");
listitems[i].help = ((dialog_vars.item_help)
- ? ItemHelp(i)
+ ? items[j++]
: dlg_strempty());
- listitems[i].state = !dlg_strcmp(ItemStatus(i), "on");
}
dlg_align_columns(&listitems[0].text, (int) sizeof(DIALOG_LISTITEM), item_no);
@@ -720,10 +678,14 @@ dialog_checklist(const char *title,
} else {
if (dlg_need_separator())
dlg_add_separator();
- dlg_add_string(listitems[i].name);
+ if (flag == FLAG_CHECK)
+ dlg_add_quoted(listitems[i].name);
+ else
+ dlg_add_string(listitems[i].name);
}
}
}
+ dlg_add_last_key(separate_output);
}
dlg_free_columns(&listitems[0].text, (int) sizeof(DIALOG_LISTITEM), item_no);
diff --git a/contrib/dialog/columns.c b/contrib/dialog/columns.c
index 8e5620c4e7e07..d03761f816218 100644
--- a/contrib/dialog/columns.c
+++ b/contrib/dialog/columns.c
@@ -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;
}
diff --git a/contrib/dialog/config.guess b/contrib/dialog/config.guess
index e4b69669fd22a..872b96a161eec 100755
--- a/contrib/dialog/config.guess
+++ b/contrib/dialog/config.guess
@@ -2,9 +2,9 @@
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2911 Free Software Foundation, Inc.
+# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2011-01-01'
+timestamp='2012-09-25'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -17,9 +17,7 @@ timestamp='2011-01-01'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -57,7 +55,7 @@ GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -145,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
@@ -202,6 +200,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -220,10 +222,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
- *4.0)
+ *4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;;
- *5.*)
+ *5.*)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
@@ -304,7 +306,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -600,50 +602,50 @@ EOF
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
+ esac ;;
+ esac
fi
if [ "${HP_ARCH}" = "" ]; then
eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ sed 's/^ //' << EOF >$dummy.c
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
EOF
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
@@ -792,21 +794,26 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
- case ${UNAME_MACHINE} in
- pc98)
- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
+ i*:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
@@ -861,15 +868,22 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
@@ -877,30 +891,39 @@ EOF
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
- if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null | \
- grep -q __ARM_EABI__
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-gnu
else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ fi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
- echo cris-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
frv:Linux:*:*)
- echo frv-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
LIBC=gnu
eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ sed 's/^ //' << EOF >$dummy.c
#ifdef __dietlibc__
LIBC=dietlibc
#endif
@@ -937,7 +960,7 @@ EOF
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
- echo or32-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
@@ -972,13 +995,13 @@ EOF
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-tilera-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -1096,7 +1119,7 @@ EOF
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
+ && { echo i486-ncr-sysv4; exit; } ;;
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
OS_REL='.3'
test -r /etc/.relid \
@@ -1139,8 +1162,8 @@ EOF
echo ns32k-sni-sysv
fi
exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Richard.M.Bartel@ccMail.Census.GOV>
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit ;;
*:UNIX_System_V:4*:FTX*)
@@ -1168,9 +1191,9 @@ EOF
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
+ echo mips-nec-sysv${UNAME_RELEASE}
else
- echo mips-unknown-sysv${UNAME_RELEASE}
+ echo mips-unknown-sysv${UNAME_RELEASE}
fi
exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
@@ -1185,6 +1208,9 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1215,12 +1241,12 @@ EOF
i386)
eval $set_cc_for_build
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- UNAME_PROCESSOR="x86_64"
- fi
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ UNAME_PROCESSOR="x86_64"
+ fi
fi ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
@@ -1229,8 +1255,8 @@ EOF
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
if test "$UNAME_PROCESSOR" = "x86"; then
- UNAME_PROCESSOR=i386
- UNAME_MACHINE=pc
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
fi
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
exit ;;
@@ -1240,7 +1266,7 @@ EOF
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
+ NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
@@ -1309,11 +1335,11 @@ EOF
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
esac
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
eval $set_cc_for_build
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
@@ -1331,11 +1357,11 @@ main ()
#include <sys/param.h>
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
- "4"
+ "4"
#else
- ""
+ ""
#endif
- ); exit (0);
+ ); exit (0);
#endif
#endif
diff --git a/contrib/dialog/config.sub b/contrib/dialog/config.sub
index 7c62c346acfb0..bdda9e4a32c18 100755
--- a/contrib/dialog/config.sub
+++ b/contrib/dialog/config.sub
@@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-# 2011 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2011-04-01'
+timestamp='2012-08-18'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -21,9 +21,7 @@ timestamp='2011-04-01'
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -76,7 +74,7 @@ version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -125,13 +123,17 @@ esac
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
@@ -223,6 +225,12 @@ case $os in
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
-lynx*)
os=-lynxos
;;
@@ -247,17 +255,22 @@ case $basic_machine in
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
+ | aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | be32 | be64 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
+ | epiphany \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
+ | le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep | metag \
@@ -291,7 +304,7 @@ case $basic_machine in
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
- | rx \
+ | rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
@@ -300,7 +313,7 @@ case $basic_machine in
| spu \
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
- | v850 | v850e \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
@@ -315,8 +328,7 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12 | picochip)
- # Motorola 68HC11/12.
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -325,21 +337,28 @@ case $basic_machine in
ms1)
basic_machine=mt-unknown
;;
+
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
xscaleeb)
basic_machine=armeb-unknown
;;
+
xscaleel)
basic_machine=armel-unknown
;;
+
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
i*86 | x86_64)
- basic_machine=$basic_machine-pc
- ;;
+ basic_machine=$basic_machine-pc
+ ;;
# Object if more than one company name word.
*-*-*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
@@ -348,11 +367,13 @@ case $basic_machine in
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
+ | aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
+ | be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \
@@ -361,8 +382,10 @@ case $basic_machine in
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
+ | le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
@@ -396,7 +419,7 @@ case $basic_machine in
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
- | romp-* | rs6000-* | rx-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
@@ -404,10 +427,11 @@ case $basic_machine in
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tile-* | tilegx-* \
+ | tile*-* \
| tron-* \
| ubicom32-* \
- | v850-* | v850e-* | vax-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
@@ -707,7 +731,6 @@ case $basic_machine in
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
@@ -768,6 +791,10 @@ case $basic_machine in
microblaze)
basic_machine=microblaze-xilinx
;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
mingw32)
basic_machine=i386-pc
os=-mingw32
@@ -804,10 +831,18 @@ case $basic_machine in
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
+ msys)
+ basic_machine=i386-pc
+ os=-msys
+ ;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
@@ -836,10 +871,10 @@ case $basic_machine in
basic_machine=v70-nec
os=-sysv
;;
- next | m*-next)
+ next | m*-next )
basic_machine=m68k-next
case $os in
- -nextstep*)
+ -nextstep* )
;;
-ns2*)
os=-nextstep2
@@ -958,11 +993,9 @@ case $basic_machine in
pn)
basic_machine=pn-gould
;;
- power)
- basic_machine=power-ibm
+ power) basic_machine=power-ibm
;;
- ppc | ppcbe)
- basic_machine=powerpc-unknown
+ ppc | ppcbe) basic_machine=powerpc-unknown
;;
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
@@ -973,11 +1006,9 @@ case $basic_machine in
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- ppc64)
- basic_machine=powerpc64-unknown
+ ppc64) basic_machine=powerpc64-unknown
;;
- ppc64-*)
- basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown
@@ -1120,13 +1151,8 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
- # This must be matched before tile*.
- tilegx*)
- basic_machine=tilegx-unknown
- os=-linux-gnu
- ;;
tile*)
- basic_machine=tile-unknown
+ basic_machine=$basic_machine-unknown
os=-linux-gnu
;;
tx39)
@@ -1330,15 +1356,15 @@ case $os in
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-uclibc* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1421,7 +1447,7 @@ case $os in
-nova*)
os=-rtmk-nova
;;
- -ns2)
+ -ns2 )
os=-nextstep2
;;
-nsk*)
@@ -1521,6 +1547,9 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
+ hexagon-*)
+ os=-elf
+ ;;
tic54x-*)
os=-coff
;;
@@ -1548,9 +1577,6 @@ case $basic_machine in
;;
m68000-sun)
os=-sunos3
- # This also exists in the configure program, but was not the
- # default.
- # os=-sunos4
;;
m68*-cisco)
os=-aout
@@ -1618,7 +1644,7 @@ case $basic_machine in
m88k-omron*)
os=-luna
;;
- *-next)
+ *-next )
os=-nextstep
;;
*-sequent)
diff --git a/contrib/dialog/configure b/contrib/dialog/configure
index 44eaeb44f8dd0..c3900e39003d6 100755
--- a/contrib/dialog/configure
+++ b/contrib/dialog/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by Autoconf 2.52.20101002.
+# Generated by Autoconf 2.52.20121002.
#
# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -170,15 +170,16 @@ x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
+infodir='${datarootdir}/info'
+mandir='${datarootdir}/man'
# Identity of this package.
PACKAGE_NAME=
@@ -229,6 +230,13 @@ do
| --da=*)
datadir=$ac_optarg ;;
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
-disable-* | --disable-*)
ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
@@ -504,7 +512,7 @@ do
done
# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
localstatedir libdir includedir oldincludedir infodir mandir
do
eval ac_val=$`echo $ac_var`
@@ -641,15 +649,16 @@ Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
EOF
cat <<\EOF
@@ -677,7 +686,7 @@ Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --disable-echo display "compiling" commands
+ --disable-echo do not display "compiling" commands
--disable-largefile omit support for large files
--with-warnings test: turn on gcc warnings
--with-package=XXX rename dialog to XXX, library to libXXX.a, etc
@@ -702,7 +711,9 @@ Optional Packages:
--with-ncursesw compile/link with wide-char ncurses library
--disable-extras do not include extra dialogs
--disable-rc-file do not include config-file support
- --disable-Xdialog do not include Xdialog-style dialogs
+ --disable-Xdialog do not include Xdialog-style dialogs (1.1)
+ --disable-Xdialog2 do not include extra Xdialog-style dialogs (1.2)
+ --disable-whiptail do not map extra whiptail options
--disable-form do not include the form dialog
--disable-gauge do not include the gauge dialogs
--disable-tailbox do not include the tailbox dialog
@@ -779,7 +790,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
-generated by GNU Autoconf 2.52.20101002. Invocation command line was
+generated by GNU Autoconf 2.52.20121002. Invocation command line was
$ $0 $@
@@ -903,7 +914,7 @@ if test -z "$CONFIG_SITE"; then
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
- { echo "$as_me:906: loading site script $ac_site_file" >&5
+ { echo "$as_me:917: loading site script $ac_site_file" >&5
echo "$as_me: loading site script $ac_site_file" >&6;}
cat "$ac_site_file" >&5
. "$ac_site_file"
@@ -914,7 +925,7 @@ if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special
# files actually), so we avoid doing that.
if test -f "$cache_file"; then
- { echo "$as_me:917: loading cache $cache_file" >&5
+ { echo "$as_me:928: loading cache $cache_file" >&5
echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . $cache_file;;
@@ -922,7 +933,7 @@ echo "$as_me: loading cache $cache_file" >&6;}
esac
fi
else
- { echo "$as_me:925: creating cache $cache_file" >&5
+ { echo "$as_me:936: creating cache $cache_file" >&5
echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
@@ -938,21 +949,21 @@ for ac_var in `(set) 2>&1 |
eval ac_new_val="\$ac_env_${ac_var}_value"
case $ac_old_set,$ac_new_set in
set,)
- { echo "$as_me:941: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+ { echo "$as_me:952: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { echo "$as_me:945: error: \`$ac_var' was not set in the previous run" >&5
+ { echo "$as_me:956: error: \`$ac_var' was not set in the previous run" >&5
echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:951: error: \`$ac_var' has changed since the previous run:" >&5
+ { echo "$as_me:962: error: \`$ac_var' has changed since the previous run:" >&5
echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:953: former value: $ac_old_val" >&5
+ { echo "$as_me:964: former value: $ac_old_val" >&5
echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:955: current value: $ac_new_val" >&5
+ { echo "$as_me:966: current value: $ac_new_val" >&5
echo "$as_me: current value: $ac_new_val" >&2;}
ac_cache_corrupted=:
fi;;
@@ -971,9 +982,9 @@ echo "$as_me: current value: $ac_new_val" >&2;}
fi
done
if $ac_cache_corrupted; then
- { echo "$as_me:974: error: changes in the environment can compromise the build" >&5
+ { echo "$as_me:985: error: changes in the environment can compromise the build" >&5
echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:976: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+ { { echo "$as_me:987: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -994,10 +1005,10 @@ esac
echo "#! $SHELL" >conftest.sh
echo "exit 0" >>conftest.sh
chmod +x conftest.sh
-if { (echo "$as_me:997: PATH=\".;.\"; conftest.sh") >&5
+if { (echo "$as_me:1008: PATH=\".;.\"; conftest.sh") >&5
(PATH=".;."; conftest.sh) 2>&5
ac_status=$?
- echo "$as_me:1000: \$? = $ac_status" >&5
+ echo "$as_me:1011: \$? = $ac_status" >&5
(exit $ac_status); }; then
ac_path_separator=';'
else
@@ -1032,7 +1043,7 @@ ac_main_return=return
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:1035: checking for $ac_word" >&5
+echo "$as_me:1046: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1047,7 +1058,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="${ac_tool_prefix}gcc"
-echo "$as_me:1050: found $ac_dir/$ac_word" >&5
+echo "$as_me:1061: found $ac_dir/$ac_word" >&5
break
done
@@ -1055,10 +1066,10 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1058: result: $CC" >&5
+ echo "$as_me:1069: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1061: result: no" >&5
+ echo "$as_me:1072: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1067,7 +1078,7 @@ if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-echo "$as_me:1070: checking for $ac_word" >&5
+echo "$as_me:1081: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1082,7 +1093,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="gcc"
-echo "$as_me:1085: found $ac_dir/$ac_word" >&5
+echo "$as_me:1096: found $ac_dir/$ac_word" >&5
break
done
@@ -1090,10 +1101,10 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:1093: result: $ac_ct_CC" >&5
+ echo "$as_me:1104: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
- echo "$as_me:1096: result: no" >&5
+ echo "$as_me:1107: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1106,7 +1117,7 @@ if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:1109: checking for $ac_word" >&5
+echo "$as_me:1120: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1121,7 +1132,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="${ac_tool_prefix}cc"
-echo "$as_me:1124: found $ac_dir/$ac_word" >&5
+echo "$as_me:1135: found $ac_dir/$ac_word" >&5
break
done
@@ -1129,10 +1140,10 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1132: result: $CC" >&5
+ echo "$as_me:1143: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1135: result: no" >&5
+ echo "$as_me:1146: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1141,7 +1152,7 @@ if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-echo "$as_me:1144: checking for $ac_word" >&5
+echo "$as_me:1155: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1156,7 +1167,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="cc"
-echo "$as_me:1159: found $ac_dir/$ac_word" >&5
+echo "$as_me:1170: found $ac_dir/$ac_word" >&5
break
done
@@ -1164,10 +1175,10 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:1167: result: $ac_ct_CC" >&5
+ echo "$as_me:1178: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
- echo "$as_me:1170: result: no" >&5
+ echo "$as_me:1181: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1180,7 +1191,7 @@ fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-echo "$as_me:1183: checking for $ac_word" >&5
+echo "$as_me:1194: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1200,7 +1211,7 @@ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
continue
fi
ac_cv_prog_CC="cc"
-echo "$as_me:1203: found $ac_dir/$ac_word" >&5
+echo "$as_me:1214: found $ac_dir/$ac_word" >&5
break
done
@@ -1222,10 +1233,10 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1225: result: $CC" >&5
+ echo "$as_me:1236: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1228: result: no" >&5
+ echo "$as_me:1239: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1236,7 +1247,7 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:1239: checking for $ac_word" >&5
+echo "$as_me:1250: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1251,7 +1262,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-echo "$as_me:1254: found $ac_dir/$ac_word" >&5
+echo "$as_me:1265: found $ac_dir/$ac_word" >&5
break
done
@@ -1259,10 +1270,10 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1262: result: $CC" >&5
+ echo "$as_me:1273: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1265: result: no" >&5
+ echo "$as_me:1276: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1275,7 +1286,7 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:1278: checking for $ac_word" >&5
+echo "$as_me:1289: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1290,7 +1301,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="$ac_prog"
-echo "$as_me:1293: found $ac_dir/$ac_word" >&5
+echo "$as_me:1304: found $ac_dir/$ac_word" >&5
break
done
@@ -1298,10 +1309,10 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:1301: result: $ac_ct_CC" >&5
+ echo "$as_me:1312: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
- echo "$as_me:1304: result: no" >&5
+ echo "$as_me:1315: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1313,32 +1324,32 @@ fi
fi
-test -z "$CC" && { { echo "$as_me:1316: error: no acceptable cc found in \$PATH" >&5
+test -z "$CC" && { { echo "$as_me:1327: error: no acceptable cc found in \$PATH" >&5
echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
{ (exit 1); exit 1; }; }
# Provide some information about the compiler.
-echo "$as_me:1321:" \
+echo "$as_me:1332:" \
"checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:1324: \"$ac_compiler --version </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1335: \"$ac_compiler --version </dev/null >&5\"") >&5
(eval $ac_compiler --version </dev/null >&5) 2>&5
ac_status=$?
- echo "$as_me:1327: \$? = $ac_status" >&5
+ echo "$as_me:1338: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:1329: \"$ac_compiler -v </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1340: \"$ac_compiler -v </dev/null >&5\"") >&5
(eval $ac_compiler -v </dev/null >&5) 2>&5
ac_status=$?
- echo "$as_me:1332: \$? = $ac_status" >&5
+ echo "$as_me:1343: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:1334: \"$ac_compiler -V </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1345: \"$ac_compiler -V </dev/null >&5\"") >&5
(eval $ac_compiler -V </dev/null >&5) 2>&5
ac_status=$?
- echo "$as_me:1337: \$? = $ac_status" >&5
+ echo "$as_me:1348: \$? = $ac_status" >&5
(exit $ac_status); }
cat >conftest.$ac_ext <<_ACEOF
-#line 1341 "configure"
+#line 1352 "configure"
#include "confdefs.h"
int
@@ -1354,13 +1365,13 @@ ac_clean_files="$ac_clean_files a.out a.exe"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-echo "$as_me:1357: checking for C compiler default output" >&5
+echo "$as_me:1368: checking for C compiler default output" >&5
echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:1360: \"$ac_link_default\"") >&5
+if { (eval echo "$as_me:1371: \"$ac_link_default\"") >&5
(eval $ac_link_default) 2>&5
ac_status=$?
- echo "$as_me:1363: \$? = $ac_status" >&5
+ echo "$as_me:1374: \$? = $ac_status" >&5
(exit $ac_status); }; then
# Find the output, starting from the most likely. This scheme is
# not robust to junk in `.', hence go to wildcards (a.*) only as a last
@@ -1383,34 +1394,34 @@ done
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-{ { echo "$as_me:1386: error: C compiler cannot create executables" >&5
+{ { echo "$as_me:1397: error: C compiler cannot create executables" >&5
echo "$as_me: error: C compiler cannot create executables" >&2;}
{ (exit 77); exit 77; }; }
fi
ac_exeext=$ac_cv_exeext
-echo "$as_me:1392: result: $ac_file" >&5
+echo "$as_me:1403: result: $ac_file" >&5
echo "${ECHO_T}$ac_file" >&6
# Check the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-echo "$as_me:1397: checking whether the C compiler works" >&5
+echo "$as_me:1408: checking whether the C compiler works" >&5
echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
if { ac_try='./$ac_file'
- { (eval echo "$as_me:1403: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1414: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1406: \$? = $ac_status" >&5
+ echo "$as_me:1417: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { echo "$as_me:1413: error: cannot run C compiled programs.
+ { { echo "$as_me:1424: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'." >&5
echo "$as_me: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'." >&2;}
@@ -1418,24 +1429,24 @@ If you meant to cross compile, use \`--host'." >&2;}
fi
fi
fi
-echo "$as_me:1421: result: yes" >&5
+echo "$as_me:1432: result: yes" >&5
echo "${ECHO_T}yes" >&6
rm -f a.out a.exe conftest$ac_cv_exeext
ac_clean_files=$ac_clean_files_save
# Check the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-echo "$as_me:1428: checking whether we are cross compiling" >&5
+echo "$as_me:1439: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:1430: result: $cross_compiling" >&5
+echo "$as_me:1441: result: $cross_compiling" >&5
echo "${ECHO_T}$cross_compiling" >&6
-echo "$as_me:1433: checking for executable suffix" >&5
+echo "$as_me:1444: checking for executable suffix" >&5
echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
-if { (eval echo "$as_me:1435: \"$ac_link\"") >&5
+if { (eval echo "$as_me:1446: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:1438: \$? = $ac_status" >&5
+ echo "$as_me:1449: \$? = $ac_status" >&5
(exit $ac_status); }; then
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
@@ -1451,25 +1462,25 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
esac
done
else
- { { echo "$as_me:1454: error: cannot compute EXEEXT: cannot compile and link" >&5
+ { { echo "$as_me:1465: error: cannot compute EXEEXT: cannot compile and link" >&5
echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
{ (exit 1); exit 1; }; }
fi
rm -f conftest$ac_cv_exeext
-echo "$as_me:1460: result: $ac_cv_exeext" >&5
+echo "$as_me:1471: result: $ac_cv_exeext" >&5
echo "${ECHO_T}$ac_cv_exeext" >&6
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
-echo "$as_me:1466: checking for object suffix" >&5
+echo "$as_me:1477: checking for object suffix" >&5
echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
if test "${ac_cv_objext+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 1472 "configure"
+#line 1483 "configure"
#include "confdefs.h"
int
@@ -1481,10 +1492,10 @@ main ()
}
_ACEOF
rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:1484: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1495: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1487: \$? = $ac_status" >&5
+ echo "$as_me:1498: \$? = $ac_status" >&5
(exit $ac_status); }; then
for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
case $ac_file in
@@ -1496,24 +1507,24 @@ done
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-{ { echo "$as_me:1499: error: cannot compute OBJEXT: cannot compile" >&5
+{ { echo "$as_me:1510: error: cannot compute OBJEXT: cannot compile" >&5
echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
{ (exit 1); exit 1; }; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-echo "$as_me:1506: result: $ac_cv_objext" >&5
+echo "$as_me:1517: result: $ac_cv_objext" >&5
echo "${ECHO_T}$ac_cv_objext" >&6
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-echo "$as_me:1510: checking whether we are using the GNU C compiler" >&5
+echo "$as_me:1521: checking whether we are using the GNU C compiler" >&5
echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
if test "${ac_cv_c_compiler_gnu+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 1516 "configure"
+#line 1527 "configure"
#include "confdefs.h"
int
@@ -1528,16 +1539,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1531: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1542: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1534: \$? = $ac_status" >&5
+ echo "$as_me:1545: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1537: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1548: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1540: \$? = $ac_status" >&5
+ echo "$as_me:1551: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_compiler_gnu=yes
else
@@ -1549,19 +1560,19 @@ rm -f conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-echo "$as_me:1552: result: $ac_cv_c_compiler_gnu" >&5
+echo "$as_me:1563: result: $ac_cv_c_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
GCC=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
CFLAGS="-g"
-echo "$as_me:1558: checking whether $CC accepts -g" >&5
+echo "$as_me:1569: checking whether $CC accepts -g" >&5
echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cc_g+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 1564 "configure"
+#line 1575 "configure"
#include "confdefs.h"
int
@@ -1573,16 +1584,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1576: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1587: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1579: \$? = $ac_status" >&5
+ echo "$as_me:1590: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1582: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1593: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1585: \$? = $ac_status" >&5
+ echo "$as_me:1596: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_prog_cc_g=yes
else
@@ -1592,7 +1603,7 @@ ac_cv_prog_cc_g=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:1595: result: $ac_cv_prog_cc_g" >&5
+echo "$as_me:1606: result: $ac_cv_prog_cc_g" >&5
echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
@@ -1619,16 +1630,16 @@ cat >conftest.$ac_ext <<_ACEOF
#endif
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1622: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1633: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1625: \$? = $ac_status" >&5
+ echo "$as_me:1636: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1628: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1639: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1631: \$? = $ac_status" >&5
+ echo "$as_me:1642: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
for ac_declaration in \
''\
@@ -1640,7 +1651,7 @@ if { (eval echo "$as_me:1622: \"$ac_compile\"") >&5
'void exit (int);'
do
cat >conftest.$ac_ext <<_ACEOF
-#line 1643 "configure"
+#line 1654 "configure"
#include "confdefs.h"
#include <stdlib.h>
$ac_declaration
@@ -1653,16 +1664,16 @@ exit (42);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1656: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1667: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1659: \$? = $ac_status" >&5
+ echo "$as_me:1670: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1662: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1673: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1665: \$? = $ac_status" >&5
+ echo "$as_me:1676: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -1672,7 +1683,7 @@ continue
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line 1675 "configure"
+#line 1686 "configure"
#include "confdefs.h"
$ac_declaration
int
@@ -1684,16 +1695,16 @@ exit (42);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1687: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1698: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1690: \$? = $ac_status" >&5
+ echo "$as_me:1701: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1693: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1704: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1696: \$? = $ac_status" >&5
+ echo "$as_me:1707: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -1721,13 +1732,214 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_main_return=return
+GCC_VERSION=none
+if test "$GCC" = yes ; then
+ echo "$as_me:1737: checking version of $CC" >&5
+echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
+ GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
+ test -z "$GCC_VERSION" && GCC_VERSION=unknown
+ echo "$as_me:1741: result: $GCC_VERSION" >&5
+echo "${ECHO_T}$GCC_VERSION" >&6
+fi
+
+echo "$as_me:1745: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line 1753 "configure"
+#include "confdefs.h"
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1802: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1805: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1808: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1811: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:1828: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:1831: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# This should have been defined by AC_PROG_CC
+: ${CC:=cc}
+
+echo "$as_me:1839: checking \$CC variable" >&5
+echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
+case "$CC" in #(vi
+*[\ \ ]-[IUD]*)
+ echo "$as_me:1843: result: broken" >&5
+echo "${ECHO_T}broken" >&6
+ { echo "$as_me:1845: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
+echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
+ # humor him...
+ cf_flags=`echo "$CC" | sed -e 's/^[^ ]*[ ]//'`
+ CC=`echo "$CC" | sed -e 's/[ ].*//'`
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_flags
+do
+case $cf_fix_cppflags in
+no)
+ case $cf_add_cflags in #(vi
+ -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+ case $cf_add_cflags in
+ -D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ *$cf_add_cflags) #(vi
+ ;;
+ *) #(vi
+ case $cf_add_cflags in #(vi
+ -D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ *)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+ ;;
+*)
+ echo "$as_me:1931: result: ok" >&5
+echo "${ECHO_T}ok" >&6
+ ;;
+esac
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_main_return=return
-echo "$as_me:1730: checking how to run the C preprocessor" >&5
+echo "$as_me:1942: checking how to run the C preprocessor" >&5
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
@@ -1748,18 +1960,18 @@ do
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat >conftest.$ac_ext <<_ACEOF
-#line 1751 "configure"
+#line 1963 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax error
_ACEOF
-if { (eval echo "$as_me:1756: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:1968: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:1762: \$? = $ac_status" >&5
+ echo "$as_me:1974: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -1782,17 +1994,17 @@ rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
-#line 1785 "configure"
+#line 1997 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:1789: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2001: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:1795: \$? = $ac_status" >&5
+ echo "$as_me:2007: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -1829,7 +2041,7 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-echo "$as_me:1832: result: $CPP" >&5
+echo "$as_me:2044: result: $CPP" >&5
echo "${ECHO_T}$CPP" >&6
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
@@ -1839,18 +2051,18 @@ do
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat >conftest.$ac_ext <<_ACEOF
-#line 1842 "configure"
+#line 2054 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax error
_ACEOF
-if { (eval echo "$as_me:1847: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2059: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:1853: \$? = $ac_status" >&5
+ echo "$as_me:2065: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -1873,17 +2085,17 @@ rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
-#line 1876 "configure"
+#line 2088 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:1880: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2092: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:1886: \$? = $ac_status" >&5
+ echo "$as_me:2098: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -1911,7 +2123,7 @@ rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
- { { echo "$as_me:1914: error: C preprocessor \"$CPP\" fails sanity check" >&5
+ { { echo "$as_me:2126: error: C preprocessor \"$CPP\" fails sanity check" >&5
echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -1923,50 +2135,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_main_return=return
-if test $ac_cv_c_compiler_gnu = yes; then
- echo "$as_me:1927: checking whether $CC needs -traditional" >&5
-echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
-if test "${ac_cv_prog_gcc_traditional+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_pattern="Autoconf.*'x'"
- cat >conftest.$ac_ext <<_ACEOF
-#line 1934 "configure"
-#include "confdefs.h"
-#include <sgtty.h>
-int Autoconf = TIOCGETP;
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "$ac_pattern" >/dev/null 2>&1; then
- ac_cv_prog_gcc_traditional=yes
-else
- ac_cv_prog_gcc_traditional=no
-fi
-rm -rf conftest*
-
- if test $ac_cv_prog_gcc_traditional = no; then
- cat >conftest.$ac_ext <<_ACEOF
-#line 1949 "configure"
-#include "confdefs.h"
-#include <termio.h>
-int Autoconf = TCGETA;
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "$ac_pattern" >/dev/null 2>&1; then
- ac_cv_prog_gcc_traditional=yes
-fi
-rm -rf conftest*
-
- fi
-fi
-echo "$as_me:1962: result: $ac_cv_prog_gcc_traditional" >&5
-echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
- if test $ac_cv_prog_gcc_traditional = yes; then
- CC="$CC -traditional"
- fi
-fi
-
-echo "$as_me:1969: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "$as_me:2138: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
@@ -1986,11 +2155,11 @@ fi
rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$as_me:1989: result: yes" >&5
+ echo "$as_me:2158: result: yes" >&5
echo "${ECHO_T}yes" >&6
SET_MAKE=
else
- echo "$as_me:1993: result: no" >&5
+ echo "$as_me:2162: result: no" >&5
echo "${ECHO_T}no" >&6
SET_MAKE="MAKE=${MAKE-make}"
fi
@@ -1998,7 +2167,7 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:2001: checking for $ac_word" >&5
+echo "$as_me:2170: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_RANLIB+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2013,7 +2182,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-echo "$as_me:2016: found $ac_dir/$ac_word" >&5
+echo "$as_me:2185: found $ac_dir/$ac_word" >&5
break
done
@@ -2021,10 +2190,10 @@ fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- echo "$as_me:2024: result: $RANLIB" >&5
+ echo "$as_me:2193: result: $RANLIB" >&5
echo "${ECHO_T}$RANLIB" >&6
else
- echo "$as_me:2027: result: no" >&5
+ echo "$as_me:2196: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2033,7 +2202,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
-echo "$as_me:2036: checking for $ac_word" >&5
+echo "$as_me:2205: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2048,7 +2217,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_RANLIB="ranlib"
-echo "$as_me:2051: found $ac_dir/$ac_word" >&5
+echo "$as_me:2220: found $ac_dir/$ac_word" >&5
break
done
@@ -2057,10 +2226,10 @@ fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:2060: result: $ac_ct_RANLIB" >&5
+ echo "$as_me:2229: result: $ac_ct_RANLIB" >&5
echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
- echo "$as_me:2063: result: no" >&5
+ echo "$as_me:2232: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2086,7 +2255,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
fi
done
if test -z "$ac_aux_dir"; then
- { { echo "$as_me:2089: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+ { { echo "$as_me:2258: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -2106,7 +2275,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:2109: checking for a BSD compatible install" >&5
+echo "$as_me:2278: checking for a BSD compatible install" >&5
echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
@@ -2155,7 +2324,7 @@ fi
INSTALL=$ac_install_sh
fi
fi
-echo "$as_me:2158: result: $INSTALL" >&5
+echo "$as_me:2327: result: $INSTALL" >&5
echo "${ECHO_T}$INSTALL" >&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
@@ -2166,10 +2335,47 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+for ac_prog in tdlint lint alint splint lclint
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:2342: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LINT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$LINT"; then
+ ac_cv_prog_LINT="$LINT" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_LINT="$ac_prog"
+echo "$as_me:2357: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+LINT=$ac_cv_prog_LINT
+if test -n "$LINT"; then
+ echo "$as_me:2365: result: $LINT" >&5
+echo "${ECHO_T}$LINT" >&6
+else
+ echo "$as_me:2368: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$LINT" && break
+done
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo "$as_me:2172: checking for $ac_word" >&5
+echo "$as_me:2378: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_AR+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2184,7 +2390,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_AR="${ac_tool_prefix}ar"
-echo "$as_me:2187: found $ac_dir/$ac_word" >&5
+echo "$as_me:2393: found $ac_dir/$ac_word" >&5
break
done
@@ -2192,10 +2398,10 @@ fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
- echo "$as_me:2195: result: $AR" >&5
+ echo "$as_me:2401: result: $AR" >&5
echo "${ECHO_T}$AR" >&6
else
- echo "$as_me:2198: result: no" >&5
+ echo "$as_me:2404: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2204,7 +2410,7 @@ if test -z "$ac_cv_prog_AR"; then
ac_ct_AR=$AR
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
-echo "$as_me:2207: checking for $ac_word" >&5
+echo "$as_me:2413: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2219,7 +2425,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_AR="ar"
-echo "$as_me:2222: found $ac_dir/$ac_word" >&5
+echo "$as_me:2428: found $ac_dir/$ac_word" >&5
break
done
@@ -2228,10 +2434,10 @@ fi
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
- echo "$as_me:2231: result: $ac_ct_AR" >&5
+ echo "$as_me:2437: result: $ac_ct_AR" >&5
echo "${ECHO_T}$ac_ct_AR" >&6
else
- echo "$as_me:2234: result: no" >&5
+ echo "$as_me:2440: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2240,215 +2446,7 @@ else
AR="$ac_cv_prog_AR"
fi
-echo "$as_me:2243: checking for POSIXized ISC" >&5
-echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
-if test -d /etc/conf/kconfig.d &&
- grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
-then
- echo "$as_me:2248: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- ISC=yes # If later tests want to check for ISC.
-
-cat >>confdefs.h <<\EOF
-#define _POSIX_SOURCE 1
-EOF
-
- if test "$GCC" = yes; then
- CC="$CC -posix"
- else
- CC="$CC -Xp"
- fi
-else
- echo "$as_me:2262: result: no" >&5
-echo "${ECHO_T}no" >&6
- ISC=
-fi
-
-echo "$as_me:2267: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-#line 2275 "configure"
-#include "confdefs.h"
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2324: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:2327: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2330: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:2333: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:2350: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
- *)
- echo "$as_me:2353: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-echo "$as_me:2358: checking for an ANSI C-conforming const" >&5
-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
-if test "${ac_cv_c_const+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-#line 2364 "configure"
-#include "confdefs.h"
-
-int
-main ()
-{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
- /* Ultrix mips cc rejects this. */
- typedef int charset[2];
- const charset x;
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *ccp;
- char **p;
- /* NEC SVR4.0.2 mips cc rejects this. */
- struct point {int x, y;};
- static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in
- an arm of an if-expression whose if-part is not a constant
- expression */
- const char *g = "string";
- ccp = &g + (g ? g-g : 0);
- /* HPUX 7.0 cc rejects these. */
- ++ccp;
- p = (char**) ccp;
- ccp = (char const *const *) p;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
- }
- { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
- }
- { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
- }
- { /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
- }
- { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
- }
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2422: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:2425: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2428: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:2431: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_const=yes
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_c_const=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:2441: result: $ac_cv_c_const" >&5
-echo "${ECHO_T}$ac_cv_c_const" >&6
-if test $ac_cv_c_const = no; then
-
-cat >>confdefs.h <<\EOF
-#define const
-EOF
-
-fi
-
-echo "$as_me:2451: checking for makeflags variable" >&5
+echo "$as_me:2449: checking for makeflags variable" >&5
echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
if test "${cf_cv_makeflags+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2482,10 +2480,10 @@ CF_EOF
rm -f cf_makeflags.tmp
fi
-echo "$as_me:2485: result: $cf_cv_makeflags" >&5
+echo "$as_me:2483: result: $cf_cv_makeflags" >&5
echo "${ECHO_T}$cf_cv_makeflags" >&6
-echo "$as_me:2488: checking if filesystem supports mixed-case filenames" >&5
+echo "$as_me:2486: checking if filesystem supports mixed-case filenames" >&5
echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
if test "${cf_cv_mixedcase+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2512,9 +2510,10 @@ else
fi
fi
-echo "$as_me:2515: result: $cf_cv_mixedcase" >&5
+echo "$as_me:2513: result: $cf_cv_mixedcase" >&5
echo "${ECHO_T}$cf_cv_mixedcase" >&6
-test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
+test "$cf_cv_mixedcase" = yes &&
+cat >>confdefs.h <<\EOF
#define MIXEDCASE_FILENAMES 1
EOF
@@ -2522,7 +2521,7 @@ for ac_prog in exctags ctags
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:2525: checking for $ac_word" >&5
+echo "$as_me:2524: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CTAGS+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2537,7 +2536,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CTAGS="$ac_prog"
-echo "$as_me:2540: found $ac_dir/$ac_word" >&5
+echo "$as_me:2539: found $ac_dir/$ac_word" >&5
break
done
@@ -2545,10 +2544,10 @@ fi
fi
CTAGS=$ac_cv_prog_CTAGS
if test -n "$CTAGS"; then
- echo "$as_me:2548: result: $CTAGS" >&5
+ echo "$as_me:2547: result: $CTAGS" >&5
echo "${ECHO_T}$CTAGS" >&6
else
- echo "$as_me:2551: result: no" >&5
+ echo "$as_me:2550: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2559,7 +2558,7 @@ for ac_prog in exetags etags
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:2562: checking for $ac_word" >&5
+echo "$as_me:2561: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ETAGS+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2574,7 +2573,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ETAGS="$ac_prog"
-echo "$as_me:2577: found $ac_dir/$ac_word" >&5
+echo "$as_me:2576: found $ac_dir/$ac_word" >&5
break
done
@@ -2582,10 +2581,10 @@ fi
fi
ETAGS=$ac_cv_prog_ETAGS
if test -n "$ETAGS"; then
- echo "$as_me:2585: result: $ETAGS" >&5
+ echo "$as_me:2584: result: $ETAGS" >&5
echo "${ECHO_T}$ETAGS" >&6
else
- echo "$as_me:2588: result: no" >&5
+ echo "$as_me:2587: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2594,7 +2593,7 @@ done
# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
set dummy ${CTAGS:-ctags}; ac_word=$2
-echo "$as_me:2597: checking for $ac_word" >&5
+echo "$as_me:2596: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2609,7 +2608,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_MAKE_LOWER_TAGS="yes"
-echo "$as_me:2612: found $ac_dir/$ac_word" >&5
+echo "$as_me:2611: found $ac_dir/$ac_word" >&5
break
done
@@ -2618,17 +2617,17 @@ fi
fi
MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
if test -n "$MAKE_LOWER_TAGS"; then
- echo "$as_me:2621: result: $MAKE_LOWER_TAGS" >&5
+ echo "$as_me:2620: result: $MAKE_LOWER_TAGS" >&5
echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
else
- echo "$as_me:2624: result: no" >&5
+ echo "$as_me:2623: result: no" >&5
echo "${ECHO_T}no" >&6
fi
if test "$cf_cv_mixedcase" = yes ; then
# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
set dummy ${ETAGS:-etags}; ac_word=$2
-echo "$as_me:2631: checking for $ac_word" >&5
+echo "$as_me:2630: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2643,7 +2642,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_MAKE_UPPER_TAGS="yes"
-echo "$as_me:2646: found $ac_dir/$ac_word" >&5
+echo "$as_me:2645: found $ac_dir/$ac_word" >&5
break
done
@@ -2652,10 +2651,10 @@ fi
fi
MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
if test -n "$MAKE_UPPER_TAGS"; then
- echo "$as_me:2655: result: $MAKE_UPPER_TAGS" >&5
+ echo "$as_me:2654: result: $MAKE_UPPER_TAGS" >&5
echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
else
- echo "$as_me:2658: result: no" >&5
+ echo "$as_me:2657: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2675,7 +2674,7 @@ else
MAKE_LOWER_TAGS="#"
fi
-echo "$as_me:2678: checking if you want to see long compiling messages" >&5
+echo "$as_me:2677: checking if you want to see long compiling messages" >&5
echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
# Check whether --enable-echo or --disable-echo was given.
@@ -2709,16 +2708,16 @@ else
ECHO_CC=''
fi;
-echo "$as_me:2712: result: $enableval" >&5
+echo "$as_me:2711: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
# Make sure we can run config.sub.
$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:2717: error: cannot run $ac_config_sub" >&5
+ { { echo "$as_me:2716: error: cannot run $ac_config_sub" >&5
echo "$as_me: error: cannot run $ac_config_sub" >&2;}
{ (exit 1); exit 1; }; }
-echo "$as_me:2721: checking build system type" >&5
+echo "$as_me:2720: checking build system type" >&5
echo $ECHO_N "checking build system type... $ECHO_C" >&6
if test "${ac_cv_build+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2727,16 +2726,16 @@ else
test -z "$ac_cv_build_alias" &&
ac_cv_build_alias=`$ac_config_guess`
test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:2730: error: cannot guess build type; you must specify one" >&5
+ { { echo "$as_me:2729: error: cannot guess build type; you must specify one" >&5
echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
{ (exit 1); exit 1; }; }
ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- { { echo "$as_me:2734: error: $ac_config_sub $ac_cv_build_alias failed." >&5
+ { { echo "$as_me:2733: error: $ac_config_sub $ac_cv_build_alias failed." >&5
echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
{ (exit 1); exit 1; }; }
fi
-echo "$as_me:2739: result: $ac_cv_build" >&5
+echo "$as_me:2738: result: $ac_cv_build" >&5
echo "${ECHO_T}$ac_cv_build" >&6
build=$ac_cv_build
build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
@@ -2744,7 +2743,7 @@ build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
- echo "$as_me:2747: checking host system type" >&5
+ echo "$as_me:2746: checking host system type" >&5
echo $ECHO_N "checking host system type... $ECHO_C" >&6
if test "${ac_cv_host+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2753,12 +2752,12 @@ else
test -z "$ac_cv_host_alias" &&
ac_cv_host_alias=$ac_cv_build_alias
ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:2756: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+ { { echo "$as_me:2755: error: $ac_config_sub $ac_cv_host_alias failed" >&5
echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
{ (exit 1); exit 1; }; }
fi
-echo "$as_me:2761: result: $ac_cv_host" >&5
+echo "$as_me:2760: result: $ac_cv_host" >&5
echo "${ECHO_T}$ac_cv_host" >&6
host=$ac_cv_host
host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
@@ -2772,7 +2771,8 @@ else
system_name="`(hostname) 2>/dev/null`"
fi
fi
-test -n "$system_name" && cat >>confdefs.h <<EOF
+test -n "$system_name" &&
+cat >>confdefs.h <<EOF
#define SYSTEM_NAME "$system_name"
EOF
@@ -2807,15 +2807,21 @@ esac
PROG_EXT="$EXEEXT"
-test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
+test -n "$PROG_EXT" &&
+cat >>confdefs.h <<EOF
#define PROG_EXT "$PROG_EXT"
EOF
+ echo "$as_me:2815: checking for PATH separator" >&5
+echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
case $cf_cv_system_name in
os2*) PATH_SEPARATOR=';' ;;
- *) PATH_SEPARATOR=':' ;;
+ *) ${PATH_SEPARATOR:=':'} ;;
esac
+ echo "$as_me:2822: result: $PATH_SEPARATOR" >&5
+echo "${ECHO_T}$PATH_SEPARATOR" >&6
+
case $cf_cv_system_name in #(vi
OS/2*|os2*) #(vi
LIB_PREFIX=''
@@ -2829,7 +2835,7 @@ cf_POSIX_C_SOURCE=199506L
cf_xopen_source=
case $host_os in #(vi
-aix[456]*) #(vi
+aix[4-7]*) #(vi
cf_xopen_source="-D_ALL_SOURCE"
;;
cygwin) #(vi
@@ -2840,6 +2846,7 @@ darwin[0-8].*) #(vi
;;
darwin*) #(vi
cf_xopen_source="-D_DARWIN_C_SOURCE"
+ cf_XOPEN_SOURCE=
;;
freebsd*|dragonfly*) #(vi
# 5.x headers associate
@@ -2857,17 +2864,18 @@ hpux*) #(vi
;;
irix[56].*) #(vi
cf_xopen_source="-D_SGI_SOURCE"
+ cf_XOPEN_SOURCE=
;;
linux*|gnu*|mint*|k*bsd*-gnu) #(vi
-echo "$as_me:2863: checking if we must define _GNU_SOURCE" >&5
+echo "$as_me:2871: checking if we must define _GNU_SOURCE" >&5
echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
if test "${cf_cv_gnu_source+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 2870 "configure"
+#line 2878 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -2882,16 +2890,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2885: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2893: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2888: \$? = $ac_status" >&5
+ echo "$as_me:2896: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2891: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2899: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2894: \$? = $ac_status" >&5
+ echo "$as_me:2902: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_gnu_source=no
else
@@ -2900,7 +2908,7 @@ cat conftest.$ac_ext >&5
cf_save="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
cat >conftest.$ac_ext <<_ACEOF
-#line 2903 "configure"
+#line 2911 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -2915,16 +2923,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2918: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2926: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2921: \$? = $ac_status" >&5
+ echo "$as_me:2929: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2924: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2932: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2927: \$? = $ac_status" >&5
+ echo "$as_me:2935: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_gnu_source=no
else
@@ -2939,16 +2947,260 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:2942: result: $cf_cv_gnu_source" >&5
+echo "$as_me:2950: result: $cf_cv_gnu_source" >&5
echo "${ECHO_T}$cf_cv_gnu_source" >&6
test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_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
+
+cf_save_CFLAGS="$CFLAGS"
+cf_save_CPPFLAGS="$CPPFLAGS"
+
+cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
+ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
+
+cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
+ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
+
+echo "$as_me:2972: checking if we should define _POSIX_C_SOURCE" >&5
+echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
+if test "${cf_cv_posix_c_source+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+echo "${as_me:-configure}:2978: testing if the symbol is already defined go no further ..." 1>&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2981 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2996: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:2999: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:3002: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3005: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_posix_c_source=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_want_posix_source=no
+ case .$cf_POSIX_C_SOURCE in #(vi
+ .[12]??*) #(vi
+ cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+ ;;
+ .2) #(vi
+ cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+ cf_want_posix_source=yes
+ ;;
+ .*)
+ cf_want_posix_source=yes
+ ;;
+ esac
+ if test "$cf_want_posix_source" = yes ; then
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3026 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifdef _POSIX_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3041: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:3044: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:3047: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3050: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+
+echo "${as_me:-configure}:3061: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
+
+ CFLAGS="$cf_trim_CFLAGS"
+ CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
+
+echo "${as_me:-configure}:3066: testing if the second compile does not leave our definition intact error ..." 1>&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3069 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3084: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:3087: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:3090: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3093: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_posix_c_source=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$cf_save_CFLAGS"
+ CPPFLAGS="$cf_save_CPPFLAGS"
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:3109: result: $cf_cv_posix_c_source" >&5
+echo "${ECHO_T}$cf_cv_posix_c_source" >&6
+
+if test "$cf_cv_posix_c_source" != no ; then
+ CFLAGS="$cf_trim_CFLAGS"
+ CPPFLAGS="$cf_trim_CPPFLAGS"
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_cv_posix_c_source
+do
+case $cf_fix_cppflags in
+no)
+ case $cf_add_cflags in #(vi
+ -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+ case $cf_add_cflags in
+ -D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ *$cf_add_cflags) #(vi
+ ;;
+ *) #(vi
+ case $cf_add_cflags in #(vi
+ -D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ *)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+fi
+
;;
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
@@ -2962,23 +3214,25 @@ 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__"
;;
*)
- echo "$as_me:2972: checking if we should define _XOPEN_SOURCE" >&5
+
+echo "$as_me:3222: checking if we should define _XOPEN_SOURCE" >&5
echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
if test "${cf_cv_xopen_source+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 2979 "configure"
+#line 3229 "configure"
#include "confdefs.h"
+
+#include <stdlib.h>
+#include <string.h>
#include <sys/types.h>
+
int
main ()
{
@@ -2991,16 +3245,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2994: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3248: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2997: \$? = $ac_status" >&5
+ echo "$as_me:3251: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3000: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3254: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3003: \$? = $ac_status" >&5
+ echo "$as_me:3257: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_xopen_source=no
else
@@ -3009,9 +3263,13 @@ cat conftest.$ac_ext >&5
cf_save="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
cat >conftest.$ac_ext <<_ACEOF
-#line 3012 "configure"
+#line 3266 "configure"
#include "confdefs.h"
+
+#include <stdlib.h>
+#include <string.h>
#include <sys/types.h>
+
int
main ()
{
@@ -3024,16 +3282,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3027: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3285: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3030: \$? = $ac_status" >&5
+ echo "$as_me:3288: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3033: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3291: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3036: \$? = $ac_status" >&5
+ echo "$as_me:3294: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_xopen_source=no
else
@@ -3048,9 +3306,10 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:3051: result: $cf_cv_xopen_source" >&5
+echo "$as_me:3309: result: $cf_cv_xopen_source" >&5
echo "${ECHO_T}$cf_cv_xopen_source" >&6
- if test "$cf_cv_xopen_source" != no ; then
+
+if test "$cf_cv_xopen_source" != no ; then
CFLAGS=`echo "$CFLAGS" | \
sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
@@ -3060,7 +3319,7 @@ CPPFLAGS=`echo "$CPPFLAGS" | \
sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
- cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
+ cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
cf_fix_cppflags=no
cf_new_cflags=
@@ -3140,7 +3399,7 @@ if test -n "$cf_new_extra_cppflags" ; then
EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
fi
- fi
+fi
cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
@@ -3155,16 +3414,16 @@ cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
-echo "$as_me:3158: checking if we should define _POSIX_C_SOURCE" >&5
+echo "$as_me:3417: checking if we should define _POSIX_C_SOURCE" >&5
echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
if test "${cf_cv_posix_c_source+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
-echo "${as_me:-configure}:3164: testing if the symbol is already defined go no further ..." 1>&5
+echo "${as_me:-configure}:3423: testing if the symbol is already defined go no further ..." 1>&5
cat >conftest.$ac_ext <<_ACEOF
-#line 3167 "configure"
+#line 3426 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -3179,16 +3438,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3182: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3441: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3185: \$? = $ac_status" >&5
+ echo "$as_me:3444: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3188: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3447: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3191: \$? = $ac_status" >&5
+ echo "$as_me:3450: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_posix_c_source=no
else
@@ -3209,7 +3468,7 @@ cf_want_posix_source=no
esac
if test "$cf_want_posix_source" = yes ; then
cat >conftest.$ac_ext <<_ACEOF
-#line 3212 "configure"
+#line 3471 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -3224,16 +3483,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3227: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3486: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3230: \$? = $ac_status" >&5
+ echo "$as_me:3489: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3233: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3492: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3236: \$? = $ac_status" >&5
+ echo "$as_me:3495: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -3244,15 +3503,15 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "${as_me:-configure}:3247: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
+echo "${as_me:-configure}:3506: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
CFLAGS="$cf_trim_CFLAGS"
CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
-echo "${as_me:-configure}:3252: testing if the second compile does not leave our definition intact error ..." 1>&5
+echo "${as_me:-configure}:3511: testing if the second compile does not leave our definition intact error ..." 1>&5
cat >conftest.$ac_ext <<_ACEOF
-#line 3255 "configure"
+#line 3514 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -3267,16 +3526,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3270: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3529: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3273: \$? = $ac_status" >&5
+ echo "$as_me:3532: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3276: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3535: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3279: \$? = $ac_status" >&5
+ echo "$as_me:3538: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -3292,7 +3551,7 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:3295: result: $cf_cv_posix_c_source" >&5
+echo "$as_me:3554: result: $cf_cv_posix_c_source" >&5
echo "${ECHO_T}$cf_cv_posix_c_source" >&6
if test "$cf_cv_posix_c_source" != no ; then
@@ -3464,6 +3723,273 @@ fi
fi
+if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
+ echo "$as_me:3727: checking if _XOPEN_SOURCE really is set" >&5
+echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3730 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+int
+main ()
+{
+
+#ifndef _XOPEN_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3745: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:3748: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:3751: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3754: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_XOPEN_SOURCE_set=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_XOPEN_SOURCE_set=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:3763: result: $cf_XOPEN_SOURCE_set" >&5
+echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
+ if test $cf_XOPEN_SOURCE_set = yes
+ then
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3768 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+int
+main ()
+{
+
+#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3783: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:3786: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:3789: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3792: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_XOPEN_SOURCE_set_ok=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_XOPEN_SOURCE_set_ok=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ if test $cf_XOPEN_SOURCE_set_ok = no
+ then
+ { echo "$as_me:3803: WARNING: _XOPEN_SOURCE is lower than requested" >&5
+echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
+ fi
+ else
+
+echo "$as_me:3808: checking if we should define _XOPEN_SOURCE" >&5
+echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
+if test "${cf_cv_xopen_source+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3815 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+
+int
+main ()
+{
+
+#ifndef _XOPEN_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3834: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:3837: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:3840: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3843: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_xopen_source=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_save="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3852 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+
+int
+main ()
+{
+
+#ifdef _XOPEN_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3871: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:3874: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:3877: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3880: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_xopen_source=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_xopen_source=$cf_XOPEN_SOURCE
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$cf_save"
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:3895: result: $cf_cv_xopen_source" >&5
+echo "${ECHO_T}$cf_cv_xopen_source" >&6
+
+if test "$cf_cv_xopen_source" != no ; then
+
+CFLAGS=`echo "$CFLAGS" | \
+ sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
+
+ cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_temp_xopen_source
+do
+case $cf_fix_cppflags in
+no)
+ case $cf_add_cflags in #(vi
+ -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+ case $cf_add_cflags in
+ -D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ *$cf_add_cflags) #(vi
+ ;;
+ *) #(vi
+ case $cf_add_cflags in #(vi
+ -D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ *)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+fi
+
+ fi
+fi
+
# Check whether --enable-largefile or --disable-largefile was given.
if test "${enable_largefile+set}" = set; then
enableval="$enable_largefile"
@@ -3471,7 +3997,7 @@ if test "${enable_largefile+set}" = set; then
fi;
if test "$enable_largefile" != no; then
- echo "$as_me:3474: checking for special C compiler options needed for large files" >&5
+ echo "$as_me:4000: checking for special C compiler options needed for large files" >&5
echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
if test "${ac_cv_sys_largefile_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3483,7 +4009,7 @@ else
# IRIX 6.2 and later do not support large files by default,
# so use the C compiler's -n32 option if that helps.
cat >conftest.$ac_ext <<_ACEOF
-#line 3486 "configure"
+#line 4012 "configure"
#include "confdefs.h"
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
@@ -3503,16 +4029,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3506: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4032: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3509: \$? = $ac_status" >&5
+ echo "$as_me:4035: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3512: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4038: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3515: \$? = $ac_status" >&5
+ echo "$as_me:4041: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -3522,16 +4048,16 @@ fi
rm -f conftest.$ac_objext
CC="$CC -n32"
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3525: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4051: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3528: \$? = $ac_status" >&5
+ echo "$as_me:4054: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3531: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4057: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3534: \$? = $ac_status" >&5
+ echo "$as_me:4060: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sys_largefile_CC=' -n32'; break
else
@@ -3545,13 +4071,13 @@ rm -f conftest.$ac_objext
rm -f conftest.$ac_ext
fi
fi
-echo "$as_me:3548: result: $ac_cv_sys_largefile_CC" >&5
+echo "$as_me:4074: result: $ac_cv_sys_largefile_CC" >&5
echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
if test "$ac_cv_sys_largefile_CC" != no; then
CC=$CC$ac_cv_sys_largefile_CC
fi
- echo "$as_me:3554: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+ echo "$as_me:4080: checking for _FILE_OFFSET_BITS value needed for large files" >&5
echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
if test "${ac_cv_sys_file_offset_bits+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3559,7 +4085,7 @@ else
while :; do
ac_cv_sys_file_offset_bits=no
cat >conftest.$ac_ext <<_ACEOF
-#line 3562 "configure"
+#line 4088 "configure"
#include "confdefs.h"
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
@@ -3579,16 +4105,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3582: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4108: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3585: \$? = $ac_status" >&5
+ echo "$as_me:4111: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3588: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4114: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3591: \$? = $ac_status" >&5
+ echo "$as_me:4117: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -3597,7 +4123,7 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line 3600 "configure"
+#line 4126 "configure"
#include "confdefs.h"
#define _FILE_OFFSET_BITS 64
#include <sys/types.h>
@@ -3618,16 +4144,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3621: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4147: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3624: \$? = $ac_status" >&5
+ echo "$as_me:4150: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3627: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4153: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3630: \$? = $ac_status" >&5
+ echo "$as_me:4156: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sys_file_offset_bits=64; break
else
@@ -3638,7 +4164,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
break
done
fi
-echo "$as_me:3641: result: $ac_cv_sys_file_offset_bits" >&5
+echo "$as_me:4167: result: $ac_cv_sys_file_offset_bits" >&5
echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
if test "$ac_cv_sys_file_offset_bits" != no; then
@@ -3648,7 +4174,7 @@ EOF
fi
rm -rf conftest*
- echo "$as_me:3651: checking for _LARGE_FILES value needed for large files" >&5
+ echo "$as_me:4177: checking for _LARGE_FILES value needed for large files" >&5
echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
if test "${ac_cv_sys_large_files+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3656,7 +4182,7 @@ else
while :; do
ac_cv_sys_large_files=no
cat >conftest.$ac_ext <<_ACEOF
-#line 3659 "configure"
+#line 4185 "configure"
#include "confdefs.h"
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
@@ -3676,16 +4202,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3679: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4205: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3682: \$? = $ac_status" >&5
+ echo "$as_me:4208: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3685: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4211: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3688: \$? = $ac_status" >&5
+ echo "$as_me:4214: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -3694,7 +4220,7 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line 3697 "configure"
+#line 4223 "configure"
#include "confdefs.h"
#define _LARGE_FILES 1
#include <sys/types.h>
@@ -3715,16 +4241,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3718: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4244: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3721: \$? = $ac_status" >&5
+ echo "$as_me:4247: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3724: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4250: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3727: \$? = $ac_status" >&5
+ echo "$as_me:4253: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sys_large_files=1; break
else
@@ -3735,7 +4261,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
break
done
fi
-echo "$as_me:3738: result: $ac_cv_sys_large_files" >&5
+echo "$as_me:4264: result: $ac_cv_sys_large_files" >&5
echo "${ECHO_T}$ac_cv_sys_large_files" >&6
if test "$ac_cv_sys_large_files" != no; then
@@ -3748,7 +4274,7 @@ rm -rf conftest*
fi
if test "$enable_largefile" != no ; then
- echo "$as_me:3751: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+ echo "$as_me:4277: checking for _LARGEFILE_SOURCE value needed for large files" >&5
echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
if test "${ac_cv_sys_largefile_source+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3756,7 +4282,7 @@ else
while :; do
ac_cv_sys_largefile_source=no
cat >conftest.$ac_ext <<_ACEOF
-#line 3759 "configure"
+#line 4285 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -3768,16 +4294,16 @@ return !fseeko;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3771: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4297: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3774: \$? = $ac_status" >&5
+ echo "$as_me:4300: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3777: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4303: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3780: \$? = $ac_status" >&5
+ echo "$as_me:4306: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -3786,7 +4312,7 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line 3789 "configure"
+#line 4315 "configure"
#include "confdefs.h"
#define _LARGEFILE_SOURCE 1
#include <stdio.h>
@@ -3799,16 +4325,16 @@ return !fseeko;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3802: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4328: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3805: \$? = $ac_status" >&5
+ echo "$as_me:4331: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3808: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4334: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3811: \$? = $ac_status" >&5
+ echo "$as_me:4337: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sys_largefile_source=1; break
else
@@ -3819,7 +4345,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
break
done
fi
-echo "$as_me:3822: result: $ac_cv_sys_largefile_source" >&5
+echo "$as_me:4348: result: $ac_cv_sys_largefile_source" >&5
echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
if test "$ac_cv_sys_largefile_source" != no; then
@@ -3833,13 +4359,13 @@ rm -rf conftest*
# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
# in glibc 2.1.3, but that breaks too many other things.
# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
-echo "$as_me:3836: checking for fseeko" >&5
+echo "$as_me:4362: checking for fseeko" >&5
echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
if test "${ac_cv_func_fseeko+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 3842 "configure"
+#line 4368 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -3851,16 +4377,16 @@ return fseeko && fseeko (stdin, 0, 0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3854: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4380: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3857: \$? = $ac_status" >&5
+ echo "$as_me:4383: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3860: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4386: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3863: \$? = $ac_status" >&5
+ echo "$as_me:4389: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_fseeko=yes
else
@@ -3870,7 +4396,7 @@ ac_cv_func_fseeko=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:3873: result: $ac_cv_func_fseeko" >&5
+echo "$as_me:4399: result: $ac_cv_func_fseeko" >&5
echo "${ECHO_T}$ac_cv_func_fseeko" >&6
if test $ac_cv_func_fseeko = yes; then
@@ -3891,14 +4417,14 @@ fi
test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
- echo "$as_me:3894: checking whether to use struct dirent64" >&5
+ echo "$as_me:4420: checking whether to use struct dirent64" >&5
echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
if test "${cf_cv_struct_dirent64+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 3901 "configure"
+#line 4427 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -3919,16 +4445,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3922: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4448: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3925: \$? = $ac_status" >&5
+ echo "$as_me:4451: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3928: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4454: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3931: \$? = $ac_status" >&5
+ echo "$as_me:4457: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_struct_dirent64=yes
else
@@ -3939,27 +4465,18 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:3942: result: $cf_cv_struct_dirent64" >&5
+echo "$as_me:4468: result: $cf_cv_struct_dirent64" >&5
echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
- test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
+ test "$cf_cv_struct_dirent64" = yes &&
+cat >>confdefs.h <<\EOF
#define HAVE_STRUCT_DIRENT64 1
EOF
fi
-GCC_VERSION=none
-if test "$GCC" = yes ; then
- echo "$as_me:3952: checking version of $CC" >&5
-echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
- GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
- test -z "$GCC_VERSION" && GCC_VERSION=unknown
- echo "$as_me:3956: result: $GCC_VERSION" >&5
-echo "${ECHO_T}$GCC_VERSION" >&6
-fi
-
if ( test "$GCC" = yes || test "$GXX" = yes )
then
-echo "$as_me:3962: checking if you want to check for gcc warnings" >&5
+echo "$as_me:4479: checking if you want to check for gcc warnings" >&5
echo $ECHO_N "checking if you want to check for gcc warnings... $ECHO_C" >&6
# Check whether --with-warnings or --without-warnings was given.
@@ -3969,7 +4486,7 @@ if test "${with_warnings+set}" = set; then
else
cf_opt_with_warnings=no
fi;
-echo "$as_me:3972: result: $cf_opt_with_warnings" >&5
+echo "$as_me:4489: result: $cf_opt_with_warnings" >&5
echo "${ECHO_T}$cf_opt_with_warnings" >&6
if test "$cf_opt_with_warnings" != no ; then
@@ -3991,10 +4508,10 @@ cat > conftest.i <<EOF
EOF
if test "$GCC" = yes
then
- { echo "$as_me:3994: checking for $CC __attribute__ directives..." >&5
+ { echo "$as_me:4511: checking for $CC __attribute__ directives..." >&5
echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
cat > conftest.$ac_ext <<EOF
-#line 3997 "${as_me:-configure}"
+#line 4514 "${as_me:-configure}"
#include "confdefs.h"
#include "conftest.h"
#include "conftest.i"
@@ -4043,36 +4560,60 @@ EOF
;;
esac
- if { (eval echo "$as_me:4046: \"$ac_compile\"") >&5
+ if { (eval echo "$as_me:4563: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4049: \$? = $ac_status" >&5
+ echo "$as_me:4566: \$? = $ac_status" >&5
(exit $ac_status); }; then
- test -n "$verbose" && echo "$as_me:4051: result: ... $cf_attribute" >&5
+ test -n "$verbose" && echo "$as_me:4568: result: ... $cf_attribute" >&5
echo "${ECHO_T}... $cf_attribute" >&6
cat conftest.h >>confdefs.h
case $cf_attribute in #(vi
- printf) #(vi
- if test "$cf_printf_attribute" = no ; then
- cat >>confdefs.h <<EOF
-#define GCC_PRINTFLIKE(fmt,var) /* nothing */
+ noreturn) #(vi
+
+cat >>confdefs.h <<EOF
+#define GCC_NORETURN $cf_directive
EOF
- else
- cat >>confdefs.h <<EOF
-#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
+
+ ;;
+ printf) #(vi
+ cf_value='/* nothing */'
+ if test "$cf_printf_attribute" != no ; then
+ cf_value='__attribute__((format(printf,fmt,var)))'
+
+cat >>confdefs.h <<\EOF
+#define GCC_PRINTF 1
EOF
+
fi
+
+cat >>confdefs.h <<EOF
+#define GCC_PRINTFLIKE(fmt,var) $cf_value
+EOF
+
;;
scanf) #(vi
- if test "$cf_scanf_attribute" = no ; then
- cat >>confdefs.h <<EOF
-#define GCC_SCANFLIKE(fmt,var) /* nothing */
-EOF
- else
- cat >>confdefs.h <<EOF
-#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
+ cf_value='/* nothing */'
+ if test "$cf_scanf_attribute" != no ; then
+ cf_value='__attribute__((format(scanf,fmt,var)))'
+
+cat >>confdefs.h <<\EOF
+#define GCC_SCANF 1
EOF
+
fi
+
+cat >>confdefs.h <<EOF
+#define GCC_SCANFLIKE(fmt,var) $cf_value
+EOF
+
+ ;;
+ unused) #(vi
+
+cat >>confdefs.h <<EOF
+#define GCC_UNUSED $cf_directive
+EOF
+
;;
esac
fi
@@ -4088,12 +4629,12 @@ INTEL_COMPILER=no
if test "$GCC" = yes ; then
case $host_os in
linux*|gnu*)
- echo "$as_me:4091: checking if this is really Intel C compiler" >&5
+ echo "$as_me:4632: checking if this is really Intel C compiler" >&5
echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
cf_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -no-gcc"
cat >conftest.$ac_ext <<_ACEOF
-#line 4096 "configure"
+#line 4637 "configure"
#include "confdefs.h"
int
@@ -4110,16 +4651,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4113: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4654: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4116: \$? = $ac_status" >&5
+ echo "$as_me:4657: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4119: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4660: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4122: \$? = $ac_status" >&5
+ echo "$as_me:4663: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
INTEL_COMPILER=yes
cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
@@ -4130,14 +4671,63 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
CFLAGS="$cf_save_CFLAGS"
- echo "$as_me:4133: result: $INTEL_COMPILER" >&5
+ echo "$as_me:4674: result: $INTEL_COMPILER" >&5
echo "${ECHO_T}$INTEL_COMPILER" >&6
;;
esac
fi
+CLANG_COMPILER=no
+
+if test "$GCC" = yes ; then
+ echo "$as_me:4683: checking if this is really Clang C compiler" >&5
+echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
+ cf_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Qunused-arguments"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4688 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+#ifdef __clang__
+#else
+make an error
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4705: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4708: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4711: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4714: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ CLANG_COMPILER=yes
+cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$cf_save_CFLAGS"
+ echo "$as_me:4725: result: $CLANG_COMPILER" >&5
+echo "${ECHO_T}$CLANG_COMPILER" >&6
+fi
+
cat > conftest.$ac_ext <<EOF
-#line 4140 "${as_me:-configure}"
+#line 4730 "${as_me:-configure}"
int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
EOF
@@ -4154,7 +4744,7 @@ then
# remark #981: operands are evaluated in unspecified order
# warning #279: controlling expression is constant
- { echo "$as_me:4157: checking for $CC warning options..." >&5
+ { echo "$as_me:4747: checking for $CC warning options..." >&5
echo "$as_me: checking for $CC warning options..." >&6;}
cf_save_CFLAGS="$CFLAGS"
EXTRA_CFLAGS="-Wall"
@@ -4170,12 +4760,12 @@ echo "$as_me: checking for $CC warning options..." >&6;}
wd981
do
CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
- if { (eval echo "$as_me:4173: \"$ac_compile\"") >&5
+ if { (eval echo "$as_me:4763: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4176: \$? = $ac_status" >&5
+ echo "$as_me:4766: \$? = $ac_status" >&5
(exit $ac_status); }; then
- test -n "$verbose" && echo "$as_me:4178: result: ... -$cf_opt" >&5
+ test -n "$verbose" && echo "$as_me:4768: result: ... -$cf_opt" >&5
echo "${ECHO_T}... -$cf_opt" >&6
EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
fi
@@ -4184,7 +4774,7 @@ echo "${ECHO_T}... -$cf_opt" >&6
elif test "$GCC" = yes
then
- { echo "$as_me:4187: checking for $CC warning options..." >&5
+ { echo "$as_me:4777: checking for $CC warning options..." >&5
echo "$as_me: checking for $CC warning options..." >&6;}
cf_save_CFLAGS="$CFLAGS"
EXTRA_CFLAGS=
@@ -4204,12 +4794,12 @@ echo "$as_me: checking for $CC warning options..." >&6;}
Wundef $cf_warn_CONST
do
CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
- if { (eval echo "$as_me:4207: \"$ac_compile\"") >&5
+ if { (eval echo "$as_me:4797: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4210: \$? = $ac_status" >&5
+ echo "$as_me:4800: \$? = $ac_status" >&5
(exit $ac_status); }; then
- test -n "$verbose" && echo "$as_me:4212: result: ... -$cf_opt" >&5
+ test -n "$verbose" && echo "$as_me:4802: result: ... -$cf_opt" >&5
echo "${ECHO_T}... -$cf_opt" >&6
case $cf_opt in #(vi
Wcast-qual) #(vi
@@ -4220,7 +4810,17 @@ echo "${ECHO_T}... -$cf_opt" >&6
[34].*)
test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
-echo "${as_me:-configure}:4223: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
+echo "${as_me:-configure}:4813: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
+
+ continue;;
+ esac
+ ;;
+ Wpointer-arith) #(vi
+ case $GCC_VERSION in
+ [12].*)
+ test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
+
+echo "${as_me:-configure}:4823: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
continue;;
esac
@@ -4245,7 +4845,7 @@ else
fi;
if test -f $srcdir/VERSION ; then
- echo "$as_me:4248: checking for package version" >&5
+ echo "$as_me:4848: checking for package version" >&5
echo $ECHO_N "checking for package version... $ECHO_C" >&6
# if there are not enough fields, cut returns the last one...
@@ -4257,39 +4857,39 @@ echo $ECHO_N "checking for package version... $ECHO_C" >&6
VERSION="$cf_field1"
VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
- test -z "$VERSION_MAJOR" && { { echo "$as_me:4260: error: missing major-version" >&5
+ test -z "$VERSION_MAJOR" && { { echo "$as_me:4860: error: missing major-version" >&5
echo "$as_me: error: missing major-version" >&2;}
{ (exit 1); exit 1; }; }
VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
- test -z "$VERSION_MINOR" && { { echo "$as_me:4265: error: missing minor-version" >&5
+ test -z "$VERSION_MINOR" && { { echo "$as_me:4865: error: missing minor-version" >&5
echo "$as_me: error: missing minor-version" >&2;}
{ (exit 1); exit 1; }; }
- echo "$as_me:4269: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
+ echo "$as_me:4869: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
- echo "$as_me:4272: checking for package patch date" >&5
+ echo "$as_me:4872: checking for package patch date" >&5
echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
case .$VERSION_PATCH in
.)
- { { echo "$as_me:4277: error: missing patch-date $VERSION_PATCH" >&5
+ { { echo "$as_me:4877: error: missing patch-date $VERSION_PATCH" >&5
echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
{ (exit 1); exit 1; }; }
;;
.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
;;
*)
- { { echo "$as_me:4284: error: illegal patch-date $VERSION_PATCH" >&5
+ { { echo "$as_me:4884: error: illegal patch-date $VERSION_PATCH" >&5
echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
{ (exit 1); exit 1; }; }
;;
esac
- echo "$as_me:4289: result: $VERSION_PATCH" >&5
+ echo "$as_me:4889: result: $VERSION_PATCH" >&5
echo "${ECHO_T}$VERSION_PATCH" >&6
else
- { { echo "$as_me:4292: error: did not find $srcdir/VERSION" >&5
+ { { echo "$as_me:4892: error: did not find $srcdir/VERSION" >&5
echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -4297,23 +4897,24 @@ fi
# show the actual data that we have for versions:
test -n "$verbose" && echo " VERSION $VERSION" 1>&6
-echo "${as_me:-configure}:4300: testing VERSION $VERSION ..." 1>&5
+echo "${as_me:-configure}:4900: testing VERSION $VERSION ..." 1>&5
test -n "$verbose" && echo " VERSION_MAJOR $VERSION_MAJOR" 1>&6
-echo "${as_me:-configure}:4304: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
+echo "${as_me:-configure}:4904: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
test -n "$verbose" && echo " VERSION_MINOR $VERSION_MINOR" 1>&6
-echo "${as_me:-configure}:4308: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
+echo "${as_me:-configure}:4908: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
test -n "$verbose" && echo " VERSION_PATCH $VERSION_PATCH" 1>&6
-echo "${as_me:-configure}:4312: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
+echo "${as_me:-configure}:4912: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
cf_PACKAGE=dialog
PACKAGE=$PACKAGE
- cat >>confdefs.h <<EOF
+
+cat >>confdefs.h <<EOF
#define PACKAGE "$PACKAGE"
EOF
@@ -4336,13 +4937,14 @@ else
fi;
EXTRAOBJS=""
-echo "$as_me:4339: checking for ANSI C header files" >&5
+
+echo "$as_me:4941: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4345 "configure"
+#line 4947 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -4350,13 +4952,13 @@ else
#include <float.h>
_ACEOF
-if { (eval echo "$as_me:4353: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:4955: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:4359: \$? = $ac_status" >&5
+ echo "$as_me:4961: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -4378,7 +4980,7 @@ rm -f conftest.err conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
-#line 4381 "configure"
+#line 4983 "configure"
#include "confdefs.h"
#include <string.h>
@@ -4396,7 +4998,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
-#line 4399 "configure"
+#line 5001 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -4417,7 +5019,7 @@ if test $ac_cv_header_stdc = yes; then
:
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4420 "configure"
+#line 5022 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
@@ -4443,15 +5045,15 @@ main ()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:4446: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5048: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4449: \$? = $ac_status" >&5
+ echo "$as_me:5051: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:4451: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5053: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4454: \$? = $ac_status" >&5
+ echo "$as_me:5056: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -4464,7 +5066,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
-echo "$as_me:4467: result: $ac_cv_header_stdc" >&5
+echo "$as_me:5069: result: $ac_cv_header_stdc" >&5
echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then
@@ -4474,7 +5076,7 @@ EOF
fi
-echo "$as_me:4477: checking for inline" >&5
+echo "$as_me:5079: checking for inline" >&5
echo $ECHO_N "checking for inline... $ECHO_C" >&6
if test "${ac_cv_c_inline+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4482,7 +5084,7 @@ else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat >conftest.$ac_ext <<_ACEOF
-#line 4485 "configure"
+#line 5087 "configure"
#include "confdefs.h"
#ifndef __cplusplus
static $ac_kw int static_foo () {return 0; }
@@ -4491,16 +5093,16 @@ $ac_kw int foo () {return 0; }
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4494: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5096: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4497: \$? = $ac_status" >&5
+ echo "$as_me:5099: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4500: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5102: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4503: \$? = $ac_status" >&5
+ echo "$as_me:5105: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_c_inline=$ac_kw; break
else
@@ -4511,7 +5113,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:4514: result: $ac_cv_c_inline" >&5
+echo "$as_me:5116: result: $ac_cv_c_inline" >&5
echo "${ECHO_T}$ac_cv_c_inline" >&6
case $ac_cv_c_inline in
inline | yes) ;;
@@ -4532,28 +5134,28 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:4535: checking for $ac_header" >&5
+echo "$as_me:5137: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4541 "configure"
+#line 5143 "configure"
#include "confdefs.h"
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4547: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5149: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4550: \$? = $ac_status" >&5
+ echo "$as_me:5152: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4553: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5155: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4556: \$? = $ac_status" >&5
+ echo "$as_me:5158: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Header=yes"
else
@@ -4563,7 +5165,7 @@ eval "$as_ac_Header=no"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:4566: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:5168: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -4573,13 +5175,13 @@ EOF
fi
done
-echo "$as_me:4576: checking for off_t" >&5
+echo "$as_me:5178: checking for off_t" >&5
echo $ECHO_N "checking for off_t... $ECHO_C" >&6
if test "${ac_cv_type_off_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4582 "configure"
+#line 5184 "configure"
#include "confdefs.h"
$ac_includes_default
int
@@ -4594,16 +5196,16 @@ if (sizeof (off_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4597: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5199: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4600: \$? = $ac_status" >&5
+ echo "$as_me:5202: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4603: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5205: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4606: \$? = $ac_status" >&5
+ echo "$as_me:5208: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_type_off_t=yes
else
@@ -4613,7 +5215,7 @@ ac_cv_type_off_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:4616: result: $ac_cv_type_off_t" >&5
+echo "$as_me:5218: result: $ac_cv_type_off_t" >&5
echo "${ECHO_T}$ac_cv_type_off_t" >&6
if test $ac_cv_type_off_t = yes; then
:
@@ -4625,13 +5227,13 @@ EOF
fi
-echo "$as_me:4628: checking for size_t" >&5
+echo "$as_me:5230: checking for size_t" >&5
echo $ECHO_N "checking for size_t... $ECHO_C" >&6
if test "${ac_cv_type_size_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4634 "configure"
+#line 5236 "configure"
#include "confdefs.h"
$ac_includes_default
int
@@ -4646,16 +5248,16 @@ if (sizeof (size_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4649: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5251: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4652: \$? = $ac_status" >&5
+ echo "$as_me:5254: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4655: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5257: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4658: \$? = $ac_status" >&5
+ echo "$as_me:5260: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_type_size_t=yes
else
@@ -4665,7 +5267,7 @@ ac_cv_type_size_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:4668: result: $ac_cv_type_size_t" >&5
+echo "$as_me:5270: result: $ac_cv_type_size_t" >&5
echo "${ECHO_T}$ac_cv_type_size_t" >&6
if test $ac_cv_type_size_t = yes; then
:
@@ -4679,13 +5281,13 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
-echo "$as_me:4682: checking for working alloca.h" >&5
+echo "$as_me:5284: checking for working alloca.h" >&5
echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
if test "${ac_cv_working_alloca_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4688 "configure"
+#line 5290 "configure"
#include "confdefs.h"
#include <alloca.h>
int
@@ -4697,16 +5299,16 @@ char *p = (char *) alloca (2 * sizeof (int));
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4700: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5302: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4703: \$? = $ac_status" >&5
+ echo "$as_me:5305: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4706: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5308: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4709: \$? = $ac_status" >&5
+ echo "$as_me:5311: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_working_alloca_h=yes
else
@@ -4716,7 +5318,7 @@ ac_cv_working_alloca_h=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:4719: result: $ac_cv_working_alloca_h" >&5
+echo "$as_me:5321: result: $ac_cv_working_alloca_h" >&5
echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
if test $ac_cv_working_alloca_h = yes; then
@@ -4726,13 +5328,13 @@ EOF
fi
-echo "$as_me:4729: checking for alloca" >&5
+echo "$as_me:5331: checking for alloca" >&5
echo $ECHO_N "checking for alloca... $ECHO_C" >&6
if test "${ac_cv_func_alloca_works+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4735 "configure"
+#line 5337 "configure"
#include "confdefs.h"
#ifdef __GNUC__
# define alloca __builtin_alloca
@@ -4764,16 +5366,16 @@ char *p = (char *) alloca (1);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4767: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5369: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4770: \$? = $ac_status" >&5
+ echo "$as_me:5372: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4773: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5375: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4776: \$? = $ac_status" >&5
+ echo "$as_me:5378: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_alloca_works=yes
else
@@ -4783,7 +5385,7 @@ ac_cv_func_alloca_works=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:4786: result: $ac_cv_func_alloca_works" >&5
+echo "$as_me:5388: result: $ac_cv_func_alloca_works" >&5
echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
if test $ac_cv_func_alloca_works = yes; then
@@ -4804,13 +5406,13 @@ cat >>confdefs.h <<\EOF
#define C_ALLOCA 1
EOF
-echo "$as_me:4807: checking whether \`alloca.c' needs Cray hooks" >&5
+echo "$as_me:5409: checking whether \`alloca.c' needs Cray hooks" >&5
echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
if test "${ac_cv_os_cray+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4813 "configure"
+#line 5415 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -4828,18 +5430,18 @@ fi
rm -rf conftest*
fi
-echo "$as_me:4831: result: $ac_cv_os_cray" >&5
+echo "$as_me:5433: result: $ac_cv_os_cray" >&5
echo "${ECHO_T}$ac_cv_os_cray" >&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:4836: checking for $ac_func" >&5
+echo "$as_me:5438: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4842 "configure"
+#line 5444 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
@@ -4862,7 +5464,7 @@ main ()
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
#endif
;
@@ -4870,16 +5472,16 @@ f = $ac_func;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4873: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5475: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4876: \$? = $ac_status" >&5
+ echo "$as_me:5478: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4879: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5481: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4882: \$? = $ac_status" >&5
+ echo "$as_me:5484: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
@@ -4889,7 +5491,7 @@ eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:4892: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:5494: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
@@ -4903,7 +5505,7 @@ fi
done
fi
-echo "$as_me:4906: checking stack direction for C alloca" >&5
+echo "$as_me:5508: checking stack direction for C alloca" >&5
echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
if test "${ac_cv_c_stack_direction+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4912,7 +5514,7 @@ else
ac_cv_c_stack_direction=0
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4915 "configure"
+#line 5517 "configure"
#include "confdefs.h"
int
find_stack_direction ()
@@ -4935,15 +5537,15 @@ main ()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:4938: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5540: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4941: \$? = $ac_status" >&5
+ echo "$as_me:5543: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:4943: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5545: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4946: \$? = $ac_status" >&5
+ echo "$as_me:5548: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_c_stack_direction=1
else
@@ -4955,7 +5557,7 @@ fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:4958: result: $ac_cv_c_stack_direction" >&5
+echo "$as_me:5560: result: $ac_cv_c_stack_direction" >&5
echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
cat >>confdefs.h <<EOF
@@ -4967,23 +5569,23 @@ fi
for ac_header in stdlib.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:4970: checking for $ac_header" >&5
+echo "$as_me:5572: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4976 "configure"
+#line 5578 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:4980: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:5582: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:4986: \$? = $ac_status" >&5
+ echo "$as_me:5588: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -5002,7 +5604,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:5005: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:5607: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -5015,13 +5617,13 @@ done
for ac_func in getpagesize
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:5018: checking for $ac_func" >&5
+echo "$as_me:5620: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5024 "configure"
+#line 5626 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
@@ -5044,7 +5646,7 @@ main ()
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
#endif
;
@@ -5052,16 +5654,16 @@ f = $ac_func;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5055: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5657: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5058: \$? = $ac_status" >&5
+ echo "$as_me:5660: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5061: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5663: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5064: \$? = $ac_status" >&5
+ echo "$as_me:5666: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
@@ -5071,7 +5673,7 @@ eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:5074: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:5676: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -5081,7 +5683,7 @@ EOF
fi
done
-echo "$as_me:5084: checking for working mmap" >&5
+echo "$as_me:5686: checking for working mmap" >&5
echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5090,7 +5692,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5093 "configure"
+#line 5695 "configure"
#include "confdefs.h"
$ac_includes_default
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -5217,15 +5819,15 @@ main ()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:5220: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5822: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5223: \$? = $ac_status" >&5
+ echo "$as_me:5825: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:5225: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5827: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5228: \$? = $ac_status" >&5
+ echo "$as_me:5830: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -5237,7 +5839,7 @@ fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:5240: result: $ac_cv_func_mmap_fixed_mapped" >&5
+echo "$as_me:5842: result: $ac_cv_func_mmap_fixed_mapped" >&5
echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
if test $ac_cv_func_mmap_fixed_mapped = yes; then
@@ -5248,13 +5850,13 @@ EOF
fi
rm -f conftest.mmap
- echo "$as_me:5251: checking whether we are using the GNU C Library 2.1 or newer" >&5
+ echo "$as_me:5853: checking whether we are using the GNU C Library 2.1 or newer" >&5
echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6
if test "${ac_cv_gnu_library_2_1+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5257 "configure"
+#line 5859 "configure"
#include "confdefs.h"
#include <features.h>
@@ -5274,7 +5876,7 @@ fi
rm -rf conftest*
fi
-echo "$as_me:5277: result: $ac_cv_gnu_library_2_1" >&5
+echo "$as_me:5879: result: $ac_cv_gnu_library_2_1" >&5
echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6
GLIBC21="$ac_cv_gnu_library_2_1"
@@ -5287,7 +5889,7 @@ test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && ec
: ${CONFIG_H:=config.h}
if test -z "$PACKAGE" ; then
- { { echo "$as_me:5290: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&5
+ { { echo "$as_me:5892: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&5
echo "$as_me: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -5304,23 +5906,23 @@ for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
stdlib.h string.h unistd.h sys/param.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:5307: checking for $ac_header" >&5
+echo "$as_me:5909: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5313 "configure"
+#line 5915 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:5317: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:5919: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:5323: \$? = $ac_status" >&5
+ echo "$as_me:5925: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -5339,7 +5941,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:5342: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:5944: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -5354,13 +5956,13 @@ getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
strdup strtoul tsearch __argz_count __argz_stringify __argz_next
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:5357: checking for $ac_func" >&5
+echo "$as_me:5959: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5363 "configure"
+#line 5965 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
@@ -5383,7 +5985,7 @@ main ()
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
#endif
;
@@ -5391,16 +5993,16 @@ f = $ac_func;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5394: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5996: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5397: \$? = $ac_status" >&5
+ echo "$as_me:5999: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5400: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6002: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5403: \$? = $ac_status" >&5
+ echo "$as_me:6005: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
@@ -5410,7 +6012,7 @@ eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:5413: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:6015: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -5458,7 +6060,7 @@ if test -n "$cf_searchpath/include" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 5461 "configure"
+#line 6063 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -5470,16 +6072,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5473: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6075: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:5476: \$? = $ac_status" >&5
+ echo "$as_me:6078: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:5479: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6081: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5482: \$? = $ac_status" >&5
+ echo "$as_me:6084: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -5496,7 +6098,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:5499: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:6101: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -5537,7 +6139,7 @@ if test -n "$cf_searchpath/../include" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 5540 "configure"
+#line 6142 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -5549,16 +6151,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5552: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6154: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:5555: \$? = $ac_status" >&5
+ echo "$as_me:6157: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:5558: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6160: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5561: \$? = $ac_status" >&5
+ echo "$as_me:6163: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -5575,7 +6177,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:5578: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:6180: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -5591,7 +6193,7 @@ echo "${as_me:-configure}:5578: testing adding $cf_add_incdir to include-path ..
fi
else
-{ { echo "$as_me:5594: error: cannot find libiconv under $withval" >&5
+{ { echo "$as_me:6196: error: cannot find libiconv under $withval" >&5
echo "$as_me: error: cannot find libiconv under $withval" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -5616,7 +6218,7 @@ if test -n "$cf_searchpath/lib" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:5619: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:6221: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -5645,7 +6247,7 @@ if test -n "$cf_searchpath" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:5648: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:6250: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -5654,7 +6256,7 @@ echo "${as_me:-configure}:5648: testing adding $cf_add_libdir to library-path ..
fi
else
-{ { echo "$as_me:5657: error: cannot find libiconv under $withval" >&5
+{ { echo "$as_me:6259: error: cannot find libiconv under $withval" >&5
echo "$as_me: error: cannot find libiconv under $withval" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -5665,7 +6267,7 @@ done
fi;
- echo "$as_me:5668: checking for iconv" >&5
+ echo "$as_me:6270: checking for iconv" >&5
echo $ECHO_N "checking for iconv... $ECHO_C" >&6
if test "${am_cv_func_iconv+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5676,12 +6278,12 @@ else
cf_cv_header_path_iconv=
cf_cv_library_path_iconv=
-echo "${as_me:-configure}:5679: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
+echo "${as_me:-configure}:6281: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
cf_save_LIBS="$LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 5684 "configure"
+#line 6286 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -5700,16 +6302,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5703: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6305: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5706: \$? = $ac_status" >&5
+ echo "$as_me:6308: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5709: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6311: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5712: \$? = $ac_status" >&5
+ echo "$as_me:6314: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_find_linkage_iconv=yes
@@ -5723,7 +6325,7 @@ cat conftest.$ac_ext >&5
LIBS="-liconv $cf_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 5726 "configure"
+#line 6328 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -5742,16 +6344,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5745: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6347: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5748: \$? = $ac_status" >&5
+ echo "$as_me:6350: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5751: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6353: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5754: \$? = $ac_status" >&5
+ echo "$as_me:6356: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_find_linkage_iconv=yes
@@ -5768,9 +6370,9 @@ cat conftest.$ac_ext >&5
test -n "$verbose" && echo " find linkage for iconv library" 1>&6
-echo "${as_me:-configure}:5771: testing find linkage for iconv library ..." 1>&5
+echo "${as_me:-configure}:6373: testing find linkage for iconv library ..." 1>&5
-echo "${as_me:-configure}:5773: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
+echo "${as_me:-configure}:6375: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
cf_save_CPPFLAGS="$CPPFLAGS"
cf_test_CPPFLAGS="$CPPFLAGS"
@@ -5883,11 +6485,11 @@ cf_search="$cf_search $cf_header_path_list"
if test -d $cf_cv_header_path_iconv ; then
test -n "$verbose" && echo " ... testing $cf_cv_header_path_iconv" 1>&6
-echo "${as_me:-configure}:5886: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
+echo "${as_me:-configure}:6488: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_iconv"
cat >conftest.$ac_ext <<_ACEOF
-#line 5890 "configure"
+#line 6492 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -5906,21 +6508,21 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5909: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6511: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:5912: \$? = $ac_status" >&5
+ echo "$as_me:6514: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:5915: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6517: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5918: \$? = $ac_status" >&5
+ echo "$as_me:6520: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
test -n "$verbose" && echo " ... found iconv headers in $cf_cv_header_path_iconv" 1>&6
-echo "${as_me:-configure}:5923: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
+echo "${as_me:-configure}:6525: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
cf_cv_find_linkage_iconv=maybe
cf_test_CPPFLAGS="$CPPFLAGS"
@@ -5938,7 +6540,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_cv_find_linkage_iconv" = maybe ; then
-echo "${as_me:-configure}:5941: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
+echo "${as_me:-configure}:6543: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
cf_save_LIBS="$LIBS"
cf_save_LDFLAGS="$LDFLAGS"
@@ -6035,13 +6637,13 @@ cf_search="$cf_library_path_list $cf_search"
if test -d $cf_cv_library_path_iconv ; then
test -n "$verbose" && echo " ... testing $cf_cv_library_path_iconv" 1>&6
-echo "${as_me:-configure}:6038: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
+echo "${as_me:-configure}:6640: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
CPPFLAGS="$cf_test_CPPFLAGS"
LIBS="-liconv $cf_save_LIBS"
LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
cat >conftest.$ac_ext <<_ACEOF
-#line 6044 "configure"
+#line 6646 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -6060,21 +6662,21 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6063: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6665: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6066: \$? = $ac_status" >&5
+ echo "$as_me:6668: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6069: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6671: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6072: \$? = $ac_status" >&5
+ echo "$as_me:6674: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
test -n "$verbose" && echo " ... found iconv library in $cf_cv_library_path_iconv" 1>&6
-echo "${as_me:-configure}:6077: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
+echo "${as_me:-configure}:6679: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
cf_cv_find_linkage_iconv=yes
cf_cv_library_file_iconv="-liconv"
@@ -6114,7 +6716,7 @@ am_cv_func_iconv="no, consider installing GNU libiconv"
fi
fi
-echo "$as_me:6117: result: $am_cv_func_iconv" >&5
+echo "$as_me:6719: result: $am_cv_func_iconv" >&5
echo "${ECHO_T}$am_cv_func_iconv" >&6
if test "$am_cv_func_iconv" = yes; then
@@ -6123,14 +6725,14 @@ cat >>confdefs.h <<\EOF
#define HAVE_ICONV 1
EOF
- echo "$as_me:6126: checking if the declaration of iconv() needs const." >&5
+ echo "$as_me:6728: checking if the declaration of iconv() needs const." >&5
echo $ECHO_N "checking if the declaration of iconv() needs const.... $ECHO_C" >&6
if test "${am_cv_proto_iconv_const+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 6133 "configure"
+#line 6735 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -6155,16 +6757,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6158: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6760: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6161: \$? = $ac_status" >&5
+ echo "$as_me:6763: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6164: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6766: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6167: \$? = $ac_status" >&5
+ echo "$as_me:6769: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
am_cv_proto_iconv_const=no
else
@@ -6174,7 +6776,7 @@ am_cv_proto_iconv_const=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:6177: result: $am_cv_proto_iconv_const" >&5
+echo "$as_me:6779: result: $am_cv_proto_iconv_const" >&5
echo "${ECHO_T}$am_cv_proto_iconv_const" >&6
if test "$am_cv_proto_iconv_const" = yes ; then
@@ -6216,7 +6818,7 @@ if test -n "$cf_cv_header_path_iconv" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 6219 "configure"
+#line 6821 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -6228,16 +6830,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6231: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6833: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6234: \$? = $ac_status" >&5
+ echo "$as_me:6836: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6237: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6839: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6240: \$? = $ac_status" >&5
+ echo "$as_me:6842: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -6254,7 +6856,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:6257: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:6859: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -6291,7 +6893,7 @@ if test -n "$cf_cv_library_path_iconv" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:6294: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:6896: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -6302,13 +6904,13 @@ fi
fi
fi
- echo "$as_me:6305: checking for nl_langinfo and CODESET" >&5
+ echo "$as_me:6907: checking for nl_langinfo and CODESET" >&5
echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
if test "${am_cv_langinfo_codeset+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 6311 "configure"
+#line 6913 "configure"
#include "confdefs.h"
#include <langinfo.h>
int
@@ -6320,16 +6922,16 @@ char* cs = nl_langinfo(CODESET);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6323: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6925: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6326: \$? = $ac_status" >&5
+ echo "$as_me:6928: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6329: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6931: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6332: \$? = $ac_status" >&5
+ echo "$as_me:6934: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
am_cv_langinfo_codeset=yes
else
@@ -6340,7 +6942,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:6343: result: $am_cv_langinfo_codeset" >&5
+echo "$as_me:6945: result: $am_cv_langinfo_codeset" >&5
echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
if test $am_cv_langinfo_codeset = yes; then
@@ -6351,13 +6953,13 @@ EOF
fi
if test $ac_cv_header_locale_h = yes; then
- echo "$as_me:6354: checking for LC_MESSAGES" >&5
+ echo "$as_me:6956: checking for LC_MESSAGES" >&5
echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
if test "${am_cv_val_LC_MESSAGES+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 6360 "configure"
+#line 6962 "configure"
#include "confdefs.h"
#include <locale.h>
int
@@ -6369,16 +6971,16 @@ return LC_MESSAGES
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6372: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6974: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6375: \$? = $ac_status" >&5
+ echo "$as_me:6977: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6378: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6980: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6381: \$? = $ac_status" >&5
+ echo "$as_me:6983: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
am_cv_val_LC_MESSAGES=yes
else
@@ -6388,7 +6990,7 @@ am_cv_val_LC_MESSAGES=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:6391: result: $am_cv_val_LC_MESSAGES" >&5
+echo "$as_me:6993: result: $am_cv_val_LC_MESSAGES" >&5
echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
if test $am_cv_val_LC_MESSAGES = yes; then
@@ -6398,7 +7000,7 @@ EOF
fi
fi
- echo "$as_me:6401: checking whether NLS is requested" >&5
+ echo "$as_me:7003: checking whether NLS is requested" >&5
echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
# Check whether --enable-nls or --disable-nls was given.
@@ -6408,7 +7010,7 @@ if test "${enable_nls+set}" = set; then
else
USE_NLS=no
fi;
- echo "$as_me:6411: result: $USE_NLS" >&5
+ echo "$as_me:7013: result: $USE_NLS" >&5
echo "${ECHO_T}$USE_NLS" >&6
BUILD_INCLUDED_LIBINTL=no
@@ -6421,7 +7023,7 @@ cat >>confdefs.h <<\EOF
#define ENABLE_NLS 1
EOF
- echo "$as_me:6424: checking whether included gettext is requested" >&5
+ echo "$as_me:7026: checking whether included gettext is requested" >&5
echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
# Check whether --with-included-gettext or --without-included-gettext was given.
@@ -6431,7 +7033,7 @@ if test "${with_included_gettext+set}" = set; then
else
nls_cv_force_use_gnu_gettext=no
fi;
- echo "$as_me:6434: result: $nls_cv_force_use_gnu_gettext" >&5
+ echo "$as_me:7036: result: $nls_cv_force_use_gnu_gettext" >&5
echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
@@ -6440,7 +7042,7 @@ echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
cf_save_LIBS_1="$LIBS"
LIBS="$LIBICONV $LIBS"
- echo "$as_me:6443: checking for libintl.h and gettext()" >&5
+ echo "$as_me:7045: checking for libintl.h and gettext()" >&5
echo $ECHO_N "checking for libintl.h and gettext()... $ECHO_C" >&6
if test "${cf_cv_func_gettext+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6451,12 +7053,12 @@ else
cf_cv_header_path_intl=
cf_cv_library_path_intl=
-echo "${as_me:-configure}:6454: testing Starting FIND_LINKAGE(intl,) ..." 1>&5
+echo "${as_me:-configure}:7056: testing Starting FIND_LINKAGE(intl,) ..." 1>&5
cf_save_LIBS="$LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 6459 "configure"
+#line 7061 "configure"
#include "confdefs.h"
#include <libintl.h>
@@ -6476,16 +7078,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6479: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7081: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6482: \$? = $ac_status" >&5
+ echo "$as_me:7084: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6485: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7087: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6488: \$? = $ac_status" >&5
+ echo "$as_me:7090: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_find_linkage_intl=yes
@@ -6499,7 +7101,7 @@ cat conftest.$ac_ext >&5
LIBS="-lintl $cf_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 6502 "configure"
+#line 7104 "configure"
#include "confdefs.h"
#include <libintl.h>
@@ -6519,16 +7121,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6522: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7124: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6525: \$? = $ac_status" >&5
+ echo "$as_me:7127: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6528: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7130: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6531: \$? = $ac_status" >&5
+ echo "$as_me:7133: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_find_linkage_intl=yes
@@ -6545,9 +7147,9 @@ cat conftest.$ac_ext >&5
test -n "$verbose" && echo " find linkage for intl library" 1>&6
-echo "${as_me:-configure}:6548: testing find linkage for intl library ..." 1>&5
+echo "${as_me:-configure}:7150: testing find linkage for intl library ..." 1>&5
-echo "${as_me:-configure}:6550: testing Searching for headers in FIND_LINKAGE(intl,) ..." 1>&5
+echo "${as_me:-configure}:7152: testing Searching for headers in FIND_LINKAGE(intl,) ..." 1>&5
cf_save_CPPFLAGS="$CPPFLAGS"
cf_test_CPPFLAGS="$CPPFLAGS"
@@ -6660,11 +7262,11 @@ cf_search="$cf_search $cf_header_path_list"
if test -d $cf_cv_header_path_intl ; then
test -n "$verbose" && echo " ... testing $cf_cv_header_path_intl" 1>&6
-echo "${as_me:-configure}:6663: testing ... testing $cf_cv_header_path_intl ..." 1>&5
+echo "${as_me:-configure}:7265: testing ... testing $cf_cv_header_path_intl ..." 1>&5
CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_intl"
cat >conftest.$ac_ext <<_ACEOF
-#line 6667 "configure"
+#line 7269 "configure"
#include "confdefs.h"
#include <libintl.h>
@@ -6684,21 +7286,21 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6687: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7289: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6690: \$? = $ac_status" >&5
+ echo "$as_me:7292: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6693: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7295: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6696: \$? = $ac_status" >&5
+ echo "$as_me:7298: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
test -n "$verbose" && echo " ... found intl headers in $cf_cv_header_path_intl" 1>&6
-echo "${as_me:-configure}:6701: testing ... found intl headers in $cf_cv_header_path_intl ..." 1>&5
+echo "${as_me:-configure}:7303: testing ... found intl headers in $cf_cv_header_path_intl ..." 1>&5
cf_cv_find_linkage_intl=maybe
cf_test_CPPFLAGS="$CPPFLAGS"
@@ -6716,7 +7318,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_cv_find_linkage_intl" = maybe ; then
-echo "${as_me:-configure}:6719: testing Searching for intl library in FIND_LINKAGE(intl,) ..." 1>&5
+echo "${as_me:-configure}:7321: testing Searching for intl library in FIND_LINKAGE(intl,) ..." 1>&5
cf_save_LIBS="$LIBS"
cf_save_LDFLAGS="$LDFLAGS"
@@ -6813,13 +7415,13 @@ cf_search="$cf_library_path_list $cf_search"
if test -d $cf_cv_library_path_intl ; then
test -n "$verbose" && echo " ... testing $cf_cv_library_path_intl" 1>&6
-echo "${as_me:-configure}:6816: testing ... testing $cf_cv_library_path_intl ..." 1>&5
+echo "${as_me:-configure}:7418: testing ... testing $cf_cv_library_path_intl ..." 1>&5
CPPFLAGS="$cf_test_CPPFLAGS"
LIBS="-lintl $cf_save_LIBS"
LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_intl"
cat >conftest.$ac_ext <<_ACEOF
-#line 6822 "configure"
+#line 7424 "configure"
#include "confdefs.h"
#include <libintl.h>
@@ -6839,21 +7441,21 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6842: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7444: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6845: \$? = $ac_status" >&5
+ echo "$as_me:7447: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6848: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7450: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6851: \$? = $ac_status" >&5
+ echo "$as_me:7453: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
test -n "$verbose" && echo " ... found intl library in $cf_cv_library_path_intl" 1>&6
-echo "${as_me:-configure}:6856: testing ... found intl library in $cf_cv_library_path_intl ..." 1>&5
+echo "${as_me:-configure}:7458: testing ... found intl library in $cf_cv_library_path_intl ..." 1>&5
cf_cv_find_linkage_intl=yes
cf_cv_library_file_intl="-lintl"
@@ -6893,12 +7495,13 @@ cf_cv_func_gettext=no
fi
fi
-echo "$as_me:6896: result: $cf_cv_func_gettext" >&5
+echo "$as_me:7498: result: $cf_cv_func_gettext" >&5
echo "${ECHO_T}$cf_cv_func_gettext" >&6
LIBS="$cf_save_LIBS_1"
if test "$cf_cv_func_gettext" = yes ; then
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_LIBINTL_H 1
EOF
@@ -6932,7 +7535,7 @@ if test -n "$cf_cv_header_path_intl" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 6935 "configure"
+#line 7538 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -6944,16 +7547,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6947: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7550: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6950: \$? = $ac_status" >&5
+ echo "$as_me:7553: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6953: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7556: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6956: \$? = $ac_status" >&5
+ echo "$as_me:7559: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -6970,7 +7573,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:6973: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:7576: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -7007,7 +7610,7 @@ if test -n "$cf_cv_library_path_intl" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:7010: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:7613: testing adding $cf_add_libdir to library-path ..." 1>&5
INTLLIBS="-L$cf_add_libdir $INTLLIBS"
fi
@@ -7023,13 +7626,13 @@ fi
for ac_func in dcgettext
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:7026: checking for $ac_func" >&5
+echo "$as_me:7629: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 7032 "configure"
+#line 7635 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
@@ -7052,7 +7655,7 @@ main ()
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
#endif
;
@@ -7060,16 +7663,16 @@ f = $ac_func;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7063: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7666: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7066: \$? = $ac_status" >&5
+ echo "$as_me:7669: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7069: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7672: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7072: \$? = $ac_status" >&5
+ echo "$as_me:7675: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
@@ -7079,7 +7682,7 @@ eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:7082: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:7685: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -7094,7 +7697,7 @@ done
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
-echo "$as_me:7097: checking for $ac_word" >&5
+echo "$as_me:7700: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_MSGFMT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7121,16 +7724,16 @@ esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test "$MSGFMT" != ":"; then
- echo "$as_me:7124: result: $MSGFMT" >&5
+ echo "$as_me:7727: result: $MSGFMT" >&5
echo "${ECHO_T}$MSGFMT" >&6
else
- echo "$as_me:7127: result: no" >&5
+ echo "$as_me:7730: result: no" >&5
echo "${ECHO_T}no" >&6
fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
-echo "$as_me:7133: checking for $ac_word" >&5
+echo "$as_me:7736: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_GMSGFMT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7147,7 +7750,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if $as_executable_p "$ac_dir/$ac_word"; then
ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
- echo "$as_me:7150: found $ac_dir/$ac_word" >&5
+ echo "$as_me:7753: found $ac_dir/$ac_word" >&5
break
fi
done
@@ -7159,17 +7762,17 @@ fi
GMSGFMT=$ac_cv_path_GMSGFMT
if test -n "$GMSGFMT"; then
- echo "$as_me:7162: result: $GMSGFMT" >&5
+ echo "$as_me:7765: result: $GMSGFMT" >&5
echo "${ECHO_T}$GMSGFMT" >&6
else
- echo "$as_me:7165: result: no" >&5
+ echo "$as_me:7768: result: no" >&5
echo "${ECHO_T}no" >&6
fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
-echo "$as_me:7172: checking for $ac_word" >&5
+echo "$as_me:7775: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_XGETTEXT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7196,10 +7799,10 @@ esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test "$XGETTEXT" != ":"; then
- echo "$as_me:7199: result: $XGETTEXT" >&5
+ echo "$as_me:7802: result: $XGETTEXT" >&5
echo "${ECHO_T}$XGETTEXT" >&6
else
- echo "$as_me:7202: result: no" >&5
+ echo "$as_me:7805: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -7214,7 +7817,7 @@ fi
if test "$nls_cv_use_gnu_gettext" = "yes"; then
if test ! -d $srcdir/intl ; then
- { { echo "$as_me:7217: error: no NLS library is packaged with this application" >&5
+ { { echo "$as_me:7820: error: no NLS library is packaged with this application" >&5
echo "$as_me: error: no NLS library is packaged with this application" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -7222,7 +7825,7 @@ echo "$as_me: error: no NLS library is packaged with this application" >&2;}
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
-echo "$as_me:7225: checking for $ac_word" >&5
+echo "$as_me:7828: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_MSGFMT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7249,16 +7852,16 @@ esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test "$MSGFMT" != ":"; then
- echo "$as_me:7252: result: $MSGFMT" >&5
+ echo "$as_me:7855: result: $MSGFMT" >&5
echo "${ECHO_T}$MSGFMT" >&6
else
- echo "$as_me:7255: result: no" >&5
+ echo "$as_me:7858: result: no" >&5
echo "${ECHO_T}no" >&6
fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
-echo "$as_me:7261: checking for $ac_word" >&5
+echo "$as_me:7864: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_GMSGFMT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7275,7 +7878,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if $as_executable_p "$ac_dir/$ac_word"; then
ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
- echo "$as_me:7278: found $ac_dir/$ac_word" >&5
+ echo "$as_me:7881: found $ac_dir/$ac_word" >&5
break
fi
done
@@ -7287,17 +7890,17 @@ fi
GMSGFMT=$ac_cv_path_GMSGFMT
if test -n "$GMSGFMT"; then
- echo "$as_me:7290: result: $GMSGFMT" >&5
+ echo "$as_me:7893: result: $GMSGFMT" >&5
echo "${ECHO_T}$GMSGFMT" >&6
else
- echo "$as_me:7293: result: no" >&5
+ echo "$as_me:7896: result: no" >&5
echo "${ECHO_T}no" >&6
fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
-echo "$as_me:7300: checking for $ac_word" >&5
+echo "$as_me:7903: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_XGETTEXT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7324,10 +7927,10 @@ esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test "$XGETTEXT" != ":"; then
- echo "$as_me:7327: result: $XGETTEXT" >&5
+ echo "$as_me:7930: result: $XGETTEXT" >&5
echo "${ECHO_T}$XGETTEXT" >&6
else
- echo "$as_me:7330: result: no" >&5
+ echo "$as_me:7933: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -7342,7 +7945,7 @@ fi
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
: ;
else
- echo "$as_me:7345: result: found msgfmt program is not GNU msgfmt; ignore it" >&5
+ echo "$as_me:7948: result: found msgfmt program is not GNU msgfmt; ignore it" >&5
echo "${ECHO_T}found msgfmt program is not GNU msgfmt; ignore it" >&6
GMSGFMT=":"
fi
@@ -7352,7 +7955,7 @@ echo "${ECHO_T}found msgfmt program is not GNU msgfmt; ignore it" >&6
if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
: ;
else
- echo "$as_me:7355: result: found xgettext program is not GNU xgettext; ignore it" >&5
+ echo "$as_me:7958: result: found xgettext program is not GNU xgettext; ignore it" >&5
echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
XGETTEXT=":"
fi
@@ -7372,7 +7975,7 @@ echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:7375: checking for $ac_word" >&5
+echo "$as_me:7978: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_INTLBISON+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7387,7 +7990,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_INTLBISON="$ac_prog"
-echo "$as_me:7390: found $ac_dir/$ac_word" >&5
+echo "$as_me:7993: found $ac_dir/$ac_word" >&5
break
done
@@ -7395,10 +7998,10 @@ fi
fi
INTLBISON=$ac_cv_prog_INTLBISON
if test -n "$INTLBISON"; then
- echo "$as_me:7398: result: $INTLBISON" >&5
+ echo "$as_me:8001: result: $INTLBISON" >&5
echo "${ECHO_T}$INTLBISON" >&6
else
- echo "$as_me:7401: result: no" >&5
+ echo "$as_me:8004: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -7408,7 +8011,7 @@ done
if test -z "$INTLBISON"; then
ac_verc_fail=yes
else
- echo "$as_me:7411: checking version of bison" >&5
+ echo "$as_me:8014: checking version of bison" >&5
echo $ECHO_N "checking version of bison... $ECHO_C" >&6
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
@@ -7417,7 +8020,7 @@ echo $ECHO_N "checking version of bison... $ECHO_C" >&6
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
esac
- echo "$as_me:7420: result: $ac_prog_version" >&5
+ echo "$as_me:8023: result: $ac_prog_version" >&5
echo "${ECHO_T}$ac_prog_version" >&6
fi
if test $ac_verc_fail = yes; then
@@ -7443,7 +8046,7 @@ echo "${ECHO_T}$ac_prog_version" >&6
if test "x$ALL_LINGUAS" = "x"; then
LINGUAS=
else
- echo "$as_me:7446: checking for catalogs to be installed" >&5
+ echo "$as_me:8049: checking for catalogs to be installed" >&5
echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
NEW_LINGUAS=
for presentlang in $ALL_LINGUAS; do
@@ -7463,7 +8066,7 @@ echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
fi
done
LINGUAS=$NEW_LINGUAS
- echo "$as_me:7466: result: $LINGUAS" >&5
+ echo "$as_me:8069: result: $LINGUAS" >&5
echo "${ECHO_T}$LINGUAS" >&6
fi
@@ -7483,7 +8086,8 @@ if test "${with_textdomain+set}" = set; then
else
NLS_TEXTDOMAIN=$PACKAGE
fi;
- cat >>confdefs.h <<EOF
+
+cat >>confdefs.h <<EOF
#define NLS_TEXTDOMAIN "$NLS_TEXTDOMAIN"
EOF
@@ -7498,7 +8102,7 @@ cf_makefile=makefile
use_our_messages=no
if test "$USE_NLS" = yes ; then
if test -d $srcdir/po ; then
-echo "$as_me:7501: checking if we should use included message-library" >&5
+echo "$as_me:8105: checking if we should use included message-library" >&5
echo $ECHO_N "checking if we should use included message-library... $ECHO_C" >&6
# Check whether --enable-included-msgs or --disable-included-msgs was given.
@@ -7509,7 +8113,7 @@ else
use_our_messages=yes
fi;
fi
-echo "$as_me:7512: result: $use_our_messages" >&5
+echo "$as_me:8116: result: $use_our_messages" >&5
echo "${ECHO_T}$use_our_messages" >&6
fi
@@ -7529,7 +8133,8 @@ if test "$USE_INCLUDED_LIBINTL" = yes ; then
INTLDIR_MAKE="#"
fi
if test -z "$INTLDIR_MAKE"; then
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_LIBGETTEXT_H 1
EOF
@@ -7550,23 +8155,23 @@ else
for ac_header in libintl.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:7553: checking for $ac_header" >&5
+echo "$as_me:8158: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 7559 "configure"
+#line 8164 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:7563: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:8168: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:7569: \$? = $ac_status" >&5
+ echo "$as_me:8174: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -7585,7 +8190,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:7588: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:8193: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -7612,32 +8217,35 @@ fi
if test "$USE_INCLUDED_LIBINTL" = yes ; then
if test "$nls_cv_force_use_gnu_gettext" = yes ; then
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_GETTEXT 1
EOF
elif test "$nls_cv_use_gnu_gettext" = yes ; then
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_GETTEXT 1
EOF
fi
if test -n "$nls_cv_header_intl" ; then
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_LIBINTL_H 1
EOF
fi
fi
-echo "$as_me:7633: checking if -lm needed for math functions" >&5
+echo "$as_me:8241: checking if -lm needed for math functions" >&5
echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
if test "${cf_cv_need_libm+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 7640 "configure"
+#line 8248 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7652,16 +8260,16 @@ double x = rand(); printf("result = %g\n", sqrt(x))
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7655: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8263: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7658: \$? = $ac_status" >&5
+ echo "$as_me:8266: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7661: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8269: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7664: \$? = $ac_status" >&5
+ echo "$as_me:8272: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_need_libm=no
else
@@ -7671,7 +8279,7 @@ cf_cv_need_libm=yes
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:7674: result: $cf_cv_need_libm" >&5
+echo "$as_me:8282: result: $cf_cv_need_libm" >&5
echo "${ECHO_T}$cf_cv_need_libm" >&6
if test "$cf_cv_need_libm" = yes
then
@@ -7680,13 +8288,14 @@ then
fi
-echo "$as_me:7683: checking if you want to use dmalloc for testing" >&5
+echo "$as_me:8291: checking if you want to use dmalloc for testing" >&5
echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
# Check whether --with-dmalloc or --without-dmalloc was given.
if test "${with_dmalloc+set}" = set; then
withval="$with_dmalloc"
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<EOF
#define USE_DMALLOC 1
EOF
@@ -7696,7 +8305,7 @@ EOF
else
with_dmalloc=
fi;
-echo "$as_me:7699: result: ${with_dmalloc:-no}" >&5
+echo "$as_me:8308: result: ${with_dmalloc:-no}" >&5
echo "${ECHO_T}${with_dmalloc:-no}" >&6
case .$with_cflags in #(vi
@@ -7790,23 +8399,23 @@ fi
esac
if test "$with_dmalloc" = yes ; then
- echo "$as_me:7793: checking for dmalloc.h" >&5
+ echo "$as_me:8402: checking for dmalloc.h" >&5
echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
if test "${ac_cv_header_dmalloc_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 7799 "configure"
+#line 8408 "configure"
#include "confdefs.h"
#include <dmalloc.h>
_ACEOF
-if { (eval echo "$as_me:7803: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:8412: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:7809: \$? = $ac_status" >&5
+ echo "$as_me:8418: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -7825,11 +8434,11 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:7828: result: $ac_cv_header_dmalloc_h" >&5
+echo "$as_me:8437: result: $ac_cv_header_dmalloc_h" >&5
echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
if test $ac_cv_header_dmalloc_h = yes; then
-echo "$as_me:7832: checking for dmalloc_debug in -ldmalloc" >&5
+echo "$as_me:8441: checking for dmalloc_debug in -ldmalloc" >&5
echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7837,7 +8446,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldmalloc $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 7840 "configure"
+#line 8449 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -7856,16 +8465,16 @@ dmalloc_debug ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7859: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8468: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7862: \$? = $ac_status" >&5
+ echo "$as_me:8471: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7865: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8474: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7868: \$? = $ac_status" >&5
+ echo "$as_me:8477: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dmalloc_dmalloc_debug=yes
else
@@ -7876,7 +8485,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:7879: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
+echo "$as_me:8488: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
cat >>confdefs.h <<EOF
@@ -7891,13 +8500,14 @@ fi
fi
-echo "$as_me:7894: checking if you want to use dbmalloc for testing" >&5
+echo "$as_me:8503: checking if you want to use dbmalloc for testing" >&5
echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
# Check whether --with-dbmalloc or --without-dbmalloc was given.
if test "${with_dbmalloc+set}" = set; then
withval="$with_dbmalloc"
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<EOF
#define USE_DBMALLOC 1
EOF
@@ -7907,7 +8517,7 @@ EOF
else
with_dbmalloc=
fi;
-echo "$as_me:7910: result: ${with_dbmalloc:-no}" >&5
+echo "$as_me:8520: result: ${with_dbmalloc:-no}" >&5
echo "${ECHO_T}${with_dbmalloc:-no}" >&6
case .$with_cflags in #(vi
@@ -8001,23 +8611,23 @@ fi
esac
if test "$with_dbmalloc" = yes ; then
- echo "$as_me:8004: checking for dbmalloc.h" >&5
+ echo "$as_me:8614: checking for dbmalloc.h" >&5
echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
if test "${ac_cv_header_dbmalloc_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 8010 "configure"
+#line 8620 "configure"
#include "confdefs.h"
#include <dbmalloc.h>
_ACEOF
-if { (eval echo "$as_me:8014: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:8624: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:8020: \$? = $ac_status" >&5
+ echo "$as_me:8630: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -8036,11 +8646,11 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:8039: result: $ac_cv_header_dbmalloc_h" >&5
+echo "$as_me:8649: result: $ac_cv_header_dbmalloc_h" >&5
echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
if test $ac_cv_header_dbmalloc_h = yes; then
-echo "$as_me:8043: checking for debug_malloc in -ldbmalloc" >&5
+echo "$as_me:8653: checking for debug_malloc in -ldbmalloc" >&5
echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8048,7 +8658,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldbmalloc $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 8051 "configure"
+#line 8661 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -8067,16 +8677,16 @@ debug_malloc ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8070: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8680: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8073: \$? = $ac_status" >&5
+ echo "$as_me:8683: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8076: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8686: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8079: \$? = $ac_status" >&5
+ echo "$as_me:8689: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dbmalloc_debug_malloc=yes
else
@@ -8087,7 +8697,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:8090: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
+echo "$as_me:8700: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
cat >>confdefs.h <<EOF
@@ -8102,13 +8712,14 @@ fi
fi
-echo "$as_me:8105: checking if you want to use purify for testing" >&5
+echo "$as_me:8715: checking if you want to use purify for testing" >&5
echo $ECHO_N "checking if you want to use purify for testing... $ECHO_C" >&6
# Check whether --with-purify or --without-purify was given.
if test "${with_purify+set}" = set; then
withval="$with_purify"
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<EOF
#define USE_PURIFY 1
EOF
@@ -8118,7 +8729,7 @@ EOF
else
with_purify=
fi;
-echo "$as_me:8121: result: ${with_purify:-no}" >&5
+echo "$as_me:8732: result: ${with_purify:-no}" >&5
echo "${ECHO_T}${with_purify:-no}" >&6
case .$with_cflags in #(vi
@@ -8211,13 +8822,14 @@ fi
;;
esac
-echo "$as_me:8214: checking if you want to use valgrind for testing" >&5
+echo "$as_me:8825: checking if you want to use valgrind for testing" >&5
echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
# Check whether --with-valgrind or --without-valgrind was given.
if test "${with_valgrind+set}" = set; then
withval="$with_valgrind"
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<EOF
#define USE_VALGRIND 1
EOF
@@ -8227,7 +8839,7 @@ EOF
else
with_valgrind=
fi;
-echo "$as_me:8230: result: ${with_valgrind:-no}" >&5
+echo "$as_me:8842: result: ${with_valgrind:-no}" >&5
echo "${ECHO_T}${with_valgrind:-no}" >&6
case .$with_cflags in #(vi
@@ -8320,20 +8932,22 @@ fi
;;
esac
-echo "$as_me:8323: checking if you want to perform memory-leak testing" >&5
+echo "$as_me:8935: checking if you want to perform memory-leak testing" >&5
echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
# Check whether --with-no-leaks or --without-no-leaks was given.
if test "${with_no_leaks+set}" = set; then
withval="$with_no_leaks"
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define NO_LEAKS 1
EOF
cf_doalloc=".${with_dmalloc}${with_dbmalloc}${with_purify}${with_valgrind}"
case ${cf_doalloc} in #(vi
*yes*) ;;
- *) cat >>confdefs.h <<\EOF
+ *)
+cat >>confdefs.h <<\EOF
#define DOALLOC 10000
EOF
;;
@@ -8342,10 +8956,10 @@ EOF
else
with_no_leaks=
fi;
-echo "$as_me:8345: result: $with_no_leaks" >&5
+echo "$as_me:8959: result: $with_no_leaks" >&5
echo "${ECHO_T}$with_no_leaks" >&6
-echo "$as_me:8348: checking if you want --trace option" >&5
+echo "$as_me:8962: checking if you want --trace option" >&5
echo $ECHO_N "checking if you want --trace option... $ECHO_C" >&6
# Check whether --enable-trace or --disable-trace was given.
@@ -8355,11 +8969,12 @@ if test "${enable_trace+set}" = set; then
else
enableval=yes
fi;
-echo "$as_me:8358: result: $enableval" >&5
+echo "$as_me:8972: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS trace\$o"
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_DLG_TRACE 1
EOF
@@ -8369,7 +8984,7 @@ fi
LIBTOOL_MAKE="#"
-echo "$as_me:8372: checking if libtool -version-number should be used" >&5
+echo "$as_me:8987: checking if libtool -version-number should be used" >&5
echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
# Check whether --enable-libtool-version or --disable-libtool-version was given.
@@ -8386,7 +9001,7 @@ else
cf_libtool_version=yes
fi;
-echo "$as_me:8389: result: $cf_libtool_version" >&5
+echo "$as_me:9004: result: $cf_libtool_version" >&5
echo "${ECHO_T}$cf_libtool_version" >&6
if test "$cf_libtool_version" = yes ; then
@@ -8411,7 +9026,7 @@ LIB_LINK='${CC}'
LIB_INSTALL=
LIB_UNINSTALL=
-echo "$as_me:8414: checking if you want to build libraries with libtool" >&5
+echo "$as_me:9029: checking if you want to build libraries with libtool" >&5
echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
# Check whether --with-libtool or --without-libtool was given.
@@ -8421,7 +9036,7 @@ if test "${with_libtool+set}" = set; then
else
with_libtool=no
fi;
-echo "$as_me:8424: result: $with_libtool" >&5
+echo "$as_me:9039: result: $with_libtool" >&5
echo "${ECHO_T}$with_libtool" >&6
if test "$with_libtool" != "no"; then
@@ -8440,7 +9055,7 @@ case ".$with_libtool" in #(vi
;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
;;
-.\${*prefix}*) #(vi
+.\${*prefix}*|.\${*dir}*) #(vi
eval with_libtool="$with_libtool"
case ".$with_libtool" in #(vi
.NONE/*)
@@ -8452,7 +9067,7 @@ case ".$with_libtool" in #(vi
with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
;;
*)
- { { echo "$as_me:8455: error: expected a pathname, not \"$with_libtool\"" >&5
+ { { echo "$as_me:9070: error: expected a pathname, not \"$with_libtool\"" >&5
echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
{ (exit 1); exit 1; }; }
;;
@@ -8462,7 +9077,7 @@ esac
else
# Extract the first word of "libtool", so it can be a program name with args.
set dummy libtool; ac_word=$2
-echo "$as_me:8465: checking for $ac_word" >&5
+echo "$as_me:9080: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_LIBTOOL+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8479,7 +9094,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if $as_executable_p "$ac_dir/$ac_word"; then
ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
- echo "$as_me:8482: found $ac_dir/$ac_word" >&5
+ echo "$as_me:9097: found $ac_dir/$ac_word" >&5
break
fi
done
@@ -8490,16 +9105,16 @@ fi
LIBTOOL=$ac_cv_path_LIBTOOL
if test -n "$LIBTOOL"; then
- echo "$as_me:8493: result: $LIBTOOL" >&5
+ echo "$as_me:9108: result: $LIBTOOL" >&5
echo "${ECHO_T}$LIBTOOL" >&6
else
- echo "$as_me:8496: result: no" >&5
+ echo "$as_me:9111: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
if test -z "$LIBTOOL" ; then
- { { echo "$as_me:8502: error: Cannot find libtool" >&5
+ { { echo "$as_me:9117: error: Cannot find libtool" >&5
echo "$as_me: error: Cannot find libtool" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -8514,17 +9129,17 @@ echo "$as_me: error: Cannot find libtool" >&2;}
LIB_PREP=:
# Show the version of libtool
- echo "$as_me:8517: checking version of libtool" >&5
+ echo "$as_me:9132: checking version of libtool" >&5
echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
# Save the version in a cache variable - this is not entirely a good
# thing, but the version string from libtool is very ugly, and for
# bug reports it might be useful to have the original string. "("
cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
- echo "$as_me:8524: result: $cf_cv_libtool_version" >&5
+ echo "$as_me:9139: result: $cf_cv_libtool_version" >&5
echo "${ECHO_T}$cf_cv_libtool_version" >&6
if test -z "$cf_cv_libtool_version" ; then
- { { echo "$as_me:8527: error: This is not GNU libtool" >&5
+ { { echo "$as_me:9142: error: This is not GNU libtool" >&5
echo "$as_me: error: This is not GNU libtool" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -8532,7 +9147,7 @@ echo "$as_me: error: This is not GNU libtool" >&2;}
# 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
@@ -8558,7 +9173,7 @@ if test "$with_libtool" = "yes" ; then
OBJEXT="lo"
LIBTOOL_MAKE=
-echo "$as_me:8561: checking for additional libtool options" >&5
+echo "$as_me:9176: checking for additional libtool options" >&5
echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
# Check whether --with-libtool-opts or --without-libtool-opts was given.
@@ -8568,7 +9183,7 @@ if test "${with_libtool_opts+set}" = set; then
else
with_libtool_opts=no
fi;
-echo "$as_me:8571: result: $with_libtool_opts" >&5
+echo "$as_me:9186: result: $with_libtool_opts" >&5
echo "${ECHO_T}$with_libtool_opts" >&6
case .$with_libtool_opts in
@@ -8581,7 +9196,7 @@ esac
fi
-echo "$as_me:8584: checking for specific curses-directory" >&5
+echo "$as_me:9199: checking for specific curses-directory" >&5
echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
# Check whether --with-curses-dir or --without-curses-dir was given.
@@ -8591,7 +9206,7 @@ if test "${with_curses_dir+set}" = set; then
else
cf_cv_curses_dir=no
fi;
-echo "$as_me:8594: result: $cf_cv_curses_dir" >&5
+echo "$as_me:9209: result: $cf_cv_curses_dir" >&5
echo "${ECHO_T}$cf_cv_curses_dir" >&6
if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
@@ -8610,7 +9225,7 @@ case ".$withval" in #(vi
;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
;;
-.\${*prefix}*) #(vi
+.\${*prefix}*|.\${*dir}*) #(vi
eval withval="$withval"
case ".$withval" in #(vi
.NONE/*)
@@ -8622,7 +9237,7 @@ case ".$withval" in #(vi
withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
;;
*)
- { { echo "$as_me:8625: error: expected a pathname, not \"$withval\"" >&5
+ { { echo "$as_me:9240: error: expected a pathname, not \"$withval\"" >&5
echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
{ (exit 1); exit 1; }; }
;;
@@ -8655,7 +9270,7 @@ if test -n "$cf_cv_curses_dir/include" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 8658 "configure"
+#line 9273 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -8667,16 +9282,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8670: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9285: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:8673: \$? = $ac_status" >&5
+ echo "$as_me:9288: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:8676: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9291: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8679: \$? = $ac_status" >&5
+ echo "$as_me:9294: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -8693,7 +9308,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:8696: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:9311: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -8727,7 +9342,7 @@ if test -n "$cf_cv_curses_dir/lib" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:8730: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:9345: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -8755,7 +9370,7 @@ if test $use_ncurses != no ; then
cf_wide_curses=yes
if test $use_ncurses = ncursesw ; then
-echo "$as_me:8758: checking for multibyte character support" >&5
+echo "$as_me:9373: checking for multibyte character support" >&5
echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
if test "${cf_cv_utf8_lib+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8763,7 +9378,7 @@ else
cf_save_LIBS="$LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 8766 "configure"
+#line 9381 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -8776,16 +9391,16 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8779: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9394: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8782: \$? = $ac_status" >&5
+ echo "$as_me:9397: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8785: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9400: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8788: \$? = $ac_status" >&5
+ echo "$as_me:9403: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_utf8_lib=yes
else
@@ -8797,12 +9412,12 @@ cat conftest.$ac_ext >&5
cf_cv_header_path_utf8=
cf_cv_library_path_utf8=
-echo "${as_me:-configure}:8800: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
+echo "${as_me:-configure}:9415: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
cf_save_LIBS="$LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 8805 "configure"
+#line 9420 "configure"
#include "confdefs.h"
#include <libutf8.h>
@@ -8815,16 +9430,16 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8818: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9433: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8821: \$? = $ac_status" >&5
+ echo "$as_me:9436: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8824: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9439: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8827: \$? = $ac_status" >&5
+ echo "$as_me:9442: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_find_linkage_utf8=yes
@@ -8838,7 +9453,7 @@ cat conftest.$ac_ext >&5
LIBS="-lutf8 $cf_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 8841 "configure"
+#line 9456 "configure"
#include "confdefs.h"
#include <libutf8.h>
@@ -8851,16 +9466,16 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8854: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9469: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8857: \$? = $ac_status" >&5
+ echo "$as_me:9472: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8860: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9475: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8863: \$? = $ac_status" >&5
+ echo "$as_me:9478: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_find_linkage_utf8=yes
@@ -8877,9 +9492,9 @@ cat conftest.$ac_ext >&5
test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
-echo "${as_me:-configure}:8880: testing find linkage for utf8 library ..." 1>&5
+echo "${as_me:-configure}:9495: testing find linkage for utf8 library ..." 1>&5
-echo "${as_me:-configure}:8882: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
+echo "${as_me:-configure}:9497: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
cf_save_CPPFLAGS="$CPPFLAGS"
cf_test_CPPFLAGS="$CPPFLAGS"
@@ -8992,11 +9607,11 @@ cf_search="$cf_search $cf_header_path_list"
if test -d $cf_cv_header_path_utf8 ; then
test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
-echo "${as_me:-configure}:8995: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:9610: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
cat >conftest.$ac_ext <<_ACEOF
-#line 8999 "configure"
+#line 9614 "configure"
#include "confdefs.h"
#include <libutf8.h>
@@ -9009,21 +9624,21 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9012: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9627: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9015: \$? = $ac_status" >&5
+ echo "$as_me:9630: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9018: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9633: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9021: \$? = $ac_status" >&5
+ echo "$as_me:9636: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
-echo "${as_me:-configure}:9026: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:9641: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
cf_cv_find_linkage_utf8=maybe
cf_test_CPPFLAGS="$CPPFLAGS"
@@ -9041,7 +9656,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_cv_find_linkage_utf8" = maybe ; then
-echo "${as_me:-configure}:9044: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
+echo "${as_me:-configure}:9659: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
cf_save_LIBS="$LIBS"
cf_save_LDFLAGS="$LDFLAGS"
@@ -9138,13 +9753,13 @@ cf_search="$cf_library_path_list $cf_search"
if test -d $cf_cv_library_path_utf8 ; then
test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
-echo "${as_me:-configure}:9141: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:9756: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
CPPFLAGS="$cf_test_CPPFLAGS"
LIBS="-lutf8 $cf_save_LIBS"
LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
cat >conftest.$ac_ext <<_ACEOF
-#line 9147 "configure"
+#line 9762 "configure"
#include "confdefs.h"
#include <libutf8.h>
@@ -9157,21 +9772,21 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9160: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9775: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9163: \$? = $ac_status" >&5
+ echo "$as_me:9778: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:9166: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9781: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9169: \$? = $ac_status" >&5
+ echo "$as_me:9784: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
-echo "${as_me:-configure}:9174: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:9789: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
cf_cv_find_linkage_utf8=yes
cf_cv_library_file_utf8="-lutf8"
@@ -9213,13 +9828,14 @@ fi
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:9216: result: $cf_cv_utf8_lib" >&5
+echo "$as_me:9831: result: $cf_cv_utf8_lib" >&5
echo "${ECHO_T}$cf_cv_utf8_lib" >&6
# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
# ncurses/ncursesw:
if test "$cf_cv_utf8_lib" = "add-on" ; then
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_LIBUTF8_H 1
EOF
@@ -9247,7 +9863,7 @@ if test -n "$cf_cv_header_path_utf8" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 9250 "configure"
+#line 9866 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -9259,16 +9875,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9262: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9878: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9265: \$? = $ac_status" >&5
+ echo "$as_me:9881: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9268: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9884: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9271: \$? = $ac_status" >&5
+ echo "$as_me:9887: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -9285,7 +9901,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:9288: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:9904: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -9319,7 +9935,7 @@ if test -n "$cf_cv_library_path_utf8" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:9322: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:9938: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -9335,48 +9951,87 @@ fi
cf_ncuconfig_root=$use_ncurses
echo "Looking for ${cf_ncuconfig_root}-config"
-for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
+
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:9960: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$NCURSES_CONFIG"; then
+ ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
+echo "$as_me:9975: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
+if test -n "$NCURSES_CONFIG"; then
+ echo "$as_me:9983: result: $NCURSES_CONFIG" >&5
+echo "${ECHO_T}$NCURSES_CONFIG" >&6
+else
+ echo "$as_me:9986: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$NCURSES_CONFIG" && break
+ done
+fi
+if test -z "$NCURSES_CONFIG"; then
+ ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
+ for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:9342: checking for $ac_word" >&5
+echo "$as_me:9999: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
+if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case $NCURSES_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
- ;;
- *)
+ if test -n "$ac_ct_NCURSES_CONFIG"; then
+ ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
+else
ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
IFS=$ac_save_IFS
test -z "$ac_dir" && ac_dir=.
- if $as_executable_p "$ac_dir/$ac_word"; then
- ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
- echo "$as_me:9359: found $ac_dir/$ac_word" >&5
- break
-fi
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
+echo "$as_me:10014: found $ac_dir/$ac_word" >&5
+break
done
- ;;
-esac
fi
-NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
-
-if test -n "$NCURSES_CONFIG"; then
- echo "$as_me:9370: result: $NCURSES_CONFIG" >&5
-echo "${ECHO_T}$NCURSES_CONFIG" >&6
+fi
+ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
+if test -n "$ac_ct_NCURSES_CONFIG"; then
+ echo "$as_me:10022: result: $ac_ct_NCURSES_CONFIG" >&5
+echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
else
- echo "$as_me:9373: result: no" >&5
+ echo "$as_me:10025: result: no" >&5
echo "${ECHO_T}no" >&6
fi
- test -n "$NCURSES_CONFIG" && break
+ test -n "$ac_ct_NCURSES_CONFIG" && break
done
-test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
+test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
+
+ NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
+fi
if test "$NCURSES_CONFIG" != none ; then
@@ -9385,7 +10040,7 @@ LIBS="`$NCURSES_CONFIG --libs` $LIBS"
# even with config script, some packages use no-override for curses.h
-echo "$as_me:9388: checking if we have identified curses headers" >&5
+echo "$as_me:10043: checking if we have identified curses headers" >&5
echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
if test "${cf_cv_ncurses_header+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9399,7 +10054,7 @@ for cf_header in \
curses.h
do
cat >conftest.$ac_ext <<_ACEOF
-#line 9402 "configure"
+#line 10057 "configure"
#include "confdefs.h"
#include <${cf_header}>
int
@@ -9411,16 +10066,16 @@ initscr(); tgoto("?", 0,0)
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9414: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10069: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9417: \$? = $ac_status" >&5
+ echo "$as_me:10072: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9420: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10075: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9423: \$? = $ac_status" >&5
+ echo "$as_me:10078: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_header=$cf_header; break
else
@@ -9431,11 +10086,11 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:9434: result: $cf_cv_ncurses_header" >&5
+echo "$as_me:10089: result: $cf_cv_ncurses_header" >&5
echo "${ECHO_T}$cf_cv_ncurses_header" >&6
if test "$cf_cv_ncurses_header" = none ; then
- { { echo "$as_me:9438: error: No curses header-files found" >&5
+ { { echo "$as_me:10093: error: No curses header-files found" >&5
echo "$as_me: error: No curses header-files found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -9445,23 +10100,23 @@ fi
for ac_header in $cf_cv_ncurses_header
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:9448: checking for $ac_header" >&5
+echo "$as_me:10103: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 9454 "configure"
+#line 10109 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:9458: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:10113: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:9464: \$? = $ac_status" >&5
+ echo "$as_me:10119: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -9480,7 +10135,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:9483: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:10138: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -9533,7 +10188,7 @@ if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 9536 "configure"
+#line 10191 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -9545,16 +10200,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9548: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10203: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9551: \$? = $ac_status" >&5
+ echo "$as_me:10206: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9554: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10209: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9557: \$? = $ac_status" >&5
+ echo "$as_me:10212: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -9571,7 +10226,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:9574: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:10229: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -9588,7 +10243,7 @@ fi
}
-echo "$as_me:9591: checking for $cf_ncuhdr_root header in include-path" >&5
+echo "$as_me:10246: checking for $cf_ncuhdr_root header in include-path" >&5
echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
if test "${cf_cv_ncurses_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9600,7 +10255,7 @@ else
do
cat >conftest.$ac_ext <<_ACEOF
-#line 9603 "configure"
+#line 10258 "configure"
#include "confdefs.h"
#include <$cf_header>
@@ -9624,16 +10279,16 @@ printf("old\n");
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9627: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10282: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9630: \$? = $ac_status" >&5
+ echo "$as_me:10285: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9633: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10288: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9636: \$? = $ac_status" >&5
+ echo "$as_me:10291: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_h=$cf_header
@@ -9648,14 +10303,14 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:9651: result: $cf_cv_ncurses_h" >&5
+echo "$as_me:10306: result: $cf_cv_ncurses_h" >&5
echo "${ECHO_T}$cf_cv_ncurses_h" >&6
if test "$cf_cv_ncurses_h" != no ; then
cf_cv_ncurses_header=$cf_cv_ncurses_h
else
-echo "$as_me:9658: checking for $cf_ncuhdr_root include-path" >&5
+echo "$as_me:10313: checking for $cf_ncuhdr_root include-path" >&5
echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
if test "${cf_cv_ncurses_h2+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9795,7 +10450,7 @@ if test -n "$cf_incdir" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 9798 "configure"
+#line 10453 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -9807,16 +10462,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9810: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10465: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9813: \$? = $ac_status" >&5
+ echo "$as_me:10468: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9816: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10471: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9819: \$? = $ac_status" >&5
+ echo "$as_me:10474: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -9833,7 +10488,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:9836: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:10491: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -9854,7 +10509,7 @@ fi
do
cat >conftest.$ac_ext <<_ACEOF
-#line 9857 "configure"
+#line 10512 "configure"
#include "confdefs.h"
#include <$cf_header>
@@ -9878,16 +10533,16 @@ printf("old\n");
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9881: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10536: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9884: \$? = $ac_status" >&5
+ echo "$as_me:10539: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9887: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10542: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9890: \$? = $ac_status" >&5
+ echo "$as_me:10545: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_h2=$cf_header
@@ -9908,12 +10563,12 @@ rm -f conftest.$ac_objext conftest.$ac_ext
CPPFLAGS="$cf_save2_CPPFLAGS"
test "$cf_cv_ncurses_h2" != no && break
done
- test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9911: error: not found" >&5
+ test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10566: error: not found" >&5
echo "$as_me: error: not found" >&2;}
{ (exit 1); exit 1; }; }
fi
-echo "$as_me:9916: result: $cf_cv_ncurses_h2" >&5
+echo "$as_me:10571: result: $cf_cv_ncurses_h2" >&5
echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
@@ -9946,7 +10601,7 @@ if test -n "$cf_1st_incdir" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 9949 "configure"
+#line 10604 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -9958,16 +10613,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9961: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10616: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9964: \$? = $ac_status" >&5
+ echo "$as_me:10619: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9967: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10622: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9970: \$? = $ac_status" >&5
+ echo "$as_me:10625: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -9984,7 +10639,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:9987: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:10642: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -10005,7 +10660,8 @@ fi
case $cf_cv_ncurses_header in # (vi
*ncurses.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSES_H 1
EOF
@@ -10014,20 +10670,22 @@ esac
case $cf_cv_ncurses_header in # (vi
ncurses/curses.h|ncurses/ncurses.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSES_NCURSES_H 1
EOF
;;
ncursesw/curses.h|ncursesw/ncurses.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSESW_NCURSES_H 1
EOF
;;
esac
-echo "$as_me:10030: checking for terminfo header" >&5
+echo "$as_me:10688: checking for terminfo header" >&5
echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
if test "${cf_cv_term_header+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10045,7 +10703,7 @@ esac
for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
do
cat >conftest.$ac_ext <<_ACEOF
-#line 10048 "configure"
+#line 10706 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -10060,16 +10718,16 @@ int x = auto_left_margin
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10063: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10721: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10066: \$? = $ac_status" >&5
+ echo "$as_me:10724: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10069: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10727: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10072: \$? = $ac_status" >&5
+ echo "$as_me:10730: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_term_header="$cf_test"
@@ -10085,14 +10743,15 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:10088: result: $cf_cv_term_header" >&5
+echo "$as_me:10746: result: $cf_cv_term_header" >&5
echo "${ECHO_T}$cf_cv_term_header" >&6
# Set definitions to allow ifdef'ing to accommodate subdirectories
case $cf_cv_term_header in # (vi
*term.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_TERM_H 1
EOF
@@ -10101,13 +10760,15 @@ esac
case $cf_cv_term_header in # (vi
ncurses/term.h) #(vi
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSES_TERM_H 1
EOF
;;
ncursesw/term.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSESW_TERM_H 1
EOF
@@ -10115,11 +10776,12 @@ EOF
esac
# some applications need this, but should check for NCURSES_VERSION
+
cat >>confdefs.h <<\EOF
#define NCURSES 1
EOF
-echo "$as_me:10122: checking for ncurses version" >&5
+echo "$as_me:10784: checking for ncurses version" >&5
echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
if test "${cf_cv_ncurses_version+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10145,10 +10807,10 @@ Autoconf "old"
#endif
EOF
cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
- { (eval echo "$as_me:10148: \"$cf_try\"") >&5
+ { (eval echo "$as_me:10810: \"$cf_try\"") >&5
(eval $cf_try) 2>&5
ac_status=$?
- echo "$as_me:10151: \$? = $ac_status" >&5
+ echo "$as_me:10813: \$? = $ac_status" >&5
(exit $ac_status); }
if test -f conftest.out ; then
cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
@@ -10158,7 +10820,7 @@ EOF
else
cat >conftest.$ac_ext <<_ACEOF
-#line 10161 "configure"
+#line 10823 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -10183,15 +10845,15 @@ int main()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:10186: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10848: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10189: \$? = $ac_status" >&5
+ echo "$as_me:10851: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:10191: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10853: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10194: \$? = $ac_status" >&5
+ echo "$as_me:10856: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -10205,9 +10867,10 @@ fi
rm -f $cf_tempfile
fi
-echo "$as_me:10208: result: $cf_cv_ncurses_version" >&5
+echo "$as_me:10870: result: $cf_cv_ncurses_version" >&5
echo "${ECHO_T}$cf_cv_ncurses_version" >&6
-test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
+test "$cf_cv_ncurses_version" = no ||
+cat >>confdefs.h <<\EOF
#define NCURSES 1
EOF
@@ -10217,7 +10880,7 @@ cf_nculib_root=$use_ncurses
# to link gpm.
cf_ncurses_LIBS=""
cf_ncurses_SAVE="$LIBS"
-echo "$as_me:10220: checking for Gpm_Open in -lgpm" >&5
+echo "$as_me:10883: checking for Gpm_Open in -lgpm" >&5
echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10225,7 +10888,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 10228 "configure"
+#line 10891 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -10244,16 +10907,16 @@ Gpm_Open ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10247: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10910: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10250: \$? = $ac_status" >&5
+ echo "$as_me:10913: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10253: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10916: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10256: \$? = $ac_status" >&5
+ echo "$as_me:10919: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_gpm_Gpm_Open=yes
else
@@ -10264,10 +10927,10 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:10267: result: $ac_cv_lib_gpm_Gpm_Open" >&5
+echo "$as_me:10930: result: $ac_cv_lib_gpm_Gpm_Open" >&5
echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
if test $ac_cv_lib_gpm_Gpm_Open = yes; then
- echo "$as_me:10270: checking for initscr in -lgpm" >&5
+ echo "$as_me:10933: checking for initscr in -lgpm" >&5
echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
if test "${ac_cv_lib_gpm_initscr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10275,7 +10938,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 10278 "configure"
+#line 10941 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -10294,16 +10957,16 @@ initscr ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10297: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10960: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10300: \$? = $ac_status" >&5
+ echo "$as_me:10963: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10303: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10966: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10306: \$? = $ac_status" >&5
+ echo "$as_me:10969: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_gpm_initscr=yes
else
@@ -10314,7 +10977,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:10317: result: $ac_cv_lib_gpm_initscr" >&5
+echo "$as_me:10980: result: $ac_cv_lib_gpm_initscr" >&5
echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
if test $ac_cv_lib_gpm_initscr = yes; then
LIBS="$cf_ncurses_SAVE"
@@ -10329,7 +10992,7 @@ freebsd*)
# This is only necessary if you are linking against an obsolete
# version of ncurses (but it should do no harm, since it's static).
if test "$cf_nculib_root" = ncurses ; then
- echo "$as_me:10332: checking for tgoto in -lmytinfo" >&5
+ echo "$as_me:10995: checking for tgoto in -lmytinfo" >&5
echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10337,7 +11000,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lmytinfo $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 10340 "configure"
+#line 11003 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -10356,16 +11019,16 @@ tgoto ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10359: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11022: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10362: \$? = $ac_status" >&5
+ echo "$as_me:11025: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10365: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11028: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10368: \$? = $ac_status" >&5
+ echo "$as_me:11031: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_mytinfo_tgoto=yes
else
@@ -10376,7 +11039,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:10379: result: $ac_cv_lib_mytinfo_tgoto" >&5
+echo "$as_me:11042: result: $ac_cv_lib_mytinfo_tgoto" >&5
echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
if test $ac_cv_lib_mytinfo_tgoto = yes; then
cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
@@ -10395,13 +11058,13 @@ else
eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
cf_libdir=""
- echo "$as_me:10398: checking for initscr" >&5
+ echo "$as_me:11061: checking for initscr" >&5
echo $ECHO_N "checking for initscr... $ECHO_C" >&6
if test "${ac_cv_func_initscr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 10404 "configure"
+#line 11067 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char initscr (); below. */
@@ -10424,7 +11087,7 @@ main ()
#if defined (__stub_initscr) || defined (__stub___initscr)
choke me
#else
-f = initscr;
+f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
#endif
;
@@ -10432,16 +11095,16 @@ f = initscr;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10435: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11098: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10438: \$? = $ac_status" >&5
+ echo "$as_me:11101: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10441: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11104: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10444: \$? = $ac_status" >&5
+ echo "$as_me:11107: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_initscr=yes
else
@@ -10451,18 +11114,18 @@ ac_cv_func_initscr=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:10454: result: $ac_cv_func_initscr" >&5
+echo "$as_me:11117: result: $ac_cv_func_initscr" >&5
echo "${ECHO_T}$ac_cv_func_initscr" >&6
if test $ac_cv_func_initscr = yes; then
eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
else
cf_save_LIBS="$LIBS"
- echo "$as_me:10461: checking for initscr in -l$cf_nculib_root" >&5
+ echo "$as_me:11124: checking for initscr in -l$cf_nculib_root" >&5
echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
LIBS="-l$cf_nculib_root $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 10465 "configure"
+#line 11128 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -10474,25 +11137,25 @@ initscr()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10477: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11140: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10480: \$? = $ac_status" >&5
+ echo "$as_me:11143: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10483: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11146: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10486: \$? = $ac_status" >&5
+ echo "$as_me:11149: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:10488: result: yes" >&5
+ echo "$as_me:11151: result: yes" >&5
echo "${ECHO_T}yes" >&6
eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-echo "$as_me:10495: result: no" >&5
+echo "$as_me:11158: result: no" >&5
echo "${ECHO_T}no" >&6
cf_search=
@@ -10582,11 +11245,11 @@ cf_search="$cf_library_path_list $cf_search"
for cf_libdir in $cf_search
do
- echo "$as_me:10585: checking for -l$cf_nculib_root in $cf_libdir" >&5
+ echo "$as_me:11248: checking for -l$cf_nculib_root in $cf_libdir" >&5
echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 10589 "configure"
+#line 11252 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -10598,25 +11261,25 @@ initscr()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10601: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11264: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10604: \$? = $ac_status" >&5
+ echo "$as_me:11267: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10607: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11270: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10610: \$? = $ac_status" >&5
+ echo "$as_me:11273: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:10612: result: yes" >&5
+ echo "$as_me:11275: result: yes" >&5
echo "${ECHO_T}yes" >&6
eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
break
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-echo "$as_me:10619: result: no" >&5
+echo "$as_me:11282: result: no" >&5
echo "${ECHO_T}no" >&6
LIBS="$cf_save_LIBS"
fi
@@ -10631,7 +11294,7 @@ fi
eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
if test $cf_found_library = no ; then
- { { echo "$as_me:10634: error: Cannot link $cf_nculib_root library" >&5
+ { { echo "$as_me:11297: error: Cannot link $cf_nculib_root library" >&5
echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -10639,7 +11302,7 @@ fi
fi
if test -n "$cf_ncurses_LIBS" ; then
- echo "$as_me:10642: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
+ echo "$as_me:11305: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
cf_ncurses_SAVE="$LIBS"
for p in $cf_ncurses_LIBS ; do
@@ -10649,7 +11312,7 @@ echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS..
fi
done
cat >conftest.$ac_ext <<_ACEOF
-#line 10652 "configure"
+#line 11315 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -10661,23 +11324,23 @@ initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10664: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11327: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10667: \$? = $ac_status" >&5
+ echo "$as_me:11330: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10670: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11333: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10673: \$? = $ac_status" >&5
+ echo "$as_me:11336: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:10675: result: yes" >&5
+ echo "$as_me:11338: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-echo "$as_me:10680: result: no" >&5
+echo "$as_me:11343: result: no" >&5
echo "${ECHO_T}no" >&6
LIBS="$cf_ncurses_SAVE"
fi
@@ -10695,7 +11358,7 @@ fi
else
cf_wide_curses=no
-echo "$as_me:10698: checking for extra include directories" >&5
+echo "$as_me:11361: checking for extra include directories" >&5
echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
if test "${cf_cv_curses_incdir+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10721,11 +11384,11 @@ sunos3*|sunos4*)
esac
fi
-echo "$as_me:10724: result: $cf_cv_curses_incdir" >&5
+echo "$as_me:11387: result: $cf_cv_curses_incdir" >&5
echo "${ECHO_T}$cf_cv_curses_incdir" >&6
test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
-echo "$as_me:10728: checking if we have identified curses headers" >&5
+echo "$as_me:11391: checking if we have identified curses headers" >&5
echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
if test "${cf_cv_ncurses_header+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10737,7 +11400,7 @@ for cf_header in \
curses.h ncurses/ncurses.h ncurses/curses.h
do
cat >conftest.$ac_ext <<_ACEOF
-#line 10740 "configure"
+#line 11403 "configure"
#include "confdefs.h"
#include <${cf_header}>
int
@@ -10749,16 +11412,16 @@ initscr(); tgoto("?", 0,0)
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10752: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11415: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10755: \$? = $ac_status" >&5
+ echo "$as_me:11418: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10758: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11421: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10761: \$? = $ac_status" >&5
+ echo "$as_me:11424: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_header=$cf_header; break
else
@@ -10769,11 +11432,11 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:10772: result: $cf_cv_ncurses_header" >&5
+echo "$as_me:11435: result: $cf_cv_ncurses_header" >&5
echo "${ECHO_T}$cf_cv_ncurses_header" >&6
if test "$cf_cv_ncurses_header" = none ; then
- { { echo "$as_me:10776: error: No curses header-files found" >&5
+ { { echo "$as_me:11439: error: No curses header-files found" >&5
echo "$as_me: error: No curses header-files found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -10783,23 +11446,23 @@ fi
for ac_header in $cf_cv_ncurses_header
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:10786: checking for $ac_header" >&5
+echo "$as_me:11449: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 10792 "configure"
+#line 11455 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:10796: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:11459: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:10802: \$? = $ac_status" >&5
+ echo "$as_me:11465: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -10818,7 +11481,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:10821: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:11484: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -10828,7 +11491,7 @@ EOF
fi
done
-echo "$as_me:10831: checking for terminfo header" >&5
+echo "$as_me:11494: checking for terminfo header" >&5
echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
if test "${cf_cv_term_header+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10846,7 +11509,7 @@ esac
for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
do
cat >conftest.$ac_ext <<_ACEOF
-#line 10849 "configure"
+#line 11512 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -10861,16 +11524,16 @@ int x = auto_left_margin
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10864: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11527: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10867: \$? = $ac_status" >&5
+ echo "$as_me:11530: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10870: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11533: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10873: \$? = $ac_status" >&5
+ echo "$as_me:11536: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_term_header="$cf_test"
@@ -10886,14 +11549,15 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:10889: result: $cf_cv_term_header" >&5
+echo "$as_me:11552: result: $cf_cv_term_header" >&5
echo "${ECHO_T}$cf_cv_term_header" >&6
# Set definitions to allow ifdef'ing to accommodate subdirectories
case $cf_cv_term_header in # (vi
*term.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_TERM_H 1
EOF
@@ -10902,20 +11566,22 @@ esac
case $cf_cv_term_header in # (vi
ncurses/term.h) #(vi
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSES_TERM_H 1
EOF
;;
ncursesw/term.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSESW_TERM_H 1
EOF
;;
esac
-echo "$as_me:10918: checking for ncurses version" >&5
+echo "$as_me:11584: checking for ncurses version" >&5
echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
if test "${cf_cv_ncurses_version+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10941,10 +11607,10 @@ Autoconf "old"
#endif
EOF
cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
- { (eval echo "$as_me:10944: \"$cf_try\"") >&5
+ { (eval echo "$as_me:11610: \"$cf_try\"") >&5
(eval $cf_try) 2>&5
ac_status=$?
- echo "$as_me:10947: \$? = $ac_status" >&5
+ echo "$as_me:11613: \$? = $ac_status" >&5
(exit $ac_status); }
if test -f conftest.out ; then
cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
@@ -10954,7 +11620,7 @@ EOF
else
cat >conftest.$ac_ext <<_ACEOF
-#line 10957 "configure"
+#line 11623 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -10979,15 +11645,15 @@ int main()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:10982: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11648: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10985: \$? = $ac_status" >&5
+ echo "$as_me:11651: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:10987: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11653: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10990: \$? = $ac_status" >&5
+ echo "$as_me:11656: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -11001,16 +11667,17 @@ fi
rm -f $cf_tempfile
fi
-echo "$as_me:11004: result: $cf_cv_ncurses_version" >&5
+echo "$as_me:11670: result: $cf_cv_ncurses_version" >&5
echo "${ECHO_T}$cf_cv_ncurses_version" >&6
-test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
+test "$cf_cv_ncurses_version" = no ||
+cat >>confdefs.h <<\EOF
#define NCURSES 1
EOF
-echo "$as_me:11010: checking if we have identified curses libraries" >&5
+echo "$as_me:11677: checking if we have identified curses libraries" >&5
echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line 11013 "configure"
+#line 11680 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -11022,16 +11689,16 @@ initscr(); tgoto("?", 0,0)
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11025: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11692: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11028: \$? = $ac_status" >&5
+ echo "$as_me:11695: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11031: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11698: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11034: \$? = $ac_status" >&5
+ echo "$as_me:11701: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -11040,13 +11707,13 @@ cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-echo "$as_me:11043: result: $cf_result" >&5
+echo "$as_me:11710: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
if test "$cf_result" = no ; then
case $host_os in #(vi
freebsd*) #(vi
- echo "$as_me:11049: checking for tgoto in -lmytinfo" >&5
+ echo "$as_me:11716: checking for tgoto in -lmytinfo" >&5
echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11054,7 +11721,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lmytinfo $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 11057 "configure"
+#line 11724 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -11073,16 +11740,16 @@ tgoto ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11076: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11743: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11079: \$? = $ac_status" >&5
+ echo "$as_me:11746: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11082: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11749: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11085: \$? = $ac_status" >&5
+ echo "$as_me:11752: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_mytinfo_tgoto=yes
else
@@ -11093,7 +11760,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:11096: result: $ac_cv_lib_mytinfo_tgoto" >&5
+echo "$as_me:11763: result: $ac_cv_lib_mytinfo_tgoto" >&5
echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
if test $ac_cv_lib_mytinfo_tgoto = yes; then
LIBS="-lmytinfo $LIBS"
@@ -11107,7 +11774,7 @@ hpux10.*) #(vi
# term.h) for cur_colr
if test "x$cf_cv_screen" = "xcurses_colr"
then
- echo "$as_me:11110: checking for initscr in -lcur_colr" >&5
+ echo "$as_me:11777: checking for initscr in -lcur_colr" >&5
echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11115,7 +11782,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lcur_colr $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 11118 "configure"
+#line 11785 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -11134,16 +11801,16 @@ initscr ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11137: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11804: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11140: \$? = $ac_status" >&5
+ echo "$as_me:11807: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11143: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11810: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11146: \$? = $ac_status" >&5
+ echo "$as_me:11813: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_cur_colr_initscr=yes
else
@@ -11154,7 +11821,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:11157: result: $ac_cv_lib_cur_colr_initscr" >&5
+echo "$as_me:11824: result: $ac_cv_lib_cur_colr_initscr" >&5
echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
if test $ac_cv_lib_cur_colr_initscr = yes; then
@@ -11163,7 +11830,7 @@ if test $ac_cv_lib_cur_colr_initscr = yes; then
else
- echo "$as_me:11166: checking for initscr in -lHcurses" >&5
+ echo "$as_me:11833: checking for initscr in -lHcurses" >&5
echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11171,7 +11838,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lHcurses $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 11174 "configure"
+#line 11841 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -11190,16 +11857,16 @@ initscr ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11193: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11860: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11196: \$? = $ac_status" >&5
+ echo "$as_me:11863: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11199: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11866: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11202: \$? = $ac_status" >&5
+ echo "$as_me:11869: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_Hcurses_initscr=yes
else
@@ -11210,7 +11877,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:11213: result: $ac_cv_lib_Hcurses_initscr" >&5
+echo "$as_me:11880: result: $ac_cv_lib_Hcurses_initscr" >&5
echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
if test $ac_cv_lib_Hcurses_initscr = yes; then
@@ -11250,7 +11917,7 @@ if test -n "/lib64" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:11253: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:11920: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -11279,7 +11946,7 @@ if test -n "/lib" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:11282: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:11949: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -11310,7 +11977,7 @@ if test -n "/lib" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:11313: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:11980: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -11345,7 +12012,7 @@ if test -n "/usr/5lib" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:11348: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:12015: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -11374,13 +12041,13 @@ 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.
- echo "$as_me:11377: checking for tgoto" >&5
+ echo "$as_me:12044: checking for tgoto" >&5
echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
if test "${ac_cv_func_tgoto+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11383 "configure"
+#line 12050 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char tgoto (); below. */
@@ -11403,7 +12070,7 @@ main ()
#if defined (__stub_tgoto) || defined (__stub___tgoto)
choke me
#else
-f = tgoto;
+f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
#endif
;
@@ -11411,16 +12078,16 @@ f = tgoto;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11414: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12081: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11417: \$? = $ac_status" >&5
+ echo "$as_me:12084: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11420: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12087: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11423: \$? = $ac_status" >&5
+ echo "$as_me:12090: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_tgoto=yes
else
@@ -11430,16 +12097,16 @@ ac_cv_func_tgoto=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:11433: result: $ac_cv_func_tgoto" >&5
+echo "$as_me:12100: result: $ac_cv_func_tgoto" >&5
echo "${ECHO_T}$ac_cv_func_tgoto" >&6
if test $ac_cv_func_tgoto = yes; then
cf_term_lib=predefined
else
- for cf_term_lib in $cf_check_list termcap termlib unknown
+ for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
do
as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
-echo "$as_me:11442: checking for tgoto in -l$cf_term_lib" >&5
+echo "$as_me:12109: checking for tgoto in -l$cf_term_lib" >&5
echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11447,7 +12114,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$cf_term_lib $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 11450 "configure"
+#line 12117 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -11466,16 +12133,16 @@ tgoto ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11469: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12136: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11472: \$? = $ac_status" >&5
+ echo "$as_me:12139: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11475: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12142: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11478: \$? = $ac_status" >&5
+ echo "$as_me:12145: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Lib=yes"
else
@@ -11486,7 +12153,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:11489: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "$as_me:12156: result: `eval echo '${'$as_ac_Lib'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
break
@@ -11501,7 +12168,7 @@ fi
for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
do
as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
-echo "$as_me:11504: checking for initscr in -l$cf_curs_lib" >&5
+echo "$as_me:12171: checking for initscr in -l$cf_curs_lib" >&5
echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11509,7 +12176,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$cf_curs_lib $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 11512 "configure"
+#line 12179 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -11528,16 +12195,16 @@ initscr ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11531: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12198: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11534: \$? = $ac_status" >&5
+ echo "$as_me:12201: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11537: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12204: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11540: \$? = $ac_status" >&5
+ echo "$as_me:12207: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Lib=yes"
else
@@ -11548,23 +12215,23 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:11551: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "$as_me:12218: result: `eval echo '${'$as_ac_Lib'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
break
fi
done
- test $cf_curs_lib = unknown && { { echo "$as_me:11558: error: no curses library found" >&5
+ test $cf_curs_lib = unknown && { { echo "$as_me:12225: error: no curses library found" >&5
echo "$as_me: error: no curses library found" >&2;}
{ (exit 1); exit 1; }; }
LIBS="-l$cf_curs_lib $cf_save_LIBS"
if test "$cf_term_lib" = unknown ; then
- echo "$as_me:11564: checking if we can link with $cf_curs_lib library" >&5
+ echo "$as_me:12231: checking if we can link with $cf_curs_lib library" >&5
echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line 11567 "configure"
+#line 12234 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -11576,16 +12243,16 @@ initscr()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11579: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12246: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11582: \$? = $ac_status" >&5
+ echo "$as_me:12249: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11585: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12252: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11588: \$? = $ac_status" >&5
+ echo "$as_me:12255: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -11594,18 +12261,18 @@ cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- echo "$as_me:11597: result: $cf_result" >&5
+ echo "$as_me:12264: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
- test $cf_result = no && { { echo "$as_me:11599: error: Cannot link curses library" >&5
+ test $cf_result = no && { { echo "$as_me:12266: error: Cannot link curses library" >&5
echo "$as_me: error: Cannot link curses library" >&2;}
{ (exit 1); exit 1; }; }
elif test "$cf_curs_lib" = "$cf_term_lib" ; then
:
elif test "$cf_term_lib" != predefined ; then
- echo "$as_me:11605: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
+ echo "$as_me:12272: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line 11608 "configure"
+#line 12275 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -11617,16 +12284,16 @@ initscr(); tgoto((char *)0, 0, 0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11620: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12287: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11623: \$? = $ac_status" >&5
+ echo "$as_me:12290: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11626: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12293: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11629: \$? = $ac_status" >&5
+ echo "$as_me:12296: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=no
else
@@ -11635,7 +12302,7 @@ cat conftest.$ac_ext >&5
LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 11638 "configure"
+#line 12305 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -11647,16 +12314,16 @@ initscr()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11650: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12317: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11653: \$? = $ac_status" >&5
+ echo "$as_me:12320: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11656: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12323: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11659: \$? = $ac_status" >&5
+ echo "$as_me:12326: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -11668,7 +12335,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- echo "$as_me:11671: result: $cf_result" >&5
+ echo "$as_me:12338: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
fi
fi
@@ -11678,7 +12345,7 @@ fi
cf_all_widgets=yes
-echo "$as_me:11681: checking if you want extra dialogs" >&5
+echo "$as_me:12348: checking if you want extra dialogs" >&5
echo $ECHO_N "checking if you want extra dialogs... $ECHO_C" >&6
# Check whether --enable-extras or --disable-extras was given.
@@ -11688,7 +12355,7 @@ if test "${enable_extras+set}" = set; then
else
enableval=yes
fi;
-echo "$as_me:11691: result: $enableval" >&5
+echo "$as_me:12358: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
cf_all_widgets=yes
@@ -11696,7 +12363,7 @@ else
cf_all_widgets=no
fi
-echo "$as_me:11699: checking if you want config-file support" >&5
+echo "$as_me:12366: checking if you want config-file support" >&5
echo $ECHO_N "checking if you want config-file support... $ECHO_C" >&6
# Check whether --enable-rc-file or --disable-rc-file was given.
@@ -11706,11 +12373,12 @@ if test "${enable_rc_file+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:11709: result: $enableval" >&5
+echo "$as_me:12376: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS rc\$o"
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_RC_FILE 1
EOF
@@ -11718,7 +12386,7 @@ else
:
fi
-echo "$as_me:11721: checking if you want Xdialog-style dialogs" >&5
+echo "$as_me:12389: checking if you want Xdialog-style dialogs" >&5
echo $ECHO_N "checking if you want Xdialog-style dialogs... $ECHO_C" >&6
# Check whether --enable-Xdialog or --disable-Xdialog was given.
@@ -11728,11 +12396,12 @@ if test "${enable_Xdialog+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:11731: result: $enableval" >&5
+echo "$as_me:12399: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS calendar\$o fselect\$o timebox\$o"
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_XDIALOG 1
EOF
@@ -11740,7 +12409,52 @@ else
:
fi
-echo "$as_me:11743: checking if you want the form dialog" >&5
+echo "$as_me:12412: checking if you want extra Xdialog-style dialogs (1.2)" >&5
+echo $ECHO_N "checking if you want extra Xdialog-style dialogs (1.2)... $ECHO_C" >&6
+
+# Check whether --enable-Xdialog2 or --disable-Xdialog2 was given.
+if test "${enable_Xdialog2+set}" = set; then
+ enableval="$enable_Xdialog2"
+
+else
+ enableval=$cf_all_widgets
+fi;
+echo "$as_me:12422: result: $enableval" >&5
+echo "${ECHO_T}$enableval" >&6
+if test "$enableval" != no ; then
+EXTRAOBJS="$EXTRAOBJS buildlist\$o rangebox\$o treeview\$o"
+
+cat >>confdefs.h <<\EOF
+#define HAVE_XDIALOG2 1
+EOF
+
+else
+ :
+fi
+
+echo "$as_me:12435: checking if you want compatibility with whiptail options" >&5
+echo $ECHO_N "checking if you want compatibility with whiptail options... $ECHO_C" >&6
+
+# Check whether --enable-whiptail or --disable-whiptail was given.
+if test "${enable_whiptail+set}" = set; then
+ enableval="$enable_whiptail"
+
+else
+ enableval=$cf_all_widgets
+fi;
+echo "$as_me:12445: result: $enableval" >&5
+echo "${ECHO_T}$enableval" >&6
+if test "$enableval" != no ; then
+
+cat >>confdefs.h <<\EOF
+#define HAVE_WHIPTAIL 1
+EOF
+
+else
+ :
+fi
+
+echo "$as_me:12457: checking if you want the form dialog" >&5
echo $ECHO_N "checking if you want the form dialog... $ECHO_C" >&6
# Check whether --enable-form or --disable-form was given.
@@ -11750,11 +12464,12 @@ if test "${enable_form+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:11753: result: $enableval" >&5
+echo "$as_me:12467: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS formbox\$o"
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_DLG_FORMBOX 1
EOF
@@ -11762,7 +12477,7 @@ else
:
fi
-echo "$as_me:11765: checking if you want the gauge dialog" >&5
+echo "$as_me:12480: checking if you want the gauge dialog" >&5
echo $ECHO_N "checking if you want the gauge dialog... $ECHO_C" >&6
# Check whether --enable-gauge or --disable-gauge was given.
@@ -11772,11 +12487,12 @@ if test "${enable_gauge+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:11775: result: $enableval" >&5
+echo "$as_me:12490: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS guage\$o pause\$o prgbox\$o progressbox\$o"
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_DLG_GAUGE 1
EOF
@@ -11784,7 +12500,7 @@ else
:
fi
-echo "$as_me:11787: checking if you want the tailbox dialog" >&5
+echo "$as_me:12503: checking if you want the tailbox dialog" >&5
echo $ECHO_N "checking if you want the tailbox dialog... $ECHO_C" >&6
# Check whether --enable-tailbox or --disable-tailbox was given.
@@ -11794,11 +12510,12 @@ if test "${enable_tailbox+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:11797: result: $enableval" >&5
+echo "$as_me:12513: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS tailbox\$o"
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_DLG_TAILBOX 1
EOF
@@ -11806,7 +12523,7 @@ else
:
fi
-echo "$as_me:11809: checking if you want the mixedform dialog" >&5
+echo "$as_me:12526: checking if you want the mixedform dialog" >&5
echo $ECHO_N "checking if you want the mixedform dialog... $ECHO_C" >&6
# Check whether --enable-mixedform or --disable-mixedform was given.
@@ -11816,11 +12533,12 @@ if test "${enable_mixedform+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:11819: result: $enableval" >&5
+echo "$as_me:12536: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS mixedform\$o"
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_DLG_MIXEDFORM 1
EOF
@@ -11828,7 +12546,7 @@ else
:
fi
-echo "$as_me:11831: checking if you want the mixedgauge dialog" >&5
+echo "$as_me:12549: checking if you want the mixedgauge dialog" >&5
echo $ECHO_N "checking if you want the mixedgauge dialog... $ECHO_C" >&6
# Check whether --enable-mixedgauge or --disable-mixedgauge was given.
@@ -11838,11 +12556,12 @@ if test "${enable_mixedgauge+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:11841: result: $enableval" >&5
+echo "$as_me:12559: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS mixedgauge\$o"
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_MIXEDGAUGE 1
EOF
@@ -11850,7 +12569,7 @@ else
:
fi
-echo "$as_me:11853: checking if you want the wide-curses features" >&5
+echo "$as_me:12572: checking if you want the wide-curses features" >&5
echo $ECHO_N "checking if you want the wide-curses features... $ECHO_C" >&6
# Check whether --enable-widec or --disable-widec was given.
@@ -11860,9 +12579,10 @@ if test "${enable_widec+set}" = set; then
else
enableval=$cf_wide_curses
fi;
-echo "$as_me:11863: result: $enableval" >&5
+echo "$as_me:12582: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
+
cat >>confdefs.h <<\EOF
#define USE_WIDE_CURSES 1
EOF
@@ -11871,13 +12591,13 @@ else
:
fi
-echo "$as_me:11874: checking for ANSI C header files" >&5
+echo "$as_me:12594: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11880 "configure"
+#line 12600 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -11885,13 +12605,13 @@ else
#include <float.h>
_ACEOF
-if { (eval echo "$as_me:11888: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:12608: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:11894: \$? = $ac_status" >&5
+ echo "$as_me:12614: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -11913,7 +12633,7 @@ rm -f conftest.err conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
-#line 11916 "configure"
+#line 12636 "configure"
#include "confdefs.h"
#include <string.h>
@@ -11931,7 +12651,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
-#line 11934 "configure"
+#line 12654 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -11952,7 +12672,7 @@ if test $ac_cv_header_stdc = yes; then
:
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11955 "configure"
+#line 12675 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
@@ -11978,15 +12698,15 @@ main ()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:11981: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12701: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11984: \$? = $ac_status" >&5
+ echo "$as_me:12704: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:11986: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12706: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11989: \$? = $ac_status" >&5
+ echo "$as_me:12709: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -11999,7 +12719,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
-echo "$as_me:12002: result: $ac_cv_header_stdc" >&5
+echo "$as_me:12722: result: $ac_cv_header_stdc" >&5
echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then
@@ -12009,13 +12729,13 @@ EOF
fi
-echo "$as_me:12012: checking whether time.h and sys/time.h may both be included" >&5
+echo "$as_me:12732: checking whether time.h and sys/time.h may both be included" >&5
echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
if test "${ac_cv_header_time+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12018 "configure"
+#line 12738 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -12031,16 +12751,16 @@ return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12034: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12754: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12037: \$? = $ac_status" >&5
+ echo "$as_me:12757: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12040: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12760: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12043: \$? = $ac_status" >&5
+ echo "$as_me:12763: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_header_time=yes
else
@@ -12050,7 +12770,7 @@ ac_cv_header_time=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:12053: result: $ac_cv_header_time" >&5
+echo "$as_me:12773: result: $ac_cv_header_time" >&5
echo "${ECHO_T}$ac_cv_header_time" >&6
if test $ac_cv_header_time = yes; then
@@ -12063,13 +12783,13 @@ fi
ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-echo "$as_me:12066: checking for $ac_hdr that defines DIR" >&5
+echo "$as_me:12786: checking for $ac_hdr that defines DIR" >&5
echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12072 "configure"
+#line 12792 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -12084,16 +12804,16 @@ return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12087: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12807: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12090: \$? = $ac_status" >&5
+ echo "$as_me:12810: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12093: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12813: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12096: \$? = $ac_status" >&5
+ echo "$as_me:12816: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Header=yes"
else
@@ -12103,7 +12823,7 @@ eval "$as_ac_Header=no"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:12106: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:12826: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -12116,7 +12836,7 @@ fi
done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
- echo "$as_me:12119: checking for opendir in -ldir" >&5
+ echo "$as_me:12839: checking for opendir in -ldir" >&5
echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
if test "${ac_cv_lib_dir_opendir+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12124,7 +12844,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldir $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 12127 "configure"
+#line 12847 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -12143,16 +12863,16 @@ opendir ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12146: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12866: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12149: \$? = $ac_status" >&5
+ echo "$as_me:12869: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12152: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12872: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12155: \$? = $ac_status" >&5
+ echo "$as_me:12875: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dir_opendir=yes
else
@@ -12163,14 +12883,14 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:12166: result: $ac_cv_lib_dir_opendir" >&5
+echo "$as_me:12886: result: $ac_cv_lib_dir_opendir" >&5
echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
if test $ac_cv_lib_dir_opendir = yes; then
LIBS="$LIBS -ldir"
fi
else
- echo "$as_me:12173: checking for opendir in -lx" >&5
+ echo "$as_me:12893: checking for opendir in -lx" >&5
echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
if test "${ac_cv_lib_x_opendir+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12178,7 +12898,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lx $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 12181 "configure"
+#line 12901 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -12197,16 +12917,16 @@ opendir ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12200: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12920: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12203: \$? = $ac_status" >&5
+ echo "$as_me:12923: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12206: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12926: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12209: \$? = $ac_status" >&5
+ echo "$as_me:12929: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_x_opendir=yes
else
@@ -12217,7 +12937,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:12220: result: $ac_cv_lib_x_opendir" >&5
+echo "$as_me:12940: result: $ac_cv_lib_x_opendir" >&5
echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
if test $ac_cv_lib_x_opendir = yes; then
LIBS="$LIBS -lx"
@@ -12228,23 +12948,23 @@ fi
for ac_header in search.h unctrl.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:12231: checking for $ac_header" >&5
+echo "$as_me:12951: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12237 "configure"
+#line 12957 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:12241: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:12961: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:12247: \$? = $ac_status" >&5
+ echo "$as_me:12967: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -12263,7 +12983,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:12266: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:12986: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -12273,7 +12993,7 @@ EOF
fi
done
-echo "$as_me:12276: checking for term.h" >&5
+echo "$as_me:12996: checking for term.h" >&5
echo $ECHO_N "checking for term.h... $ECHO_C" >&6
if test "${cf_cv_term_header+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12294,7 +13014,7 @@ esac
for cf_header in $cf_header_list
do
cat >conftest.$ac_ext <<_ACEOF
-#line 12297 "configure"
+#line 13017 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -12308,16 +13028,16 @@ WINDOW *x
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12311: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13031: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12314: \$? = $ac_status" >&5
+ echo "$as_me:13034: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12317: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13037: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12320: \$? = $ac_status" >&5
+ echo "$as_me:13040: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_term_header=$cf_header
break
@@ -12336,7 +13056,7 @@ no)
for cf_header in ncurses/term.h ncursesw/term.h
do
cat >conftest.$ac_ext <<_ACEOF
-#line 12339 "configure"
+#line 13059 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -12354,16 +13074,16 @@ WINDOW *x
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12357: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13077: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12360: \$? = $ac_status" >&5
+ echo "$as_me:13080: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12363: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13083: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12366: \$? = $ac_status" >&5
+ echo "$as_me:13086: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_term_header=$cf_header
break
@@ -12378,37 +13098,40 @@ rm -f conftest.$ac_objext conftest.$ac_ext
esac
fi
-echo "$as_me:12381: result: $cf_cv_term_header" >&5
+echo "$as_me:13101: result: $cf_cv_term_header" >&5
echo "${ECHO_T}$cf_cv_term_header" >&6
case $cf_cv_term_header in #(vi
term.h) #(vi
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_TERM_H 1
EOF
;;
ncurses/term.h) #(vi
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSES_TERM_H 1
EOF
;;
ncursesw/term.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSESW_TERM_H 1
EOF
;;
esac
-echo "$as_me:12405: checking return type of signal handlers" >&5
+echo "$as_me:13128: checking return type of signal handlers" >&5
echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
if test "${ac_cv_type_signal+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12411 "configure"
+#line 13134 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -12430,16 +13153,16 @@ int i;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12433: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13156: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12436: \$? = $ac_status" >&5
+ echo "$as_me:13159: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12439: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13162: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12442: \$? = $ac_status" >&5
+ echo "$as_me:13165: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_type_signal=void
else
@@ -12449,7 +13172,7 @@ ac_cv_type_signal=int
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:12452: result: $ac_cv_type_signal" >&5
+echo "$as_me:13175: result: $ac_cv_type_signal" >&5
echo "${ECHO_T}$ac_cv_type_signal" >&6
cat >>confdefs.h <<EOF
@@ -12474,13 +13197,13 @@ wctomb \
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:12477: checking for $ac_func" >&5
+echo "$as_me:13200: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12483 "configure"
+#line 13206 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
@@ -12503,7 +13226,7 @@ main ()
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
#endif
;
@@ -12511,16 +13234,16 @@ f = $ac_func;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12514: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13237: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12517: \$? = $ac_status" >&5
+ echo "$as_me:13240: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12520: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13243: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12523: \$? = $ac_status" >&5
+ echo "$as_me:13246: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
@@ -12530,7 +13253,7 @@ eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:12533: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:13256: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -12540,14 +13263,14 @@ EOF
fi
done
-echo "$as_me:12543: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
+echo "$as_me:13266: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
if test "${cf_cv_need_xopen_extension+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12550 "configure"
+#line 13273 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -12569,23 +13292,23 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12572: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13295: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12575: \$? = $ac_status" >&5
+ echo "$as_me:13298: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12578: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13301: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12581: \$? = $ac_status" >&5
+ echo "$as_me:13304: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_need_xopen_extension=no
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
-#line 12588 "configure"
+#line 13311 "configure"
#include "confdefs.h"
#define _XOPEN_SOURCE_EXTENDED
@@ -12607,16 +13330,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12610: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13333: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12613: \$? = $ac_status" >&5
+ echo "$as_me:13336: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12616: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13339: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12619: \$? = $ac_status" >&5
+ echo "$as_me:13342: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_need_xopen_extension=yes
else
@@ -12628,11 +13351,11 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:12631: result: $cf_cv_need_xopen_extension" >&5
+echo "$as_me:13354: result: $cf_cv_need_xopen_extension" >&5
echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
-echo "$as_me:12635: checking for unctrl.h" >&5
+echo "$as_me:13358: checking for unctrl.h" >&5
echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
if test "${cf_cv_unctrl_header+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12653,7 +13376,7 @@ esac
for cf_header in $cf_header_list
do
cat >conftest.$ac_ext <<_ACEOF
-#line 12656 "configure"
+#line 13379 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -12667,16 +13390,16 @@ WINDOW *x
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12670: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13393: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12673: \$? = $ac_status" >&5
+ echo "$as_me:13396: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12676: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13399: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12679: \$? = $ac_status" >&5
+ echo "$as_me:13402: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_unctrl_header=$cf_header
break
@@ -12690,30 +13413,33 @@ done
case $cf_cv_unctrl_header in #(vi
no)
- { echo "$as_me:12693: WARNING: unctrl.h header not found" >&5
+ { echo "$as_me:13416: WARNING: unctrl.h header not found" >&5
echo "$as_me: WARNING: unctrl.h header not found" >&2;}
;;
esac
fi
-echo "$as_me:12699: result: $cf_cv_unctrl_header" >&5
+echo "$as_me:13422: result: $cf_cv_unctrl_header" >&5
echo "${ECHO_T}$cf_cv_unctrl_header" >&6
case $cf_cv_unctrl_header in #(vi
unctrl.h) #(vi
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_UNCTRL_H 1
EOF
;;
ncurses/unctrl.h) #(vi
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSES_UNCTRL_H 1
EOF
;;
ncursesw/unctrl.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSESW_UNCTRL_H 1
EOF
@@ -12736,16 +13462,18 @@ getpary \
getparyx \
use_default_colors \
wchgat \
+wcursyncup \
wget_wch \
+wsyncup \
do
cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- echo "$as_me:12745: checking for ${cf_func}" >&5
+ echo "$as_me:13473: checking for ${cf_func}" >&5
echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
-echo "${as_me:-configure}:12748: testing ${cf_func} ..." 1>&5
+echo "${as_me:-configure}:13476: testing ${cf_func} ..." 1>&5
if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12754,7 +13482,7 @@ else
eval cf_result='$ac_cv_func_'$cf_func
if test ".$cf_result" != ".no"; then
cat >conftest.$ac_ext <<_ACEOF
-#line 12757 "configure"
+#line 13485 "configure"
#include "confdefs.h"
#ifdef HAVE_XCURSES
@@ -12786,16 +13514,16 @@ if (foo + 1234 > 5678)
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12789: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13517: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12792: \$? = $ac_status" >&5
+ echo "$as_me:13520: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12795: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13523: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12798: \$? = $ac_status" >&5
+ echo "$as_me:13526: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -12811,7 +13539,7 @@ fi
# use the computed/retrieved cache-value:
eval 'cf_result=$cf_cv_func_'$cf_func
- echo "$as_me:12814: result: $cf_result" >&5
+ echo "$as_me:13542: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
if test $cf_result != no; then
cat >>confdefs.h <<EOF
@@ -12821,13 +13549,13 @@ EOF
fi
done
-echo "$as_me:12824: checking for start_color" >&5
+echo "$as_me:13552: checking for start_color" >&5
echo $ECHO_N "checking for start_color... $ECHO_C" >&6
if test "${ac_cv_func_start_color+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12830 "configure"
+#line 13558 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char start_color (); below. */
@@ -12850,7 +13578,7 @@ main ()
#if defined (__stub_start_color) || defined (__stub___start_color)
choke me
#else
-f = start_color;
+f = start_color; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
#endif
;
@@ -12858,16 +13586,16 @@ f = start_color;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12861: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13589: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12864: \$? = $ac_status" >&5
+ echo "$as_me:13592: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12867: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13595: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12870: \$? = $ac_status" >&5
+ echo "$as_me:13598: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_start_color=yes
else
@@ -12877,23 +13605,24 @@ ac_cv_func_start_color=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:12880: result: $ac_cv_func_start_color" >&5
+echo "$as_me:13608: result: $ac_cv_func_start_color" >&5
echo "${ECHO_T}$ac_cv_func_start_color" >&6
if test $ac_cv_func_start_color = yes; then
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_COLOR 1
EOF
fi
-echo "$as_me:12889: checking for chtype typedef" >&5
+echo "$as_me:13618: checking for chtype typedef" >&5
echo $ECHO_N "checking for chtype typedef... $ECHO_C" >&6
if test "${cf_cv_chtype_decl+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12896 "configure"
+#line 13625 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -12905,16 +13634,16 @@ chtype foo
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12908: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13637: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12911: \$? = $ac_status" >&5
+ echo "$as_me:13640: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12914: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13643: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12917: \$? = $ac_status" >&5
+ echo "$as_me:13646: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_chtype_decl=yes
else
@@ -12924,21 +13653,22 @@ cf_cv_chtype_decl=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:12927: result: $cf_cv_chtype_decl" >&5
+echo "$as_me:13656: result: $cf_cv_chtype_decl" >&5
echo "${ECHO_T}$cf_cv_chtype_decl" >&6
if test $cf_cv_chtype_decl = yes ; then
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_TYPE_CHTYPE 1
EOF
- echo "$as_me:12934: checking if chtype is scalar or struct" >&5
+ echo "$as_me:13664: checking if chtype is scalar or struct" >&5
echo $ECHO_N "checking if chtype is scalar or struct... $ECHO_C" >&6
if test "${cf_cv_chtype_type+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12941 "configure"
+#line 13671 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -12950,16 +13680,16 @@ chtype foo; long x = foo
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12953: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13683: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12956: \$? = $ac_status" >&5
+ echo "$as_me:13686: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12959: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13689: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12962: \$? = $ac_status" >&5
+ echo "$as_me:13692: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_chtype_type=scalar
else
@@ -12969,17 +13699,18 @@ cf_cv_chtype_type=struct
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:12972: result: $cf_cv_chtype_type" >&5
+echo "$as_me:13702: result: $cf_cv_chtype_type" >&5
echo "${ECHO_T}$cf_cv_chtype_type" >&6
if test $cf_cv_chtype_type = scalar ; then
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define TYPE_CHTYPE_IS_SCALAR 1
EOF
fi
fi
-echo "$as_me:12982: checking for wide alternate character set array" >&5
+echo "$as_me:13713: checking for wide alternate character set array" >&5
echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
if test "${cf_cv_curses_wacs_map+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12989,7 +13720,7 @@ else
for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
do
cat >conftest.$ac_ext <<_ACEOF
-#line 12992 "configure"
+#line 13723 "configure"
#include "confdefs.h"
#ifndef _XOPEN_SOURCE_EXTENDED
@@ -13005,16 +13736,16 @@ void *foo = &($name['k'])
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13008: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13739: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13011: \$? = $ac_status" >&5
+ echo "$as_me:13742: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13014: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13745: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13017: \$? = $ac_status" >&5
+ echo "$as_me:13748: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_curses_wacs_map=$name
break
@@ -13025,14 +13756,15 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
done
fi
-echo "$as_me:13028: result: $cf_cv_curses_wacs_map" >&5
+echo "$as_me:13759: result: $cf_cv_curses_wacs_map" >&5
echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
-test "$cf_cv_curses_wacs_map" != unknown && cat >>confdefs.h <<EOF
+test "$cf_cv_curses_wacs_map" != unknown &&
+cat >>confdefs.h <<EOF
#define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
EOF
-echo "$as_me:13035: checking for wide alternate character constants" >&5
+echo "$as_me:13767: checking for wide alternate character constants" >&5
echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
if test "${cf_cv_curses_wacs_symbols+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13042,7 +13774,7 @@ cf_cv_curses_wacs_symbols=no
if test "$cf_cv_curses_wacs_map" != unknown
then
cat >conftest.$ac_ext <<_ACEOF
-#line 13045 "configure"
+#line 13777 "configure"
#include "confdefs.h"
#ifndef _XOPEN_SOURCE_EXTENDED
@@ -13059,16 +13791,16 @@ cchar_t *foo = WACS_PLUS;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13062: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13794: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13065: \$? = $ac_status" >&5
+ echo "$as_me:13797: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13068: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13800: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13071: \$? = $ac_status" >&5
+ echo "$as_me:13803: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_curses_wacs_symbols=yes
else
@@ -13078,7 +13810,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13081 "configure"
+#line 13813 "configure"
#include "confdefs.h"
#ifndef _XOPEN_SOURCE_EXTENDED
@@ -13094,16 +13826,16 @@ cchar_t *foo = WACS_PLUS
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13097: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13829: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13100: \$? = $ac_status" >&5
+ echo "$as_me:13832: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13103: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13835: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13106: \$? = $ac_status" >&5
+ echo "$as_me:13838: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_curses_wacs_symbols=yes
else
@@ -13114,33 +13846,165 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
fi
-echo "$as_me:13117: result: $cf_cv_curses_wacs_symbols" >&5
+echo "$as_me:13849: result: $cf_cv_curses_wacs_symbols" >&5
echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
-test "$cf_cv_curses_wacs_symbols" != no && cat >>confdefs.h <<\EOF
+test "$cf_cv_curses_wacs_symbols" != no &&
+cat >>confdefs.h <<\EOF
#define CURSES_WACS_SYMBOLS 1
EOF
+for cf_func in wgetparent
+do
+
+cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+ echo "$as_me:13862: checking for ${cf_func}" >&5
+echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
+
+echo "${as_me:-configure}:13865: testing ${cf_func} ..." 1>&5
+
+ if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ eval cf_result='$ac_cv_func_'$cf_func
+ if test ".$cf_result" != ".no"; then
+ cat >conftest.$ac_ext <<_ACEOF
+#line 13874 "configure"
+#include "confdefs.h"
+
+#ifdef HAVE_XCURSES
+#include <xcurses.h>
+char * XCursesProgramName = "test";
+#else
+#include <${cf_cv_ncurses_header:-curses.h}>
+#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
+#include <ncursesw/term.h>
+#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
+#include <ncurses/term.h>
+#elif defined(HAVE_TERM_H)
+#include <term.h>
+#endif
+#endif
+
+int
+main ()
+{
+
+#ifndef ${cf_func}
+long foo = (long)(&${cf_func});
+if (foo + 1234 > 5678)
+ ${cf_cv_main_return:-return}(foo);
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:13906: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:13909: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:13912: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13915: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_result=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_result=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
+ eval 'cf_cv_func_'$cf_func'=$cf_result'
+
+fi
+
+ # use the computed/retrieved cache-value:
+ eval 'cf_result=$cf_cv_func_'$cf_func
+ echo "$as_me:13931: result: $cf_result" >&5
+echo "${ECHO_T}$cf_result" >&6
+ if test $cf_result != no; then
+ cat >>confdefs.h <<EOF
+#define HAVE_${cf_tr_func} 1
+EOF
+
+ fi
+done
+
+if test "x$cf_cv_func_wgetparent" != xyes
+then
+ echo "$as_me:13943: checking if WINDOW has _parent member" >&5
+echo $ECHO_N "checking if WINDOW has _parent member... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line 13946 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main ()
+{
+WINDOW *p = stdscr->_parent
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:13958: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:13961: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:13964: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13967: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_window__parent=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_window__parent=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:13976: result: $cf_window__parent" >&5
+echo "${ECHO_T}$cf_window__parent" >&6
+ if test "$cf_window__parent" = yes
+ then
+
+cat >>confdefs.h <<\EOF
+#define HAVE_WINDOW__PARENT 1
+EOF
+
+ fi
+fi
+
for ac_header in sys/wait.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:13127: checking for $ac_header" >&5
+echo "$as_me:13991: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13133 "configure"
+#line 13997 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:13137: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:14001: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:13143: \$? = $ac_status" >&5
+ echo "$as_me:14007: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -13159,7 +14023,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:13162: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:14026: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -13180,23 +14044,23 @@ else
for ac_header in wait.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:13183: checking for $ac_header" >&5
+echo "$as_me:14047: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13189 "configure"
+#line 14053 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:13193: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:14057: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:13199: \$? = $ac_status" >&5
+ echo "$as_me:14063: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -13215,7 +14079,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:13218: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:14082: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -13228,23 +14092,23 @@ done
for ac_header in waitstatus.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:13231: checking for $ac_header" >&5
+echo "$as_me:14095: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13237 "configure"
+#line 14101 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:13241: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:14105: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:13247: \$? = $ac_status" >&5
+ echo "$as_me:14111: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -13263,7 +14127,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:13266: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:14130: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -13285,14 +14149,14 @@ cf_wait_headers="$cf_wait_headers
fi
fi
-echo "$as_me:13288: checking for union wait" >&5
+echo "$as_me:14152: checking for union wait" >&5
echo $ECHO_N "checking for union wait... $ECHO_C" >&6
if test "${cf_cv_type_unionwait+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13295 "configure"
+#line 14159 "configure"
#include "confdefs.h"
$cf_wait_headers
int
@@ -13308,16 +14172,16 @@ int x;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13311: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14175: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13314: \$? = $ac_status" >&5
+ echo "$as_me:14178: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13317: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14181: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13320: \$? = $ac_status" >&5
+ echo "$as_me:14184: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_type_unionwait=no
echo compiles ok w/o union wait 1>&5
@@ -13327,7 +14191,7 @@ else
cat conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
-#line 13330 "configure"
+#line 14194 "configure"
#include "confdefs.h"
$cf_wait_headers
int
@@ -13347,16 +14211,16 @@ union wait x;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13350: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14214: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13353: \$? = $ac_status" >&5
+ echo "$as_me:14217: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13356: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14220: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13359: \$? = $ac_status" >&5
+ echo "$as_me:14223: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_type_unionwait=yes
echo compiles ok with union wait and possibly macros too 1>&5
@@ -13371,22 +14235,23 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:13374: result: $cf_cv_type_unionwait" >&5
+echo "$as_me:14238: result: $cf_cv_type_unionwait" >&5
echo "${ECHO_T}$cf_cv_type_unionwait" >&6
-test $cf_cv_type_unionwait = yes && cat >>confdefs.h <<\EOF
+test $cf_cv_type_unionwait = yes &&
+cat >>confdefs.h <<\EOF
#define HAVE_TYPE_UNIONWAIT 1
EOF
if test $cf_cv_type_unionwait = yes; then
- echo "$as_me:13382: checking if union wait can be used as wait-arg" >&5
+ echo "$as_me:14247: checking if union wait can be used as wait-arg" >&5
echo $ECHO_N "checking if union wait can be used as wait-arg... $ECHO_C" >&6
if test "${cf_cv_arg_union_wait+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13389 "configure"
+#line 14254 "configure"
#include "confdefs.h"
$cf_wait_headers
int
@@ -13398,16 +14263,16 @@ union wait x; wait(&x)
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13401: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14266: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13404: \$? = $ac_status" >&5
+ echo "$as_me:14269: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13407: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14272: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13410: \$? = $ac_status" >&5
+ echo "$as_me:14275: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_arg_union_wait=yes
else
@@ -13419,20 +14284,21 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
- echo "$as_me:13422: result: $cf_cv_arg_union_wait" >&5
+ echo "$as_me:14287: result: $cf_cv_arg_union_wait" >&5
echo "${ECHO_T}$cf_cv_arg_union_wait" >&6
- test $cf_cv_arg_union_wait = yes && cat >>confdefs.h <<\EOF
+ test $cf_cv_arg_union_wait = yes &&
+cat >>confdefs.h <<\EOF
#define WAIT_USES_UNION 1
EOF
- echo "$as_me:13428: checking if union wait can be used as waitpid-arg" >&5
+ echo "$as_me:14294: checking if union wait can be used as waitpid-arg" >&5
echo $ECHO_N "checking if union wait can be used as waitpid-arg... $ECHO_C" >&6
if test "${cf_cv_arg_union_waitpid+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13435 "configure"
+#line 14301 "configure"
#include "confdefs.h"
$cf_wait_headers
int
@@ -13444,16 +14310,16 @@ union wait x; waitpid(0, &x, 0)
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13447: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14313: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13450: \$? = $ac_status" >&5
+ echo "$as_me:14316: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13453: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14319: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13456: \$? = $ac_status" >&5
+ echo "$as_me:14322: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_arg_union_waitpid=yes
else
@@ -13465,22 +14331,23 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
- echo "$as_me:13468: result: $cf_cv_arg_union_waitpid" >&5
+ echo "$as_me:14334: result: $cf_cv_arg_union_waitpid" >&5
echo "${ECHO_T}$cf_cv_arg_union_waitpid" >&6
- test $cf_cv_arg_union_waitpid = yes && cat >>confdefs.h <<\EOF
+ test $cf_cv_arg_union_waitpid = yes &&
+cat >>confdefs.h <<\EOF
#define WAITPID_USES_UNION 1
EOF
fi
-echo "$as_me:13476: checking if we must include wchar.h to declare mbstate_t" >&5
+echo "$as_me:14343: checking if we must include wchar.h to declare mbstate_t" >&5
echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
if test "${cf_cv_mbstate_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13483 "configure"
+#line 14350 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -13497,23 +14364,23 @@ mbstate_t state
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13500: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14367: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13503: \$? = $ac_status" >&5
+ echo "$as_me:14370: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13506: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14373: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13509: \$? = $ac_status" >&5
+ echo "$as_me:14376: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_mbstate_t=no
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
-#line 13516 "configure"
+#line 14383 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -13531,16 +14398,16 @@ mbstate_t value
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13534: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14401: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13537: \$? = $ac_status" >&5
+ echo "$as_me:14404: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13540: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14407: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13543: \$? = $ac_status" >&5
+ echo "$as_me:14410: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_mbstate_t=yes
else
@@ -13552,18 +14419,20 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:13555: result: $cf_cv_mbstate_t" >&5
+echo "$as_me:14422: result: $cf_cv_mbstate_t" >&5
echo "${ECHO_T}$cf_cv_mbstate_t" >&6
if test "$cf_cv_mbstate_t" = yes ; then
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define NEED_WCHAR_H 1
EOF
fi
if test "$cf_cv_mbstate_t" != unknown ; then
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_MBSTATE_T 1
EOF
@@ -13575,7 +14444,7 @@ PACKAGE_CONFIG=dlg_config.h
EXTRA_OUTPUT="$EXTRA_OUTPUT headers-sh:$srcdir/headers-sh.in"
cat >conftest.$ac_ext <<_ACEOF
-#line 13578 "configure"
+#line 14447 "configure"
#include "confdefs.h"
#include <locale.h>
int
@@ -13587,18 +14456,19 @@ setlocale(LC_ALL, "")
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13590: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14459: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13593: \$? = $ac_status" >&5
+ echo "$as_me:14462: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13596: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14465: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13599: \$? = $ac_status" >&5
+ echo "$as_me:14468: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_SETLOCALE 1
EOF
@@ -13609,7 +14479,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LD_RPATH_OPT=
-echo "$as_me:13612: checking for an rpath option" >&5
+echo "$as_me:14482: checking for an rpath option" >&5
echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
case $cf_cv_system_name in #(vi
irix*) #(vi
@@ -13625,7 +14495,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
@@ -13640,17 +14510,17 @@ solaris2*) #(vi
*)
;;
esac
-echo "$as_me:13643: result: $LD_RPATH_OPT" >&5
+echo "$as_me:14513: result: $LD_RPATH_OPT" >&5
echo "${ECHO_T}$LD_RPATH_OPT" >&6
case "x$LD_RPATH_OPT" in #(vi
x-R*)
- echo "$as_me:13648: checking if we need a space after rpath option" >&5
+ echo "$as_me:14518: checking if we need a space after rpath option" >&5
echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
cf_save_LIBS="$LIBS"
LIBS="${LD_RPATH_OPT}$libdir $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 13653 "configure"
+#line 14523 "configure"
#include "confdefs.h"
int
@@ -13662,16 +14532,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13665: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14535: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13668: \$? = $ac_status" >&5
+ echo "$as_me:14538: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13671: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14541: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13674: \$? = $ac_status" >&5
+ echo "$as_me:14544: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_rpath_space=no
else
@@ -13681,13 +14551,13 @@ cf_rpath_space=yes
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS="$cf_save_LIBS"
- echo "$as_me:13684: result: $cf_rpath_space" >&5
+ echo "$as_me:14554: result: $cf_rpath_space" >&5
echo "${ECHO_T}$cf_rpath_space" >&6
test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
;;
esac
-echo "$as_me:13690: checking if rpath-hack should be disabled" >&5
+echo "$as_me:14560: checking if rpath-hack should be disabled" >&5
echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
@@ -13704,21 +14574,21 @@ else
cf_disable_rpath_hack=no
fi;
-echo "$as_me:13707: result: $cf_disable_rpath_hack" >&5
+echo "$as_me:14577: result: $cf_disable_rpath_hack" >&5
echo "${ECHO_T}$cf_disable_rpath_hack" >&6
if test "$cf_disable_rpath_hack" = no ; then
-echo "$as_me:13711: checking for updated LDFLAGS" >&5
+echo "$as_me:14581: checking for updated LDFLAGS" >&5
echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
if test -n "$LD_RPATH_OPT" ; then
- echo "$as_me:13714: result: maybe" >&5
+ echo "$as_me:14584: result: maybe" >&5
echo "${ECHO_T}maybe" >&6
for ac_prog in ldd
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:13721: checking for $ac_word" >&5
+echo "$as_me:14591: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13733,7 +14603,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_cf_ldd_prog="$ac_prog"
-echo "$as_me:13736: found $ac_dir/$ac_word" >&5
+echo "$as_me:14606: found $ac_dir/$ac_word" >&5
break
done
@@ -13741,10 +14611,10 @@ fi
fi
cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
if test -n "$cf_ldd_prog"; then
- echo "$as_me:13744: result: $cf_ldd_prog" >&5
+ echo "$as_me:14614: result: $cf_ldd_prog" >&5
echo "${ECHO_T}$cf_ldd_prog" >&6
else
- echo "$as_me:13747: result: no" >&5
+ echo "$as_me:14617: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -13758,7 +14628,7 @@ test -n "$cf_ldd_prog" || cf_ldd_prog="no"
cf_rpath_oops=
cat >conftest.$ac_ext <<_ACEOF
-#line 13761 "configure"
+#line 14631 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -13770,16 +14640,16 @@ printf("Hello");
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13773: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14643: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13776: \$? = $ac_status" >&5
+ echo "$as_me:14646: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13779: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14649: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13782: \$? = $ac_status" >&5
+ echo "$as_me:14652: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
@@ -13807,7 +14677,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
then
test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
-echo "${as_me:-configure}:13810: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
+echo "${as_me:-configure}:14680: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
break
@@ -13819,11 +14689,11 @@ echo "${as_me:-configure}:13810: testing ...adding -L$cf_rpath_dir/lib to LDFLAG
test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
-echo "${as_me:-configure}:13822: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
+echo "${as_me:-configure}:14692: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
-echo "${as_me:-configure}:13826: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
+echo "${as_me:-configure}:14696: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
cf_rpath_dst=
for cf_rpath_src in $LDFLAGS
@@ -13860,7 +14730,7 @@ do
then
test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
-echo "${as_me:-configure}:13863: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
+echo "${as_me:-configure}:14733: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
fi
@@ -13873,11 +14743,11 @@ LDFLAGS=$cf_rpath_dst
test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
-echo "${as_me:-configure}:13876: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
+echo "${as_me:-configure}:14746: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
-echo "${as_me:-configure}:13880: testing ...checking LIBS $LIBS ..." 1>&5
+echo "${as_me:-configure}:14750: testing ...checking LIBS $LIBS ..." 1>&5
cf_rpath_dst=
for cf_rpath_src in $LIBS
@@ -13914,7 +14784,7 @@ do
then
test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
-echo "${as_me:-configure}:13917: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
+echo "${as_me:-configure}:14787: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
fi
@@ -13927,17 +14797,17 @@ LIBS=$cf_rpath_dst
test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
-echo "${as_me:-configure}:13930: testing ...checked LIBS $LIBS ..." 1>&5
+echo "${as_me:-configure}:14800: testing ...checked LIBS $LIBS ..." 1>&5
test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
-echo "${as_me:-configure}:13934: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
+echo "${as_me:-configure}:14804: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
fi
fi
-ac_config_files="$ac_config_files dialog-config makefile $EXTRA_OUTPUT $SUB_MAKEFILE samples/install/makefile"
+ac_config_files="$ac_config_files dialog-config makefile $EXTRA_OUTPUT $SUB_MAKEFILE"
ac_config_commands="$ac_config_commands default"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -14018,7 +14888,7 @@ DEFS=-DHAVE_CONFIG_H
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:14021: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:14891: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
@@ -14150,7 +15020,7 @@ EOF
cat >>$CONFIG_STATUS <<EOF
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.52.20101002,
+configured by $0, generated by GNU Autoconf 2.52.20121002,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -14194,7 +15064,7 @@ cat >>$CONFIG_STATUS <<\EOF
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
# Conflict between --help and --header
- { { echo "$as_me:14197: error: ambiguous option: $1
+ { { echo "$as_me:15067: error: ambiguous option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2;}
@@ -14213,7 +15083,7 @@ Try \`$0 --help' for more information." >&2;}
ac_need_defaults=false;;
# This is an error.
- -*) { { echo "$as_me:14216: error: unrecognized option: $1
+ -*) { { echo "$as_me:15086: error: unrecognized option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2;}
@@ -14232,7 +15102,7 @@ cat >&5 << _ACEOF
## Running config.status. ##
## ----------------------- ##
-This file was extended by $as_me 2.52.20101002, executed with
+This file was extended by $as_me 2.52.20121002, executed with
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
CONFIG_LINKS = $CONFIG_LINKS
@@ -14259,11 +15129,10 @@ do
"makefile" ) CONFIG_FILES="$CONFIG_FILES makefile" ;;
"$EXTRA_OUTPUT" ) CONFIG_FILES="$CONFIG_FILES $EXTRA_OUTPUT" ;;
"$SUB_MAKEFILE" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILE" ;;
- "samples/install/makefile" ) CONFIG_FILES="$CONFIG_FILES samples/install/makefile" ;;
"default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
"dlg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS dlg_config.h:config.hin" ;;
- *) { { echo "$as_me:14266: error: invalid argument: $ac_config_target" >&5
+ *) { { echo "$as_me:15135: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
@@ -14322,6 +15191,7 @@ s,@program_transform_name@,$program_transform_name,;t t
s,@bindir@,$bindir,;t t
s,@sbindir@,$sbindir,;t t
s,@libexecdir@,$libexecdir,;t t
+s,@datarootdir@,$datarootdir,;t t
s,@datadir@,$datadir,;t t
s,@sysconfdir@,$sysconfdir,;t t
s,@sharedstatedir@,$sharedstatedir,;t t
@@ -14353,6 +15223,7 @@ s,@CPPFLAGS@,$CPPFLAGS,;t t
s,@ac_ct_CC@,$ac_ct_CC,;t t
s,@EXEEXT@,$EXEEXT,;t t
s,@OBJEXT@,$OBJEXT,;t t
+s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
s,@CPP@,$CPP,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
s,@RANLIB@,$RANLIB,;t t
@@ -14360,6 +15231,8 @@ s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@LINT@,$LINT,;t t
+s,@LINT_OPTS@,$LINT_OPTS,;t t
s,@AR@,$AR,;t t
s,@ac_ct_AR@,$ac_ct_AR,;t t
s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
@@ -14382,7 +15255,6 @@ s,@host_vendor@,$host_vendor,;t t
s,@host_os@,$host_os,;t t
s,@PROG_EXT@,$PROG_EXT,;t t
s,@LIB_PREFIX@,$LIB_PREFIX,;t t
-s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
s,@VERSION@,$VERSION,;t t
s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
@@ -14435,6 +15307,7 @@ s,@LIB_INSTALL@,$LIB_INSTALL,;t t
s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
s,@LIBTOOL_MAKE@,$LIBTOOL_MAKE,;t t
s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
+s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
s,@EXTRAOBJS@,$EXTRAOBJS,;t t
s,@PACKAGE_PREFIX@,$PACKAGE_PREFIX,;t t
s,@PACKAGE_CONFIG@,$PACKAGE_CONFIG,;t t
@@ -14554,7 +15427,7 @@ done; }
esac
if test x"$ac_file" != x-; then
- { echo "$as_me:14557: creating $ac_file" >&5
+ { echo "$as_me:15430: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
@@ -14572,7 +15445,7 @@ echo "$as_me: creating $ac_file" >&6;}
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:14575: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:15448: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@@ -14585,13 +15458,45 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:14588: error: cannot find input file: $f" >&5
+ { { echo "$as_me:15461: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
esac
done` || { (exit 1); exit 1; }
EOF
+cat >>$CONFIG_STATUS <<\EOF
+ ac_warn_datarootdir=no
+ if test x"$ac_file" != x-; then
+ for ac_item in $ac_file_inputs
+ do
+ ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
+ if test -n "$ac_seen"; then
+ ac_used=`grep '@datarootdir@' $ac_item`
+ if test -z "$ac_used"; then
+ { echo "$as_me:15477: WARNING: datarootdir was used implicitly but not set:
+$ac_seen" >&5
+echo "$as_me: WARNING: datarootdir was used implicitly but not set:
+$ac_seen" >&2;}
+ ac_warn_datarootdir=yes
+ fi
+ fi
+ ac_seen=`grep '${datarootdir}' $ac_item`
+ if test -n "$ac_seen"; then
+ { echo "$as_me:15486: WARNING: datarootdir was used explicitly but not set:
+$ac_seen" >&5
+echo "$as_me: WARNING: datarootdir was used explicitly but not set:
+$ac_seen" >&2;}
+ ac_warn_datarootdir=yes
+ fi
+ done
+ fi
+
+if test "x$ac_warn_datarootdir" = xyes; then
+ ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
+fi
+
+EOF
cat >>$CONFIG_STATUS <<EOF
sed "$ac_vpsub
$extrasub
@@ -14606,11 +15511,35 @@ s,@INSTALL@,$ac_INSTALL,;t t
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
rm -f $tmp/stdin
if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
+ cp $tmp/out $ac_file
+
+ for ac_name in prefix exec_prefix datarootdir
+ do
+ ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
+ if test -n "$ac_seen"; then
+ ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
+ if test -z "$ac_init"; then
+ ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
+ { echo "$as_me:15523: WARNING: Variable $ac_name is used but was not set:
+$ac_seen" >&5
+echo "$as_me: WARNING: Variable $ac_name is used but was not set:
+$ac_seen" >&2;}
+ fi
+ fi
+ done
+ egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
+ egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
+ if test -s $tmp/out; then
+ ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
+ { echo "$as_me:15534: WARNING: Some variables may not be substituted:
+$ac_seen" >&5
+echo "$as_me: WARNING: Some variables may not be substituted:
+$ac_seen" >&2;}
+ fi
else
cat $tmp/out
- rm -f $tmp/out
fi
+ rm -f $tmp/out
done
EOF
@@ -14651,7 +15580,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
* ) ac_file_in=$ac_file.in ;;
esac
- test x"$ac_file" != x- && { echo "$as_me:14654: creating $ac_file" >&5
+ test x"$ac_file" != x- && { echo "$as_me:15583: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
# First look for the input files in the build tree, otherwise in the
@@ -14662,7 +15591,7 @@ echo "$as_me: creating $ac_file" >&6;}
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:14665: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:15594: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@@ -14675,7 +15604,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:14678: error: cannot find input file: $f" >&5
+ { { echo "$as_me:15607: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
@@ -14733,7 +15662,7 @@ cat >>$CONFIG_STATUS <<\EOF
rm -f $tmp/in
if test x"$ac_file" != x-; then
if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
- { echo "$as_me:14736: $ac_file is unchanged" >&5
+ { echo "$as_me:15665: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
diff --git a/contrib/dialog/configure.in b/contrib/dialog/configure.in
index 2feac7366ebdc..2e8630cc4abb6 100644
--- a/contrib/dialog/configure.in
+++ b/contrib/dialog/configure.in
@@ -1,7 +1,7 @@
-dnl $Id: configure.in,v 1.65 2011/06/27 10:42:27 tom Exp $
+dnl $Id: configure.in,v 1.75 2012/12/30 22:38:00 tom Exp $
dnl Process this file with autoconf to produce a configure script.
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
@@ -27,7 +27,7 @@ dnl holders shall not be used in advertising or otherwise to promote the
dnl sale, use or other dealings in this Software without prior written
dnl authorization.
dnl ---------------------------------------------------------------------------
-AC_PREREQ(2.13.20020210)
+AC_PREREQ(2.52.20011201)
AC_INIT(dialog.h)
AC_CONFIG_HEADER(dlg_config.h:config.hin)
@@ -39,19 +39,16 @@ AC_SUBST(DESTDIR)
dnl
dnl Checks for programs.
dnl
-AC_PROG_CC
+CF_PROG_CC
AC_PROG_CPP
-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)
-AC_ISC_POSIX
-AC_C_CONST
-
CF_MAKEFLAGS
CF_MAKE_TAGS
CF_DISABLE_ECHO
@@ -94,7 +91,7 @@ CF_ARG_MSG_ENABLE([if you want --trace option],
trace,
[ --disable-trace do not support --trace option],
[EXTRAOBJS="$EXTRAOBJS trace\$o"
- AC_DEFINE(HAVE_DLG_TRACE)],,yes)
+ AC_DEFINE(HAVE_DLG_TRACE,1,[Define to 1 to support --trace option])],,yes)
LIBTOOL_MAKE="#"
CF_WITH_LIBTOOL
@@ -135,48 +132,59 @@ CF_ARG_MSG_ENABLE([if you want config-file support],
rc-file,
[ --disable-rc-file do not include config-file support],
[EXTRAOBJS="$EXTRAOBJS rc\$o"
- AC_DEFINE(HAVE_RC_FILE)],,$cf_all_widgets)
+ AC_DEFINE(HAVE_RC_FILE,1,[Define to 1 to include config-file support])],,$cf_all_widgets)
CF_ARG_MSG_ENABLE([if you want Xdialog-style dialogs],
Xdialog,
- [ --disable-Xdialog do not include Xdialog-style dialogs],
+ [ --disable-Xdialog do not include Xdialog-style dialogs (1.1)],
[EXTRAOBJS="$EXTRAOBJS calendar\$o fselect\$o timebox\$o"
- AC_DEFINE(HAVE_XDIALOG)],,$cf_all_widgets)
+ AC_DEFINE(HAVE_XDIALOG,1,[Define to 1 to include Xdialog-style dialogs])],,$cf_all_widgets)
+
+CF_ARG_MSG_ENABLE([if you want extra Xdialog-style dialogs (1.2)],
+ Xdialog2,
+ [ --disable-Xdialog2 do not include extra Xdialog-style dialogs (1.2)],
+ [EXTRAOBJS="$EXTRAOBJS buildlist\$o rangebox\$o treeview\$o"
+ AC_DEFINE(HAVE_XDIALOG2,1,[Define to 1 to include extra Xdialog-style dialogs])],,$cf_all_widgets)
+
+CF_ARG_MSG_ENABLE([if you want compatibility with whiptail options],
+ whiptail,
+ [ --disable-whiptail do not map extra whiptail options],
+ [AC_DEFINE(HAVE_WHIPTAIL,1,[Define to 1 to include extra whiptail options])],,$cf_all_widgets)
CF_ARG_MSG_ENABLE([if you want the form dialog],
form,
[ --disable-form do not include the form dialog],
[EXTRAOBJS="$EXTRAOBJS formbox\$o"
- AC_DEFINE(HAVE_DLG_FORMBOX)],,$cf_all_widgets)
+ AC_DEFINE(HAVE_DLG_FORMBOX,1,[Define to 1 to include the form dialog])],,$cf_all_widgets)
CF_ARG_MSG_ENABLE([if you want the gauge dialog],
gauge,
[ --disable-gauge do not include the gauge dialogs],
[EXTRAOBJS="$EXTRAOBJS guage\$o pause\$o prgbox\$o progressbox\$o"
- AC_DEFINE(HAVE_DLG_GAUGE)],,$cf_all_widgets)
+ AC_DEFINE(HAVE_DLG_GAUGE,1,[Define to 1 to include the gauge dialogs])],,$cf_all_widgets)
CF_ARG_MSG_ENABLE([if you want the tailbox dialog],
tailbox,
[ --disable-tailbox do not include the tailbox dialog],
[EXTRAOBJS="$EXTRAOBJS tailbox\$o"
- AC_DEFINE(HAVE_DLG_TAILBOX)],,$cf_all_widgets)
+ AC_DEFINE(HAVE_DLG_TAILBOX,1,[Define to 1 to include the tailbox dialog])],,$cf_all_widgets)
CF_ARG_MSG_ENABLE([if you want the mixedform dialog],
mixedform,
[ --disable-mixedform do not include the mixedform dialog],
[EXTRAOBJS="$EXTRAOBJS mixedform\$o"
- AC_DEFINE(HAVE_DLG_MIXEDFORM)],,$cf_all_widgets)
+ AC_DEFINE(HAVE_DLG_MIXEDFORM,1,[Define to 1 to include the mixedform dialog])],,$cf_all_widgets)
CF_ARG_MSG_ENABLE([if you want the mixedgauge dialog],
mixedgauge,
[ --disable-mixedgauge do not include the mixedgauge dialog],
[EXTRAOBJS="$EXTRAOBJS mixedgauge\$o"
- AC_DEFINE(HAVE_MIXEDGAUGE)],,$cf_all_widgets)
+ AC_DEFINE(HAVE_MIXEDGAUGE,1,[Define to 1 to include the mixedgauge dialog])],,$cf_all_widgets)
CF_ARG_MSG_ENABLE([if you want the wide-curses features],
widec,
[ --enable-widec enable wide-curses features],
- [AC_DEFINE(USE_WIDE_CURSES)],,$cf_wide_curses)
+ [AC_DEFINE(USE_WIDE_CURSES,1,[Define to 1 to enable wide-curses features])],,$cf_wide_curses)
AC_SUBST(EXTRAOBJS)
@@ -226,19 +234,22 @@ getpary \
getparyx \
use_default_colors \
wchgat \
+wcursyncup \
wget_wch \
+wsyncup \
)
-AC_CHECK_FUNC(start_color,[AC_DEFINE(HAVE_COLOR)])
+AC_CHECK_FUNC(start_color,[AC_DEFINE(HAVE_COLOR,1,[Define to 1 if (n)curses has start_color function])])
CF_CURSES_CHTYPE
CF_CURSES_WACS_SYMBOLS
+CF_CURSES_WGETPARENT
CF_FUNC_WAIT
CF_MBSTATE_T
CF_HEADERS_SH(DLG,dlg_config.h)
-AC_TRY_LINK([#include <locale.h>],[setlocale(LC_ALL, "")],[AC_DEFINE(HAVE_SETLOCALE)])
+AC_TRY_LINK([#include <locale.h>],[setlocale(LC_ALL, "")],[AC_DEFINE(HAVE_SETLOCALE,1,[Define to 1 if locale feature can be enabled])])
CF_DISABLE_RPATH_HACK
-AC_OUTPUT(dialog-config makefile $EXTRA_OUTPUT $SUB_MAKEFILE samples/install/makefile,,,sort -u)
+AC_OUTPUT(dialog-config makefile $EXTRA_OUTPUT $SUB_MAKEFILE,,,sort -u)
diff --git a/contrib/dialog/dialog-config.in b/contrib/dialog/dialog-config.in
index 443fc97364f14..530551ba1e57f 100644
--- a/contrib/dialog/dialog-config.in
+++ b/contrib/dialog/dialog-config.in
@@ -1,7 +1,7 @@
#!@SHELL@
-# $Id: dialog-config.in,v 1.5 2011/01/06 09:38:03 tom Exp $
+# $Id: dialog-config.in,v 1.6 2012/10/06 14:29:45 tom Exp $
##############################################################################
-# Copyright (c) 2007,2011 Thomas E. Dickey #
+# Copyright (c) 2007-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"), #
@@ -30,6 +30,7 @@
prefix="@prefix@"
exec_prefix="@exec_prefix@"
+datarootdir="@datarootdir@"
bindir="@bindir@"
libdir="@libdir@"
diff --git a/contrib/dialog/dialog.1 b/contrib/dialog/dialog.1
index 8fd4de13ce915..923408bf99c27 100644
--- a/contrib/dialog/dialog.1
+++ b/contrib/dialog/dialog.1
@@ -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.165 2013/03/15 09:07:30 tom Exp $
+.\" Copyright 2005-2012,2013 Thomas E. Dickey
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU Lesser General Public License, version 2.1
@@ -27,18 +27,23 @@
.ne 8
.IP
..
-.de EX
-.RS +10
+.de Ex
+.RS +7
+.PP
.nf
..
-.de EE
+.de Ee
.fi
.RE
..
+.\" Bulleted paragraph
+.de bP
+.IP \(bu 4
+..
.
-.TH \*D 1 "" "$Date: 2011/06/29 09:39:29 $"
+.TH \*D 1 "" "$Date: 2013/03/15 09:07:30 $"
.SH NAME
-\*p \- display dialog boxes from shell scripts
+dialog \- display dialog boxes from shell scripts
.SH SYNOPSIS
\fB\*p --clear\fP
.br
@@ -59,6 +64,7 @@ These types of dialog boxes are implemented
.LP
.nh
.na
+.BR buildlist ", "
.BR calendar ", "
.BR checklist ", "
.BR dselect ", "
@@ -80,22 +86,22 @@ These types of dialog boxes are implemented
.BR programbox ", "
.BR progressbox ", "
.BR radiolist ", "
+.BR rangebox ", "
.BR tailbox ", "
.BR tailboxbg ", "
.BR textbox ", "
-.BR timebox ", and "
+.BR timebox ", "
+.BR treeview ", and "
.BR yesno " (yes/no)."
.ad
.hy
.RE
.PP
You can put more than one dialog box into a script:
-.TP 5
--
+.bP
Use the "\fB--and-widget\fP" token to force \fB\*p\fP to proceed to the next
dialog unless you have pressed ESC to cancel, or
-.TP 5
--
+.bP
Simply add the tokens for the next dialog box, making a chain.
\*L stops chaining when the return code from a dialog is nonzero,
e.g., Cancel or No (see DIAGNOSTICS).
@@ -172,39 +178,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 +243,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 +277,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,13 +364,14 @@ 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
is visually distracting in a script which runs \fB\*p\fP
several times.
-Use this option to allow \fB\*p\fP to use those initialization strings.
+Use this option to allow \fB\*p\fP to use those initialization strings.
.
.IP "\fB--keep-window"
Normally when \fB\*p\fR performs several \fBtailboxbg\fR widgets
@@ -357,6 +384,12 @@ marked with "\fB--keep-window\fR", even if they are not \fBtailboxbg\fR widgets.
That causes them to be repainted in reverse order.
See the discussion of the "\fB--clear\fR" option for examples.
.
+.IP "\fB--last-key"
+At exit, report the last key which the user entered.
+This is the curses key code rather than a symbol or literal character.
+It can be used by scripts to distinguish between two keys which are
+bound to the same action.
+.
.IP "\fB--max-input \fIsize"
Limit input strings to the given size.
If not specified, the limit is 2048.
@@ -373,6 +406,16 @@ Use this option to disable that feature.
Note that \fB\*p\fR will still wrap text,
subject to the "\fB--cr-wrap\fR" and "\fB--trim\fR" options.
.
+.IP "\fB--no-items"
+Some widgets (checklist, inputmenu, radiolist, menu) display a list
+with two columns (a "tag" and "item", i.e., "description").
+This option tells \fB\*p\fP to read shorter rows,
+omitting the "item" part of the list.
+This is occasionally useful, e.g., if the tags provide enough information.
+.IP
+See also \fB--no-tags\fP.
+If both options are given, this one is ignored.
+.
.IP "\fB--no-kill"
Tells
\fB\*p\fP
@@ -401,10 +444,27 @@ literal newlines.
Suppress the "OK" button in checklist, inputbox and menu box modes.
A script can still test if the user pressed the "Enter" key to accept the data.
.
-.
.IP "\fB--no-shadow"
Suppress shadows that would be drawn to the right and bottom of each dialog box.
.
+.IP "\fB--no-tags"
+Some widgets (checklist, inputmenu, radiolist, menu) display a list
+with two columns (a "tag" and "description").
+The tag is useful for scripting, but may not help the user.
+The \fB--no-tags\fP option (from Xdialog) may be used to suppress the
+column of tags from the display.
+Unlike the \fB--no-items\fP option,
+this does not affect the data which is read from the script.
+.IP
+Xdialog does not display the tag column for the analogous buildlist
+and treeview widgets; \fB\*p\fP does the same.
+.IP
+Normally \fB\*p\fP allows you to quickly move to entries on the displayed list,
+by matching a single character to the first character of the tag.
+When the \fB--no-tags\fP option is given, \fB\*p\fP matches against
+the first character of the description.
+In either case, the matchable character is highlighted.
+.
.IP "\fB--ok-label \fIstring"
Override the label used for "OK" buttons.
.
@@ -433,6 +493,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 +521,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 +566,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 +578,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,
@@ -528,7 +601,7 @@ Prints \fB\*p\fR's version to the standard output, and exits.
See also "\fB--print-version\fP".
.
.IP "\fB--visit-items"
-Modify the tab-traversal of checklist, radiobox, menubox and inputmenu
+Modify the tab-traversal of checklist, radiolist, menubox and inputmenu
to include the list of items as one of the states.
This is useful as a visual aid,
i.e., the cursor position helps some users.
@@ -556,6 +629,44 @@ the width of the dialog box.
Other parameters depend on the box type.
.
.
+.IP "\fB--buildlist \fItext height width \fR[ \fItag item status \fR] \fI..."
+A \fBbuildlist\fP dialog displays two lists, side-by-side.
+The list on the left shows unselected items.
+The list on the right shows selected items.
+As items are selected or unselected, they move between the lists.
+.IP
+Use a carriage return or the "OK" button to accept the current value
+in the selected-window and exit.
+The results are written using the order displayed in the selected-window.
+.IP
+The initial on/off state of each entry is specified by
+.IR status "."
+.IP
+The dialog behaves like a \fBmenu\fP, using the \fB--visit-items\fP
+to control whether the cursor is allowed to visit the lists directly.
+.RS
+.bP
+If \fB--visit-items\fP is not given,
+tab-traversal uses two states (OK/Cancel).
+.bP
+If \fB--visit-items\fP is given,
+tab-traversal uses four states (Left/Right/OK/Cancel).
+.RE
+.IP
+Whether or not \fB--visit--items\fP is given,
+it is possible to move the highlight between the two lists using
+the default "^" (left-column) and "$" (right-column) keys.
+.IP
+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 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.
+.
+.
.IP "\fB--calendar \fItext height width day month year"
A \fBcalendar\fP box displays
month, day and year in separately adjustable windows.
@@ -589,8 +700,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.
.
.
@@ -621,7 +734,7 @@ On exit, the contents of the text-entry window are written to \fB\*p\fP's output
.
.IP "\fB--editbox \fIfilepath height width\fR"
The edit-box dialog displays a copy of the file.
-You may edit it using
+You may edit it using
the \fIbackspace\fP, \fIdelete\fP and cursor keys
to correct typing errors.
It also recognizes pageup/pagedown.
@@ -642,16 +755,13 @@ The former defines the length shown for a selected field,
while the latter defines the permissible length of the data entered in the
field.
.RS
-.TP 3
--
+.bP
If \fIflen\fR is zero, the corresponding field cannot be altered.
and the contents of the field determine the displayed-length.
-.TP 3
--
+.bP
If \fIflen\fR is negative, the corresponding field cannot be altered,
and the negated value of \fIflen\fR is used as the displayed-length.
-.TP 3
--
+.bP
If \fIilen\fR is zero, it is set to \fIflen\fR.
.RE
.IP
@@ -847,7 +957,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 +1009,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 +1024,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.
@@ -929,7 +1049,7 @@ The only difference is
that you can indicate which entry is currently selected, by setting its
.IR status " to " on "."
.IP
-On exit, the name of the selected item is written to \fB\*p\fP's output.
+On exit, the tag of the selected item is written to \fB\*p\fP's output.
.
.
.IP "\fB--tailbox \fIfile height width"
@@ -942,6 +1062,36 @@ Only an "OK" button is provided for input,
but an ESC exit status may be returned.
.
.
+.nf
+.IP "\fB--rangebox \fItext height width list-height min-value max-value default-value"
+.fi
+Allow the user to select from a range of values, e.g., using a slider.
+The dialog shows the current value as a bar (like the gauge dialog).
+Tabs or arrow keys move the cursor between the buttons and the value.
+When the cursor is on the value,
+you can edit it by:
+.RS
+.TP 5
+left/right cursor movement to select a digit to modify
+.TP 5
++/-
+characters to increment/decrement the digit by one
+.TP 5
+0 through 9
+to set the digit to the given value
+.RE
+.IP
+Some keys are also recognized in all cursor positions:
+.RS
+.TP 5
+home/end
+set the value to its maximum or minimum
+.TP 5
+pageup/pagedown
+increment the value so that the slider moves by one column
+.RE
+.
+.
.IP "\fB--tailboxbg \fIfile height width"
Display text from a file in a dialog box as a background task,
as in a "tail -f &" command.
@@ -1007,6 +1157,19 @@ On exit, the result is printed in the form hour:minute:second.
The format can be overridden using the \fB--time-format\fP option.
.
.
+.IP "\fB--treeview \fItext height width list-height \fR[ \fItag item status depth \fR] \fI..."
+Display data organized as a tree.
+Each group of data contains a tag,
+the text to display for the item,
+its status ("on" or "off")
+and the depth of the item in the tree.
+.IP
+Only one item can be selected (like the \fBradiolist\fP).
+The tag is not displayed.
+.IP
+On exit, the tag of the selected item is written to \fB\*p\fP's output.
+.
+.
.IP "\fB--yesno \fItext height width"
A \fByes/no\fP dialog box of
size \fIheight\fP rows by \fIwidth\fP columns will be displayed.
@@ -1094,9 +1257,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 +1275,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 +1389,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,49 +1407,51 @@ 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
\fB\*L\fP works with X/Open curses.
However, some implementations have deficiencies:
.RS 3
-.TP 3
--
+.bP
HPUX curses (and perhaps others) do not open the terminal properly for
the \fInewterm\fP function.
This interferes with \fB\*p\fP's \fB--input-fd\fP option,
by preventing cursor-keys and similar escape sequences from being recognized.
-.TP 3
--
+.bP
NetBSD 5.1 curses has incomplete support for wide-characters.
\fB\*p\fP will build, but not all examples display properly.
.RE
@@ -1262,15 +1504,31 @@ l l.
.RE
.PP
\fBXdialog\fP's manpage has a section discussing its compatibility with \fB\*p\fP.
+There are some differences not shown in the manpage.
+For example, the html documentation states
+.RS
+.PP
+Note: former Xdialog releases used the "\n" (line feed) as a
+results separator for the checklist widget; this has been
+changed to "/" in Xdialog v1.5.0 so to make it compatible with
+(c)dialog. In your old scripts using the Xdialog checklist, you
+will then have to add the --separate-output option before the
+--checklist one.
+.RE
+.PP
+\fB\*L\fP has not used a different separator;
+the difference was likely due to confusion regarding some script.
.SS WHIPTAIL
Then there is \fBwhiptail\fP.
-For practical purposes, it is maintained by Debian.
-Its documentation claims
+For practical purposes, it is maintained by Debian
+(very little work is done by its upstream developers).
+Its documentation (README.whiptail) claims
.RS
.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.
@@ -1287,18 +1545,24 @@ The comparable number for \fB\*p\fP (counting ncurses) is 520kb.
Disregard the first paragraph.
.PP
The second paragraph is misleading, since \fBwhiptail\fP
-also does not work for common options of \*p, such as the gauge box.
-\fBwhiptail\fP is less compatible with \fB\*p\fP than the decade-old
-original dialog 0.4 program.
+also does not work for common options of \fB\*p\fP,
+such as the gauge box.
+\fBwhiptail\fP is less compatible with \fB\*p\fP than the
+original mid-1990s dialog 0.4 program.
.PP
\fBwhiptail\fP's manpage borrows features from \fB\*p\fP, e.g.,
-\fB--default-item\fP (2000),
-\fB--output-fd\fP (2002),
-but oddly cites only \fB\*p\fP versions up to 0.4 (1996) as a source.
+but oddly cites only \fB\*p\fP versions up to 0.4 (1994) 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).
+.bP
+\fB--gauge\fP (from 0.5)
+.bP
+\fB--passwordbox\fP (from Debian changes in 1999),
+.bP
+\fB--default-item\fP (from \fB\*p\fP 2000/02/22),
+.bP
+\fB--output-fd\fP (from \fB\*p\fP 2002/08/14).
+.PP
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
@@ -1316,12 +1580,38 @@ l l
_ _
l l.
\fIOption\fR \fITreatment\fR
+\fB--cancel-button\fP mapped to \fB--cancel-label\fP
\fB--fb\fP ignored
\fB--fullbutton\fP ignored
+\fB--no-button\fP mapped to \fB--no-label\fP
\fB--nocancel\fP mapped to \fB--no-cancel\fP
-\fB--noitem\fP ignored
+\fB--noitem\fP mapped to \fB--no-items\fP
+\fB--notags\fP mapped to \fB--no-tags\fP
+\fB--ok-button\fP mapped to \fB--ok-label\fP
+\fB--scrolltext\fP mapped to \fB--scrollbar\fP
+\fB--topleft\fP mapped to \fB--begin 0 0\fP
+\fB--yes-button\fP mapped to \fB--yes-label\fP
.TE
.RE
+.LP
+There are visual differences which are not addressed by command-line options:
+.bP
+\fB\*p\fP centers lists within the window.
+\fBwhiptail\fP typically puts lists against the left margin.
+.bP
+\fBwhiptail\fP uses angle brackets ("<" and ">") for marking buttons.
+\fB\*p\fP uses square brackets.
+.bP
+\fBwhiptail\fP marks the limits of subtitles with vertical bars.
+\fB\*p\fP does not mark the limits.
+.bP
+\fBwhiptail\fP attempts to mark the top/bottom cells of a scrollbar
+with up/down arrows.
+When it cannot do this,
+it fills those cells with the background color
+of the scrollbar and confusing the user.
+\fB\*p\fP uses the entire scrollbar space,
+thereby getting better resolution.
.\" ************************************************************************
.SH BUGS
Perhaps.
@@ -1340,13 +1630,11 @@ Yura Kalinichenko adapted the gauge widget as "pause".
This is a rewrite (except as needed to provide compatibility)
of the earlier version of \fB\*p 0.9a\fP,
which lists as authors:
-.RS
-.LP
+.bP
Savio Lam - version 0.3, "dialog"
-.LP
+.bP
Stuart Herbert - patch for version 0.4
-.LP
+.bP
Marc Ewing - the gauge widget.
-.LP
+.bP
Pasquale De Marco "Pako" - version 0.9a, "cdialog"
-.RE
diff --git a/contrib/dialog/dialog.3 b/contrib/dialog/dialog.3
index 62938af92503e..c3a6aac0b2f74 100644
--- a/contrib/dialog/dialog.3
+++ b/contrib/dialog/dialog.3
@@ -1,5 +1,6 @@
-.\" $Id: dialog.3,v 1.68 2011/06/29 09:07:36 tom Exp $
-.\" Copyright 2005-2010,2011 Thomas E. Dickey
+'\" t
+.\" $Id: dialog.3,v 1.91 2013/03/15 09:07:30 tom Exp $
+.\" Copyright 2005-2012,2013 Thomas E. Dickey
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU Lesser General Public License, version 2.1
@@ -38,9 +39,9 @@
.de bP
.IP \(bu 4
..
-.TH \*D 3 "" "$Date: 2011/06/29 09:07:36 $"
+.TH \*D 3 "" "$Date: 2013/03/15 09:07:30 $"
.SH NAME
-\*l \- widgets and utilities for the \*p program
+dialog \- widgets and utilities for the \*p program
.SH SYNOPSIS
.B cc [ flag ... ] file ... -l\*l [ library ... ]
.br
@@ -108,6 +109,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 +296,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 +316,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,
@@ -419,7 +433,7 @@ by echoing asterisks for each character.
.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_VARS.in_helpfile
This variable is used to prevent \fBdialog_helpfile\fP from showing
-anything, e.g., if F1 were pressed within a help-file display.
+anything, e.g., if F1 were pressed within a help-file display.
.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_VARS.item_help
This corresponds to the command-line option "\fB--item-help\fP".
@@ -443,11 +457,21 @@ This is useful for keeping the window contents visible when several
widgets are run in the same process.
Note that curses will clear the screen when starting a new process.
.\" ---------------------------------------------------------------------------
+.IP \fIDIALOG_VARS.last_key
+This corresponds to the command-line option "\fB--last-key\fP".
+.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_VARS.max_input
This corresponds to the command-line option "\fB--max-input\fP \fIsize\fP".
Limit input strings to the given size.
If not specified, the limit is 2048.
.\" ---------------------------------------------------------------------------
+.IP \fIDIALOG_VARS.no_items
+This corresponds to the command-line option "\fB--no-items\fP".
+Some widgets (checklist, inputmenu, radiolist, menu) display a list
+with two columns (a "tag" and "item", i.e., "description").
+This tells \fB\*p\fP to read shorter rows from data,
+omitting the "list".
+.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_VARS.no_label
This corresponds to the command-line option "\fB--no-label\fP \fIstring\fP".
The given string overrides the label used for "No" buttons.
@@ -462,6 +486,63 @@ This corresponds to the command-line option "\fB--no-nl-expand\fP".
If false, \fBdlg_trim_string\fP converts literal "\\n" substrings
in a message into newlines.
.\" ---------------------------------------------------------------------------
+.IP \fIDIALOG_VARS.no_tags
+This corresponds to the command-line option "\fB--no-tags\fP".
+Some widgets (checklist, inputmenu, radiolist, menu) display a list
+with two columns (a "tag" and "item", also known as "description").
+The tag is useful for scripting, but may not help the user.
+The \fB--no-tags\fP option (from Xdialog) may be used to suppress the
+column of tags from the display.
+.IP
+Normally \fB\*p\fP allows you to quickly move to entries on the displayed list,
+by matching a single character to the first character of the tag.
+When the \fB--no-tags\fP option is given, \fB\*p\fP matches against
+the first character of the description.
+In either case, the matchable character is highlighted.
+.IP
+Here is a table showing how the no_tags and no_items values interact:
+.TS
+tab(/);
+l l l l l
+_ _ _ _ _
+l l l c c.
+Widget/Fields Shown/Fields Read/.no_items/.no_tags
+buildlist/item/tag,item/0/0*
+buildlist/item/tag,item/0/1
+buildlist/tag/tag/1/0*
+buildlist/tag/tag/1/1
+checklist/tag,item/tag,item/0/0
+checklist/item/tag,item/0/1
+checklist/tag/tag/1/0
+checklist/tag/tag/1/1
+inputmenu/tag,item/tag,item/0/0
+inputmenu/item/tag,item/0/1
+inputmenu/tag/tag/1/0
+inputmenu/tag/tag/1/1
+menu/tag,item/tag,item/0/0
+menu/item/tag,item/0/1
+menu/tag/tag/1/0
+menu/tag/tag/1/1
+radiolist/tag,item/tag,item/0/0
+radiolist/item/tag,item/0/1
+radiolist/tag/tag/1/0
+radiolist/tag/tag/1/1
+treeview/item/tag,item/0/0*
+treeview/item/tag,item/0/1
+treeview/tag/tag/1/0*
+treeview/tag/tag/1/1
+_
+.TE
+.RS
+.TP 2
+*
+Xdialog does not display the tag column for the analogous buildlist
+and treeview widgets.
+\fB\*L\fP does the same on the command-line.
+However the library interface defaults to displaying the tag column.
+Your application can enable or disable the tag column as needed for each widget.
+.RE
+.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_VARS.nocancel
This corresponds to the command-line option "\fB--no-cancel\fP".
If true,
@@ -477,6 +558,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 +571,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 +585,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,
@@ -543,7 +628,8 @@ trim literal newlines and repeated blanks from message text.
.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_VARS.visit_items
This corresponds to the command-line option "\fB--visit-items\fP".
-Modify the tab-traversal of checklist, radiobox, menubox and inputmenu
+Modify the tab-traversal of the list-oriented widgets
+(buildlist, checklist, radiobox, menubox, inputmenu, and treeview)
to include the list of items as one of the states.
This is useful as a visual aid,
i.e., the cursor position helps some users.
@@ -572,6 +658,49 @@ the width of the dialog box.
Other parameters depend on the box type.
.
.\" ************************************************************************
+.IP \fBdialog_buildlist
+implements the "\fB--buildlist\fP" option.
+.RS
+.TP 5
+.B const char * \fItitle
+is the title on the top of the widget.
+.TP 5
+.B const char * \fIcprompt
+is the prompt text shown within the widget.
+.TP 5
+.B int \fIheight
+is the desired height of the box.
+If zero, the height is adjusted to use the available screen size.
+.TP 5
+.B int \fIwidth
+is the desired width of the box.
+If zero, the height is adjusted to use the available screen size.
+.TP 5
+.B int \fIlist_height
+is the minimum height to reserve for displaying the list.
+If zero, it is computed based on the given \fIheight\fP and \fIwidth\fP.
+.TP 5
+.B int \fIitem_no
+is the number of rows in \fIitems\fP.
+.TP 5
+.B char ** \fIitems
+is an array of strings which is viewed either as a list of rows
+.RS
+\fItag item status \fR
+.RE
+.IP
+or
+.RS
+\fItag item status help\fR
+.RE
+.IP
+depending on whether \fBdialog_vars.item_help\fP is set.
+.TP 5
+.B int \fIorder_mode
+is reserved for future enhancements
+.RE
+.
+.\" ************************************************************************
.IP \fBdialog_calendar
implements the "\fB--calendar\fP" option.
.RS
@@ -747,7 +876,7 @@ If zero, the height is based on the screen size.
.\" ************************************************************************
.IP \fBdialog_gauge
implements the "\fB--gauge\fP" option.
-Alternatively, a simpler or customized gauge widget can be
+Alternatively, a simpler or customized gauge widget can be
setup using
\fBdlg_allocate_gauge\fP,
\fBdlg_update_gauge\fP and
@@ -918,7 +1047,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
@@ -1050,6 +1180,35 @@ is the desired width of the box.
If zero, the height is based on the screen size.
.RE
.\" ************************************************************************
+.IP \fBdialog_rangebox
+implements the "\fB--rangebox\fP" option.
+.RS
+.TP 5
+.B const char * \fItitle
+is the title on the top of the widget.
+.TP 5
+.B const char * \fIcprompt
+is the prompt text shown within the widget.
+If empty or null, no prompt is shown.
+.TP 5
+.B int \fIheight
+is the desired height of the widget.
+If zero, the height is based on the screen size.
+.TP 5
+.B int \fIwidth
+is the desired width of the widget.
+If zero, the height is based on the screen size.
+.TP 5
+.B int \fImin_value
+is the minimum value to allow.
+.TP 5
+.B int \fImax_value
+is the maximum value to allow.
+.TP 5
+.B int \fIdefault_value
+is the default value, if no change is made.
+.RE
+.\" ************************************************************************
.IP \fBdialog_tailbox
implements the "\fB--tailbox\fP" or "\fB--tailboxbg\fP" option
depending on whether \fIbg_task\fP is set.
@@ -1130,6 +1289,42 @@ If the value is negative, the current second is used.
Returns DLG_EXIT_ERROR if the value specified is greater than or equal to 60.
.RE
.\" ************************************************************************
+.IP \fBdialog_treeview
+implements the "\fB--treeview\fP" option.
+.RS
+.TP 5
+.B const char * \fItitle
+is the title on the top of the widget.
+.TP 5
+.B const char * \fIcprompt
+is the prompt text shown within the widget.
+.TP 5
+.B int \fIheight
+is the desired height of the box.
+If zero, the height is based on the screen size.
+.TP 5
+.B int \fIwidth
+is the desired width of the box.
+If zero, the height is based on the screen size.
+.TP 5
+.B int \fIlist_height
+is the minimum height to reserve for displaying the list.
+If zero, it is computed based on the given \fIheight\fP and \fIwidth\fP.
+.TP 5
+.B int \fIitem_no
+is the number of rows in \fIitems\fP.
+.TP 5
+.B char ** \fIitems
+is the list of items, contain tag, name, and optionally help strings
+(if \fBdialog_vars.item_help\fP is set).
+The initial selection state for each item is also in this list.
+.TP 5
+.B int \fIflag
+.IP flag
+is either \fIFLAG_CHECK\fP, for checklists (multiple selections),
+or \fIFLAG_RADIO\fP for radiolists (a single selection).
+.RE
+.\" ************************************************************************
.IP \fBdialog_yesno
implements the "\fB--yesno\fP" option.
.RS
@@ -1191,8 +1386,36 @@ function to call when input ends, e.g., to free caller's additional data.
.RE
.\" ---------------------------------------------------------------------------
.TP 5
+.B dlg_add_last_key
+Report the last key entered by the user.
+This implements the \fB\-\-last\-key\fP command-line option,
+using \fBdialog_vars.last_key\fP.
+.RS
+.TP 5
+.B int \fImode
+controls the way the last key report is separated from other results:
+.RS
+.TP 5
+-2
+(no separator)
+.TP 5
+-1
+(separator after the key name)
+.TP 5
+0
+(separator is optionally before the key name)
+.TP 5
+1
+(same as -1)
+.RE
+.RE
+.\" ---------------------------------------------------------------------------
+.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 +1424,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
@@ -1212,7 +1435,7 @@ is the string to add.
.B dlg_add_separator
Add an output-separator to the result buffer \fBdialog_vars.input_result\fP.
If \fBdialog_vars.output_separator\fP is set, use that.
-Otherwise, if \fBdialog_vars.separate_output\fP is set, use newline.
+Otherwise, if \fBdialog_vars.separate_output\fP is set, use newline.
If neither is set, use a space.
.\" ---------------------------------------------------------------------------
.TP 5
@@ -1276,6 +1499,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 +1564,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,19 +1587,15 @@ 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 -
+.bP
if neither \fBdialog_vars.ascii_lines\fP nor \fBdialog_vars.no_lines\fP is set.
-.TP 3
-.B -
+.bP
if \fBdialog_vars.ascii_lines\fP is set, returns the corresponding "+" or "-", etc. for the line-drawing characters used in \fB\*p\fP.
-.TP 3
-.B -
+.bP
otherwise, if \fBdialog_vars.no_lines\fP is set, returns a space for the line-drawing characters.
-.TP 3
-.B -
+.bP
if the parameter is not a line-drawing or other special character such as ACS_DARROW, it returns the parameter unchanged.
.RE
.\" ---------------------------------------------------------------------------
@@ -1401,6 +1624,56 @@ is the height of the widget.
.RE
.\" ---------------------------------------------------------------------------
.TP 5
+.B dlg_buildlist
+This is an alternate interface to the \fBbuildlist\fP widget
+which allows the application to read the list item states back
+directly without putting them in the output buffer.
+.RS
+.TP 5
+.B const char * \fItitle
+is the title string to display at the top of the widget.
+.TP 5
+.B const char * \fIcprompt
+is the prompt text shown within the widget.
+.TP 5
+.B int \fIheight
+is the desired height of the box.
+If zero, the height is adjusted to use the available screen size.
+.TP 5
+.B int \fIwidth
+is the desired width of the box.
+If zero, the height is adjusted to use the available screen size.
+.TP 5
+.B int \fIlist_height
+is the minimum height to reserve for displaying the list.
+If zero, it is computed based on the given \fIheight\fP and \fIwidth\fP.
+.TP 5
+.B int \fIitem_no
+is the number of rows in \fIitems\fP.
+.TP 5
+.B DIALOG_LISTITEM * \fIitems
+is the list of items, contain tag, name, and optionally help strings
+(if \fBdialog_vars.item_help\fP is set).
+The initial selection state for each item is also in this list.
+.TP 5
+.B const char * \fIstates
+This is a list of characters to display for the given states.
+Normally a buildlist provides true (1) and false (0) values,
+which the widget displays as "*" and space, respectively.
+An application may set this parameter to an arbitrary null-terminated string.
+The widget determines the number of states from the length of this string,
+and will cycle through the corresponding display characters as the user
+presses the space-bar.
+.TP 5
+.B int \fIorder_mode
+is reserved for future enhancements
+.TP 5
+.B int * \fIcurrent_item
+The widget sets the referenced location to the index of the current display
+item (cursor) when it returns.
+.RE
+.\" ---------------------------------------------------------------------------
+.TP 5
.B dlg_button_count
Count the buttons in the list.
.RS
@@ -1473,6 +1746,16 @@ abbreviation.
If the label is empty, return -1.
If no uppercase character is found, return 0.
Otherwise return the uppercase character.
+.IP
+Normally
+.B dlg_draw_buttons
+and
+.B dlg_char_to_button
+use the first uppercase character.
+However, they keep track of all of the labels and
+if the first has already been used in another label,
+they will continue looking for another uppercase character.
+This function does not have enough information to make that check.
.RS
.TP 5
.B const char * \fIlabel
@@ -1481,8 +1764,8 @@ is the label to test.
.\" ---------------------------------------------------------------------------
.TP 5
.B dlg_calc_list_width
-Calculate the minimum width for the list, assuming none of the items
-are truncated.
+Calculate the minimum width for the list,
+assuming none of the items are truncated.
.RS
.TP 5
.B int \fIitem_no
@@ -1493,6 +1776,9 @@ contains a \fIname\fP and \fItext\fP field,
e.g., for checklists or radiobox lists.
The function returns the sum of the widest columns
needed for of each of these fields.
+.IP
+If \fBdialog_vars.no_items\fP is set,
+the \fItext\fP fields in the list are ignored.
.RE
.\" ---------------------------------------------------------------------------
.TP 5
@@ -1685,6 +1971,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 +2017,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 +2135,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 +2145,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 +2194,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 +2349,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 +2380,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 +2808,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
@@ -2544,6 +2940,21 @@ is the top-row for the base
.RE
.\" ---------------------------------------------------------------------------
.TP 5
+.B dlg_mouse_setcode
+Sets a value used internally by \fBdlg_mouse_mkregion\fP
+which is added to the \fIcode\fP parameter.
+By providing different values,
+e.g., multiples of \fBKEY_MAX\fP,
+it is possible to support multiple "big" regions in a widget.
+The \fIbuildlist\fP widget uses this feature to recognize mouse-clicks
+in the left/right panes.
+.RS
+.TP 5
+.B int \fIcode
+is the value to add to \fBdlg_mouse_mkregion\fP's \fIcode\fP parameter.
+.RE
+.\" ---------------------------------------------------------------------------
+.TP 5
.B dlg_mouse_wgetch
is a wrapper for \fBdlg_getc\fP which additionally maps mouse-clicks
(if the curses library supports those) into extended function-keys
@@ -2699,6 +3110,35 @@ is the current button index
.RE
.\" ---------------------------------------------------------------------------
.TP 5
+.B dlg_print_listitem
+This is a helper function used for the various "list" widgets,
+e.g., checklist, menu, buildlist, treeview.
+Each list-widget has "tag" and "description" values for each item
+which can be displayed.
+If \fBdialog_vars.no_tags\fP is true,
+the "tag" value is not shown.
+The first character of the first value shown (tag or description)
+is highlighted to indicate that the widget will match it for quick navigation.
+.RS
+.TP 5
+.B WINDOW *\fIwin
+the window in which to display the text
+.TP 5
+.B const char *\fItext
+the value to display
+.TP 5
+.B int \fIclimit
+the number of columns available for printing the text
+.TP 5
+.B bool \fIfirst
+true if this is the first call (for "tag" and "description"),
+and the first character of the value should be highlighted.
+.TP 5
+.B int \fIselected
+nonzero if the text should be displayed using the "selected" colors
+.RE
+.\" ---------------------------------------------------------------------------
+.TP 5
.B dlg_print_scrolled
This is a wrapper for \fBdlg_print_autowrap\fP which allows the user
to scroll too-long prompt text up/down.
@@ -2898,11 +3338,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
@@ -2911,7 +3375,7 @@ Restore \fB\*p\fP's variables from the given variable (see \fBdialog_save_vars\f
is the variable from which to restore.
.RE
.IP
-The
+The
\fIDIALOG_VARS.input_length\fP and
\fIDIALOG_VARS.input_result\fP members are treated specially,
since these are used by a widget to pass data to the caller.
@@ -2938,7 +3402,7 @@ store the result of the mapping in the referenced location.
.\" ---------------------------------------------------------------------------
.TP 5
.B dlg_save_vars
-Save \fB\*p\fP's variables into the given variable (see \fBdialog_restore_vars\fP).
+Save \fB\*p\fP's variables into the given variable (see \fBdlg_restore_vars\fP).
.RS
.TP 5
.B DIALOG_VARS * \fIsave
@@ -2960,7 +3424,7 @@ is the window on which to place focus (usually a subwindow of a widget)
.\" ---------------------------------------------------------------------------
.TP 5
.B dlg_set_result
-Setup a fixed-buffer for the result in \fBdialog_vars.input_result\fP
+Setup a fixed-buffer for the result in \fBdialog_vars.input_result\fP
.RS
.TP 5
.B const char * \fIstring
@@ -3015,10 +3479,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
.\" ---------------------------------------------------------------------------
@@ -3072,7 +3536,7 @@ name and stores the file pointer in \fBdialog_state.trace\fP.
.\" ---------------------------------------------------------------------------
.TP 5
.B dlg_trace_chr
-If \fBdialog_state.trace\fP is set,
+If \fBdialog_state.trace\fP is set,
translate the parameters into a printable representation,
log it on a "chr" line.
.RS
@@ -3109,10 +3573,66 @@ DLG_TRACE(("this is dialog version %s\\n", dialog_version()));
.\" ---------------------------------------------------------------------------
.TP 5
.B dlg_trace_win
-If \fBdialog_state.trace\fP is set,
+If \fBdialog_state.trace\fP is set,
log a printable picture of the given window.
.\" ---------------------------------------------------------------------------
.TP 5
+.B dlg_treeview
+This is an alternate interface to 'treeview' which allows the application
+to read the list item states back directly without putting them in the
+output buffer.
+.RS
+.TP 5
+.B const char * \fItitle
+is the title on the top of the widget.
+.TP 5
+.B const char * \fIcprompt
+is the prompt text shown within the widget.
+.TP 5
+.B int \fIheight
+is the desired height of the box.
+If zero, the height is based on the screen size.
+.TP 5
+.B int \fIwidth
+is the desired width of the box.
+If zero, the height is based on the screen size.
+.TP 5
+.B int \fIlist_height
+is the minimum height to reserve for displaying the list.
+If zero, it is computed based on the given \fIheight\fP and \fIwidth\fP.
+.TP 5
+.B int \fIitem_no
+is the number of rows in \fIitems\fP.
+.TP 5
+.B DIALOG_LISTITEM * \fIitems
+is the list of items, contain tag, name, and optionally help strings
+(if \fBdialog_vars.item_help\fP is set).
+The initial selection state for each item is also in this list.
+.TP 5
+.B const char * \fIstates
+This is a list of characters to display for the given states.
+Normally a buildlist provides true (1) and false (0) values,
+which the widget displays as "*" and space, respectively.
+An application may set this parameter to an arbitrary null-terminated string.
+The widget determines the number of states from the length of this string,
+and will cycle through the corresponding display characters as the user
+presses the space-bar.
+.TP 5
+.B int * \fIdepths
+This is a list of depths of each item in the tree.
+It is a separate parameter from \fIitems\fP to allow reuse of
+the existing functions.
+.TP 5
+.B int \fIflag
+is either \fIFLAG_CHECK\fP, for checklists (multiple selections),
+or \fIFLAG_RADIO\fP for radiolists (a single selection).
+.TP 5
+.B int * \fIcurrent_item
+The widget sets the referenced location to the index of the current display
+item (cursor) when it returns.
+.RE
+.\" ---------------------------------------------------------------------------
+.TP 5
.B dlg_trim_string
The \fBdialog\fP program uses this in each widget to adjust the
message string,
diff --git a/contrib/dialog/dialog.c b/contrib/dialog/dialog.c
index 44a16dba003e5..ff803f94fea2a 100644
--- a/contrib/dialog/dialog.c
+++ b/contrib/dialog/dialog.c
@@ -1,9 +1,9 @@
/*
- * $Id: dialog.c,v 1.193 2011/06/29 09:10:56 tom Exp $
+ * $Id: dialog.c,v 1.230 2013/03/15 09:07:30 tom Exp $
*
* cdialog - Display simple dialog boxes from shell scripts
*
- * Copyright 2000-2010,2011 Thomas E. Dickey
+ * Copyright 2000-2012,2013 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -48,7 +48,6 @@ typedef enum {
,o_beep
,o_beep_after
,o_begin
- ,o_calendar
,o_cancel_label
,o_checklist
,o_clear
@@ -57,17 +56,14 @@ typedef enum {
,o_cr_wrap
,o_create_rc
,o_date_format
+ ,o_default_button
,o_default_item
,o_defaultno
- ,o_dselect
- ,o_editbox
,o_exit_label
,o_extra_button
,o_extra_label
,o_fixed_font
,o_form
- ,o_fselect
- ,o_fullbutton
,o_gauge
,o_help
,o_help_button
@@ -86,6 +82,7 @@ typedef enum {
,o_keep_colors
,o_keep_tite
,o_keep_window
+ ,o_last_key
,o_max_input
,o_menu
,o_mixedform
@@ -101,7 +98,6 @@ typedef enum {
,o_no_nl_expand
,o_no_shadow
,o_nocancel
- ,o_noitem
,o_nook
,o_ok_label
,o_output_fd
@@ -135,7 +131,6 @@ typedef enum {
,o_tailboxbg
,o_textbox
,o_time_format
- ,o_timebox
,o_timeout
,o_title
,o_trim
@@ -145,6 +140,26 @@ typedef enum {
,o_wmclass
,o_yes_label
,o_yesno
+#ifdef HAVE_WHIPTAIL
+ ,o_fullbutton
+ ,o_topleft
+#endif
+#ifdef HAVE_XDIALOG
+ ,o_calendar
+ ,o_dselect
+ ,o_editbox
+ ,o_fselect
+ ,o_timebox
+#endif
+#ifdef HAVE_XDIALOG2
+ ,o_buildlist
+ ,o_rangebox
+ ,o_treeview
+#endif
+#if defined(HAVE_XDIALOG2) || defined(HAVE_WHIPTAIL)
+ ,o_no_items
+ ,o_no_tags
+#endif
#ifdef HAVE_DLG_TRACE
,o_trace
#endif
@@ -189,10 +204,9 @@ static const Options options[] = {
{ "aspect", o_aspect, 1, "<ratio>" },
{ "auto-placement", o_auto_placement, 1, NULL },
{ "backtitle", o_backtitle, 1, "<backtitle>" },
- { "beep", o_beep, 1, NULL },
- { "beep-after", o_beep_after, 1, NULL },
+ { "beep", o_beep, 1, "" },
+ { "beep-after", o_beep_after, 1, "" },
{ "begin", o_begin, 1, "<y> <x>" },
- { "calendar", o_calendar, 2, "<text> <height> <width> <day> <month> <year>" },
{ "cancel-label", o_cancel_label, 1, "<str>" },
{ "checklist", o_checklist, 2, "<text> <height> <width> <list height> <tag1> <item1> <status1>..." },
{ "clear", o_clear, 1, "" },
@@ -201,18 +215,14 @@ 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>" },
- { "editbox", o_editbox, 2, "<file> <height> <width>" },
{ "exit-label", o_exit_label, 1, "<str>" },
{ "extra-button", o_extra_button, 1, "" },
{ "extra-label", o_extra_label, 1, "<str>" },
- { "fb", o_fullbutton, 1, NULL },
{ "fixed-font", o_fixed_font, 1, NULL },
{ "form", o_form, 2, "<text> <height> <width> <form height> <label1> <l_y1> <l_x1> <item1> <i_y1> <i_x1> <flen1> <ilen1>..." },
- { "fselect", o_fselect, 2, "<filepath> <height> <width>" },
- { "fullbutton", o_fullbutton, 1, NULL },
{ "gauge", o_gauge, 2, "<text> <height> <width> [<percent>]" },
{ "guage", o_gauge, 2, NULL },
{ "help", o_help, 4, "" },
@@ -232,6 +242,7 @@ static const Options options[] = {
{ "keep-colors", o_keep_colors, 1, NULL },
{ "keep-tite", o_keep_tite, 1, "" },
{ "keep-window", o_keep_window, 1, "" },
+ { "last-key", o_last_key, 1, "" },
{ "max-input", o_max_input, 1, "<n>" },
{ "menu", o_menu, 2, "<text> <height> <width> <menu height> <tag1> <item1>..." },
{ "mixedform", o_mixedform, 2, "<text> <height> <width> <form height> <label1> <l_y1> <l_x1> <item1> <i_y1> <i_x1> <flen1> <ilen1> <itype>..." },
@@ -240,7 +251,7 @@ static const Options options[] = {
{ "no-cancel", o_nocancel, 1, "" },
{ "no-close", o_no_close, 1, NULL },
{ "no-collapse", o_no_collapse, 1, "" },
- { "no-cr-wrap", o_no_cr_wrap, 1, NULL },
+ { "no-cr-wrap", o_no_cr_wrap, 1, "" },
{ "no-kill", o_no_kill, 1, "" },
{ "no-label", o_no_label, 1, "<str>" },
{ "no-lines", o_no_lines, 1, "" },
@@ -249,7 +260,6 @@ static const Options options[] = {
{ "no-ok", o_nook, 1, "" },
{ "no-shadow", o_no_shadow, 1, "" },
{ "nocancel", o_nocancel, 1, NULL }, /* see --no-cancel */
- { "noitem", o_noitem, 1, NULL },
{ "nook", o_nook, 1, "" }, /* See no-ok */
{ "ok-label", o_ok_label, 1, "<str>" },
{ "output-fd", o_output_fd, 1, "<fd>" },
@@ -283,7 +293,6 @@ static const Options options[] = {
{ "tailboxbg", o_tailboxbg, 2, "<file> <height> <width>" },
{ "textbox", o_textbox, 2, "<file> <height> <width>" },
{ "time-format", o_time_format, 1, "<str>" },
- { "timebox", o_timebox, 2, "<text> <height> <width> <hour> <minute> <second>" },
{ "timeout", o_timeout, 1, "<secs>" },
{ "title", o_title, 1, "<title>" },
{ "trim", o_trim, 1, "" },
@@ -293,6 +302,34 @@ static const Options options[] = {
{ "wmclass", o_wmclass, 1, NULL },
{ "yes-label", o_yes_label, 1, "<str>" },
{ "yesno", o_yesno, 2, "<text> <height> <width>" },
+#ifdef HAVE_WHIPTAIL
+ { "cancel-button", o_cancel_label, 1, NULL },
+ { "fb", o_fullbutton, 1, NULL },
+ { "fullbutton", o_fullbutton, 1, NULL },
+ { "no-button", o_no_label, 1, NULL },
+ { "ok-button", o_ok_label, 1, NULL },
+ { "scrolltext", o_scrollbar, 1, NULL },
+ { "topleft", o_topleft, 1, NULL },
+ { "yes-button", o_yes_label, 1, NULL },
+#endif
+#ifdef HAVE_XDIALOG
+ { "calendar", o_calendar, 2, "<text> <height> <width> <day> <month> <year>" },
+ { "dselect", o_dselect, 2, "<directory> <height> <width>" },
+ { "editbox", o_editbox, 2, "<file> <height> <width>" },
+ { "fselect", o_fselect, 2, "<filepath> <height> <width>" },
+ { "timebox", o_timebox, 2, "<text> <height> <width> <hour> <minute> <second>" },
+#endif
+#ifdef HAVE_XDIALOG2
+ { "buildlist", o_buildlist, 2, "<text> <height> <width> <tag1> <item1> <status1>..." },
+ { "no-items", o_no_items, 1, "" },
+ { "no-tags", o_no_tags, 1, "" },
+ { "rangebox", o_rangebox, 2, "<text> <height> <width> <min-value> <max-value> <default-value>" },
+ { "treeview", o_treeview, 2, "<text> <height> <width> <list-height> <tag1> <item1> <status1> <depth1>..." },
+#endif
+#if defined(HAVE_XDIALOG2) || defined(HAVE_WHIPTAIL)
+ { "noitem", o_no_items, 1, NULL },
+ { "notags", o_no_tags, 1, NULL },
+#endif
#ifdef HAVE_DLG_TRACE
{ "trace", o_trace, 1, "<file>" },
#endif
@@ -431,6 +468,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 +492,11 @@ isOption(const char *arg)
}
}
} else if (!strncmp(arg, "--", (size_t) 2) && isalpha(UCH(arg[2]))) {
- result = TRUE;
+ if (strlen(arg) == strspn(arg, OptionChars)) {
+ result = TRUE;
+ } else {
+ dlg_exiterr("Invalid option \"%s\"", arg);
+ }
}
}
return result;
@@ -459,17 +506,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
@@ -523,13 +572,17 @@ howmany_tags(char *argv[], int group)
static int
numeric_arg(char **av, int n)
{
- char *last = 0;
- int result = (int) strtol(av[n], &last, 10);
- char msg[80];
+ int result = 0;
+
+ if (n < dlg_count_argv(av)) {
+ char msg[80];
+ char *last = 0;
+ result = (int) strtol(av[n], &last, 10);
- if (last == 0 || *last != 0) {
- sprintf(msg, "Expected a number for token %d of %.20s", n, av[0]);
- Usage(msg);
+ if (last == 0 || *last != 0) {
+ sprintf(msg, "Expected a number for token %d of %.20s", n, av[0]);
+ Usage(msg);
+ }
}
return result;
}
@@ -685,9 +738,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 +746,6 @@ call_checklist(CALLARGS)
numeric_arg(av, 3),
numeric_arg(av, 4),
tags, av + 5, FLAG_CHECK);
- dialog_vars.quoted = save_quoted;
return code;
}
@@ -792,6 +842,75 @@ call_timebox(CALLARGS)
}
#endif /* HAVE_XDIALOG */
+/* dialog 1.2 widgets */
+#ifdef HAVE_XDIALOG2
+
+#define DisableNoTags() \
+ bool save_no_tags = dialog_vars.no_tags; \
+ bool save_no_items = dialog_vars.no_items; \
+ dialog_vars.no_tags = TRUE; \
+ dialog_vars.no_items = FALSE
+
+#define RestoreNoTags() \
+ dialog_vars.no_tags = save_no_tags; \
+ dialog_vars.no_items = save_no_items
+
+static int
+call_buildlist(CALLARGS)
+{
+ int tags = howmany_tags(av + 5, CHECKBOX_TAGS);
+ int result;
+
+ DisableNoTags();
+
+ *offset_add = 5 + tags * CHECKBOX_TAGS;
+ result = dialog_buildlist(t,
+ av[1],
+ numeric_arg(av, 2),
+ numeric_arg(av, 3),
+ numeric_arg(av, 4),
+ tags, av + 5,
+ TRUE);
+ RestoreNoTags();
+ return result;
+}
+
+static int
+call_rangebox(CALLARGS)
+{
+ int min_value;
+
+ *offset_add = arg_rest(av);
+ min_value = numeric_arg(av, 4);
+ return dialog_rangebox(t,
+ av[1],
+ numeric_arg(av, 2),
+ numeric_arg(av, 3),
+ min_value,
+ numeric_arg(av, 5),
+ (*offset_add > 6) ? numeric_arg(av, 6) : min_value);
+}
+
+static int
+call_treeview(CALLARGS)
+{
+ int tags = howmany_tags(av + 5, TREEVIEW_TAGS);
+ int result;
+
+ DisableNoTags();
+
+ *offset_add = arg_rest(av);
+ result = dialog_treeview(t,
+ av[1],
+ numeric_arg(av, 2),
+ numeric_arg(av, 3),
+ numeric_arg(av, 4),
+ tags, av + 5, FLAG_RADIO);
+ RestoreNoTags();
+ return result;
+}
+#endif /* HAVE_XDIALOG */
+
#ifdef HAVE_DLG_FORMBOX
static int
call_form(CALLARGS)
@@ -1006,11 +1125,14 @@ static const Mode modes[] =
{o_tailboxbg, 4, 4, call_tailboxbg},
#endif
#ifdef HAVE_XDIALOG
+ {o_buildlist, 4, 0, call_buildlist},
{o_calendar, 4, 7, call_calendar},
{o_dselect, 4, 5, call_dselect},
{o_editbox, 4, 4, call_editbox},
{o_fselect, 4, 5, call_fselect},
+ {o_rangebox, 5, 7, call_rangebox},
{o_timebox, 4, 7, call_timebox},
+ {o_treeview, 4, 0, call_treeview},
#endif
};
/* *INDENT-ON* */
@@ -1052,6 +1174,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 +1274,7 @@ Help(void)
static const char *const tbl_1[] =
{
"cdialog (ComeOn Dialog!) version %s",
- "Copyright 2000-2008,2011 Thomas E. Dickey",
+ "Copyright 2000-2012,2013 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 +1338,32 @@ 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));
+ } else {
+ dlg_trace_msg("# ignore extra --trace option\n");
+ *offset += 1;
+ }
+
+ dlg_trace_msg("# Parameters:\n");
+ for (j = 0; argv[j] != 0; ++j) {
+ dlg_trace_msg("# argv[%d] = %s\n", j, argv[j]);
+ }
+}
+#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 +1372,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 +1435,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);
@@ -1281,6 +1471,9 @@ process_common_options(int argc, char **argv, int offset, bool output)
case o_keep_window:
dialog_vars.keep_window = TRUE;
break;
+ case o_last_key:
+ dialog_vars.last_key = TRUE;
+ break;
case o_no_shadow:
dialog_state.use_shadow = FALSE;
break;
@@ -1334,6 +1527,7 @@ process_common_options(int argc, char **argv, int offset, bool output)
break;
case o_visit_items:
dialog_state.visit_items = TRUE;
+ dialog_state.visit_cols = 1;
break;
case o_aspect:
dialog_state.aspect_ratio = optionValue(argv, &offset);
@@ -1388,10 +1582,16 @@ process_common_options(int argc, char **argv, int offset, bool output)
dialog_state.no_mouse = TRUE;
mouse_close();
break;
- case o_noitem:
+#ifdef HAVE_WHIPTAIL
+ case o_topleft:
+ dialog_vars.begin_set = TRUE;
+ dialog_vars.begin_y = 0;
+ dialog_vars.begin_x = 0;
+ break;
case o_fullbutton:
/* ignore */
break;
+#endif
/* options of Xdialog which we ignore */
case o_icon:
case o_wmclass:
@@ -1416,10 +1616,15 @@ 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
+#if defined(HAVE_XDIALOG2) || defined(HAVE_WHIPTAIL)
+ case o_no_items:
+ dialog_vars.no_items = TRUE;
+ break;
+ case o_no_tags:
+ dialog_vars.no_tags = TRUE;
break;
#endif
}
@@ -1440,12 +1645,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 +1667,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 +1756,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)
@@ -1670,7 +1905,13 @@ main(int argc, char *argv[])
break;
default:
if (argv[j] != 0) {
- dlg_trim_string(argv[j]);
+ char *argv_j = strdup(argv[j]);
+ if (argv_j != 0) {
+ dlg_trim_string(argv_j);
+ argv[j] = argv_j;
+ } else {
+ argv[j] = strdup("?");
+ }
}
break;
}
@@ -1679,6 +1920,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) {
diff --git a/contrib/dialog/dialog.h b/contrib/dialog/dialog.h
index 4e1b01c9b3656..a255f03f21959 100644
--- a/contrib/dialog/dialog.h
+++ b/contrib/dialog/dialog.h
@@ -1,9 +1,9 @@
/*
- * $Id: dialog.h,v 1.231 2011/06/29 09:51:00 tom Exp $
+ * $Id: dialog.h,v 1.260 2013/03/17 15:03:41 tom Exp $
*
* dialog.h -- common declarations for all dialog modules
*
- * Copyright 2000-2010,2011 Thomas E. Dickey
+ * Copyright 2000-2012,2013 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -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,21 @@
#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
+
+#if !defined(HAVE_WSYNCUP)
+#undef wsyncup
+#define wsyncup(win) /* nothing */
+#endif
+
+#if !defined(HAVE_WCURSYNCUP)
+#undef wcursyncup
+#define wcursyncup(win) /* nothing */
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -274,6 +291,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
@@ -307,6 +330,7 @@ extern int dlg_getpary(WINDOW * /*win*/);
#define mouse_mkregion(y,x,h,w,n) dlg_mouse_mkregion(y,x,h,w,n)
#define mouse_region(y,x) dlg_mouse_region(y,x)
#define mouse_setbase(x,y) dlg_mouse_setbase(x,y)
+#define mouse_setcode(c) dlg_mouse_setcode(c)
#define mouse_wgetch(w,c) dlg_mouse_wgetch(w,c)
#define new_window(h,w,y,x) dlg_new_window(h,w,y,x)
#define parse_rc() dlg_parse_rc()
@@ -357,6 +381,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 +424,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. */
@@ -415,6 +444,7 @@ typedef struct {
#endif
/* 1.1-20110106 */
bool no_mouse; /* option "--no-mouse" */
+ int visit_cols; /* option "--visit-items" */
} DIALOG_STATE;
extern DIALOG_STATE dialog_state;
@@ -485,14 +515,33 @@ 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) */
+ /* 1.1-20121218 */
+ bool no_tags; /* option "--no-tags" */
+ bool no_items; /* option "--no-items" */
+ /* 1.2-20130315 */
+ bool last_key; /* option "--last-key" */
} DIALOG_VARS;
#define USE_ITEM_HELP(s) (dialog_vars.item_help && (s) != 0)
-#define CHECKBOX_TAGS (dialog_vars.item_help ? 4 : 3)
-#define MENUBOX_TAGS (dialog_vars.item_help ? 3 : 2)
-#define FORMBOX_TAGS (dialog_vars.item_help ? 9 : 8)
-#define MIXEDFORM_TAGS (FORMBOX_TAGS + 1)
+
+/*
+ * Some settings change the number of data items per row which dialog reads
+ * from a script.
+ */
+#define DLG__NO_ITEMS (dialog_vars.no_items ? 0 : 1)
+#define DLG__ITEM_HELP (dialog_vars.item_help ? 1 : 0)
+
+/*
+ * These are the total number of data items per row used for each widget type.
+ */
+#define CHECKBOX_TAGS (2 + DLG__ITEM_HELP + DLG__NO_ITEMS)
+#define MENUBOX_TAGS (1 + DLG__ITEM_HELP + DLG__NO_ITEMS)
+#define FORMBOX_TAGS (8 + DLG__ITEM_HELP)
+#define MIXEDFORM_TAGS (1 + FORMBOX_TAGS)
#define MIXEDGAUGE_TAGS 2
+#define TREEVIEW_TAGS (3 + DLG__ITEM_HELP + DLG__NO_ITEMS)
extern DIALOG_VARS dialog_vars;
@@ -532,6 +581,7 @@ extern DIALOG_COLORS dlg_color_table[];
extern const char *dialog_version(void);
/* widgets, each in separate files */
+extern int dialog_buildlist(const char * /*title*/, const char * /*cprompt*/, int /*height*/, int /*width*/, int /*list_height*/, int /*item_no*/, char ** /*items*/, int /*order_mode*/);
extern int dialog_calendar(const char * /*title*/, const char * /*subtitle*/, int /*height*/, int /*width*/, int /*day*/, int /*month*/, int /*year*/);
extern int dialog_checklist(const char * /*title*/, const char * /*cprompt*/, int /*height*/, int /*width*/, int /*list_height*/, int /*item_no*/, char ** /*items*/, int /*flag*/);
extern int dialog_dselect(const char * /*title*/, const char * /*path*/, int /*height*/, int /*width*/);
@@ -548,9 +598,11 @@ extern int dialog_msgbox(const char * /*title*/, const char * /*cprompt*/, int /
extern int dialog_pause(const char * /*title*/, const char * /*cprompt*/, int /*height*/, int /*width*/, int /*seconds*/);
extern int dialog_prgbox(const char * /*title*/, const char * /*cprompt*/, const char * /*command*/, int /*height*/, int /*width*/, int /*pauseopt*/);
extern int dialog_progressbox(const char * /*title*/, const char * /*cprompt*/, int /*height*/, int /*width*/);
+extern int dialog_rangebox(const char * /*title*/, const char * /*file*/, int /*height*/, int /*width*/, int /*min_value*/, int /*max_value*/, int /*default_value*/);
extern int dialog_tailbox(const char * /*title*/, const char * /*file*/, int /*height*/, int /*width*/, int /*bg_task*/);
extern int dialog_textbox(const char * /*title*/, const char * /*file*/, int /*height*/, int /*width*/);
extern int dialog_timebox(const char * /*title*/, const char * /*subtitle*/, int /*height*/, int /*width*/, int /*hour*/, int /*minute*/, int /*second*/);
+extern int dialog_treeview(const char * /*title*/, const char * /*subtitle*/, int /*height*/, int /*width*/, int /*list_height*/, int /*item_no*/, char ** /*items*/, int /*flag*/);
extern int dialog_yesno(const char * /*title*/, const char * /*cprompt*/, int /*height*/, int /*width*/);
/* some widgets have alternate entrypoints, to allow list manipulation */
@@ -597,6 +649,9 @@ extern void dlg_draw_arrows2(WINDOW * /*dialog*/, int /*top_arrow*/, int /*botto
extern void dlg_draw_helpline(WINDOW * /*dialog*/, bool /*decorations*/);
extern void dlg_draw_scrollbar(WINDOW * /*dialog*/, long /* first_data */, long /* this_data */, long /* next_data */, long /* total_data */, int /* left */, int /* right */, int /*top*/, int /*bottom*/, chtype /*attr*/, chtype /*borderattr*/);
+/* buildlist.c */
+extern int dlg_buildlist(const char * /*title*/, const char * /*cprompt*/, int /*height*/, int /*width*/, int /*list_height*/, int /*item_no*/, DIALOG_LISTITEM * /*items*/, const char * /*states*/, int /*order_mode*/, int * /*current_item*/);
+
/* buttons.c */
extern const char ** dlg_exit_label(void);
extern const char ** dlg_ok_label(void);
@@ -623,7 +678,7 @@ extern void dlg_align_columns(char ** /* target */, int /* per_row */, int /* n
extern void dlg_free_columns(char ** /* target */, int /* per_row */, int /* num_rows */);
/* editbox.c */
-extern int dlg_editbox(const char */*title*/, char ***/*list*/, int */*rows*/, int /*height*/, int /*width*/);
+extern int dlg_editbox(const char * /*title*/, char *** /*list*/, int * /*rows*/, int /*height*/, int /*width*/);
/* formbox.c */
extern int dlg_default_formitem(DIALOG_FORMITEM * /*items*/);
@@ -646,16 +701,24 @@ 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);
extern void dlg_create_rc(const char * /*filename*/);
#endif
+/* treeview.c */
+extern int dlg_treeview(const char * /*title*/, const char * /*cprompt*/, int /*height*/, int /*width*/, int /*list_height*/, int /*item_no*/, DIALOG_LISTITEM * /*items*/, const char * /*states*/, int * /*depths*/, int /*flag*/, int * /*current_item*/);
+
/* ui_getc.c */
extern int dlg_getc(WINDOW * /*win*/, int * /*fkey*/);
extern int dlg_getc_callbacks(int /*ch*/, int /*fkey*/, int * /*result*/);
extern int dlg_last_getc(void);
+extern void dlg_add_last_key(int /*mode*/);
extern void dlg_add_callback(DIALOG_CALLBACK * /*p*/);
extern void dlg_add_callback_ref(DIALOG_CALLBACK ** /*p*/, DIALOG_FREEBACK /* cleanup */);
extern void dlg_flush_getc(void);
@@ -673,15 +736,17 @@ extern char * dlg_strempty(void);
extern chtype dlg_asciibox(chtype /*ch*/);
extern chtype dlg_boxchar(chtype /*ch*/);
extern chtype dlg_get_attrs(WINDOW * /*win*/);
-extern const char * dlg_print_line(WINDOW */*win*/, chtype */*attr*/, const char */*prompt*/, int /*lm*/, int /*rm*/, int */*x*/);
+extern const char * dlg_print_line(WINDOW * /*win*/, chtype * /*attr*/, const char * /*prompt*/, int /*lm*/, int /*rm*/, int * /*x*/);
extern int dlg_box_x_ordinate(int /*width*/);
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_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,11 +764,14 @@ 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*/);
extern void dlg_print_autowrap(WINDOW * /*win*/, const char * /*prompt*/, int /*height*/, int /*width*/);
+extern void dlg_print_listitem(WINDOW * /*win*/, const char * /*text*/, int /*climit*/, bool /*first*/, int /*selected*/);
extern void dlg_print_size(int /*height*/, int /*width*/);
extern void dlg_print_text(WINDOW * /*win*/, const char * /*txt*/, int /*len*/, chtype * /*attr*/);
extern void dlg_put_backtitle(void);
@@ -715,11 +783,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 +800,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*/);
@@ -779,6 +839,7 @@ extern mseRegion * dlg_mouse_mkregion (int /*y*/, int /*x*/, int /*height*/, int
extern void dlg_mouse_free_regions (void);
extern void dlg_mouse_mkbigregion (int /*y*/, int /*x*/, int /*height*/, int /*width*/, int /*code*/, int /*step_x*/, int /*step_y*/, int /*mode*/);
extern void dlg_mouse_setbase (int /*x*/, int /*y*/);
+extern void dlg_mouse_setcode (int /*code*/);
#define USE_MOUSE 1
@@ -790,6 +851,7 @@ extern void dlg_mouse_setbase (int /*x*/, int /*y*/);
#define dlg_mouse_mkregion(y, x, height, width, code) /*nothing*/
#define dlg_mouse_mkbigregion(y, x, height, width, code, step_x, step_y, mode) /*nothing*/
#define dlg_mouse_setbase(x, y) /*nothing*/
+#define dlg_mouse_setcode(c) /*nothing*/
#define USE_MOUSE 0
diff --git a/contrib/dialog/dlg_colors.h b/contrib/dialog/dlg_colors.h
index 84123ddcb453c..c047f721cb7ac 100644
--- a/contrib/dialog/dlg_colors.h
+++ b/contrib/dialog/dlg_colors.h
@@ -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
diff --git a/contrib/dialog/dlg_keys.c b/contrib/dialog/dlg_keys.c
index 97ca8654d06b4..4b59f6b3a8ca2 100644
--- a/contrib/dialog/dlg_keys.c
+++ b/contrib/dialog/dlg_keys.c
@@ -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
+ * 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) {
+ name = p->name;
+ break;
+ }
+ }
+ }
for (p = all_bindings; p != 0; p = p->link) {
- if (p->win == win || p->win == 0) {
+ 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,30 +736,53 @@ 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_keys(FILE *fp)
+dlg_dump_window_keys(FILE *fp, WINDOW *win)
{
- LIST_BINDINGS *p;
- const char *last = "";
- unsigned n;
- unsigned count = 0;
+ 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 == 0) {
- ++count;
- }
- }
- if (count != 0) {
- for (p = all_bindings, n = 0; p != 0; p = p->link) {
- if (p->win == 0) {
+ 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, "*") ? "all" : p->name);
+ !strcmp(p->name, WILDNAME) ? "all" : p->name);
last = p->name;
}
- dump_one_binding(fp, p->name, p->binding);
+ 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;
+ unsigned count = 0;
+
+ for (p = all_bindings; p != 0; p = p->link) {
+ if (p->win == 0) {
+ ++count;
+ }
+ }
+ if (count != 0) {
+ dlg_dump_window_keys(fp, 0);
+ }
+ }
+}
#endif /* HAVE_RC_FILE */
diff --git a/contrib/dialog/dlg_keys.h b/contrib/dialog/dlg_keys.h
index 34b4cba318ad9..789f39ad482b1 100644
--- a/contrib/dialog/dlg_keys.h
+++ b/contrib/dialog/dlg_keys.h
@@ -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.32 2012/12/21 21:54:30 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,
@@ -118,23 +124,35 @@ typedef enum {
DLG_KEYS_DATA( DLGK_GRID_LEFT, KEY_LEFT ), \
DLG_KEYS_DATA( DLGK_GRID_RIGHT, KEY_RIGHT )
+#define SCROLL_FKEY_BINDINGS \
+ DLG_KEYS_DATA( DLGK_GRID_DOWN, KEY_DOWN ), \
+ DLG_KEYS_DATA( DLGK_GRID_UP, KEY_UP ), \
+ DLG_KEYS_DATA( DLGK_PAGE_FIRST, KEY_HOME ), \
+ DLG_KEYS_DATA( DLGK_PAGE_LAST, KEY_END ), \
+ DLG_KEYS_DATA( DLGK_PAGE_NEXT, KEY_NPAGE ), \
+ DLG_KEYS_DATA( DLGK_PAGE_PREV, KEY_PPAGE )
+
#define SCROLLKEY_BINDINGS \
+ SCROLL_FKEY_BINDINGS, \
DLG_KEYS_DATA( DLGK_GRID_DOWN, 'J' ), \
DLG_KEYS_DATA( DLGK_GRID_DOWN, 'j' ), \
- DLG_KEYS_DATA( DLGK_GRID_DOWN, KEY_DOWN ), \
DLG_KEYS_DATA( DLGK_GRID_UP, 'K' ), \
DLG_KEYS_DATA( DLGK_GRID_UP, 'k' ), \
- DLG_KEYS_DATA( DLGK_GRID_UP, KEY_UP ), \
DLG_KEYS_DATA( DLGK_PAGE_FIRST, 'g' ), \
- DLG_KEYS_DATA( DLGK_PAGE_FIRST, KEY_HOME ), \
DLG_KEYS_DATA( DLGK_PAGE_LAST, 'G' ), \
- DLG_KEYS_DATA( DLGK_PAGE_LAST, KEY_END ), \
DLG_KEYS_DATA( DLGK_PAGE_NEXT, 'F' ), \
DLG_KEYS_DATA( DLGK_PAGE_NEXT, 'f' ), \
- DLG_KEYS_DATA( DLGK_PAGE_NEXT, KEY_NPAGE ), \
DLG_KEYS_DATA( DLGK_PAGE_PREV, 'B' ), \
- DLG_KEYS_DATA( DLGK_PAGE_PREV, 'b' ), \
- DLG_KEYS_DATA( DLGK_PAGE_PREV, KEY_PPAGE )
+ DLG_KEYS_DATA( DLGK_PAGE_PREV, 'b' )
+
+#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*/);
@@ -145,10 +163,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 */
diff --git a/contrib/dialog/editbox.c b/contrib/dialog/editbox.c
index c7da10c741052..03ae27e605c79 100644
--- a/contrib/dialog/editbox.c
+++ b/contrib/dialog/editbox.c
@@ -1,9 +1,9 @@
/*
- * $Id: editbox.c,v 1.55 2011/06/21 00:10:46 tom Exp $
+ * $Id: editbox.c,v 1.62 2013/03/17 15:03:41 tom Exp $
*
* editbox.c -- implements the edit box
*
- * Copyright 2007-2010,2011 Thomas E. Dickey
+ * Copyright 2007-2012,2013 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -43,9 +43,10 @@ grow_list(char ***list, int *have, int want)
(*list) = dlg_realloc(char *, need, *list);
if ((*list) == 0) {
fail_list();
- }
- while (++last < need) {
- (*list)[last] = 0;
+ } else {
+ while (++last < need) {
+ (*list)[last] = 0;
+ }
}
}
}
@@ -68,45 +69,47 @@ 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)
- fail_list();
- blob[size] = '\0';
-
- if ((fp = fopen(file, "r")) == 0)
- dlg_exiterr("Cannot open: %s", file);
- size = fread(blob, sizeof(char), size, fp);
- fclose(fp);
-
- for (pass = 0; pass < 2; ++pass) {
- int first = TRUE;
- need = 0;
- for (n = 0; n < size; ++n) {
- if (first && pass) {
- (*list)[need] = blob + n;
- first = FALSE;
- }
- if (blob[n] == '\n') {
- first = TRUE;
- ++need;
- if (pass)
- blob[n] = '\0';
+ if ((blob = dlg_malloc(char, size + 1)) == 0) {
+ fail_list();
+ } else {
+ blob[size] = '\0';
+
+ if ((fp = fopen(file, "r")) == 0)
+ dlg_exiterr("Cannot open: %s", file);
+ size = fread(blob, sizeof(char), size, fp);
+ fclose(fp);
+
+ for (pass = 0; pass < 2; ++pass) {
+ int first = TRUE;
+ need = 0;
+ for (n = 0; n < size; ++n) {
+ if (first && pass) {
+ (*list)[need] = blob + n;
+ first = FALSE;
+ }
+ if (blob[n] == '\n') {
+ first = TRUE;
+ ++need;
+ if (pass)
+ blob[n] = '\0';
+ }
}
- }
- if (pass) {
- if (need == 0) {
- (*list)[0] = dlg_strclone("");
- (*list)[1] = 0;
- } else {
- for (n = 0; n < need; ++n) {
- (*list)[n] = dlg_strclone((*list)[n]);
+ if (pass) {
+ if (need == 0) {
+ (*list)[0] = dlg_strclone("");
+ (*list)[1] = 0;
+ } else {
+ for (n = 0; n < need; ++n) {
+ (*list)[n] = dlg_strclone((*list)[n]);
+ }
+ (*list)[need] = 0;
}
- (*list)[need] = 0;
+ } else {
+ grow_list(list, rows, (int) need + 1);
}
- } else {
- grow_list(list, rows, (int) need + 1);
}
+ free(blob);
}
- free(blob);
}
static void
@@ -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;
@@ -701,6 +710,7 @@ dlg_editbox(const char *title,
dlg_add_result((*list)[n]);
dlg_add_separator();
}
+ dlg_add_last_key(-1);
}
free(buffer);
dlg_restore_vars(&save_vars);
diff --git a/contrib/dialog/formbox.c b/contrib/dialog/formbox.c
index 7ec798ce0b8f8..6688c5477a834 100644
--- a/contrib/dialog/formbox.c
+++ b/contrib/dialog/formbox.c
@@ -1,9 +1,9 @@
/*
- * $Id: formbox.c,v 1.73 2011/06/29 09:48:08 tom Exp $
+ * $Id: formbox.c,v 1.85 2013/03/17 15:03:41 tom Exp $
*
* formbox.c -- implements the form (i.e, some pairs label/editbox)
*
- * Copyright 2003-2010,2011 Thomas E. Dickey
+ * Copyright 2003-2012,2013 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -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.
*/
@@ -259,6 +287,7 @@ tab_next(WINDOW *win,
static bool
scroll_next(WINDOW *win, DIALOG_FORMITEM item[], int stepsize, int *choice, int *scrollamt)
{
+ bool result = TRUE;
int old_choice = *choice;
int old_scroll = *scrollamt;
int old_row = MIN(item[old_choice].text_y, item[old_choice].name_y);
@@ -270,34 +299,40 @@ scroll_next(WINDOW *win, DIALOG_FORMITEM item[], int stepsize, int *choice, int
target = old_scroll;
else
target = old_scroll + stepsize;
- if (target < 0)
- target = 0;
+ if (target < 0) {
+ result = FALSE;
+ }
} else {
- int limit = form_limit(item);
- if (target > limit)
- target = limit;
+ if (target > form_limit(item)) {
+ result = FALSE;
+ }
}
- for (n = 0; item[n].name != 0; ++n) {
- if (item[n].text_flen > 0) {
- int new_row = MIN(item[n].text_y, item[n].name_y);
- if (abs(new_row - target) < abs(old_row - target)) {
- old_row = new_row;
- *choice = n;
+ if (result) {
+ for (n = 0; item[n].name != 0; ++n) {
+ if (item[n].text_flen > 0) {
+ int new_row = MIN(item[n].text_y, item[n].name_y);
+ if (abs(new_row - target) < abs(old_row - target)) {
+ old_row = new_row;
+ *choice = n;
+ }
}
}
- }
- if (old_choice != *choice)
- print_item(win, item + old_choice, *scrollamt, FALSE);
+ if (old_choice != *choice)
+ print_item(win, item + old_choice, *scrollamt, FALSE);
- *scrollamt = *choice;
- if (*scrollamt != old_scroll) {
- scrollok(win, TRUE);
- wscrl(win, *scrollamt - old_scroll);
- scrollok(win, FALSE);
+ *scrollamt = *choice;
+ if (*scrollamt != old_scroll) {
+ scrollok(win, TRUE);
+ wscrl(win, *scrollamt - old_scroll);
+ scrollok(win, FALSE);
+ }
+ result = (old_choice != *choice) || (old_scroll != *scrollamt);
}
- return (old_choice != *choice) || (old_scroll != *scrollamt);
+ if (!result)
+ beep();
+ return result;
}
/*
@@ -419,7 +454,7 @@ prev_valid_buttonindex(int state, int extra, bool non_editable)
DLG_KEYS_DATA( DLGK_PAGE_NEXT, KEY_NPAGE ), \
DLG_KEYS_DATA( DLGK_PAGE_PREV, KEY_PPAGE )
/*
- * Display a form for fulfill a number of fields
+ * Display a form for entering a number of fields
*/
int
dlg_form(const char *title,
@@ -454,8 +489,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 +546,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 +601,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 +616,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;
@@ -591,10 +633,12 @@ dlg_form(const char *title,
current->text_x,
current->text_len,
is_hidden(current), first);
+ wsyncup(form);
+ wcursyncup(form);
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 +697,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 +742,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 */
@@ -895,6 +973,7 @@ dialog_form(const char *title,
dlg_add_separator();
}
}
+ dlg_add_last_key(-1);
}
dlg_free_formitems(listitems);
diff --git a/contrib/dialog/fselect.c b/contrib/dialog/fselect.c
index e082abf0822d9..e6d2a9634f780 100644
--- a/contrib/dialog/fselect.c
+++ b/contrib/dialog/fselect.c
@@ -1,9 +1,9 @@
/*
- * $Id: fselect.c,v 1.78 2011/06/29 09:48:21 tom Exp $
+ * $Id: fselect.c,v 1.93 2012/12/30 20:52:25 tom 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));
@@ -365,7 +367,7 @@ match(char *name, LIST * d_list, LIST * f_list, MATCH * match_list)
matches[data_len++] = f_list->data[i];
}
}
- matches = dlg_realloc(char *, data_len, matches);
+ matches = dlg_realloc(char *, data_len + 1, matches);
match_list->data = matches;
match_list->length = (int) data_len;
}
@@ -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,51 +445,69 @@ 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
- && strchr(input + n, '/') == 0) {
- return show_both_lists(input, d_list, f_list, keep);
- }
-
- strcpy(current, input);
- /* refill the lists */
- free_list(d_list, TRUE);
- free_list(f_list, TRUE);
- strcpy(path, current);
- if ((leaf = strrchr(path, '/')) != 0) {
- *++leaf = 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) {
+ result = show_both_lists(input, d_list, f_list, keep);
} else {
- strcpy(path, "./");
- leaf = path + strlen(path);
+ rescan = TRUE;
}
- if ((dp = opendir(path)) != 0) {
- while ((de = readdir(dp)) != 0) {
- strncpy(leaf, de->d_name, NAMLEN(de))[NAMLEN(de)] = 0;
- if (stat(path, &sb) == 0) {
- if ((sb.st_mode & S_IFMT) == S_IFDIR)
- add_to_list(d_list, leaf);
- else if (f_list->win)
- add_to_list(f_list, leaf);
+
+ if (rescan) {
+ size_t have = strlen(input);
+
+ if (have > MAX_LEN)
+ have = MAX_LEN;
+ memcpy(current, input, have);
+ current[have] = '\0';
+
+ /* refill the lists */
+ free_list(d_list, TRUE);
+ free_list(f_list, TRUE);
+ memcpy(path, current, have);
+ path[have] = '\0';
+ if ((leaf = strrchr(path, '/')) != 0) {
+ *++leaf = 0;
+ } else {
+ 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;
+ if (stat(path, &sb) == 0) {
+ if ((sb.st_mode & S_IFMT) == S_IFDIR)
+ add_to_list(d_list, leaf);
+ else if (f_list->win)
+ add_to_list(f_list, leaf);
+ }
+ }
+ (void) closedir(dp);
+ /* sort the lists */
+ if (d_list->data != 0 && d_list->length > 1) {
+ qsort(d_list->data,
+ (size_t) d_list->length,
+ sizeof(d_list->data[0]),
+ compar);
+ }
+ if (f_list->data != 0 && f_list->length > 1) {
+ qsort(f_list->data,
+ (size_t) f_list->length,
+ sizeof(f_list->data[0]),
+ compar);
}
}
- (void) closedir(dp);
- /* sort the lists */
- qsort(d_list->data,
- (size_t) d_list->length,
- sizeof(d_list->data[0]),
- compar);
- qsort(f_list->data,
- (size_t) f_list->length,
- sizeof(f_list->data[0]),
- compar);
- }
- (void) show_both_lists(input, d_list, f_list, FALSE);
- d_list->offset = d_list->choice;
- f_list->offset = f_list->choice;
- return TRUE;
+ (void) show_both_lists(input, d_list, f_list, FALSE);
+ d_list->offset = d_list->choice;
+ f_list->offset = f_list->choice;
+ result = TRUE;
+ }
+ return result;
}
static bool
@@ -560,9 +582,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];
@@ -572,7 +595,7 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
const char **buttons = dlg_ok_labels();
const char *d_label = _("Directories");
const char *f_label = _("Files");
- char *partial;
+ char *partial = 0;
int min_wide = MIN_WIDE;
int min_items = height ? 0 : 4;
LIST d_list, f_list;
@@ -604,11 +627,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;
@@ -617,20 +640,22 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
tbox_x = (width - tbox_width) / 2;
w_text = derwin(dialog, tbox_height, tbox_width, tbox_y, tbox_x);
- if (w_text == 0)
- return DLG_EXIT_ERROR;
+ if (w_text == 0) {
+ result = DLG_EXIT_ERROR;
+ goto finish;
+ }
(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)
@@ -642,15 +667,17 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
dbox_x = tbox_x;
w_work = derwin(dialog, dbox_height, dbox_width, dbox_y, dbox_x);
- if (w_work == 0)
- return DLG_EXIT_ERROR;
+ if (w_work == 0) {
+ result = DLG_EXIT_ERROR;
+ goto finish;
+ }
(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) {
@@ -661,15 +688,17 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
fbox_x = tbox_x + dbox_width + (2 * MARGIN);
w_work = derwin(dialog, fbox_height, fbox_width, fbox_y, fbox_x);
- if (w_work == 0)
- return DLG_EXIT_ERROR;
+ if (w_work == 0) {
+ result = DLG_EXIT_ERROR;
+ goto finish;
+ }
(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 +725,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:
@@ -771,7 +806,10 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
continue;
case DLGK_SELECT:
completed = 0;
- partial = 0;
+ if (partial != 0) {
+ free(partial);
+ partial = 0;
+ }
if (state == sFILES && !dselect) {
completed = data_of(&f_list);
} else if (state == sDIRS) {
@@ -788,8 +826,10 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
offset = (int) strlen(input);
dlg_show_string(w_text, input, offset, inputbox_attr,
0, 0, tbox_width, 0, first);
- if (partial != NULL)
+ if (partial != NULL) {
free(partial);
+ partial = 0;
+ }
continue;
} else { /* if (state < sTEXT) */
(void) beep();
@@ -862,6 +902,10 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
dlg_mouse_free_regions();
free_list(&d_list, FALSE);
free_list(&f_list, FALSE);
+
+ finish:
+ if (partial != 0)
+ free(partial);
return result;
}
diff --git a/contrib/dialog/guage.c b/contrib/dialog/guage.c
index b25052f232275..4c5c8c03f5734 100644
--- a/contrib/dialog/guage.c
+++ b/contrib/dialog/guage.c
@@ -1,9 +1,9 @@
/*
- * $Id: guage.c,v 1.60 2011/06/27 00:52:28 tom Exp $
+ * $Id: guage.c,v 1.65 2012/11/30 10:43:31 tom Exp $
*
* guage.c -- implements the gauge 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
@@ -94,6 +94,7 @@ read_data(char *buffer, FILE *fp)
result = 0;
} else if (fgets(buffer, MY_LEN, fp) != 0) {
DLG_TRACE(("read_data:%s", buffer));
+ buffer[MY_LEN] = '\0';
dlg_trim_string(buffer);
result = 1;
} else {
@@ -122,27 +123,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,
- obj->height - 4, 2 + MARGIN,
- 2 + MARGIN, obj->width - 2 * (2 + MARGIN),
- dialog_attr,
- border_attr);
+ dlg_draw_box2(dialog,
+ obj->height - 4, 2 + MARGIN,
+ 2 + MARGIN, obj->width - 2 * (2 + MARGIN),
+ dialog_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 +159,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);
@@ -180,7 +183,7 @@ handle_input(DIALOG_CALLBACK * cb)
MY_OBJ *obj = (MY_OBJ *) cb;
bool result;
int status;
- char buf[MY_LEN];
+ char buf[MY_LEN + 1];
if (dialog_state.pipe_input == 0) {
status = -1;
@@ -335,7 +338,6 @@ dlg_free_gauge(void *objptr)
delink(obj);
obj->obj.keep_win = FALSE;
dlg_remove_callback(&(obj->obj));
- free(obj);
}
}
@@ -362,6 +364,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
diff --git a/contrib/dialog/headers-sh.in b/contrib/dialog/headers-sh.in
index 906c018d83e6b..9bad19fbd25f2 100755
--- a/contrib/dialog/headers-sh.in
+++ b/contrib/dialog/headers-sh.in
@@ -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
diff --git a/contrib/dialog/help.c b/contrib/dialog/help.c
index 8ba922984ebea..ea0fade3cd92f 100644
--- a/contrib/dialog/help.c
+++ b/contrib/dialog/help.c
@@ -1,9 +1,9 @@
/*
- * $Id: help.c,v 1.2 2011/06/25 00:27:16 tom Exp $
+ * $Id: help.c,v 1.3 2012/12/04 02:01:10 tom Exp $
*
* help.c -- implements the help dialog
*
- * Copyright 2011 Thomas E. Dickey
+ * Copyright 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
@@ -33,11 +33,22 @@ dialog_helpfile(const char *title,
int width)
{
int result = DLG_EXIT_ERROR;
+ DIALOG_VARS save;
if (!dialog_vars.in_helpfile && file != 0 && *file != '\0') {
+ dlg_save_vars(&save);
+
+ dialog_vars.no_label = NULL;
+ dialog_vars.ok_label = NULL;
+ dialog_vars.help_button = FALSE;
+ dialog_vars.extra_button = FALSE;
+ dialog_vars.nook = FALSE;
+
dialog_vars.in_helpfile = TRUE;
+
result = dialog_textbox(title, file, height, width);
- dialog_vars.in_helpfile = FALSE;
+
+ dlg_restore_vars(&save);
}
return (result);
}
diff --git a/contrib/dialog/inputbox.c b/contrib/dialog/inputbox.c
index 14e2c288e17c3..1d7ad7d56cc44 100644
--- a/contrib/dialog/inputbox.c
+++ b/contrib/dialog/inputbox.c
@@ -1,9 +1,9 @@
/*
- * $Id: inputbox.c,v 1.67 2011/06/29 09:48:34 tom Exp $
+ * $Id: inputbox.c,v 1.76 2012/12/03 11:46:50 tom 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
@@ -73,6 +73,7 @@ dialog_inputbox(const char *title, const char *cprompt, int height, int width,
int result = DLG_EXIT_UNKNOWN;
int state;
int first;
+ int edited;
char *input;
WINDOW *dialog;
WINDOW *editor;
@@ -85,12 +86,13 @@ dialog_inputbox(const char *title, const char *cprompt, int height, int width,
/* Set up the initial value */
input = dlg_set_result(init);
+ edited = FALSE;
#ifdef KEY_RESIZE
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 +118,34 @@ 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);
+ if (*input != '\0') {
+ dlg_show_string(editor, input, chr_offset, inputbox_attr,
+ 0, 0, box_width, password, first);
+ wsyncup(editor);
+ wcursyncup(editor);
+ }
while (result == DLG_EXIT_UNKNOWN) {
int edit = 0;
@@ -151,6 +160,13 @@ dialog_inputbox(const char *title, const char *cprompt, int height, int width,
}
if (!first) {
+ if (*input != '\0' && !edited) {
+ dlg_show_string(editor, input, chr_offset, inputbox_attr,
+ 0, 0, box_width, password, first);
+ wmove(editor, 0, chr_offset);
+ wsyncup(editor);
+ wcursyncup(editor);
+ }
key = dlg_mouse_wgetch((state == sTEXT) ? editor : dialog, &fkey);
if (dlg_result_key(key, fkey, &result))
break;
@@ -171,9 +187,12 @@ dialog_inputbox(const char *title, const char *cprompt, int height, int width,
edit = dlg_edit_string(input, &chr_offset, key, fkey, first);
if (edit) {
- dlg_show_string(dialog, input, chr_offset, inputbox_attr,
- box_y, box_x, box_width, password, first);
+ dlg_show_string(editor, input, chr_offset, inputbox_attr,
+ 0, 0, box_width, password, first);
+ wsyncup(editor);
+ wcursyncup(editor);
first = FALSE;
+ edited = TRUE;
continue;
} else if (first) {
first = FALSE;
diff --git a/contrib/dialog/inputstr.c b/contrib/dialog/inputstr.c
index 685b1260fc795..a9e90c59da5fd 100644
--- a/contrib/dialog/inputstr.c
+++ b/contrib/dialog/inputstr.c
@@ -1,9 +1,9 @@
/*
- * $Id: inputstr.c,v 1.69 2011/01/16 21:52:35 tom Exp $
+ * $Id: inputstr.c,v 1.72 2012/12/30 22:11:37 tom Exp $
*
* inputstr.c -- functions for input/display of a string
*
- * 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
@@ -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;
@@ -310,13 +308,17 @@ dlg_count_wchars(const char *string)
size_t code;
wchar_t *temp = dlg_calloc(wchar_t, len + 1);
- cache.string[part] = '\0';
- memset(&state, 0, sizeof(state));
- code = mbsrtowcs(temp, &src, (size_t) part, &state);
- cache.i_len = ((int) code >= 0) ? wcslen(temp) : 0;
- cache.string[part] = save;
- free(temp);
- save_cache(&cache, string);
+ if (temp != 0) {
+ cache.string[part] = '\0';
+ memset(&state, 0, sizeof(state));
+ code = mbsrtowcs(temp, &src, (size_t) part, &state);
+ cache.i_len = ((int) code >= 0) ? wcslen(temp) : 0;
+ cache.string[part] = save;
+ free(temp);
+ save_cache(&cache, string);
+ } else {
+ cache.i_len = 0;
+ }
}
result = (int) cache.i_len;
} else
@@ -377,8 +379,9 @@ dlg_find_index(const int *list, int limit, int to_find)
for (result = 0; result <= limit; ++result) {
if (to_find == list[result]
|| result == limit
- || to_find < list[result + 1])
+ || ((result < limit) && (to_find < list[result + 1]))) {
break;
+ }
}
return result;
}
@@ -531,7 +534,7 @@ dlg_edit_string(char *string, int *chr_offset, int key, int fkey, bool force)
edit = force;
break;
case DLGK_GRID_LEFT:
- if (*chr_offset)
+ if (*chr_offset && offset > 0)
*chr_offset = indx[offset - 1];
break;
case DLGK_GRID_RIGHT:
@@ -700,7 +703,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];
diff --git a/contrib/dialog/makefile.in b/contrib/dialog/makefile.in
index d05d74da3778e..65664dda98985 100644
--- a/contrib/dialog/makefile.in
+++ b/contrib/dialog/makefile.in
@@ -1,7 +1,7 @@
-# $Id: makefile.in,v 1.79 2011/06/25 00:27:56 tom Exp $
+# $Id: makefile.in,v 1.83 2012/10/06 14:05:14 tom 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"), #
@@ -35,6 +35,7 @@ VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
+datarootdir = @datarootdir@
top_builddir = .
@@ -71,7 +72,8 @@ LIBS = @LIBS@ @INTLLIBS@
RANLIB = @LIB_PREP@
RM = rm -f
-LINT = lint
+LINT = @LINT@
+LINT_OPTS = @LINT_OPTS@
CTAGS = @CTAGS@
ETAGS = @ETAGS@
@@ -84,6 +86,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 +104,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 +182,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 +252,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 +279,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 +331,4 @@ update-po:
test -f $(PO_DIR)/makefile && cd $(PO_DIR) && $(MAKE) $@
lint:
- $(LINT) $(CPPFLAGS) *.c
+ $(LINT) $(LINT_OPTS) $(CPPFLAGS) *.c
diff --git a/contrib/dialog/menubox.c b/contrib/dialog/menubox.c
index 25005a4039489..31174435f81c3 100644
--- a/contrib/dialog/menubox.c
+++ b/contrib/dialog/menubox.c
@@ -1,9 +1,9 @@
/*
- * $Id: menubox.c,v 1.122 2011/06/29 09:48:46 tom Exp $
+ * $Id: menubox.c,v 1.145 2012/12/30 21:11:02 tom 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
@@ -27,141 +27,97 @@
#include <dialog.h>
#include <dlg_keys.h>
-static int menu_width, tag_x, item_x;
-
typedef enum {
Unselected = 0,
Selected,
Editing
} Mode;
+typedef struct {
+ /* the outer-window */
+ WINDOW *dialog;
+ int box_y;
+ int box_x;
+ int tag_x;
+ int item_x;
+ int menu_height;
+ int menu_width;
+ /* the inner-window */
+ WINDOW *menu;
+ DIALOG_LISTITEM *items;
+ int item_no;
+} ALL_DATA;
+
#define MIN_HIGH (1 + (5 * MARGIN))
#define INPUT_ROWS 3 /* rows per inputmenu entry */
-#define LLEN(n) ((n) * MENUBOX_TAGS)
-#define ItemName(i) items[LLEN(i)]
-#define ItemText(i) items[LLEN(i) + 1]
-#define ItemHelp(i) items[LLEN(i) + 2]
-
#define RowHeight(i) (is_inputmenu ? ((i) * INPUT_ROWS) : ((i) * 1))
#define ItemToRow(i) (is_inputmenu ? ((i) * INPUT_ROWS + 1) : (i))
#define RowToItem(i) (is_inputmenu ? ((i) / INPUT_ROWS + 0) : (i))
-static void
-print_arrows(WINDOW *win,
- int box_x,
- int box_y,
- int scrollamt,
- int max_choice,
- int item_no,
- int menu_height)
-{
- dlg_draw_scrollbar(win,
- scrollamt,
- scrollamt,
- scrollamt + max_choice,
- item_no,
- box_x,
- box_x + menu_width,
- box_y,
- box_y + menu_height + 1,
- menubox_attr,
- menubox_border_attr);
-}
-
-/*
- * Print the tag of a menu-item
- */
-static void
-print_tag(WINDOW *win,
- DIALOG_LISTITEM * item,
- int choice,
- Mode selected,
- bool is_inputmenu)
-{
- 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 */
- (void) wmove(win, my_y, tag_x);
- wattrset(win, selected ? tag_key_selected_attr : tag_key_attr);
- if (strlen(item->name) != 0)
- (void) waddnstr(win, item->name, prefix);
- /* print rest of the string */
- wattrset(win, selected ? tag_selected_attr : tag_attr);
- if ((int) strlen(item->name) > prefix) {
- limit = dlg_limit_columns(item->name, tag_width, 1);
- if (limit > 0)
- (void) waddnstr(win, item->name + indx[1], indx[limit] - indx[1]);
- }
-}
-
/*
* Print menu item
*/
static void
-print_item(WINDOW *win,
- DIALOG_LISTITEM * items,
+print_item(ALL_DATA * data,
+ WINDOW *win,
+ DIALOG_LISTITEM * item,
int choice,
Mode selected,
bool is_inputmenu)
{
chtype save = dlg_get_attrs(win);
int n;
- int my_width = menu_width;
- int my_x = item_x;
+ int climit = (data->item_x - data->tag_x - GUTTER);
+ int my_width = data->menu_width;
+ int my_x = data->item_x;
int my_y = ItemToRow(choice);
- chtype attr = A_NORMAL;
- chtype textchar;
+ bool both = (!dialog_vars.no_tags && !dialog_vars.no_items);
+ bool first = TRUE;
chtype bordchar;
+ const char *show = (dialog_vars.no_items
+ ? item->name
+ : item->text);
switch (selected) {
default:
case Unselected:
- textchar = item_attr;
bordchar = item_attr;
break;
case Selected:
- textchar = item_selected_attr;
bordchar = item_selected_attr;
break;
case Editing:
- textchar = inputbox_attr;
bordchar = dialog_attr;
break;
}
/* Clear 'residue' of last item and mark current current item */
if (is_inputmenu) {
- wattrset(win, (selected != Unselected) ? item_selected_attr : item_attr);
+ (void) wattrset(win, (selected != Unselected) ? item_selected_attr : item_attr);
for (n = my_y - 1; n < my_y + INPUT_ROWS - 1; n++) {
wmove(win, n, 0);
wprintw(win, "%*s", my_width, " ");
}
} else {
- wattrset(win, menubox_attr);
+ (void) wattrset(win, menubox_attr);
wmove(win, my_y, 0);
wprintw(win, "%*s", my_width, " ");
}
- print_tag(win, items, choice, selected, is_inputmenu);
+ /* highlight first char of the tag to be special */
+ if (both) {
+ (void) wmove(win, my_y, data->tag_x);
+ dlg_print_listitem(win, item->name, climit, first, selected);
+ first = FALSE;
+ }
/* Draw the input field box (only for inputmenu) */
(void) wmove(win, my_y, my_x);
if (is_inputmenu) {
my_width -= 1;
- dlg_draw_box(win, my_y - 1, my_x, INPUT_ROWS, my_width - my_x - tag_x,
+ dlg_draw_box(win, my_y - 1, my_x, INPUT_ROWS, my_width - my_x - data->tag_x,
bordchar,
bordchar);
my_width -= 1;
@@ -170,25 +126,24 @@ print_item(WINDOW *win,
/* print actual item */
wmove(win, my_y, my_x);
- wattrset(win, textchar);
- dlg_print_text(win, items->text, my_width - my_x, &attr);
+ dlg_print_listitem(win, show, my_width - my_x, first, selected);
if (selected) {
- dlg_item_help(items->help);
+ dlg_item_help(item->help);
}
- wattrset(win, save);
+ (void) wattrset(win, save);
}
/*
* Allow the user to edit the text of a menu entry.
*/
static int
-input_menu_edit(WINDOW *win,
+input_menu_edit(ALL_DATA * data,
DIALOG_LISTITEM * items,
int choice,
char **resultp)
{
- chtype save = dlg_get_attrs(win);
+ chtype save = dlg_get_attrs(data->menu);
char *result;
int offset = 0;
int key = 0, fkey = 0;
@@ -206,15 +161,17 @@ input_menu_edit(WINDOW *win,
result[0] = '\0';
strcpy(result, items->text);
- print_item(win, items, choice, Editing, TRUE);
+ print_item(data, data->menu, items, choice, Editing, TRUE);
/* taken out of inputbox.c - but somewhat modified */
for (;;) {
if (!first)
- key = dlg_mouse_wgetch(win, &fkey);
+ key = dlg_mouse_wgetch(data->menu, &fkey);
if (dlg_edit_string(result, &offset, key, fkey, first)) {
- dlg_show_string(win, result, offset, inputbox_attr,
- y, item_x + 1, menu_width - item_x - 3,
+ dlg_show_string(data->menu, result, offset, inputbox_attr,
+ y,
+ data->item_x + 1,
+ data->menu_width - data->item_x - 3,
FALSE, first);
first = FALSE;
} else if (key == ESC || key == TAB) {
@@ -224,8 +181,8 @@ input_menu_edit(WINDOW *win,
break;
}
}
- print_item(win, items, choice, Selected, TRUE);
- wattrset(win, save);
+ print_item(data, data->menu, items, choice, Selected, TRUE);
+ (void) wattrset(data->menu, save);
*resultp = result;
return code;
@@ -252,7 +209,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 +221,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;
@@ -273,6 +230,63 @@ dlg_dummy_menutext(DIALOG_LISTITEM * items, int current, char *newtext)
return DLG_EXIT_ERROR;
}
+static void
+print_menu(ALL_DATA * data, int choice, int scrollamt, int max_choice, bool is_inputmenu)
+{
+ int i;
+
+ for (i = 0; i < max_choice; i++) {
+ print_item(data,
+ data->menu,
+ &data->items[i + scrollamt],
+ i,
+ (i == choice) ? Selected : Unselected,
+ is_inputmenu);
+ }
+
+ /* Clean bottom lines */
+ if (is_inputmenu) {
+ int spare_lines, x_count;
+ spare_lines = data->menu_height % INPUT_ROWS;
+ (void) wattrset(data->menu, menubox_attr);
+ for (; spare_lines; spare_lines--) {
+ wmove(data->menu, data->menu_height - spare_lines, 0);
+ for (x_count = 0; x_count < data->menu_width;
+ x_count++) {
+ waddch(data->menu, ' ');
+ }
+ }
+ }
+
+ (void) wnoutrefresh(data->menu);
+
+ dlg_draw_scrollbar(data->dialog,
+ scrollamt,
+ scrollamt,
+ scrollamt + max_choice,
+ data->item_no,
+ data->box_x,
+ data->box_x + data->menu_width,
+ data->box_y,
+ data->box_y + data->menu_height + 1,
+ menubox_border2_attr,
+ menubox_border_attr);
+}
+
+static bool
+check_hotkey(DIALOG_LISTITEM * items, int choice)
+{
+ bool result = FALSE;
+
+ if (dlg_match_char(dlg_last_getc(),
+ (dialog_vars.no_tags
+ ? items[choice].text
+ : items[choice].name))) {
+ result = TRUE;
+ }
+ return result;
+}
+
/*
* This is an alternate interface to 'menu' which allows the application
* to read the list item states back directly without putting them in the
@@ -323,19 +337,24 @@ dlg_menu(const char *title,
int old_height = height;
int old_width = width;
#endif
- int i, j, x, y, cur_x, cur_y, box_x, box_y;
+ ALL_DATA all;
+ int i, j, x, y, cur_x, cur_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;
+ int use_width, name_width, text_width, list_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));
+
+ all.items = items;
+ all.item_no = item_no;
dlg_does_output();
dlg_tab_correct_str(prompt);
@@ -344,14 +363,17 @@ dlg_menu(const char *title,
retry:
#endif
- use_height = menu_height;
- if (use_height == 0) {
- min_width = dlg_calc_list_width(item_no, items) + 10;
+ all.menu_height = menu_height;
+ use_width = dlg_calc_list_width(item_no, items) + 10;
+ use_width = MAX(26, use_width);
+ if (all.menu_height == 0) {
/* calculate height without items (4) */
- dlg_auto_size(title, prompt, &height, &width, MIN_HIGH, MAX(26, min_width));
- dlg_calc_listh(&height, &use_height, item_no);
+ dlg_auto_size(title, prompt, &height, &width, MIN_HIGH, use_width);
+ dlg_calc_listh(&height, &all.menu_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 + all.menu_height, use_width);
}
dlg_button_layout(buttons, &width);
dlg_print_size(height, width);
@@ -361,48 +383,54 @@ dlg_menu(const char *title,
y = dlg_box_y_ordinate(height);
dialog = dlg_new_window(height, width, y, x);
+ all.dialog = dialog;
+
dlg_register_window(dialog, "menubox", binding);
dlg_register_buttons(dialog, "menubox", 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);
- menu_width = width - 6;
+ all.menu_width = width - 6;
getyx(dialog, cur_y, cur_x);
- box_y = cur_y + 1;
- box_x = (width - menu_width) / 2 - 1;
+ all.box_y = cur_y + 1;
+ all.box_x = (width - all.menu_width) / 2 - 1;
/*
* After displaying the prompt, we know how much space we really have.
* Limit the list to avoid overwriting the ok-button.
*/
- if (use_height + MIN_HIGH > height - cur_y)
- use_height = height - MIN_HIGH - cur_y;
- if (use_height <= 0)
- use_height = 1;
+ if (all.menu_height + MIN_HIGH > height - cur_y)
+ all.menu_height = height - MIN_HIGH - cur_y;
+ if (all.menu_height <= 0)
+ all.menu_height = 1;
/* Find out maximal number of displayable items at once. */
- max_choice = MIN(use_height,
+ max_choice = MIN(all.menu_height,
RowHeight(item_no));
if (is_inputmenu)
max_choice /= INPUT_ROWS;
/* create new window for the menu */
- menu = dlg_sub_window(dialog, use_height, menu_width,
- y + box_y + 1,
- x + box_x + 1);
+ menu = dlg_sub_window(dialog, all.menu_height, all.menu_width,
+ y + all.box_y + 1,
+ x + all.box_x + 1);
+ all.menu = menu;
+
dlg_register_window(menu, "menu", binding2);
dlg_register_buttons(menu, "menu", buttons);
/* 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);
+ dlg_draw_box(dialog,
+ all.box_y, all.box_x,
+ all.menu_height + 2, all.menu_width + 2,
+ menubox_border_attr, menubox_border2_attr);
name_width = 0;
text_width = 0;
@@ -421,49 +449,58 @@ dlg_menu(const char *title,
*
* FIXME: the gutter width and name/list ratio should be configurable.
*/
- use_width = (menu_width - GUTTER);
- if (text_width + name_width > use_width) {
- int need = (int) (0.30 * use_width);
- if (name_width > need) {
- int want = (int) (use_width
- * ((double) name_width)
- / (text_width + name_width));
- name_width = (want > need) ? want : need;
+ use_width = (all.menu_width - GUTTER);
+ if (dialog_vars.no_tags) {
+ list_width = MIN(use_width, text_width);
+ } else if (dialog_vars.no_items) {
+ list_width = MIN(use_width, name_width);
+ } else {
+ if (text_width >= 0
+ && name_width >= 0
+ && use_width > 0
+ && text_width + name_width > use_width) {
+ int need = (int) (0.30 * use_width);
+ if (name_width > need) {
+ int want = (int) (use_width
+ * ((double) name_width)
+ / (text_width + name_width));
+ name_width = (want > need) ? want : need;
+ }
+ text_width = use_width - name_width;
}
- text_width = use_width - name_width;
+ list_width = (text_width + name_width);
}
- tag_x = (is_inputmenu
- ? 0
- : (use_width - text_width - name_width) / 2);
- item_x = name_width + tag_x + GUTTER;
+ all.tag_x = (is_inputmenu
+ ? 0
+ : (use_width - list_width) / 2);
+ all.item_x = ((dialog_vars.no_tags
+ ? 0
+ : (dialog_vars.no_items
+ ? 0
+ : (GUTTER + name_width)))
+ + all.tag_x);
if (choice - scrollamt >= max_choice) {
scrollamt = choice - (max_choice - 1);
choice = max_choice - 1;
}
- /* Print the menu */
- for (i = 0; i < max_choice; i++) {
- print_item(menu,
- &items[i + scrollamt],
- i,
- (i == choice) ? Selected : Unselected,
- is_inputmenu);
- }
- (void) wnoutrefresh(menu);
+ print_menu(&all, choice, scrollamt, max_choice, is_inputmenu);
/* register the new window, along with its borders */
- dlg_mouse_mkbigregion(box_y + 1, box_x, use_height + 2, menu_width + 2,
+ dlg_mouse_mkbigregion(all.box_y + 1, all.box_x,
+ all.menu_height + 2, all.menu_width + 2,
KEY_MAX, 1, 1, 1 /* by lines */ );
- print_arrows(dialog, box_x, box_y, scrollamt, max_choice, item_no, use_height);
-
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);
+ wmove(dialog,
+ all.box_y + ItemToRow(choice) + 1,
+ all.box_x + all.tag_x + 1);
key = dlg_mouse_wgetch(dialog, &fkey);
if (dlg_result_key(key, fkey, &result))
@@ -500,7 +537,7 @@ dlg_menu(const char *title,
*/
if (button < 0 || !dialog_state.visit_items) {
for (j = scrollamt + choice + 1; j < item_no; j++) {
- if (dlg_match_char(dlg_last_getc(), items[j].name)) {
+ if (check_hotkey(items, j)) {
found = TRUE;
i = j - scrollamt;
break;
@@ -508,7 +545,7 @@ dlg_menu(const char *title,
}
if (!found) {
for (j = 0; j <= scrollamt + choice; j++) {
- if (dlg_match_char(dlg_last_getc(), items[j].name)) {
+ if (check_hotkey(items, j)) {
found = TRUE;
i = j - scrollamt;
break;
@@ -578,95 +615,17 @@ dlg_menu(const char *title,
if (i != choice) {
getyx(dialog, cur_y, cur_x);
if (i < 0 || i >= max_choice) {
-#if defined(NCURSES_VERSION_MAJOR) && NCURSES_VERSION_MAJOR < 5
- /*
- * Using wscrl to assist ncurses scrolling is not needed
- * in version 5.x
- */
- if (i == -1) {
- if (use_height > 1) {
- /* De-highlight current first item */
- print_item(menu,
- &items[scrollamt],
- 0, Unselected, is_inputmenu);
- scrollok(menu, TRUE);
- wscrl(menu, -RowHeight(1));
- scrollok(menu, FALSE);
- }
- scrollamt--;
- print_item(menu,
- &items[scrollamt],
- 0, Selected, is_inputmenu);
- } else if (i == max_choice) {
- if (use_height > 1) {
- /* De-highlight current last item before scrolling up */
- print_item(menu,
- &items[scrollamt + max_choice - 1],
- max_choice - 1,
- Unselected,
- is_inputmenu);
- scrollok(menu, TRUE);
- wscrl(menu, RowHeight(1));
- scrollok(menu, FALSE);
- }
- scrollamt++;
- print_item(menu,
- &items[scrollamt + max_choice - 1],
- max_choice - 1, TRUE,
- is_inputmenu);
- } else
-#endif
- {
- if (i < 0) {
- scrollamt += i;
- choice = 0;
- } else {
- choice = max_choice - 1;
- scrollamt += (i - max_choice + 1);
- }
- for (i = 0; i < max_choice; i++) {
- print_item(menu,
- &items[scrollamt + i],
- i,
- (i == choice) ? Selected : Unselected,
- is_inputmenu);
- }
- }
- /* Clean bottom lines */
- if (is_inputmenu) {
- int spare_lines, x_count;
- spare_lines = use_height % INPUT_ROWS;
- wattrset(menu, menubox_attr);
- for (; spare_lines; spare_lines--) {
- wmove(menu, use_height - spare_lines, 0);
- for (x_count = 0; x_count < menu_width;
- x_count++) {
- waddch(menu, ' ');
- }
- }
+ if (i < 0) {
+ scrollamt += i;
+ choice = 0;
+ } else {
+ choice = max_choice - 1;
+ scrollamt += (i - max_choice + 1);
}
- (void) wnoutrefresh(menu);
- print_arrows(dialog,
- box_x, box_y,
- scrollamt, max_choice, item_no, use_height);
+ print_menu(&all, choice, scrollamt, max_choice, is_inputmenu);
} else {
- /* De-highlight current item */
- print_item(menu,
- &items[scrollamt + choice],
- choice,
- Unselected,
- is_inputmenu);
- /* Highlight new item */
choice = i;
- print_item(menu,
- &items[scrollamt + choice],
- choice,
- Selected,
- is_inputmenu);
- (void) wnoutrefresh(menu);
- print_arrows(dialog,
- box_x, box_y,
- scrollamt, max_choice, item_no, use_height);
+ print_menu(&all, choice, scrollamt, max_choice, is_inputmenu);
(void) wmove(dialog, cur_y, cur_x);
wrefresh(dialog);
}
@@ -687,17 +646,14 @@ dlg_menu(const char *title,
FALSE, width);
break;
case DLGK_ENTER:
- result = dlg_enter_buttoncode(button);
+ 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;
@@ -720,7 +676,7 @@ dlg_menu(const char *title,
if (is_inputmenu && result == DLG_EXIT_EXTRA) {
char *tmp;
- if (input_menu_edit(menu,
+ if (input_menu_edit(&all,
&items[scrollamt + choice],
choice,
&tmp)) {
@@ -732,7 +688,8 @@ dlg_menu(const char *title,
}
} else {
result = DLG_EXIT_UNKNOWN;
- print_item(menu,
+ print_item(&all,
+ menu,
&items[scrollamt + choice],
choice,
Selected,
@@ -789,17 +746,19 @@ dialog_menu(const char *title,
{
int result;
int choice;
- int i;
+ int i, j;
DIALOG_LISTITEM *listitems;
listitems = dlg_calloc(DIALOG_LISTITEM, (size_t) item_no + 1);
assert_ptr(listitems, "dialog_menu");
- for (i = 0; i < item_no; ++i) {
- listitems[i].name = ItemName(i);
- listitems[i].text = ItemText(i);
+ for (i = j = 0; i < item_no; ++i) {
+ listitems[i].name = items[j++];
+ listitems[i].text = (dialog_vars.no_items
+ ? dlg_strempty()
+ : items[j++]);
listitems[i].help = ((dialog_vars.item_help)
- ? ItemHelp(i)
+ ? items[j++]
: dlg_strempty());
}
dlg_align_columns(&listitems[0].text, sizeof(DIALOG_LISTITEM), item_no);
@@ -812,7 +771,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);
diff --git a/contrib/dialog/mixedform.c b/contrib/dialog/mixedform.c
index b2fe538584282..1f18b2f9f3e18 100644
--- a/contrib/dialog/mixedform.c
+++ b/contrib/dialog/mixedform.c
@@ -1,9 +1,9 @@
/*
- * $Id: mixedform.c,v 1.8 2010/04/28 20:54:11 tom Exp $
+ * $Id: mixedform.c,v 1.10 2013/03/17 15:03:41 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-2011,2013 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -112,6 +112,7 @@ dialog_mixedform(const char *title,
dlg_add_separator();
}
}
+ dlg_add_last_key(-1);
}
dlg_free_formitems(listitems);
diff --git a/contrib/dialog/mixedgauge.c b/contrib/dialog/mixedgauge.c
index e15a4df7b0286..b300e078a62a0 100644
--- a/contrib/dialog/mixedgauge.c
+++ b/contrib/dialog/mixedgauge.c
@@ -1,9 +1,9 @@
/*
- * $Id: mixedgauge.c,v 1.24 2011/06/27 08:16:38 tom Exp $
+ * $Id: mixedgauge.c,v 1.30 2012/11/18 16:30:20 tom Exp $
*
* mixedgauge.c -- implements the mixedgauge dialog
*
- * 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
@@ -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;
@@ -122,12 +121,8 @@ myprint_status(DIALOG_MIXEDGAUGE * dlg)
const char *status = "";
char *freeMe = 0;
- if (win) {
- rm -= (2 * MARGIN);
- bm -= (2 * MARGIN);
- }
- if (win != 0)
- getyx(win, last_y, last_x);
+ bm -= (2 * MARGIN);
+ getyx(win, last_y, last_x);
for (item = 0; item < dlg->item_no; ++item) {
chtype attr = A_NORMAL;
@@ -147,7 +142,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 +152,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 +176,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 +189,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 +220,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 +237,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 +248,7 @@ dlg_update_mixedgauge(DIALOG_MIXEDGAUGE * dlg, int percent)
(void) waddch(dlg->dialog, ch);
}
myprint_status(dlg);
+ dlg_trace_win(dlg->dialog);
}
/*
@@ -324,11 +322,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,
- 0, 0,
- dlg->height,
- dlg->width,
- dialog_attr, border_attr);
+ dlg_draw_box2(dlg->dialog,
+ 0, 0,
+ dlg->height,
+ dlg->width,
+ dialog_attr, border_attr, border2_attr);
dlg_draw_title(dlg->dialog, dlg->title);
dlg_draw_helpline(dlg->dialog, FALSE);
@@ -340,7 +338,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);
}
diff --git a/contrib/dialog/mouse.c b/contrib/dialog/mouse.c
index 1dfcb435ff1ed..6a431e160df9d 100644
--- a/contrib/dialog/mouse.c
+++ b/contrib/dialog/mouse.c
@@ -1,9 +1,9 @@
/*
- * $Id: mouse.c,v 1.18 2007/02/22 21:51:38 tom Exp $
+ * $Id: mouse.c,v 1.20 2012/12/21 10:00:30 tom Exp $
*
* mouse.c -- mouse support for dialog
*
- * Copyright 2002-2006,2007 Thomas E. Dickey
+ * Copyright 2002-2007,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
@@ -26,7 +26,7 @@
#if USE_MOUSE
-static int basex, basey;
+static int basex, basey, basecode;
static mseRegion *regionList = NULL;
@@ -52,6 +52,12 @@ dlg_mouse_setbase(int x, int y)
}
void
+dlg_mouse_setcode(int code)
+{
+ basecode = code;
+}
+
+void
dlg_mouse_mkbigregion(int y, int x,
int height, int width,
int code,
@@ -79,7 +85,7 @@ dlg_mouse_mkregion(int y, int x, int height, int width, int code)
{
mseRegion *butPtr;
- if ((butPtr = find_region_by_code(code)) == 0) {
+ if ((butPtr = find_region_by_code(basecode + code)) == 0) {
butPtr = dlg_malloc(mseRegion, 1);
assert_ptr(butPtr, "dlg_mouse_mkregion");
butPtr->next = regionList;
@@ -93,7 +99,7 @@ dlg_mouse_mkregion(int y, int x, int height, int width, int code)
butPtr->Y = basey + y + height;
butPtr->x = basex + x;
butPtr->X = basex + x + width;
- butPtr->code = code;
+ butPtr->code = basecode + code;
}
return butPtr;
}
@@ -105,12 +111,15 @@ any_mouse_region(int y, int x, int small)
mseRegion *butPtr;
for (butPtr = regionList; butPtr; butPtr = butPtr->next) {
- if (small ^ (butPtr->code >= 0))
+ if (small ^ (butPtr->code >= 0)) {
continue;
- if (y < butPtr->y || y >= butPtr->Y)
+ }
+ if (y < butPtr->y || y >= butPtr->Y) {
continue;
- if (x < butPtr->x || x >= butPtr->X)
+ }
+ if (x < butPtr->x || x >= butPtr->X) {
continue;
+ }
break; /* found */
}
return butPtr;
diff --git a/contrib/dialog/mousewget.c b/contrib/dialog/mousewget.c
index 13a021bfc029c..6f5b04356c7de 100644
--- a/contrib/dialog/mousewget.c
+++ b/contrib/dialog/mousewget.c
@@ -1,9 +1,9 @@
/*
- * $Id: mousewget.c,v 1.21 2008/03/16 20:09:03 tom Exp $
+ * $Id: mousewget.c,v 1.22 2012/11/30 10:23:49 tom Exp $
*
* mousewget.c -- mouse/wgetch support for dialog
*
- * Copyright 2000-2006,2008 Thomas E. Dickey
+ * Copyright 2000-2008,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,7 +37,7 @@ mouse_wgetch(WINDOW *win, int *fkey, bool ignore_errs)
#if USE_MOUSE
mouse_err = FALSE;
- if (fkey && (key == KEY_MOUSE)) {
+ if (key == KEY_MOUSE) {
MEVENT event;
mseRegion *p;
diff --git a/contrib/dialog/msgbox.c b/contrib/dialog/msgbox.c
index 25a021be9f984..16e20d2625599 100644
--- a/contrib/dialog/msgbox.c
+++ b/contrib/dialog/msgbox.c
@@ -1,9 +1,9 @@
/*
- * $Id: msgbox.c,v 1.66 2011/06/27 08:36:28 tom Exp $
+ * $Id: msgbox.c,v 1.75 2012/12/01 01:48:08 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);
+ (void) 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,
- last,
- page,
- &show,
- &offset) == 0)
- break;
- beep();
+ 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) {
+ } 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;
}
diff --git a/contrib/dialog/package/debian/changelog b/contrib/dialog/package/debian/changelog
index 51d497e6936af..7c0de2a7e393b 100644
--- a/contrib/dialog/package/debian/changelog
+++ b/contrib/dialog/package/debian/changelog
@@ -1,3 +1,58 @@
+cdialog (20130523) unstable; urgency=low
+
+ * minor fixes
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Thu, 23 May 2013 19:25:01 -0400
+
+cdialog (20130315) unstable; urgency=low
+
+ * minor fixes
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 15 Mar 2013 04:41:20 -0400
+
+cdialog (20121230) unstable; urgency=low
+
+ * new widgets
+ * coverity fixes
+ * configure-script updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 06 Oct 2012 09:19:29 -0400
+
+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.
diff --git a/contrib/dialog/package/dialog.spec b/contrib/dialog/package/dialog.spec
index f5df49460be79..07ec131508577 100644
--- a/contrib/dialog/package/dialog.spec
+++ b/contrib/dialog/package/dialog.spec
@@ -1,9 +1,9 @@
Summary: dialog - display dialog boxes from shell scripts
%define AppProgram dialog
-%define AppVersion 1.1
-%define AppRelease 20110707
+%define AppVersion 1.2
+%define AppRelease 20130523
%define ActualProg c%{AppProgram}
-# $XTermId: dialog.spec,v 1.24 2011/07/07 22:10:02 tom Exp $
+# $XTermId: dialog.spec,v 1.50 2013/05/24 00:13:31 tom Exp $
Name: %{ActualProg}
Version: %{AppVersion}
Release: %{AppRelease}
@@ -28,6 +28,8 @@ compiled into dialog):
This package installs as "cdialog" to avoid conflict with other packages.
%prep
+%define debug_package %{nil}
+
%setup -q -n %{AppProgram}-%{AppVersion}-%{AppRelease}
%build
@@ -53,8 +55,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 +80,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
diff --git a/contrib/dialog/pause.c b/contrib/dialog/pause.c
index c104a700e75e5..acca9b7860262 100644
--- a/contrib/dialog/pause.c
+++ b/contrib/dialog/pause.c
@@ -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,
- gauge_y, 2 + MARGIN,
- 2 + MARGIN, width - 2 * (2 + MARGIN),
- dialog_attr,
- border_attr);
+ dlg_draw_box2(dialog,
+ gauge_y, 2 + MARGIN,
+ 2 + MARGIN, width - 2 * (2 + MARGIN),
+ dialog_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);
}
- (void) wrefresh(dialog);
+ 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);
}
diff --git a/contrib/dialog/po/an.po b/contrib/dialog/po/an.po
new file mode 100644
index 0000000000000..494dabe62ebc4
--- /dev/null
+++ b/contrib/dialog/po/an.po
@@ -0,0 +1,111 @@
+# Dialog
+# Copyright 2003-2007,2008 # Thomas Dickey
+# This file is distributed under the same license as the dialog package.
+# Daniel Martinez <entaltoaragon@gmail.com>, 2013.
+msgid ""
+msgstr ""
+"Project-Id-Version: dialog 1.1.20080819\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-06-18 18:26-0400\n"
+"PO-Revision-Date: 2013-02-19 17:50+0100\n"
+"Last-Translator: Daniel Martinez <entaltoaragon@gmail.com>\n"
+"Language-Team: Aragonese <softaragones@googlegroups.com>\n"
+"Language: an\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: buttons.c:385
+msgid "Yes"
+msgstr "Sí"
+
+#: buttons.c:393
+msgid "No"
+msgstr "No"
+
+#: buttons.c:401
+msgid "OK"
+msgstr "Acceptar"
+
+#: buttons.c:409
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: buttons.c:417
+msgid "EXIT"
+msgstr "Salir"
+
+#: buttons.c:425
+msgid "Extra"
+msgstr "Extra"
+
+#: buttons.c:433
+msgid "Help"
+msgstr "Aduya"
+
+#. Headline "Month"
+#: calendar.c:273
+msgid "Month"
+msgstr "Mes"
+
+#. Headline "Year"
+#: calendar.c:293
+msgid "Year"
+msgstr "Anyo"
+
+#: dialog.c:741
+msgid "Rename"
+msgstr "Renombrar"
+
+#: fselect.c:550
+msgid "Directories"
+msgstr "Directorios"
+
+#: fselect.c:551
+msgid "Files"
+msgstr "Fichers"
+
+#: mixedgauge.c:58
+msgid "Succeeded"
+msgstr "Finalizau con exito"
+
+#: mixedgauge.c:61
+msgid "Failed"
+msgstr "Falló"
+
+#: mixedgauge.c:64
+msgid "Passed"
+msgstr "Pasau"
+
+#: mixedgauge.c:67
+msgid "Completed"
+msgstr "Completau"
+
+#: mixedgauge.c:70
+msgid "Checked"
+msgstr "Comprebau"
+
+#: mixedgauge.c:73
+msgid "Done"
+msgstr "Feito"
+
+#: mixedgauge.c:76
+msgid "Skipped"
+msgstr "Blincau"
+
+#: mixedgauge.c:79
+msgid "In Progress"
+msgstr "En progreso"
+
+#: mixedgauge.c:85
+msgid "N/A"
+msgstr "N/A"
+
+#: mixedgauge.c:193
+msgid "Overall Progress"
+msgstr "Progreso total"
+
+#: textbox.c:489
+msgid "Search"
+msgstr "Buscar"
diff --git a/contrib/dialog/po/cs.po b/contrib/dialog/po/cs.po
index b4a40e97dece5..79868916ccc0b 100644
--- a/contrib/dialog/po/cs.po
+++ b/contrib/dialog/po/cs.po
@@ -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"
diff --git a/contrib/dialog/po/el.po b/contrib/dialog/po/el.po
index 3b87e8e603429..2fadd9bcd880b 100644
--- a/contrib/dialog/po/el.po
+++ b/contrib/dialog/po/el.po
@@ -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 "Αναζήτηση"
diff --git a/contrib/dialog/po/gl.po b/contrib/dialog/po/gl.po
index dc3b900009166..6068e868bf597 100644
--- a/contrib/dialog/po/gl.po
+++ b/contrib/dialog/po/gl.po
@@ -1,68 +1,76 @@
+# Galician translation of dialog
# This file is distributed under the same license as the dialog package.
-# Mensaxes en galego para dialog.
-# Copyright 2003-2006,2007 Thomas Dickey
+# Copyright 2003-2006, 2007 Thomas Dickey
+# Copyright 2012 Leandro Regueiro
+#
# Diego Pérez Montes <kabute@gulo.org>, 2008
+# Leandro Regueiro <leandro.regueiro@gmail.com>, 2012.
+#
+# Proxecto Trasno - Adaptación do software libre á lingua galega: Se desexas
+# colaborar connosco, podes atopar máis información en <http://www.trasno.net>
#
msgid ""
msgstr ""
-"Project-Id-Version: dialog 1.1.20070704\n"
+"Project-Id-Version: dialog 1.1.20080819\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-01-16 17:57-0500\n"
-"PO-Revision-Date: 2008-05-13 23:57+0100\n"
-"Last-Translator: Diego Pérez Montes <kabute@gulo.org>\n"
+"POT-Creation-Date: 2008-06-18 18:26-0400\n"
+"PO-Revision-Date: 2012-11-10 13:53+0200\n"
+"Last-Translator: Leandro Regueiro <leandro.regueiro@gmail.com>\n"
"Language-Team: Galician <proxecto@trasno.net>\n"
"Language: gl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Virtaal 0.7.0\n"
-#: buttons.c:387
+#: buttons.c:385
msgid "Yes"
-msgstr "Sí"
+msgstr "Si"
-#: buttons.c:395
+#: buttons.c:393
msgid "No"
msgstr "Non"
-#: buttons.c:403
+#: buttons.c:401
msgid "OK"
msgstr "Aceptar"
-#: buttons.c:411
+#: buttons.c:409
msgid "Cancel"
msgstr "Cancelar"
-#: buttons.c:419
+#: buttons.c:417
msgid "EXIT"
msgstr "SAÍR"
-#: buttons.c:427
+#: buttons.c:425
msgid "Extra"
-msgstr "Suplementario"
+msgstr "Extra"
-#: buttons.c:435
+#: buttons.c:433
msgid "Help"
msgstr "Axuda"
#. Headline "Month"
-#: calendar.c:298
+#: calendar.c:273
msgid "Month"
msgstr "Mes"
#. Headline "Year"
-#: calendar.c:318
+#: calendar.c:293
msgid "Year"
msgstr "Ano"
-#: dialog.c:756
+#: dialog.c:741
msgid "Rename"
msgstr "Renomear"
-#: fselect.c:571
+#: fselect.c:550
msgid "Directories"
msgstr "Directorios"
-#: fselect.c:572
+#: fselect.c:551
msgid "Files"
msgstr "Ficheiros"
@@ -96,16 +104,16 @@ msgstr "Omitido"
#: mixedgauge.c:79
msgid "In Progress"
-msgstr "En Progreso"
+msgstr "En progreso"
#: mixedgauge.c:85
msgid "N/A"
-msgstr "Non Dispoñible"
+msgstr "Non dispoñíbel"
#: mixedgauge.c:193
msgid "Overall Progress"
-msgstr "Progreso Total"
+msgstr "Progreso total"
-#: textbox.c:468
+#: textbox.c:489
msgid "Search"
-msgstr "Procurar"
+msgstr "Buscar"
diff --git a/contrib/dialog/po/hr.po b/contrib/dialog/po/hr.po
index 6f3f5462b26db..c3661db24325c 100644
--- a/contrib/dialog/po/hr.po
+++ b/contrib/dialog/po/hr.po
@@ -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"
diff --git a/contrib/dialog/po/ia.po b/contrib/dialog/po/ia.po
new file mode 100644
index 0000000000000..dfee2ff17b70c
--- /dev/null
+++ b/contrib/dialog/po/ia.po
@@ -0,0 +1,111 @@
+# Interlingua translation of Dialog
+# Copyright (C) 2012 Free Software Foundation, Inc.
+# This file is distributed under the same license as the dialog package.
+# Nik Kalach <nik.kalach@inbox.ru>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: dialog 1.1.20080819\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-06-18 18:26-0400\n"
+"PO-Revision-Date: 2012-12-04 00:56+0400\n"
+"Last-Translator: Nik Kalach <nik.kalach@inbox.ru>\n"
+"Language-Team: Interlingua <translation-team-ia@lists.sourceforge.net>\n"
+"Language: ia\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: buttons.c:385
+msgid "Yes"
+msgstr "Si"
+
+#: buttons.c:393
+msgid "No"
+msgstr "No"
+
+#: buttons.c:401
+msgid "OK"
+msgstr "OK"
+
+#: buttons.c:409
+msgid "Cancel"
+msgstr "Annullar"
+
+#: buttons.c:417
+msgid "EXIT"
+msgstr "SORTIR"
+
+#: buttons.c:425
+msgid "Extra"
+msgstr "Extra"
+
+#: buttons.c:433
+msgid "Help"
+msgstr "Adjuta"
+
+#. Headline "Month"
+#: calendar.c:273
+msgid "Month"
+msgstr "Mense"
+
+#. Headline "Year"
+#: calendar.c:293
+msgid "Year"
+msgstr "Anno"
+
+#: dialog.c:741
+msgid "Rename"
+msgstr "Renominar"
+
+#: fselect.c:550
+msgid "Directories"
+msgstr "Directorios"
+
+#: fselect.c:551
+msgid "Files"
+msgstr "Files"
+
+#: mixedgauge.c:58
+msgid "Succeeded"
+msgstr "Succedite"
+
+#: mixedgauge.c:61
+msgid "Failed"
+msgstr "Fallite"
+
+#: mixedgauge.c:64
+msgid "Passed"
+msgstr "Passate"
+
+#: mixedgauge.c:67
+msgid "Completed"
+msgstr "Completate"
+
+#: mixedgauge.c:70
+msgid "Checked"
+msgstr "Controlate"
+
+#: mixedgauge.c:73
+msgid "Done"
+msgstr "Facite"
+
+#: mixedgauge.c:76
+msgid "Skipped"
+msgstr "Saltate"
+
+#: mixedgauge.c:79
+msgid "In Progress"
+msgstr "In curso"
+
+#: mixedgauge.c:85
+msgid "N/A"
+msgstr "N/A"
+
+#: mixedgauge.c:193
+msgid "Overall Progress"
+msgstr "Progresso general"
+
+#: textbox.c:489
+msgid "Search"
+msgstr "Cerca"
diff --git a/contrib/dialog/po/sr.po b/contrib/dialog/po/sr.po
index 9414692d6b5ce..46b049dd31a19 100644
--- a/contrib/dialog/po/sr.po
+++ b/contrib/dialog/po/sr.po
@@ -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"
diff --git a/contrib/dialog/po/zh_TW.po b/contrib/dialog/po/zh_TW.po
index eadee70358c69..f96b50a06b7be 100644
--- a/contrib/dialog/po/zh_TW.po
+++ b/contrib/dialog/po/zh_TW.po
@@ -1,15 +1,15 @@
# Traditional Chinese Messages for dialog.
# Copyright (C) 2005 Free Software Foundation, Inc.
# This file is distributed under the same license as the dialog package.
-# Wei-Lun Chao <chaoweilun@gmail.com>, 2005, 2007.
+# Wei-Lun Chao <bluebat@member.fsf.org>, 2005, 2007, 2013.
#
msgid ""
msgstr ""
-"Project-Id-Version: dialog 1.1.20070704\n"
+"Project-Id-Version: dialog 1.1.20080819\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-01-16 17:57-0500\n"
-"PO-Revision-Date: 2007-12-19 23:39+0800\n"
-"Last-Translator: Wei-Lun Chao <chaoweilun@gmail.com>\n"
+"POT-Creation-Date: 2008-06-18 18:26-0400\n"
+"PO-Revision-Date: 2013-02-12 23:39+0800\n"
+"Last-Translator: Wei-Lun Chao <bluebat@member.fsf.org>\n"
"Language-Team: Chinese (traditional) <zh-l10n@linux.org.tw>\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
@@ -17,53 +17,53 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-#: buttons.c:387
+#: buttons.c:385
msgid "Yes"
msgstr "是"
-#: buttons.c:395
+#: buttons.c:393
msgid "No"
msgstr "否"
-#: buttons.c:403
+#: buttons.c:401
msgid "OK"
msgstr "確定"
-#: buttons.c:411
+#: buttons.c:409
msgid "Cancel"
msgstr "取消"
-#: buttons.c:419
+#: buttons.c:417
msgid "EXIT"
msgstr "離開"
-#: buttons.c:427
+#: buttons.c:425
msgid "Extra"
msgstr "其他"
-#: buttons.c:435
+#: buttons.c:433
msgid "Help"
msgstr "求助"
#. Headline "Month"
-#: calendar.c:298
+#: calendar.c:273
msgid "Month"
msgstr "月"
#. Headline "Year"
-#: calendar.c:318
+#: calendar.c:293
msgid "Year"
msgstr "年"
-#: dialog.c:756
+#: dialog.c:741
msgid "Rename"
msgstr "更名"
-#: fselect.c:571
+#: fselect.c:550
msgid "Directories"
msgstr "目錄"
-#: fselect.c:572
+#: fselect.c:551
msgid "Files"
msgstr "檔案"
@@ -107,6 +107,6 @@ msgstr "不明"
msgid "Overall Progress"
msgstr "整體進度"
-#: textbox.c:468
+#: textbox.c:489
msgid "Search"
msgstr "搜尋"
diff --git a/contrib/dialog/prgbox.c b/contrib/dialog/prgbox.c
index a3b3ea6435020..cbb1458278e66 100644
--- a/contrib/dialog/prgbox.c
+++ b/contrib/dialog/prgbox.c
@@ -1,9 +1,9 @@
/*
- * $Id: prgbox.c,v 1.7 2011/06/30 20:44:13 tom Exp $
+ * $Id: prgbox.c,v 1.9 2012/12/02 23:40:30 tom Exp $
*
* prgbox.c -- implements the prg box
*
- * Copyright 2011 Thomas E. Dickey
+ * Copyright 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,12 @@
#include <dialog.h>
+static void
+reapchild(int sig)
+{
+ (void) sig;
+}
+
/*
* Open a pipe which ties stderr and stdout together.
*/
@@ -31,11 +37,11 @@ dlg_popen(const char *command, const char *type)
{
FILE *result = 0;
int fd[2];
- int pid;
- const char *argv[4];
+ char *blob;
+ char **argv;
if ((*type == 'r' || *type != 'w') && pipe(fd) == 0) {
- switch (pid = fork()) {
+ switch (fork()) {
case -1: /* Error. */
(void) close(fd[0]);
(void) close(fd[1]);
@@ -61,11 +67,11 @@ dlg_popen(const char *command, const char *type)
* given command. Also, it needs the command to be parsed into
* tokens.
*/
- argv[0] = "sh";
- argv[1] = "-c";
- argv[2] = command;
- argv[3] = NULL;
- execvp("sh", (char **)argv);
+ if ((blob = malloc(4 + strlen(command))) != 0) {
+ sprintf(blob, "-c %s", command);
+ argv = dlg_string_to_argv(blob);
+ execvp("sh", argv);
+ }
_exit(127);
/* NOTREACHED */
default: /* parent */
@@ -96,6 +102,7 @@ dialog_prgbox(const char *title,
{
int code;
FILE *fp;
+ void (*oldreaper) (int) = signal(SIGCHLD, reapchild);
fp = dlg_popen(command, "r");
if (fp == NULL)
@@ -104,6 +111,7 @@ dialog_prgbox(const char *title,
code = dlg_progressbox(title, cprompt, height, width, pauseopt, fp);
pclose(fp);
+ signal(SIGCHLD, oldreaper);
return code;
}
diff --git a/contrib/dialog/progressbox.c b/contrib/dialog/progressbox.c
index 024e288fac8a4..d9d062033360e 100644
--- a/contrib/dialog/progressbox.c
+++ b/contrib/dialog/progressbox.c
@@ -1,10 +1,10 @@
/*
- * $Id: progressbox.c,v 1.13 2011/06/27 08:18:20 tom Exp $
+ * $Id: progressbox.c,v 1.23 2012/12/21 10:00:05 tom Exp $
*
* progressbox.c -- implements the progress box
*
* Copyright 2005 Valery Reznic
- * Copyright 2006-2011 Thomas E. Dickey
+ * Copyright 2006-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 as
@@ -46,7 +46,7 @@ get_line(MY_OBJ * obj)
int col = 0;
int j, tmpint, ch;
- while (1) {
+ for (;;) {
if ((ch = getc(fp)) == EOF) {
obj->is_eof = 1;
if (col) {
@@ -59,20 +59,23 @@ get_line(MY_OBJ * obj)
break;
if (ch == '\r')
break;
+ if (col >= MAX_LEN)
+ continue;
if ((ch == TAB) && (dialog_vars.tab_correct)) {
tmpint = dialog_state.tab_len
- (col % dialog_state.tab_len);
for (j = 0; j < tmpint; j++) {
- if (col < MAX_LEN)
+ if (col < MAX_LEN) {
obj->line[col] = ' ';
- ++col;
+ ++col;
+ } else {
+ break;
+ }
}
} else {
obj->line[col] = (char) ch;
++col;
}
- if (col >= MAX_LEN)
- break;
}
obj->line[col] = '\0';
@@ -99,6 +102,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 +115,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_ENTER:
- result = button ? DLG_EXIT_HELP : DLG_EXIT_OK;
+ case DLGK_FIELD_NEXT:
+ button = dlg_next_button(buttons, button);
+ redraw = TRUE;
break;
- case DLGK_MOUSE(0):
- result = DLG_EXIT_OK;
+ case DLGK_FIELD_PREV:
+ button = dlg_prev_button(buttons, button);
+ redraw = TRUE;
break;
- case DLGK_MOUSE(1):
- result = DLG_EXIT_HELP;
+ case DLGK_ENTER:
+ result = dlg_ok_buttoncode(button);
break;
default:
- beep();
+ 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 +217,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 +266,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 +285,7 @@ dlg_progressbox(const char *title,
free(prompt);
free(obj);
- return DLG_EXIT_OK;
+ return result;
}
/*
diff --git a/contrib/dialog/rangebox.c b/contrib/dialog/rangebox.c
new file mode 100644
index 0000000000000..c218966736ab3
--- /dev/null
+++ b/contrib/dialog/rangebox.c
@@ -0,0 +1,419 @@
+/*
+ * $Id: rangebox.c,v 1.17 2013/03/17 16:02:00 tom Exp $
+ *
+ * rangebox.c -- implements the rangebox dialog
+ *
+ * Copyright 2012,2013 Thomas E. Dickey
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License, version 2.1
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to
+ * Free Software Foundation, Inc.
+ * 51 Franklin St., Fifth Floor
+ * Boston, MA 02110, USA.
+ */
+
+#include <dialog.h>
+#include <dlg_keys.h>
+
+#define ONE_HIGH 1
+
+#define MIN_HIGH (ONE_HIGH + 1 + (4 * MARGIN))
+#define MIN_WIDE (10 + 2 + (2 * MARGIN))
+
+struct _box;
+
+typedef struct _box {
+ WINDOW *parent;
+ WINDOW *window;
+ int x;
+ int y;
+ int width;
+ int height;
+ int period;
+ int value;
+} BOX;
+
+typedef struct {
+ /* window in which the value and slider are drawn */
+ WINDOW *window;
+ int min_value;
+ int max_value;
+ /* position and width of the numeric field */
+ int value_x;
+ int value_len;
+ int value_col;
+ /* position and width of the slider field */
+ int slide_x;
+ int slide_y;
+ int slide_len;
+ /* current value drawn */
+ int current;
+ /* value to add to make slider move by one cell */
+ int slide_inc;
+} VALUE;
+
+static int
+digits_of(int value)
+{
+ char temp[80];
+ sprintf(temp, "%d", value);
+ return (int) strlen(temp);
+}
+
+static int
+digit_of(VALUE * data)
+{
+ int col = data->value_col;
+ int result = 1;
+
+ while (++col < data->value_len) {
+ result *= 10;
+ }
+ return result;
+}
+
+static bool
+set_digit(VALUE * data, int chr)
+{
+ bool result = FALSE;
+ char buffer[80];
+ long check;
+ char *next = 0;
+
+ sprintf(buffer, "%*d", data->value_len, data->current);
+ buffer[data->value_col] = (char) chr;
+ check = strtol(buffer, &next, 10);
+ if (next == 0 || *next == '\0') {
+ if ((check <= (long) data->max_value) &&
+ (check >= (long) data->min_value)) {
+ result = TRUE;
+ data->current = (int) check;
+ }
+ }
+
+ return result;
+}
+
+/*
+ * This is similar to the gauge code, but differs in the way the number
+ * is displayed, etc.
+ */
+static void
+draw_value(VALUE * data, int value)
+{
+ if (value != data->current) {
+ WINDOW *win = data->window;
+ int y, x;
+ int n;
+ int ranges = (data->max_value + 1 - data->min_value);
+ int offset = (value - data->min_value);
+ int scaled;
+
+ getyx(win, y, x);
+
+ if (ranges > data->slide_len) {
+ scaled = (offset + data->slide_inc) / data->slide_inc;
+ } else if (ranges < data->slide_len) {
+ scaled = (offset + 1) * data->slide_inc;
+ } else {
+ scaled = offset;
+ }
+
+ (void) wattrset(win, gauge_attr);
+ wmove(win, data->slide_y, data->slide_x);
+ for (n = 0; n < data->slide_len; ++n) {
+ (void) waddch(win, ' ');
+ }
+ wmove(win, data->slide_y, data->value_x);
+ wprintw(win, "%*d", data->value_len, value);
+ if ((gauge_attr & A_REVERSE) != 0) {
+ wattroff(win, A_REVERSE);
+ } else {
+ (void) wattrset(win, A_REVERSE);
+ }
+ wmove(win, data->slide_y, data->slide_x);
+ for (n = 0; n < scaled; ++n) {
+ chtype ch2 = winch(win);
+ if (gauge_attr & A_REVERSE) {
+ ch2 &= ~A_REVERSE;
+ }
+ (void) waddch(win, ch2);
+ }
+ (void) wattrset(win, dialog_attr);
+
+ wmove(win, y, x);
+ data->current = value;
+
+ dlg_trace_msg("drew %d offset %d scaled %d limit %d inc %d\n",
+ value,
+ offset,
+ scaled,
+ data->slide_len,
+ data->slide_inc);
+
+ dlg_trace_win(win);
+ }
+}
+
+/*
+ * Allow the user to select from a range of values, e.g., using a slider.
+ */
+int
+dialog_rangebox(const char *title,
+ const char *cprompt,
+ int height,
+ int width,
+ int min_value,
+ int max_value,
+ int default_value)
+{
+ /* *INDENT-OFF* */
+ static DLG_KEYS_BINDING binding[] = {
+ DLG_KEYS_DATA( DLGK_DELETE_RIGHT,KEY_DC ),
+ HELPKEY_BINDINGS,
+ ENTERKEY_BINDINGS,
+ DLG_KEYS_DATA( DLGK_ENTER, ' ' ),
+ DLG_KEYS_DATA( DLGK_FIELD_NEXT, CHR_NEXT ),
+ DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_RIGHT ),
+ DLG_KEYS_DATA( DLGK_FIELD_NEXT, TAB ),
+ DLG_KEYS_DATA( DLGK_FIELD_PREV, CHR_BACKSPACE ),
+ DLG_KEYS_DATA( DLGK_FIELD_PREV, CHR_PREVIOUS ),
+ DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
+ DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_LEFT ),
+ DLG_KEYS_DATA( DLGK_ITEM_FIRST, KEY_HOME),
+ DLG_KEYS_DATA( DLGK_ITEM_LAST, KEY_END),
+ DLG_KEYS_DATA( DLGK_ITEM_LAST, KEY_LL ),
+ DLG_KEYS_DATA( DLGK_ITEM_NEXT, '+'),
+ DLG_KEYS_DATA( DLGK_ITEM_NEXT, KEY_DOWN),
+ DLG_KEYS_DATA( DLGK_ITEM_PREV, '-' ),
+ DLG_KEYS_DATA( DLGK_ITEM_PREV, KEY_UP ),
+ DLG_KEYS_DATA( DLGK_PAGE_NEXT, KEY_NEXT),
+ DLG_KEYS_DATA( DLGK_PAGE_NEXT, KEY_NPAGE),
+ DLG_KEYS_DATA( DLGK_PAGE_PREV, KEY_PPAGE ),
+ DLG_KEYS_DATA( DLGK_PAGE_PREV, KEY_PREVIOUS ),
+ END_KEYS_BINDING
+ };
+ /* *INDENT-ON* */
+
+#ifdef KEY_RESIZE
+ int old_height = height;
+ int old_width = width;
+#endif
+ VALUE data;
+ int key = 0, key2, fkey;
+ int button;
+ int result = DLG_EXIT_UNKNOWN;
+ WINDOW *dialog;
+ int state = dlg_default_button();
+ const char **buttons = dlg_ok_labels();
+ char *prompt = dlg_strclone(cprompt);
+ char buffer[MAX_LEN];
+ int cur_value = default_value;
+ int usable;
+ int ranges;
+ int yorg, xorg;
+
+ if (max_value < min_value)
+ max_value = min_value;
+ if (cur_value > max_value)
+ cur_value = max_value;
+ if (cur_value < min_value)
+ cur_value = min_value;
+
+ dlg_does_output();
+
+#ifdef KEY_RESIZE
+ retry:
+#endif
+
+ dlg_auto_size(title, prompt, &height, &width, 0, 0);
+ height += MIN_HIGH;
+ if (width < MIN_WIDE)
+ width = MIN_WIDE;
+ dlg_button_layout(buttons, &width);
+ dlg_print_size(height, width);
+ dlg_ctl_size(height, width);
+
+ dialog = dlg_new_window(height, width,
+ yorg = dlg_box_y_ordinate(height),
+ xorg = dlg_box_x_ordinate(width));
+
+ data.window = dialog;
+
+ data.min_value = min_value;
+ data.max_value = max_value;
+
+ usable = (width - 2 - 4 * MARGIN);
+ ranges = max_value - min_value + 1;
+
+ /*
+ * Center the number after allowing for its maximum number of digits.
+ */
+ data.value_len = digits_of(max_value);
+ if (digits_of(min_value) > data.value_len)
+ data.value_len = digits_of(min_value);
+ data.value_x = (usable - data.value_len) / 2 + MARGIN;
+ data.value_col = data.value_len - 1;
+
+ /*
+ * The slider is scaled, to try to use the width of the dialog.
+ */
+ if (ranges > usable) {
+ data.slide_inc = (ranges + usable - 1) / usable;
+ data.slide_len = 1 + ranges / data.slide_inc;
+ } else if (ranges < usable) {
+ data.slide_inc = usable / ranges;
+ data.slide_len = ranges * data.slide_inc;
+ } else {
+ data.slide_inc = 1;
+ data.slide_len = usable;
+ }
+ data.slide_x = (usable - data.slide_len) / 2 + MARGIN + 2;
+ data.slide_y = height - 5;
+
+ data.current = cur_value - 1;
+
+ dlg_register_window(dialog, "rangebox", binding);
+ dlg_register_buttons(dialog, "rangebox", buttons);
+
+ dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
+ dlg_mouse_setbase(xorg, yorg);
+ dlg_mouse_mkregion(data.slide_y - 1, data.slide_x - 1, 3, usable + 2, 'i');
+ dlg_draw_box2(dialog,
+ height - 6, data.slide_x - MARGIN,
+ 2 + MARGIN, data.slide_len + 2 * MARGIN,
+ 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);
+
+ (void) wattrset(dialog, dialog_attr);
+ dlg_print_autowrap(dialog, prompt, height, width);
+
+ dlg_trace_win(dialog);
+ while (result == DLG_EXIT_UNKNOWN) {
+ draw_value(&data, cur_value);
+ button = (state < 0) ? 0 : state;
+ dlg_draw_buttons(dialog, height - 2, 0, buttons, button, FALSE, width);
+ if (state < 0) {
+ data.value_col = data.value_len + state;
+ wmove(dialog, data.slide_y, data.value_x + data.value_col);
+ }
+
+ key = dlg_mouse_wgetch(dialog, &fkey);
+ if (dlg_result_key(key, fkey, &result))
+ break;
+
+ if ((key2 = dlg_char_to_button(key, buttons)) >= 0) {
+ result = key2;
+ } else {
+ /* handle function-keys */
+ if (fkey) {
+ switch (key) {
+ case DLGK_ENTER:
+ result = dlg_ok_buttoncode(button);
+ break;
+ case DLGK_FIELD_PREV:
+ if (state < 0 && state > -data.value_len) {
+ --state;
+ } else {
+ state = dlg_prev_ok_buttonindex(state, -data.value_len);
+ }
+ break;
+ case DLGK_FIELD_NEXT:
+ if (state < 0) {
+ ++state;
+ } else {
+ state = dlg_next_ok_buttonindex(state, -data.value_len);
+ }
+ break;
+ case DLGK_ITEM_FIRST:
+ cur_value = min_value;
+ break;
+ case DLGK_ITEM_LAST:
+ cur_value = max_value;
+ break;
+ case DLGK_ITEM_PREV:
+ if (state < 0) {
+ cur_value -= digit_of(&data);
+ } else {
+ cur_value -= 1;
+ }
+ if (cur_value < min_value)
+ cur_value = min_value;
+ break;
+ case DLGK_ITEM_NEXT:
+ if (state < 0) {
+ cur_value += digit_of(&data);
+ } else {
+ cur_value += 1;
+ }
+ if (cur_value > max_value)
+ cur_value = max_value;
+ break;
+ case DLGK_PAGE_PREV:
+ cur_value -= data.slide_inc;
+ if (cur_value < min_value)
+ cur_value = min_value;
+ break;
+ case DLGK_PAGE_NEXT:
+ cur_value += data.slide_inc;
+ if (cur_value > max_value)
+ cur_value = max_value;
+ break;
+#ifdef KEY_RESIZE
+ case KEY_RESIZE:
+ /* reset data */
+ height = old_height;
+ width = old_width;
+ /* repaint */
+ dlg_clear();
+ dlg_del_window(dialog);
+ refresh();
+ dlg_mouse_free_regions();
+ goto retry;
+#endif
+ case DLGK_MOUSE('i'):
+ state = -data.value_len;
+ break;
+ default:
+ if (is_DLGK_MOUSE(key)) {
+ result = dlg_ok_buttoncode(key - M_EVENT);
+ if (result < 0)
+ result = DLG_EXIT_OK;
+ }
+ break;
+ }
+ } else if (isdigit(key) && state < 0) {
+ if (set_digit(&data, key)) {
+ cur_value = data.current;
+ data.current--;
+ }
+ } else {
+ beep();
+ }
+ }
+ }
+
+ sprintf(buffer, "%d", cur_value);
+ dlg_add_result(buffer);
+ dlg_add_separator();
+ dlg_add_last_key(-1);
+
+ dlg_del_window(dialog);
+ dlg_mouse_free_regions();
+ free(prompt);
+
+ return result;
+}
diff --git a/contrib/dialog/rc.c b/contrib/dialog/rc.c
index 2e2c7e658ef36..4a1345508961e 100644
--- a/contrib/dialog/rc.c
+++ b/contrib/dialog/rc.c
@@ -1,9 +1,9 @@
/*
- * $Id: rc.c,v 1.47 2011/06/20 22:30:04 tom Exp $
+ * $Id: rc.c,v 1.51 2012/11/30 21:32:39 tom Exp $
*
* rc.c -- routines for processing the configuration file
*
- * 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
@@ -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)
@@ -213,13 +214,27 @@ str_to_attr(char *str, int *fg, int *bg, int *hl)
int i = 0, get_fg = 1;
unsigned j;
char tempstr[MAX_LEN + 1], *part;
-
- if (str[0] != '(' || lastch(str) != ')')
+ size_t have;
+
+ 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);
- lastch(tempstr) = '\0';
+ have = strlen(str);
+ if (have > MAX_LEN) {
+ have = MAX_LEN - 1;
+ } else {
+ have -= 2;
+ }
+ memcpy(tempstr, str + 1, have);
+ tempstr[have] = '\0';
/* get foreground and background */
@@ -424,13 +439,29 @@ 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);
- 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));
+ 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 +538,10 @@ dlg_parse_rc(void)
lastch(str) = '\0';
if (begins_with(str, "bindkey", &params)) {
- 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 */
diff --git a/contrib/dialog/rename.sh b/contrib/dialog/rename.sh
index 4ddd970001339..0151541c9b5ad 100755
--- a/contrib/dialog/rename.sh
+++ b/contrib/dialog/rename.sh
@@ -1,7 +1,7 @@
#! /bin/sh
-# $Id: rename.sh,v 1.3 2011/01/06 10:51:02 tom Exp $
+# $Id: rename.sh,v 1.4 2012/12/19 10:17:36 tom Exp $
##############################################################################
-# Copyright (c) 2011 Thomas E. Dickey #
+# Copyright (c) 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"), #
@@ -54,6 +54,7 @@ sed -e "s,^\.ds p dialog\>,.ds p $BINARY," \
-e "s,^\.ds l dialog\>,.ds l $PACKAGE," \
-e "s,^\.ds L Dialog\>,.ds L $ONE_CAPS," \
-e "s,^\.ds D DIALOG\>,.ds D $ALL_CAPS," \
+ -e 's,^dialog \\- ,'"$PACKAGE"' \\- ,' \
<$SOURCE >source.tmp
"$@" source.tmp $TARGET
rm -f source.tmp
diff --git a/contrib/dialog/samples/README b/contrib/dialog/samples/README
index 91f668f014e24..604197c3dd8b4 100644
--- a/contrib/dialog/samples/README
+++ b/contrib/dialog/samples/README
@@ -1,40 +1,7 @@
--- $Id: README,v 1.3 2007/01/11 22:52:19 tom Exp $
+-- $Id: README,v 1.4 2012/12/02 18:52:52 tom Exp $
You can set the environment-variable DIALOG to whatever program you
want to check. Default is "dialog".
Use "export DIALOG=/usr/bin/dialog" for sh or "setenv DIALOG ../dialog" for csh
to test the /usr/bin/dialog program.
-
--- Here is the original README for the samples directory.
-
-There is no documentation at the moment for cdialog 0.9a, but here are a
-small installer (copismall) for 'points' fido-like, that uses cdialog 0.9a.
-It can demonstrate some of the new features... run "copismall" paying
-attention because after asking for some things, it then installs and/or
-configures programs like as Inn, Ifmail, Smail to make the 'point'.
-It's in Italian language only at moment, but the code is bash......
-If you want look at other much professional products FREE realized with
-cdialog and that use much of the other new characteristics, look for one of
-the ComeOn Point Suites v1.1+. Makers are a sub-group of the ComeOn Linux
-Development Team... ComeOn Linux! follows GNU philosophy.
-
-Mail demarco_p@abramo.it to have the actual location of these Suites and
-of other free ComeOn Linux! software, or if you want more info about
-ComeOn Linux!
-
-To run the "ComeOn Point Installer! v0.9a.small", type:
-$ copismall
-
-Other external samples could be:
-
-copa - ComeOn Point Administrator! v0.8
-copm - ComeOn Point Maintainer! v0.2
-copi - ComeOn Point Installer! v0.9 (system-wide version of copi)
-coepi - ComeOn Expert Point Installer! v1.3 (Professional)
-
-cops - ComeOn Point Suite! v1.1
-copsp - ComeOn Point Suite Professional! v1.1
-
-coui - ComeOn UUCP Installer! v0.1 (makes dialup networks in a moment)
-
diff --git a/contrib/dialog/samples/buildlist b/contrib/dialog/samples/buildlist
new file mode 100755
index 0000000000000..72d871f7a149a
--- /dev/null
+++ b/contrib/dialog/samples/buildlist
@@ -0,0 +1,20 @@
+#!/bin/sh
+# $Id: buildlist,v 1.2 2012/12/04 11:45:21 tom Exp $
+
+. ./setup-vars
+
+. ./setup-tempfile
+
+$DIALOG --title "BUILDLIST DEMO" --backtitle "A user-built list" \
+ --separator "|" \
+ --buildlist "hello, this is a --buildlist..." 0 0 0 \
+ "1" "Item number 1" "on" \
+ "2" "Item number 2" "off" \
+ "3" "Item number 3" "on" \
+ "4" "Item number 4" "on" \
+ "5" "Item number 5" "off" \
+ "6" "Item number 6" "on" 2> $tempfile
+
+retval=$?
+
+. ./report-tempfile
diff --git a/contrib/dialog/samples/buildlist2 b/contrib/dialog/samples/buildlist2
new file mode 100755
index 0000000000000..d5cbfb7d25e99
--- /dev/null
+++ b/contrib/dialog/samples/buildlist2
@@ -0,0 +1,42 @@
+#!/bin/sh
+# $Id: buildlist2,v 1.6 2012/12/23 22:28:12 tom Exp $
+
+. ./setup-vars
+
+. ./setup-edit
+
+count=0
+ls -1 | while true
+do
+ read filename
+ test -z "$filename" && break
+ case $filename in
+ *.*)
+ state=off
+ ;;
+ *-*)
+ state=on
+ ;;
+ *)
+ continue
+ ;;
+ esac
+ case "x$DIALOGOPTS" in
+ *--no-items*|*--noitem*)
+ echo $filename $state >>$input
+ ;;
+ *)
+ echo $count $filename $state >>$input
+ ;;
+ esac
+ count=`expr $count + 1`
+done
+
+$DIALOG --title "BUILDLIST DEMO" --backtitle "A user-built list" \
+ --visit-items --scrollbar --separator "|" \
+ --buildlist "hello, this is a --buildlist..." 0 0 10 `cat $input` 2> $output
+
+retval=$?
+
+tempfile=$output
+. ./report-tempfile
diff --git a/contrib/dialog/samples/checklist12 b/contrib/dialog/samples/checklist12
new file mode 100755
index 0000000000000..e23f88b9072b7
--- /dev/null
+++ b/contrib/dialog/samples/checklist12
@@ -0,0 +1,44 @@
+#! /bin/sh
+# $Id: checklist12,v 1.3 2012/12/23 22:27:51 tom Exp $
+
+. ./setup-vars
+
+. ./setup-edit
+
+case "x$DIALOGOPTS" in
+*--no-items*|*--noitem*)
+ CUT="cut -d: -f1,3"
+ ;;
+*)
+ CUT="cat"
+ ;;
+esac
+
+$CUT >$input <<-EOF
+ Apple:It's an apple.:off
+ Dog:No, that's not my dog.:ON
+ Orange:Yeah, that's juicy.:off
+ Chicken:Normally not a pet.:off
+ Cat:No, never put a dog and a cat together!:oN
+ Fish:Cats like fish.:On
+ Lemon:You know how it tastes.:on
+EOF
+cat $input | sed -e 's/^/"/' -e 's/:/" "/g' -e 's/$/"/' >$output
+cat $output >$input
+
+$DIALOG --backtitle "No Such Organization" \
+ --title "CHECKLIST BOX" "$@" \
+ --checklist "Hi, this is a checklist box. You can use this to \n\
+present a list of choices which can be turned on or \n\
+off. If there are more items than can fit on the \n\
+screen, the list will be scrolled. You can use the \n\
+UP/DOWN arrow keys, the first letter of the choice as a \n\
+hot key, or the number keys 1-9 to choose an option. \n\
+Press SPACE to toggle an option on/off. \n\n\
+ Which of the following are fruits?" 20 61 5 \
+ --file $input 2> $output
+
+retval=$?
+
+tempfile=$output
+. ./report-tempfile
diff --git a/contrib/dialog/samples/copifuncs/admin.funcs b/contrib/dialog/samples/copifuncs/admin.funcs
deleted file mode 100755
index 27800dc876f5e..0000000000000
--- a/contrib/dialog/samples/copifuncs/admin.funcs
+++ /dev/null
@@ -1,200 +0,0 @@
-#!/bin/bash
-# $Id: admin.funcs,v 1.2 2001/01/15 22:20:11 tom Exp $
-#
-# ComeOn Point Functions! v0.9.2
-# - usate da vari altri moduli ComeOn Point...
-#
-# AUTHOR: Beppe (beppe.dem@nsm.it)
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-
-# Args: source_file, domain, nldir
-install_nodelist() {
-
- NODELIST="$1"
- FOR_DOMAIN="$2"
- NODEDIR="$3"
-
- dialog --backtitle "$TITLE" --infobox "Installo la nodelist '$NODELIST' per il domain $FOR_DOMAIN, attendere prego..." 0 0
-
- cp "$NODELIST" $NODEDIR/$FOR_DOMAIN.ndl
- chown fnet.uucp $NODEDIR/$FOR_DOMAIN.ndl
-
- echo "y" | su -l fnet -c "ifindex" >/dev/null
-}
-
-# Args: source, dest
-add_alias() {
-
- SOURCE=$1
- DEST=$2
- ALIASES=/etc/aliases
- ENTRY="`grep $SOURCE: $ALIASES`"
-
- dialog --backtitle "$TITLE" --infobox "Creo un alias per redirigere le mail per $SOURCE a $DEST ..." 0 0
-
- if [ ! "$ENTRY" ]
- then
- echo "$SOURCE: $DEST" >>$ALIASES
- else
- OLDDEST="`echo $ENTRY | cut -f2 -d:`"
- mkstemp alias
- sed /"$SOURCE:"/s/"$OLDDEST"/" $DEST"/ $ALIASES >$tmp_alias
- cat $tmp_alias >$ALIASES
- rm $tmp_alias
- fi
- mkaliases >/dev/null
-}
-
-# Args: Areas_pathname, newsgroup, area_ftn, description [, expire_days]
-# Returns: 1 - innd not running
-# 2 - already existing newsgroup
-# 3 - already existing ftn_area
-create_newsgroup() {
-
- AREAS="$1"
- NEWSGROUP="$2"
- AREA="$3"
- DESCRIPTION="$4"
- EXPIRE_DAYS="$5"
-
- NEWSGROUPS=~news/newsgroups
- EXPIRECTL=~news/expire.ctl
-
- dialog --backtitle "$TITLE" --infobox "Creo il newsgroup $NEWSGROUP per contenere i messaggi dell'area $AREA..." 0 0
-
- if [ ! "`ps ax | grep ~news/etc/innd`" ]
- then
- return 1
- fi
-
- if [ "`cut $NEWSGROUPS -f1 | cut -f1 -d\ | grep -x $NEWSGROUP`" ]
- then
- return 2
- fi
-
- if [ "`cut $AREAS -f1 | cut -f1 -d\ | grep -x $AREA`" ]
- then
- return 3
- fi
-
- su -l news -c "bin/ctlinnd newgroup $NEWSGROUP" >/dev/null
- echo -e "$NEWSGROUP\t$DESCRIPTION" >> $NEWSGROUPS
- echo -e "$AREA\t$NEWSGROUP\t`echo $NEWSGROUP | cut -f1 -d.`" >> $AREAS
-
- if [ "$EXPIRE_DAYS" ]; then
- echo "$NEWSGROUP:A:2:$EXPIRE_DAYS:$EXPIRE_DAYS" >> $EXPIRECTL
- fi
-
- chown news.news $NEWSGROUPS $EXPIRECTL
- chmod 440 $EXPIRECTL
- chown fnet.uucp $AREAS
-}
-
-# Returns: 0 if ok, 1 if (innd not running), 2 if (no that newsgroup)
-# Args: Areas_pathname, newsgroup
-rmgroup() {
-
- AREAS=$1
- NEWSGR=$2
- NEWSGROUPS=~news/newsgroups
- EXPIRE=~news/expire.ctl
-
- dialog --backtitle "$TITLE" --infobox "Elimino il newsgroup $NEWSGR ed i messaggi in esso contenuti, attendere prego. Questa operazione potrebbe durare alcuni minuti." 0 0
-
- if [ ! "`ps x | grep ~news/etc/innd`" ]
- then
- return 1
- fi
-
- if [ ! "`cut -f1 $NEWSGROUPS | cut -f1 -d\ | grep -x $NEWSGR`" ]
- then
- return 2
- else
-
-# Updating newsgroups file
- if [ -f $NEWSGROUPS ]
- then
- mkstemp groups
- mv $NEWSGROUPS $NEWSGROUPS~
- grep -v $NEWSGR $NEWSGROUPS~ >$tmp_groups
- mv $tmp_groups $NEWSGROUPS
- else
- :> $NEWSGROUPS
- fi
- chown news.news $NEWSGROUPS
-
-# Updating Areas file
- if [ -f $AREAS ]
- then
- mkstemp areas
- mv $AREAS $AREAS~
- grep -v $NEWSGR $AREAS~ >$tmp_areas
- mv $tmp_areas $AREAS
- else
- :> $AREAS
- fi
- chown fnet.uucp $AREAS
-
-# Updating expire.ctl file
- if [ -f $EXPIRE ]
- then
- mkstemp expire
- mv $EXPIRE $EXPIRE~
- grep -v "$NEWSGR:" $EXPIRE~ >$tmp_expire
- mv $tmp_expire $EXPIRE
- else
- :> $EXPIRE
- fi
- chown news.news $EXPIRE
- chmod 444 $EXPIRE
-# Remove pending articles
- echo -e "\n$NEWSGR:A:0:0:0" >>$EXPIRE
- su -l news -c "bin/news.daily" >/dev/null
- mkstemp expire
- grep -v $NEWSGR $EXPIRE >$tmp_expire
- mv $tmp_expire $EXPIRE
- chown news.news $EXPIRE
- chmod 444 $EXPIRE
-
-# Updating active file
- su -l news -c "bin/ctlinnd rmgroup $NEWSGR" >/dev/null
- fi
-}
-
-# Args: newsgroups_wildmat, days_to_keep
-set_expire_time() {
-
- NEWSGROUP="$1"
- KEEPDAYS="$2"
- EXPIRE=~news/expire.ctl
-
- dialog --backtitle "$TITLE" --infobox "Imposto a $KEEPDAYS il numero di giorni di mantenimento dei messaggi del newsgroup $NEWSGROUP..." 0 0
-
- if [ ! -f $EXPIRE ]
- then
- :> $EXPIRE
-
- elif [ "`cut $EXPIRE -s -f1 -d: | grep -x $NEWSGROUP`" ]
- then
- mkstemp expire
- grep -v "$NEWSGROUP:" $EXPIRE >$tmp_expire
- mv $tmp_expire $EXPIRE
- fi
- echo -e "\n$NEWSGROUP:A:2:$KEEPDAYS:$KEEPDAYS" >>$EXPIRE
- chown news.news $EXPIRE
- chmod 444 $EXPIRE
-}
diff --git a/contrib/dialog/samples/copifuncs/common.funcs b/contrib/dialog/samples/copifuncs/common.funcs
deleted file mode 100644
index 04eca9a84000f..0000000000000
--- a/contrib/dialog/samples/copifuncs/common.funcs
+++ /dev/null
@@ -1,338 +0,0 @@
-#
-# ComeOn Point Functions! v0.9.2
-# - usate da vari altri moduli ComeOn Point...
-#
-# AUTHOR: Beppe (beppe.dem@nsm.it)
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-
-save() {
- if [ -f $1 ]
- then
- mv $1 $1~
- fi
-}
-
-# Returns $PKG_TO_REMOVE
-find_incompatible_packages() {
- dialog --backtitle "$TITLE" --infobox "Vediamo innanzitutto se c'e' qualche pacchetto di troppo ... ;-)" 0 0
-
- PKG_TO_REMOVE=""
- for i in sendmail smailcfg cnews
- do
- if [ -f /var/adm/packages/$i ]
- then
- PKG_TO_REMOVE="$PKG_TO_REMOVE $i"
- fi
- done
-}
-
-# Returns $PKG_TO_INSTALL
-find_necessary_packages() {
- dialog --backtitle "$TITLE" --infobox "Controlliamo se manca qualche pacchetto..." 0 0
-
- PKG_TO_INSTALL=""
- for i in tcpip mailx inn
- do
- if [ ! -f /var/adm/packages/$i ]
- then
- PKG_TO_INSTALL="$PKG_TO_INSTALL $i"
- fi
- done
-}
-
-# Args: user, editor
-configure_trn() {
- dialog --backtitle "$TITLE" --infobox "Configuro trn all'user $1..." 0 0
-
- SHELL_USED="`basename \`cut /etc/passwd -f1,7 -d: | grep $1: | cut -f2 -d:\``"
- USER_HOME="`cut /etc/passwd -f1,6 -d: | grep $1: | cut -f2 -d:`"
- TRNRC="$USER_HOME/.trnrc"
-
- case $SHELL_USED in
- bash)
- if [ -f $USER_HOME/.bash_profile ]
- then
- PROF=$USER_HOME/.bash_profile
- else
- PROF=$USER_HOME/.profile
- fi;;
- zsh)
- PROF=$USER_HOME/.zprofile;;
- *)
- PROF=$USER_HOME/.profile;;
- esac
-
- if [ ! -f $PROF ]
- then
- :>$PROF
- chown $1.mail $PROF
- elif [ ! "`grep -x \". ~/.trnrc\" $PROF`" ]
- then
- echo -e "\n. ~/.trnrc" >>$PROF
- fi
-
- save $TRNRC
-
- echo "EDITOR=\"$2\"" > $TRNRC
- cat copi.trnrc >> $TRNRC
- chown $1.mail $TRNRC
-}
-
-# Args: user, editor
-configure_elm() {
- USER=$1
- EDIT=$2
-
- dialog --backtitle "$TITLE" --infobox "Configuro elm all'user $USER..." 0 0
-
- USER_HOME="`cut /etc/passwd -f1,6 -d: | grep $USER: | cut -f2 -d:`"
- DIRRC="$USER_HOME/.elm"
- ELMRC="$DIRRC/elmrc"
-
- mkdir -p $DIRRC -m 700
- chown $USER.mail $USERHOME $DIRRC
-
- save $ELMRC
-
- cat <<EOF >$ELMRC
-#
-# .elm/elmrc - options file for the ELM mail system
-#
-# Generated by $PKTNAME for $USER
-#
-
-# For yes/no settings with ?, ON means yes, OFF means no
-
-# how to sort the alias list, "Name" by default
-### aliassortby = Name
-
-# name of editor to use for replies that have text
-alteditor = $EDIT
-
-# alternative addresses that I could receive mail from (usually a
-# forwarding mailbox) and don't want to have listed...
-### alternatives =
-
-# should the default be to delete messages we've marked for deletion?
-alwaysdelete = ON
-
-# should the default be to keep unread messages in the incoming mailbox?
-alwayskeep = ON
-
-# should the default be to store read messages to the "received" folder?
-alwaysstore = OFF
-
-# should we use the "->" rather than the inverse video bar?
-arrow = OFF
-
-# should the message disposition questions be displayed(ON) or
-# auto-answered(OFF) with the default answers when we resync or
-# change folders?
-ask = OFF
-
-# would you like to be asked for Carbon-Copies information each msg?
-askcc = OFF
-
-# attribution string for replies ('%s' is the author of original message)
-attribution = %s wrote:
-
-# automatically copy message being replied to into buffer?
-autocopy = ON
-
-# threshold for bouncing copies of remote uucp messages...
-# zero = disable function.
-### bounceback = 0
-
-# This is used to determine if the builtin pager should be used on some
-# messages even if you would usually use an external pager program.
-# There are two ways of determining whether the builtin pager should be
-# used. If you want any message that is shorter than "n" lines to use the
-# internal pager, set the parameter to "n". If you want the builtin
-# pager to be used if the message is "m" lines shorter than the number of
-# lines on your screen set the parameter to be "-m". Setting the
-# parameter to zero will result in the message always being sent through
-# your external pager.
-### builtinlines = -3
-
-# where to save calendar entries
-#calendar = /root/calendar
-
-# list of options that can be configured at the "o)ptions" screen
-configoptions = ^_cdefsopyv_am_un
-
-# Should elm always ask the user to confirm before it appends
-# messages to any existing file?
-# This is used for both folders in the user's mail directory
-# and ordinary files.
-confirmappend = OFF
-
-# Should elm always ask the user to confirm before it creates
-# any new files?
-# This is used for both folders in the user's mail directory
-# and ordinary files.
-confirmcreate = OFF
-
-# Should elm ask for confirmation before it appends a message
-# to an existing file that is not a folder in the user's Mail
-# directory?
-# This is used for ordinary files only and does not affect
-# folders in the user's mail directory.
-confirmfiles = OFF
-
-# Should elm ask for confirmation before it creates a new folder
-# in the user's Mail directory?
-# This is used only for folders in the user's mail directory and
-# does not affect ordinary files.
-confirmfolders = OFF
-
-# save a copy of all outbound messages?
-copy = ON
-
-# name of editor for ~e command (when editor="builtin")
-easyeditor = $EDIT
-
-# what editor to use ("none" means simulate Berkeley Mail)
-editor = $EDIT
-
-# the character to use in the builtin editor for entering commands
-### escape = ~
-
-# save outbound messages by login name of sender/recipient even if the
-# associated folder doesn't already exist?
-### forcename = OFF
-
-# do we want to be able to mail out AT&T Mail Forms?
-### forms = OFF
-
-# The full user name for outbound mail
-### fullname = $PKTNAME User
-
-# should we keep folders from which all messages are deleted?
-### keepempty = OFF
-
-# are we running on an HP terminal and want HOME, PREV, NEXT, etc...?
-### keypad = OFF
-
-# local ".signature" file to append to appropriate messages...
-localsignature = ~/.signature
-
-# where to save my mail to, default directory is "Mail"
-maildir = ~/Mail
-
-# should we display the three-line 'mini' menu?
-menu = ON
-
-# would you like a copy of a message you send to an alias you are on?
-### metoo = OFF
-
-# when using the page commands (+ - <NEXT> <PREV>) change the current
-# message pointer...?
-### movepage = OFF
-
-# just show the names when expanding aliases?
-names = OFF
-
-# when messages are copied into the outbound buffer, don't include headers?
-noheader = ON
-
-# program to use for displaying messages ('builtin' is recommended)
-### pager = builtin+
-
-# start up by pointing to the first new message received, if possible?
-### pointnew = ON
-
-# list of delivery precedences allowed, or empty to allow anything
-# precedence may be followed by optional ":priority" specification
-### precedences =
-
-# prefix sequence for indenting included message text in outgoing messages...
-prefix = _:>_
-
-# how to print a message ('%s' is the filename)
-### print = /bin/cat %s | /usr/bin/lpr
-
-# prompt for a command after the external pager exits?
-### promptafter = ON
-
-# Value by which message count is incremented while reading a new mailbox.
-# Setting this value to a number larger than one will speed up the time it
-# takes to read a large mailbox when using a slow terminal.
-### readmsginc = 1
-
-# where to save received messages to, default file is "=received"
-receivedmail = =received
-
-# remote ".signature" file to append to appropriate messages...
-remotesignature = ~/.signature
-
-# emulate the mailx message increment mode (only increment after
-# something has been 'done' to a message, either saved or deleted,
-# as opposed to simply each time something is touched)?
-### resolve = ON
-
-# save messages, incoming and outbound, by login name of sender/recipient?
-savename = ON
-
-# where to save copies of outgoing mail to, default file is "=sent"
-sentmail = =sent
-
-# The shell to use for shell escapes
-shell = /bin/sh
-
-# do we want dashes above signatures? (News 2.11 compatibility and convention)
-### sigdashes = ON
-
-# time in seconds which Elm will wait after displaying a transient message
-# and before erasing it. Can be 0 or positive integer.
-### sleepmsg = 2
-
-# are we running on an HP terminal and want softkeys available too?
-# (this implies "keypad=ON" too)
-### softkeys = OFF
-
-# how to sort folders, "Reverse Sent" by default
-### sortby = Reverse-Sent
-
-# Set the main prompt timeout for resynching...
-### timeout = 600
-
-# display message title when displaying pages of message?
-titles = ON
-
-# where to place temporary files, default directory is "/tmp"
-### tmpdir = /tmp/
-
-# are we good at it? 0=beginner, 1=intermediate, 2+ = expert!
-userlevel = 0
-
-# would you like to use termcap/terminfo ti/te entries?
-usetite = ON
-
-# name of editor for ~v command (when editor="builtin")
-visualeditor = $EDIT
-
-# enable the weedout list to be read?
-### weed = ON
-
-# what headers I DON'T want to see, ever.
-weedout = "*end-of-user-headers*"
-
-EOF
-
- chmod 600 $ELMRC
- chown $USER.mail $ELMRC
-}
diff --git a/contrib/dialog/samples/copifuncs/copi.funcs b/contrib/dialog/samples/copifuncs/copi.funcs
deleted file mode 100755
index 7be4bdb4151cb..0000000000000
--- a/contrib/dialog/samples/copifuncs/copi.funcs
+++ /dev/null
@@ -1,1303 +0,0 @@
-#!/bin/bash
-# $Id: copi.funcs,v 1.3 2001/01/15 22:24:26 tom Exp $
-# ComeOn Point Functions! v0.9.2
-# - usate da vari altri moduli ComeOn Point...
-#
-# AUTHOR: Beppe (beppe.dem@nsm.it)
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-
-HOST=`hostname`
-DOMAIN=`hostname -d`
-PKTNAME="ComeOn Point Installer!"
-COMEONDIR=/usr/lib/ComeOn
-
-AKASETUP=$COMEONDIR/point/.akasetup
-COPIUSER=$COMEONDIR/point/.copi.user
-EMSIFILE=$COMEONDIR/point/.emsi
-PNTSETUP=$COMEONDIR/point/.pntsetup
-
-mkstemp() {
- eval 'tmp_'$1'=`tempfile 2>/dev/null` || tmp_'$1'=/tmp/'$1'$$'
-}
-
-# Args: [start_uid]
-# Returns: $FOUND_UID
-find_unused_uid() {
-
- if [ $1 ]; then
- FOUND_UID=$1
- else
- FOUND_UID=501
- fi
-
- while [ "`cut -f3 -d: /etc/passwd | grep -x $FOUND_UID`" ]
- do
- FOUND_UID=$[$FOUND_UID+1]
- done
-}
-
-int2fido() {
- _RETVAL="`echo $1 | cut -f3 -d. | cut -c2-`:\
-`echo $1 | cut -f2 -d. | cut -c2-`/\
-`echo $1 | cut -f1 -d. | cut -c2-`"
-}
-int2fidonet() {
- _RETVAL="`echo $1 | cut -f3 -d. | cut -c2-`:\
-`echo $1 | cut -f2 -d. | cut -c2-`/\
-`echo $1 | cut -f1 -d. | cut -c2-`@\
-`echo $1 | cut -f4- -d.`"
-}
-fido2int() {
- _RETVAL="f\
-`echo $1 | cut -f2 -d '/'`.n\
-`echo $1 | cut -f1 -d '/' | cut -f2 -d:`.z\
-`echo $1 | cut -f1 -d '/' | cut -f1 -d:`"
-}
-fidonet2int() {
- _RETVAL="f\
-`echo $1 | cut -f2 -d/ | cut -f1 -d@`.n\
-`echo $1 | cut -f1 -d/ | cut -f2 -d:`.z\
-`echo $1 | cut -f1 -d/ | cut -f1 -d:`.\
-`echo $1 | cut -f2 -d@`"
-}
-fidonetpoint2int() {
- _RETVAL="p\
-`echo $1 | cut -f2 -d. | cut -f1 -d@`.f\
-`echo $1 | cut -f2 -d/ | cut -f1 -d.`.n\
-`echo $1 | cut -f2 -d: | cut -f1 -d/`.z\
-`echo $1 | cut -f1 -d/ | cut -f1 -d:`.\
-`echo $1 | cut -f2 -d@`.org"
-}
-
-# Parameters: fqdn
-configure_loopback() {
- dialog --backtitle "$TITLE" --infobox "Configuro la rete (in modo loopback)..." 0 0
-
- FQDN=$1
- HOST=`echo $FQDN | cut -f1 -d.`
- DOMAIN=`echo $FQDN | cut -f2- -d.`
-
- save /etc/hostname
- echo $FQDN >/etc/HOSTNAME
- export HOSTNAME=$FQDN
- hostname $HOST
-
- save /etc/rc.d/rc.inet1
- cat <<EOF >/etc/rc.d/rc.inet1
-#! /bin/sh
-#
-# rc.inet1 This shell script boots up the base INET system.
-
-# Attach the loopback device.
-/sbin/ifconfig lo 127.0.0.1
-/sbin/route add -net 127.0.0.0
-
-# End of rc.inet1
-EOF
- chmod 755 /etc/rc.d/rc.inet1
-
-
- save /etc/networks
- cat <<EOF >/etc/networks
-#
-# networks This file describes a number of netname-to-address
-# mappings for the TCP/IP subsystem. It is mostly
-# used at boot time, when no name servers are running.
-#
-
-loopback 127.0.0.0
-
-# End of networks.
-EOF
- chmod 644 /etc/networks
-
-
- save /etc/hosts
- cat <<EOF >/etc/hosts
-#
-# hosts This file describes a number of hostname-to-address
-# mappings for the TCP/IP subsystem. It is mostly
-# used at boot time, when no name servers are running.
-# On small systems, this file can be used instead of a
-# "named" name server. Just add the names, addresses
-# and any aliases to this file...
-#
-# By the way, Arnt Gulbrandsen <agulbra@nvg.unit.no> says that 127.0.0.1
-# should NEVER be named with the name of the machine. It causes problems
-# for some (stupid) programs, irc and reputedly talk. :^)
-#
-# But we (ComeOn Linux!) says that this is not valid for you, because
-# you resulted to have not a network at the installation time.
-
-# For loopbacking.
-127.0.0.1 localhost $FQDN $HOST
-
-# End of hosts.
-EOF
- chmod 644 /etc/hosts
-
- save /etc/resolv.conf
- echo domain $DOMAIN >/etc/resolv.conf
- chmod 644 /etc/resolv.conf
-
- save /etc/host.conf
- cat <<EOF >/etc/host.conf
-order hosts,bind
-multi on
-EOF
- chmod 644 /etc/host.conf
-
- /etc/rc.d/rc.inet1
-}
-
-# Private function, adds an user to a group. Args: user, group
-add_to_group() {
-
- if [ ! "`groups \"$1\" | grep \" $2 \"`" ]
- then
- USERS="`grep \"$2:\" /etc/group | cut -s -f4 -d:`"
-
- mkstemp group
- if [ "$USERS" ]; then
- sed "/$2:/s/:$USERS/:$USERS,$1/" /etc/group >$tmp_group
- else
- sed "/$2:/s/:/:$1/3" /etc/group >$tmp_group
- fi
-
- save /etc/group
- mv $tmp_group /etc/group
- fi
-}
-
-# Arguments: user, fullname
-add_postmaster() {
- dialog --backtitle "$TITLE" --infobox "Creo l'user principale e/o ne adatto le informazioni..." 0 0
-
- USER="$1"
- NAME="$2"
- HOMEDIR="/home/$USER"
-
-# echo "$USER" >$COPIUSER # you've to do this in any other location
- ENTRY="`cut /etc/passwd -s -f1,2,5 -d: | grep $USER:`"
- if [ "$ENTRY" ]
- then
- OLDNAME="`echo $ENTRY | cut -f3 -d:`"
- PASW="`echo $ENTRY | cut -f2 -d:`"
- if [ "$OLDNAME" != "$NAME" ]
- then
- mkstemp passwd
- sed "/$USER:$PASW:/s/:$OLDNAME:/:$NAME:/" /etc/passwd >$tmp_passwd
- save /etc/passwd
- mv $tmp_passwd /etc/passwd
- fi
-
- add_to_group "$USER" mail
- else
- if [ -f /bin/bash ]; then USERSHELL=/bin/bash; else USERSHELL=""; fi
- find_unused_uid
- echo "$USER:*:$FOUND_UID:12:$NAME:$HOMEDIR:$USERSHELL" >>/etc/passwd
- mkdir -p $HOMEDIR -m 755
- chown $USER.mail $HOMEDIR
- fi
-}
-
-comment_nntp_in_inetdconf() {
- dialog --backtitle "$TITLE" --infobox "Commento la riga 'nntp' in /etc/inetd.conf..." 0 0
-
- mkstemp inetd
- sed "/in.nntpd/s/nntp/#&/" /etc/inetd.conf >$tmp_inetd
- save /etc/inetd.conf
- mv $tmp_inetd /etc/inetd.conf
- killall -1 inetd
-}
-
-# Args: organization
-set_organization() {
- dialog --backtitle "$TITLE" --infobox "Imposto l' origin..." 0 0
-
- ORGANIZATION=/etc/organization
- save $ORGANIZATION
-
- NEW_ORGANIZATION="$1"
- echo "$NEW_ORGANIZATION" >$ORGANIZATION
-}
-
-create_innconf_newsfeeds_distrib() {
- dialog --backtitle "$TITLE" --infobox "Creo i files di configurazione principali di InterNet News (inn)..." 0 0
-
-# File: inn.conf
- INNCONF=~news/inn.conf
- save $INNCONF
-
- cat <<EOF >$INNCONF
-## $Revision: 1.3 $
-## inn.conf -- inn configuration data
-## Format:
-## <parameter>:<whitespace><value>
-## Used by various programs and libinn. The following parameters are defined:
-## domain Local domain, without leading period.
-## fromhost What to put in the From line; default is FQDN
-## of the local host.
-## moderatormailer Where to mail moderated postings, if not found
-## in the moderators file; see moderators(5).
-## pathhost What to put in the Path and Xref headers; default
-## is FQDN of the local host.
-## organization If $ORGANIZATION doesn't exist. What to put in
-## the Organization header if blank.
-## server If $NNTPSERVER doesn't exist. Local NNTP server
-## host to connect to.
-##
-
-server: $HOST.$DOMAIN
-domain: $DOMAIN
-pathhost: $HOST
-EOF
-
- chmod 444 $INNCONF
- chown news.news $INNCONF
-
-
-# File: newsfeeds
- NEWSFEEDS=~news/newsfeeds
- save $NEWSFEEDS
-
- echo -e "ME:*::\n" >$NEWSFEEDS
-
- IAKA=1
- OK=1
- while [ "$OK" != 0 ]
- do
- AKA="`cut $AKASETUP -f$IAKA -d:`"
- if [ ! "$AKA" ]
- then
- OK=0
- else
- if [ $IAKA != 1 ]
- then
- TMPAKA="`echo $AKA | cut -f-4 -d.`"
- SENDCRON="$SENDCRON $TMPAKA"
- echo -n "$TMPAKA/" >>$NEWSFEEDS
- fi
- TMPAKA="`echo $AKA | cut -f1-2 -d.`"
- if [ $IAKA = 1 ]; then
- SENDCRON="$SENDCRON $TMPAKA"
- fi
- echo -e "$TMPAKA\\" >>$NEWSFEEDS
- echo -e "\t:!*,`echo $AKA | cut -f4 -d.`.*\\" >>$NEWSFEEDS
- echo -e "\t:Tf,Wfb,B4096/1024:\n" >>$NEWSFEEDS
- fi
- IAKA=$[$IAKA+1]
- done
-
- chmod 444 $NEWSFEEDS
- chown news.news $NEWSFEEDS
-
-
-# File: distrib.pats
- DISTRIB=~news/distrib.pats
- save $DISTRIB
-
- IAKA=1
- OK=1
- while [ "$OK" != 0 ]; do
- AKA="`cut $AKASETUP -f$IAKA -d:`"
- IAKA=$[$IAKA+1]
- if [ "$AKA" = "" ]; then
- OK=0
- else
- DOM="`echo $AKA | cut -f4 -d.`"
- echo "10:$DOM.*:$DOM" >>$DISTRIB
- fi
- done
-
- chmod 444 $DISTRIB
- chown news.news $DISTRIB
-}
-
-# Args: num_of_days
-create_expirectl() {
- dialog --backtitle "$TITLE" --infobox "Imposto il periodo di transito dei messaggi..." 0 0
-
- EXPIRECTL=~news/expire.ctl
- save $EXPIRECTL
-
- EXPIRE_DAYS=$1
-
- echo -e "/remember/:14\n\n*:A:2:$EXPIRE_DAYS:$EXPIRE_DAYS" >$EXPIRECTL
-
- chmod 440 $EXPIRECTL
- chown news.news $EXPIRECTL
-}
-
-create_nnrpaccess() {
- dialog --backtitle "$TITLE" --infobox "Rendo accessibili le news in lettura..." 0 0
-
- NNRPACCESS=~news/nnrp.access
- save $NNRPACCESS
-
- cat <<EOF >$NNRPACCESS
-## $Revision: 1.3 $
-## nnrp.access - access file for on-campus NNTP sites
-## Format:
-## <host>:<perm>:<user>:<pass>:<groups>
-## Connecting host must be found in this file; the last match found is
-## used, so put defaults first.
-## <host> Wildcard name or IP address
-## <perm> R to read; P to post
-## <user> Username for authentication before posting
-## <pass> Password, for same reason
-## <groups> Newsgroup patterns that can be read or not read
-## To disable posting put a space in the <user> and <pass> fields, since
-## there is no way for client to enter one.
-##
-## Default is no access, no way to authentication, and no groups.
-# *:: -no- : -no- :!*
-## Foo, Incorporated, hosts have no password, can read anything.
-# *.foo.com:Read Post:::*
-
-*:: -no- : -no- :!*
-localhost.$DOMAIN:Read Post:::*
-$HOST.$DOMAIN:Read Post:::*
-
-EOF
-
- chmod 440 $NNRPACCESS
- chown news.news $NNRPACCESS
-}
-
-create_hostsnntp() {
- dialog --backtitle "$TITLE" --infobox "Rendo accessibili le news in scrittura..." 0 0
-
- HOSTSNNTP=~news/hosts.nntp
- save $HOSTSNNTP
-
- cat <<EOF >$HOSTSNNTP
-## $Revision: 1.3 $
-## hosts.nntp - names and addresses that feed us news
-## Format
-## <host>:
-## <host>:<password>
-## <host> can be a name or IP address; no wildcards. Any hosts not
-## listed here are handed off to nnrpd.
-
-$HOST.$DOMAIN:
-
-EOF
-
- chmod 440 $HOSTSNNTP
- chown news.news $HOSTSNNTP
-}
-
-create_dirs_and_files() {
-
- CURMASK=`umask`
- . ./copi.wheel
- pushd /var/log >/dev/null
- mkdir -p news -m 755; chown news.news news
- cd /var/log/news; mkdir -p OLD -m 755; chown news.news OLD
- cd /var/spool; mkdir -p news -m 775; chown news.news news
- cd /var/spool/news; umask 02
- mkdir -p out.going control junk in.coming
- chown news.news out.going control junk in.coming
- cd in.coming; mkdir -p bad tmp; chown news.news bad tmp; umask $CURMASK
- ln -sf ~news /usr/local/lib/
- ln -sf ~news/inews /usr/bin/
- chmod 1777 /var/tmp
-
- cd /var/spool
- mkdir -p uucppublic
- chown uucp.uucp uucppublic
- chmod 1777 uucppublic
-
- cd ~news
- touch history history.dir history.pag errlog log
- chown news.news history* log errlog
- chmod 664 history* log errlog
-
- save active
- echo "control 0000000000 0000000001 y" > active
- echo "junk 0000000000 0000000001 y" >> active
- chown news.news active
-
- save active.times
- echo "control 814573260 usenet" > active.times
- echo "junk 814573260 usenet" >> active.times
- chown news.news active.times
-
- save newsgroups
- :>newsgroups
- chown news.news newsgroups
-
- popd >/dev/null
-}
-
-install_rcnews() {
- dialog --backtitle "$TITLE" --infobox "Avvio l'InterNet News daemon (innd) e l'installo negli script di boot, attendere... attenzione che e' probabile che in questa fase non sia possibile entrare da un'altra VC come root." 0 0
-
- RCLOCAL=/etc/rc.d/rc.local
- RCNEWS=~news/etc/rc.news
- RCLINE="`grep $RCNEWS $RCLOCAL`"
-
- if [ ! "$RCLINE" -o `echo $RCLINE | cut -c1` = '#' ]
- then
- save $RCLOCAL
- echo -e "\n$RCNEWS" >>$RCLOCAL
- fi
-
- cp copi.rcnews $RCNEWS
- chmod 550 $RCNEWS
- chown news.news $RCNEWS
-
- if [ -f ~news/innd/innd.pid ]; then
- su -l news -c "bin/ctlinnd shutdown x" >/dev/null
- sleep 2 # wait for server to shutdown
- fi
-
- killall innd 2>/dev/null # make sure it's gone down
- $RCNEWS
-}
-
-install_crontab_news() {
- dialog --backtitle "$TITLE" --infobox "Imposto la crontab di news per l'automantenimento del sistema (cancellazione giornaliera dei messaggi vecchi et similia)..." 0 0
-
-
- if [ -f $COPIUSER ]; then
- POSTMST="`cat $COPIUSER`"
- else
- POSTMST="root"
- fi
-
- NEWSHOME=~news
- save /var/spool/cron/crontabs/news
- cat <<EOF | crontab - -u news
-#-------------------------------------------------------------------------------
-# /var/spool/cron/crontabs/news
-SHELL=/bin/sh
-#
-MAILTO=$POSTMST
-#
-#===============================================================================
-#
-# inn-1.4 (Inter Net News)
-#
-#===============================================================================
-#
-#-------------------------------------------------------------------------------
-# Daily housekeeping ... expires news and other things ...
-#-------------------------------------------------------------------------------
-#
-51 16 * * * $NEWSHOME/bin/news.daily < /dev/null
-#
-#-------------------------------------------------------------------------------
-# offer spooled news - that was spooled into the incoming directory when the
-# innd server wasn't available - again to the innd server.
-#-------------------------------------------------------------------------------
-#
-18 * * * * $NEWSHOME/rnews -U
-#
-#-------------------------------------------------------------------------------
-# send news batches to your fidonet(-like) news feeds
-#-------------------------------------------------------------------------------
-#
-49 16 * * * $NEWSHOME/send-ifmail$SENDCRON
-#
-#-------------------------------------------------------------------------------
-#
-EOF
-
- echo $NEWSHOME/send-ifmail$SENDCRON >/etc/point.ifsend
-}
-
-# Private func
-# Args: dir_with_sources, bindir, cfgdir, logdir, version
-copi.ifmCfg() {
-
- SRCDIR="$1"
- BINDIR="$2"
- CFGDIR="$3"
- LOGDIR="$4"
- VERSION="$5"
- SOURCE="$SRCDIR/CONFIG"
- CONFIGFILE="$CFGDIR/config"
-
- cat <<EOF >$SOURCE
-# Compile-time configuration for ifmail FidoNet mailer and gateway
-COPYRIGHT = "Eugene G. Crosser, 1993-1995"
-VERSION = "$VERSION"
-
-# Main configuration file. This default may be overwritten by -I key.
-CONFIGFILE = $CONFIGFILE
-
-# Debug messages turned on by -x key are written here.
-# Some error messages may occationally appear here too.
-# This may be changed in the 'config' file.
-DEBUGFILE = "$LOGDIR/ifdebug"
-
-# Procession log. Usually gets several lines for each invocation.
-# Also look for error diagnostics here. If HAS_SYSLOG defined,
-# only stdout and stderr from the packers and unpackers go to this
-# file, while actual logging is done via syslog() calls.
-# This may be changed in the 'config' file.
-LOGFILE = "$LOGDIR/iflog"
-
-# Use syslog() facility codes for mail gate, news gate and ifcico.
-# Define -DHAS_SYSLOG (see below)
-#MAILLOG = LOG_MAIL
-MAILLOG = LOG_LOCAL0
-#NEWSLOG = LOG_NEWS
-NEWSLOG = LOG_LOCAL0
-#CICOLOG = LOG_UUCP
-CICOLOG = LOG_LOCAL0
-
-# Directory where UUCP lock files reside.
-#LOCKDIR = "/var/lock"
-LOCKDIR = "/var/spool/uucp"
-
-# Directory from which file requests are resolved.
-# This may be changed from the 'config' file.
-#PUBDIR = "/home/ftp/pub"
-PUBDIR = "/var/spool/uucppublic"
-
-# Compile-time system-dependant options.
-
-# If you specify "-DHAS_NDBM_H", ndbm calls will be used instead
-# of dbm ones, and the feature will be activated of Cnews log processing
-# to add entries to SEEN-BY if echo message is exported to several FTN
-# nodes by Cnews mechanism. This works with INN too.
-
-# If you specify "-DHAS_STATFS" or "-DHAS_STATVFS", statfs() (or statvfs()
-# respectivly) call will be used to check available disk space. For statfs()
-# call, you must also specify which .h file to use: "-DSTATFS_IN_VFS_H" or
-# "-DSTATFS_IN_STATFS_H" or "-DSTATFS_IN_STATVFS_H" or "-DSTATFS_IN_MOUNT_H".
-# For statvfs() call, statvfs.h is included.
-
-# define -DSCO_STYLE_STATFS if your statfs() call requires 4 arguments.
-
-# If you specify "-DHAS_SETSID", setsid() call is used to detach from the
-# control terminal. Otherwise setpgrp() call is used, and in this case you
-# may specify "-DBSD_SETPGRP" to use BSD-style call. Used in ifcico only.
-
-# If you specify "-DDONT_HAVE_TM_GMTOFF", timezone offset will be calculated
-# from the difference between the results of localtime() and gmtime() calls
-# instead of using tm_gmtoff field of struct tm.
-
-# If you specify "-DDONT_HAVE_GETOPT", local definitions for getopt will
-# be used (but not the function itself)
-
-# For ifcico, you must specify -DHAS_TERMIOS_H (preffered), -DHAS_TERMIO_H
-# or -DHAS_SGTTY_H to use POSIX-y, SysV-ish of BSD-ish terminal control.
-
-# in SVR4 you should specify -DHAS_DIAL (and maybe -DHAS_DIAL_H) to use
-# dial() library function instead of regular open(). Lock files are
-# not used in this case.
-
-# for uucp lock files, you must specify either -DASCII_LOCKFILES or
-# -DBINARY_LOCKFILES
-
-# define -DHAS_FSYNC if there is a fsync() system call (to update .flo
-# files)
-
-# define -DPARANOID if you want iftoss to deny packets with wrong password.
-
-# define -DRELAXED if you want iftoss to accept packets that are not
-# addressed to your node.
-
-# define -DFORCEINTL if you want ifmail to create ^aINTL even if this is
-# not an inter-zone netmail.
-
-# define -DNEED_UUCPFROM if your MTA needs a uucp "From" line in mail.
-
-# define -DHAS_TCP if you want ifmail to be able to originate outgoing
-# connections over TCP/IP (socket library needed)
-
-# define -DHAS_TERM if you want ifmail to be able to originate outgoing
-# connections over TERM (TCP "extention", client.a needed)
-
-# define -DHAS_REGEX_H or -DHAS_LIBGEN_H if you have either of these
-# header files for regular expression handlers.
-
-# define -DHAS_SYSLOG to use syslog() instead of logging to files.
-# Files are necessary anyway, external programs' stdout and stderr
-# are redirected there.
-
-# define -DNEED_BSY if you want ifpack and ifcico to create .bsy
-# files preventing simultaneous processing of the same node.
-
-# define -DNEED_FORK if your system is uncapable of getting rid of the
-# control terminal unless you are running not as a group leader.
-
-# define -DREGEX_NEED_CARET if your re_comp/re_exec require that the
-# mask starts with a '^' to match the beginning of the string.
-
-# as of June 1994, FreeBSD has a nasty bug in the kernel lseek() code:
-# if you make lseek() to a point before the start of the file, it
-# succeeds and the writing point becomes negative. Fortunately,
-# subsequent write()s fail :-). To overwork this, define
-# -DNEGATIVE_SEEK_BUG, this will add an extra fseek() to restore
-# zero writing point where necessary.
-
-# define -DNEED_TRAP if you want debugging information when the programs
-# are aborted with segmentation fault etc. Currently tested and works
-# only with Linux, and only with newer kernels (1.1.20+)
-
-# define -DSLAVE_SENDS_NAK_TOO if you have problems answering incoming
-# EMSI sessions originated by FrontDoor. FrontDoor does not follow
-# EMSI specifications when originating calls, this is a workaround.
-
-# define -DDONT_HAVE_DIRENT if there is no working opendir()/readdir()
-# etc. in your libc. You will aso need to add "dirent.o" to the NEEDED
-# (see below).
-
-# Linux:
-OPTS = -DHAS_STATFS -DSTATFS_IN_VFS_H -DHAS_SETSID -DHAS_NDBM_H \\
- -DDONT_HAVE_TM_GMTOFF -DHAS_TERMIOS_H -DASCII_LOCKFILES \\
- -DHAS_FSYNC -DHAS_IOCTL_H -DHAS_REGEX_H -DHAS_TCP \\
- -DFORCEINTL -DHAS_SYSLOG -DNEED_UUCPFROM -DNEED_BSY \\
- -DREGEX_NEED_CARET -DNEED_TRAP -DSLAVE_SENDS_NAK_TOO \\
- -DNEED_FORK -DLESS_RFC_KLUDGES
-
-# 386BSD:
-#OPTS = -DHAS_STATFS -DSTATFS_IN_MOUNT_H -DHAS_SETSID -DHAS_NDBM_H \\
- -DHAS_TERMIOS_H -DASCII_LOCKFILES -DHAS_FSYNC -DHAS_IOCTL_H \\
- -DHAS_REGEX_H -DHAS_TCP -DHAS_SYSLOG -DNEED_UUCPFROM \\
- -DNEED_BSY -DNEED_FORK -DNEGATIVE_SEEK_BUG \\
- -DREGEX_NEED_CARET
-
-# SVR4:
-#OPTS = -DHAS_STATVFS -DDONT_HAVE_TM_GMTOFF -DHAS_SETSID -DHAS_NDBM_H \\
- -DHAS_TERMIOS_H -DHAS_DIAL -DHAS_DIAL_H -DASCII_LOCKFILES \\
- -DHAS_FSYNC -DHAS_IOCTL_H -DHAS_LIBGEN_H -DHAS_TCP \\
- -DHAS_SYSLOG -DREGEX_NEED_CARET
-# SunOS:
-#OPTS = -DHAS_STATFS -DSTATFS_IN_VFS_H -DHAS_SETSID -DHAS_NDBM_H \\
- -DDONT_HAVE_GETOPT -DHAS_TERMIOS_H -DASCII_LOCKFILES \\
- -DHAS_FSYNC -DHAS_TCP -DHAS_SYSLOG \\
- -DREGEX_NEED_CARET
-
-# SCO Unix 3.2v4.2
-#OPTS = -DHAS_STATFS -DSTATFS_IN_STATFS_H -DSCO_STYLE_STATFS \\
- -DHAS_TERMIOS_H -DDONT_HAVE_TM_GMTOFF -DDO_NEED_TIME \\
- -DDONT_HAVE_GETOPT -DASCII_LOCKFILES -DHAS_IOCTL_H \\
- -DHAS_TCP -DHAS_SYSLOG \\
- -DREGEX_NEED_CARET
-
-# ISC Unix 3.2 v3.0
-#OPTS = -DHAS_STATFS -DSTATFS_IN_STATFS_H -DHAS_TERMIO_H \\
- -DDONT_HAVE_TM_GMTOFF -DDONT_HAVE_GETOPT \\
- -DASCII_LOCKFILES -DHAS_IOCTL_H -DSCO_STYLE_STATFS \\
- -DUSE_POLL -DHAS_NET_ERRNO_H -DSHORT_PID_T \\
- -DHAS_TCP -DHAS_SYSLOG \\
- -DREGEX_NEED_CARET
-# On ISC, if you are suing gcc, you can run into a trouble with sscanf()
-# function. It appears that sscanf(string,"%d.%d",&int1,&int2) where
-# string is a constant segfaults unless you specify "-fwritable-strings"
-# to gcc. I would say that this is a bug in ISC libc. If nessecary,
-# add this to the defines above. If you have ISC version 4.0 or later,
-# you can add "-posix", remove "-DSHORT_PID_T" and specify "-DHAS_TERMIOS"
-# to get benefit of posix terminal control.
-
-# for make install, where to put binaries and what owner to set
-BINDIR = $BINDIR
-OWNER = fnet
-GROUP = uucp
-MODE = 0711
-SMODE = 4711
-
-INSTALL = install
-RANLIB = ranlib
-#RANLIB = touch
-SHELL = /bin/sh
-ECHO = echo -e
-CC = gcc
-YACC = bison -y
-#YACC = yacc
-LEX = flex
-#LEX = lex
-AWK = awk
-TAR = tar
-
-#CFLAGS = -g -Wall
-# Linux, 386BSD, SunOS:
-CFLAGS = -O2 -Wall -m486 -s
-# SVR4:
-#CFLAGS = -O -Xa
-
-LDFLAGS = -s
-
-# For LIBS, you may need to add "-lfl" if you are using flex 2.4.x
-# If you need TERM also add e.g. "/usr/src/term112/client.a"
-
-# Linux
-LIBS = -ldbm
-# SunOS:
-#LIBS =
-# 386BSD:
-#LIBS = -lgdbm -lgnuregex
-# SVR4
-#LIBS = -ldbm -lform -lnsl -lsocket -lc -L/usr/ucblib -lucb
-# SCO
-#LIBS = -ldbm -lsocket -lintl
-# ISC
-#LIBS = -lcposix -lmalloc -ldbm -linet -lPW
-
-INCLUDES = -I\${INCDIR}
-# ISC
-#INCLUDES = -I/usr/include/rpcsvc -I\${INCDIR}
-
-# What programs are absent at your system?
-#NEEDED = strcasestr.o strncasecmp.o strcasecmp.o rename.o mkdir.o usleep.o \\
- regexpr.o
-# Linux
-NEEDED =
-# SVR4
-#NEEDED = regexpr.o
-# SCO
-#NEEDED = strcasestr.o strncasecmp.o strcasecmp.o usleep.o regexpr.o
-# SunOS and 386BSD
-#NEEDED = signal.o
-# ISC
-#NEEDED = usleep.o regexpr.o vsyslog.o
-EOF
-
-}
-
-# Args: package.tgz, bin_dir, cfg_dir, log_dir, version, where_to_put_src
-install_ifmail() {
- dialog --backtitle "$TITLE" --infobox "Installo e compilo Ifmail..." 0 0
-
- AKAPRI="`cut $AKASETUP -f1 -d:`"
- int2fido $AKAPRI
- AKAPRIFTN=$_RETVAL
-
- if [ -f $COPIUSER ]
- then
- POST="`cat $COPIUSER`"
- else
- POST=root
- fi
-
- TGZ="$1"
- BINDIR="$2"
- CFGDIR="$3"
- LOGDIR="$4"
- VERSION="$5"
- SRC="$6"
-
-###################################################
-## passwd e group
-####################################
-
- if [ "`cut /etc/passwd -f1 -d: | grep -x fnet`" ]
- then
- mkstemp passwd
- grep -v "fnet:" /etc/passwd >$tmp_passwd
- save /etc/passwd
- mv $tmp_passwd /etc/passwd
- fi
-
- find_unused_uid 92
- echo "fnet:*:$FOUND_UID:14:Fidonet Gate:$BINDIR:" >>/etc/passwd
-
-
-####################################################
-#### dirs and files
-###################################
- mkdir -p $CFGDIR $LOGDIR /var/spool/ifmail/{BAK,nl.d} $BINDIR/magic
- chown fnet.uucp $BINDIR{,/magic} $CFGDIR $LOGDIR /var/spool/ifmail/{,BAK,nl.d}
- touch $LOGDIR/{ifdebug,iflog,sysiflog,TheLog}
- chown fnet.uucp $LOGDIR/{ifdebug,iflog,sysiflog,TheLog}
-
-##########################################################################
-#### COMPILAZIONE
-####################################
-
- SRC="$SRC/`tar zxvf $TGZ -C $SRC | head -1`"
-# ora in $SRC c'e' il path completo dei source Ifmail
-
- copi.ifmCfg $SRC $BINDIR $CFGDIR $LOGDIR $VERSION
- patch -N -d $SRC <ifpatch 2>/dev/null
- make clean -C $SRC
- make -C $SRC
-##########################################################################
-#### INSTALLAZIONE
-####################################
- make install -C $SRC
-}
-
-
-# Args: bin_dir, cfg_dir, log_dir, passwords
-# note: passwords are colon-separated (":")
-configure_ifmail() {
- dialog --backtitle "$TITLE" --infobox "Configuro Ifmail..." 0 0
-
- BINDIR=$1
- CFGDIR=$2
- LOGDIR=$3
- PASSWDS=$4
-
- SPD="` cut $EMSIFILE -f1`"
- SYSNAME="` cut $EMSIFILE -f2`"
- LOCATION="` cut $EMSIFILE -f3`"
- COMPLETE_PHONE="` cut $EMSIFILE -f4`"
- INTERCOUNTRYPREF="`cut $EMSIFILE -f5`"
- LONG_DIST_PREFIX="`cut $EMSIFILE -f6`"
- NODEFLAGS="` cut $EMSIFILE -f7`"
- DIALSTRING="` cut $EMSIFILE -f8`"
- SYSOP="` cut $EMSIFILE -f9`"
-
- COUNTRYPREF="`echo $COMPLETE_PHONE | cut -f1 -d'-'`"
- PREF="` echo $COMPLETE_PHONE | cut -f2 -d'-'`"
- PHONE="` echo $COMPLETE_PHONE | cut -f3 -d'-'`"
-
- FNETCFG=$CFGDIR/config
- AREAS=$CFGDIR/Areas
-
- POINTS="`cat $PNTSETUP`"
- POST="`cat $COPIUSER`"
- AKAPRI="`cut $AKASETUP -f1 -d:`"
- int2fido "$AKAPRI"
- AKAPRIFTN="$_RETVAL"
-
-#invece di "cp $SRC/misc/inn/send-ifmail ~news"
-#-----------------------------------------------------------------------------
- cp copi.sendifm1 ~news/send-ifmail
- cat <<EOF >>~news/send-ifmail
--p"$BINDIR/ifnews %s" \\
-EOF
- cat copi.sendifm2 >>~news/send-ifmail
-
- chmod 550 ~news/send-ifmail
- chown news.news ~news/send-ifmail
-
-#invece di "cp $SRC/misc/contrib/ifreq $BINDIR"
-#-----------------------------------------------------------------------------
- cp copi.ifreq1 $BINDIR/ifreq
- cat <<EOF >>$BINDIR/ifreq
-# ifcico-config-file:
-\$config = "$CFGDIR/config";
-
-# change this to the default node, where requests should go to.
-\$node = "$AKAPRIFTN";
-EOF
- cat copi.ifreq2 >>$BINDIR/ifreq
-
- chmod 755 $BINDIR/ifreq
- chown fnet.uucp $BINDIR/ifreq
-
-#invece di "cp $SRC/misc/contrib/ifman $BINDIR"
-#-----------------------------------------------------------------------------
- cp copi.ifman1 $BINDIR/ifman
- cat <<EOF >>$BINDIR/ifman
-\$cfgfile="$CFGDIR/config"; # where the config is
-\$ifowner="fnet"; # who is the owner of the ifmail
-
-EOF
- cat copi.ifman2 >>$BINDIR/ifman
-
- chmod 755 $BINDIR/ifman
- chown fnet.uucp $BINDIR/ifman
-
-#invece di "cp $SRC/misc/contrib/ifpoll $BINDIR"
-#-----------------------------------------------------------------------------
- cp copi.ifpoll1 $BINDIR/ifpoll
- cat <<EOF >>$BINDIR/ifpoll
-FIDOPATH=$BINDIR
-LOGPATH=$LOGDIR
-
-# sysop of fido stuff
-IFCICO_SYSOP=$POST
-
-# my boss node (default address to poll)
-NODE=$AKAPRI
-EOF
- cat copi.ifpoll2 >> $BINDIR/ifpoll
-
- chmod 755 $BINDIR/ifpoll
- chown fnet.uucp $BINDIR/ifpoll
-
-
-#########################################################
-##### se in syslog.conf non c'e' "local0.*", lo aggiunge
-################################
-
- SYSLOG="`grep \"local0.* \" /etc/syslog.conf`"
- SYSCHECK_A="`echo \"$SYSLOG\" | cut -f1 | grep -x \"local0.*\"`"
- SYSCHECK_B="`echo \"$SYSLOG\" | cut -f2- | grep $LOGDIR/sysiflog`"
- MYSYSLOG="local0.*\t\t\t\t\t$LOGDIR/sysiflog"
-
- if [ ! "$SYSCHECK_A" -o ! "$SYSCHECK_B" ]
- then
- echo -e "\n# For ifmail" >> /etc/syslog.conf
- echo -e "$MYSYSLOG" >>/etc/syslog.conf
- killall -1 syslogd
- fi
-
-
-########################
- save $AREAS
- :> $AREAS
- chown fnet.uucp $AREAS
-
- save $FNETCFG
- cat <<EOF >$FNETCFG
-# Configuration file for ifmail (ifgate+ifcico) package by Eugene Crosser
-# Compile-time default name of this file may be overridden by -I key.
-#
-# Lines with the first nonblank character '#' are comments.
-#
-# Log file name. Overrides compile-time default.
-logfile $LOGDIR/iflog
-
-# Debug file name. Overrides compile-time default.
-debugfile $LOGDIR/ifdebug
-
-# Debugging verbosity level (is overidden by -x key). Default is 0.
-# WARNING: if >0 your messages will go in /tmp/ifmail !!!!!!!!!!!!!!!!!!
-verbose 0
-
-# The first is the main address:
-EOF
-#----------------------------
-
- AKA="any"
- IAKA=0
- while [ "$AKA" ]
- do
- IAKA=$[$IAKA+1]
- AKA="`cut $AKASETUP -f$IAKA -d:`"
- if [ "$AKA" ]
- then
- int2fidonet $AKA
- AKAFTN="`echo $_RETVAL | cut -f1 -d.`"
- echo "# aka for `echo $AKAFTN | cut -f2 -d '@'`" >> $FNETCFG
-
- POINT="`echo $POINTS | cut -f$IAKA -d:`"
-
- AKAFTN="`echo $AKAFTN | cut -f1 -d '@'`.$POINT@`echo $AKAFTN | cut -f2 -d '@'`"
-
- echo "address $AKAFTN" >> $FNETCFG
- fi
- done
-
-#----------------------------
- cat <<EOF >>$FNETCFG
-
-# Passwords for nodes. Not checked by iftoss (unless -DPARANOID specified
-# at compile-time), checked by ifcico.
-# Inserted into outgoing mail packets, EMSI and yoohoo packets.
-EOF
-#----------------------------
-
- AKA="any"
- IAKA=0
- while [ "$AKA" ]
- do
- IAKA=$[$IAKA+1]
- AKA="`cut $AKASETUP -f$IAKA -d:`"
- if [ "$AKA" ]
- then
- int2fido $AKA
- AKAFTN=$_RETVAL
-
- PASSWD="`echo $PASSWDS | cut -f$IAKA -d:`"
- if [ "$PASSWD" ]
- then
- echo "password $AKAFTN $PASSWD" >> $FNETCFG
- fi
- fi
- done
-
-#----------------------------
- cat <<EOF >>$FNETCFG
-
-# Include config extention file (here: file with real passwords).
-# Includes may be nested. If the nesting is cyclic, the program cycles too.
-# You are warned.
-# include $CFGDIR/passwds
-
-# System alias file - try to fetch ftn-style aliases from there.
-# If "from" address of a message from FidoNet matches _right_ side
-# of some entry in sysalias file, then the Reply-To: header is created
-# in the RFC message with the name part taken from the left side of the
-# sysalis entry and domain part taken from myfqdn (below). E.g., if a
-# fidonet message comes from "John Smith of 1:234/567.89@fidonet" and
-# there is an entry in the sysalias file:
-# "jsmith: John.Smith@p89.f567.n234.z1.fidonet.org"
-# and fqdn value is "pccross.msk.su", then the resulting message will
-# contain a line: "Reply-To: jsmith@pccross.msk.su".
-sysalias /etc/aliases
-
-# This host fully qualified domain name to add to the alias above
-myfqdn `hostname -f`
-
-# Directory for incoming packets/files:
-inbound /var/spool/ifmail/inb
-# Directories for "listed" and "protected" sessions
-listinbound /var/spool/ifmail/inb
-protinbound /var/spool/ifmail/inb
-
-# Directory for outgoing packets (default domain and zone):
-# other zones will be like "/var/spool/ifmail/outb.003",
-# other domains will be like "/var/spool/ifmail/<domain>.<zone>"
-outbound /var/spool/ifmail/outb
-
-# Directory from which the file requests are satisfied
-public /var/spool/uucppublic
-
-# Directory with executables to satisfy "magic" file requests
-# if requested a file present in this directory, it will be
-# executed and stdout sent to the remote system. It is dangerous!
-# You are warned.
-magic $BINDIR/magic
-
-# Primary nodelist (serves "outbound" directory and domain from the
-# first "address" statement). Name expanded with ".NNN" if neccessary.
-nodelist /var/spool/ifmail/nl.d/`cut $AKASETUP -f1 -d: | cut -f4 -d.`.ndl
-
-# Secondary nodelists and nodelists for other domains.
-# use directory name from the first "nodelist" statement.
-# filename originating address
-EOF
-#----------------------------
-
- AKA="any"
- IAKA=0
- while [ "$AKA" ]
- do
- IAKA=$[$IAKA+1]
- AKA="`cut $AKASETUP -f$IAKA -d:`"
- if [ "$AKA" ]
- then
- int2fidonet $AKA
- AKAFTN="`echo $_RETVAL | cut -f1 -d.`"
- echo -e "nodelist `echo $AKAFTN | cut -f2 -d '@'`.ndl\t$AKAFTN" >> $FNETCFG
- fi
- done
-
-#----------------------------
- cat <<EOF >>$FNETCFG
-
-# domain translations, just context substitution. Leading dot recommended.
-# May contain '@'-sign too. First matching used.
-# NOTE: If you specify at least one domtrans line, there will be _NO_
-# default for fidonet <--> fidonet.org. Don't forget to specify it
-# explicitly as a last line.
-# FTN side Internet side
-#domtrans f720.n335.z2.fidonet.org giuda.deis.unical.it
-#domtrans .fidonet .fidonet.org
-
-# Automatically updated alias database. If omitted or inaccessible,
-# ^aREPLYADDR and ^aREPLYTO kludges are generated in fido messages.
-database /var/spool/ifmail/ifdbm
-
-# Sequencer file (used to generate unique IDs)
-sequencer /var/spool/ifmail/seq
-
-# Areas file (format: "AREA newsgroup distribution")
-areas $CFGDIR/Areas
-
-# Bad groups prefixes - do not pass to fido if appear in Newsgroups header
-# This is NOT the same as "!news.group" in the cnews "sys" file.
-# badgroup relcom.ads.
-# badgroup relcom.commerce.
-
-# Maximum allowed number of groups in the Newsgroups header, article will
-# not be gated if exeeds. If zero or umitted - no limit.
-# maxgroup 5
-
-# Internet -> FidoNet (outgoing) character mapping table (a la mapchan)
-# outtab $BINDIR/outkoi8alt
-
-# FidoNet -> Internet (incoming) character mapping table
-# intab $BINDIR/outaltkoi8
-
-# Toss program, used by ifunpack
-iftoss $BINDIR/iftoss
-
-EOF
-
- cat copi.ifmcfg2 >>$FNETCFG
-
- if [ $[$[SPD] > $[19200]] = 1 ]; then
- SPDLOCK="L38400"
- elif [ $[$[SPD] > $[9600]] = 1 ]; then
- SPDLOCK="L19200"
- elif [ $[$[SPD] > $[2400]] = 1 ]; then
- SPDLOCK="9600"
- elif [ $[$[SPD] > $[1200]] = 1 ]; then
- SPDLOCK="2400"
- elif [ $[$[SPD] > $[300]] = 1 ]; then
- SPDLOCK="1200"
- else
- SPDLOCK="300"
- fi
-
- echo "ModemPort modem:$SPDLOCK" >>$FNETCFG
- cat copi.ifmcfg5 >>$FNETCFG
-
- echo "PhoneTrans $COUNTRYPREF-$PREF- /" >>$FNETCFG
- echo "PhoneTrans $COUNTRYPREF- / $LONG_DIST_PREFIX" >>$FNETCFG
- echo "PhoneTrans / $INTERCOUNTRYPREF" >>$FNETCFG
- echo "ModemReset ATZ\r" >>$FNETCFG
- echo "ModemDial \d$DIALSTRING\T\r" >>$FNETCFG
-
- cat copi.ifmcfg4 >>$FNETCFG
-
- echo "Name $SYSNAME" >>$FNETCFG
- echo "Location $LOCATION" >>$FNETCFG
- echo "SysOp $SYSOP" >>$FNETCFG
- echo "Phone $COUNTRYPREF-$PREF-$PHONE" >>$FNETCFG
- echo "Speed $SPD" >>$FNETCFG
- echo "Flags $NODEFLAGS" >>$FNETCFG
-
- chown fnet.uucp $FNETCFG
-}
-
-# Args: cfg_dir
-configure_smail() {
- dialog --backtitle "$TITLE" --infobox "Configuro Smail..." 0 0
-
- USER="`cat $COPIUSER`"
- FNETHOME=~fnet
-
- SMAIL=$1
- SMAILCONF=$SMAIL/config
- ALIASES=$SMAIL/aliases
- DIRECTORS=$SMAIL/directors
- ROUTERS=$SMAIL/routers
- TRANSPORTS=$SMAIL/transports
- FTNPATHS=$SMAIL/ftnpaths
-
-# File: config
- save $SMAILCONF
-
- cat <<EOF >$SMAILCONF
-#
-# smail configuration for $HOST.$DOMAIN
-# (see smail(5) man page for details and other options)
-#
-hostnames=$HOST:$HOST.$DOMAIN
-domains=$DOMAIN
-postmaster=$USER
-smtp_banner="\$primary_name Linux Smail\$version #\$compile_num ready at \$date"
-spool_mode=0600
-received_field="Received: \\
- \${if def:sender_host \\
- {from \$sender_host by \$primary_name \\
- \${if def:sender_proto: with \$sender_proto}\\
- \n\t(Linux Smail\$version #\$compile_num) }\\
- else{by \$primary_name \${if def:sender_proto:with \$sender_proto }\\
- (Linux Smail\$version #\$compile_num)\n\t}}\\
- id \$message_id; \$spool_date"
-trusted_users=root:uucp:daemon:fnet
-EOF
-
-
-# File: routers
- save $ROUTERS
-
- cat <<EOF >$ROUTERS
-ifmail: driver=pathalias,
- transport=ifmail;
-
- file=ftnpaths,
- proto=lsearch,
- domain=ftn:org
-EOF
-
-
-# File: transports
- save $TRANSPORTS
-
- cat <<EOF >$TRANSPORTS
-local: driver = appendfile,
- return_path,
- local,
- from,
- unix_from_hack;
-
- file = /var/spool/mail/\${lc:user},
- group = mail,
- mode = 0660,
- suffix = "\n",
- append_as_user
-
-ifmail: driver=pipe,
- from,
- -received,
- max_addrs=5,
- max_chars=200;
-
- pipe_as_sender,
- cmd="$FNETHOME/ifmail -r\$host \$((\${strip:user})\$)"
-
-EOF
-
-
-# File: directors
- save $DIRECTORS
-
-
-# File: aliases
- for i in $ALIASES /etc/aliases /usr/lib/aliases
- do
- if [ ! -L $i -a -f $i ]
- then
- mv $i $i~
- fi
- done
-
- USERNAME="`cut /etc/passwd -f1,5 -d: | grep $USER: | cut -f2 -d: | sed y/\" \"/./`"
- echo "news: $USER" >> $ALIASES
- echo "usenet: $USER" >> $ALIASES
- echo "$USERNAME: $USER" >> $ALIASES
-
- ln -sf $ALIASES /etc/
- ln -sf $ALIASES /usr/lib/
-
- cd $SMAIL # is this necessary?? E-mail me if you know,please
- mkaliases >/dev/null
-
-# File: ftnpaths
- save $FTNPATHS
-
- OK=1
- IAKA=1
- while [ $OK != 0 ]; do
- AKA="`cut $AKASETUP -f$IAKA -d:`"
- IAKA=$[$IAKA+1]
- if [ ! "$AKA" ]; then
- OK=0
- else
- echo -e ".`echo $AKA | cut -f4 -d.`\t\t$AKA!%s" >>$FTNPATHS
- fi
- done
-
-
-# misc section
-
- chmod 1775 /var/spool/mail
- chgrp mail /var/spool/mail
-
- cd $SMAIL
- touch forward
- /usr/lib/smail/mkdbm forward
-
-# reload sendmail
- killall sendmail 2>/dev/null
- /usr/sbin/sendmail -bd -q15m # if inetd handles smtp port, this will not load
-}
diff --git a/contrib/dialog/samples/copifuncs/copi.ifman1 b/contrib/dialog/samples/copifuncs/copi.ifman1
deleted file mode 100644
index 3e271a532e292..0000000000000
--- a/contrib/dialog/samples/copifuncs/copi.ifman1
+++ /dev/null
@@ -1,29 +0,0 @@
-#! /usr/bin/perl
-#
-# This is a utility script to manipulate Fidonet-related issues
-# using Eugene Crosser's ifmail package
-#
-# Version 0.1
-#
-# (C) Michael Bravo and The Communication Tube, 1994
-#
-# You can do whatever you want with this script. I take no responsibility
-# whatsoever in anything related to this script. If you make some useful
-# additions to this, please think of sending them to me so I could partake
-# of your wisdom.
-#
-# This script was written to help attaching and requesting files from the
-# commandline, much like you do with Squish under DOS or OS/2. It is certainly
-# not perfect - I used it as an exercise in Perl. It also probably lacks
-# some other useful features, like ability to specify trunc/sent or kill/sent
-# attributes etc etc. If you really want this or some other features
-# implemented, write me at mbravo@tctube.spb.su or mbravo@octopus.spb.su
-# and I will try to do what I can.
-#
-# Note - files don't get copied to any spool dir, so if you move attached
-# files somewhere, they won't get sent.
-#
-# This script is supposed to read ifmail's config to determine where outbound
-# directory and logfile are. The only two parameters to modify in most cases
-# are below.
-
diff --git a/contrib/dialog/samples/copifuncs/copi.ifman2 b/contrib/dialog/samples/copifuncs/copi.ifman2
deleted file mode 100644
index 0b6dbb77dede1..0000000000000
--- a/contrib/dialog/samples/copifuncs/copi.ifman2
+++ /dev/null
@@ -1,137 +0,0 @@
-if ( getpwuid($<) ne $ifowner ) { print "You must be owner of ifmail\n"; exit 1; }
-
-if ( (@ARGV < 3) || $ARGV[0] eq "-?" || $ARGV[0] eq "-h" ) {
- &usage;
-}
-
-$ARGV[0] =~ tr/A-Z/a-z/;
-$ARGV[3] =~ tr/A-Z/a-z/;
-
-&parsecfg;
-
-if ( $logfile ne "" ) {
- open(LOG, ">>".$logfile) || die "Can't open logfile";
-}
-
-if (substr($ARGV[1], 0, 1) ne "/") {
- $cwd=`pwd`;
- chop $cwd;
- $ARGV[1] = $cwd."/".$ARGV[1];
-}
-
-if ($ARGV[3] eq "" || $ARGV[3] eq "normal") {
- $flavour = 'f';
-} elsif ($ARGV[3] eq "crash") {
- $flavour = 'c';
-} elsif ($ARGV[3] eq "hold") {
- $flavour = 'h';
-} else {
- print "Unknown flavour, assuming normal\n";
- $flavour = 'f';
-}
-
-if ($ARGV[0] eq "send") {
- &attach($ARGV[1], $ARGV[2]);
-} elsif ($ARGV[0] eq "get") {
- &request($ARGV[1], $ARGV[2]);
-} else {
- print "Unknown command, try ifman -h\n";
- exit 1;
-}
-
-close(LOG);
-
-exit 0;
-
-#######################################################################
-
-sub attach {
- local($fspec, $address) = @_;
-
- $floname = &resolve($address);
-
- open(FLO, ">>".$outbound."/".$floname) || die "Can't open flo-file $outbound/$floname";
- open(FIND, "find $fspec -print |") || die "Can't generate list of files";
-
- if ( eof(FIND) ) {
- print "No matching files, nothing to send\n";
- exit 1;
- }
-
- while (<FIND>) {
-
- chop;
- $datestamp = `date \"+%D %T\"`;
- chop $datestamp;
- printf LOG "%s %s %s\n", $datestamp, $$, "ifman: sending $_ to $address";
- printf FLO "%s\n", $_;
- }
-
- close(FLO);
- close(FIND);
-}
-
-sub request {
- local($fspec, $address) = @_;
-
- $reqname = &resolve($address);
-
- $reqname =~ s/\.[fch]lo/\.req/;
-
- open(REQ, ">>".$outbound."/".$reqname) || die "Can't open req-file";
-
- $datestamp = `date \"+%D %T\"`;
- chop $datestamp;
- printf LOG "%s %s %s\n", $datestamp, $$, "ifman: requesting $fspec from $address";
- printf REQ "%s\n", $fspec;
-
- close(REQ);
-}
-
-sub resolve {
- local($addr) = @_;
-
- if ( index($addr, ":") >=0 ) {
- print "I cannot resolve addresses with zones!\n";
- exit 1;
- } elsif ( index($addr, "/") == -1 ) {
- print "Not a valid address!\n";
- exit 1;
- }
-
- ($net, $node, $point) = split(/\/|\./, $addr);
-
- if ( defined $point ) {
- $pointdir = sprintf("%04x%04x.pnt", $net, $node);
- if ( ! -e $outbound."/".$pointdir ) {
- mkdir ($outbound."/".$pointdir, 0755) || die "Can't create point directory";
- }
- $flo = sprintf("0000%04x.%01slo", $point, $flavour);
- return $pointdir."/".$flo;
- } else {
- $flo = sprintf("%04x%04x.%01slo", $net, $node, $flavour);
- return $flo;
- }
-}
-
-sub usage {
- print "ifmail manager script\n";
- print "usage: ifman <cmd> <filespec> <address> [flavour]\n";
- print " commands: send, get\n";
- print " flavours: normal, crash, hold. Default is normal.\n";
- print "Only 2d addresses with points are supported - no zones!\n";
- exit 1;
-}
-
-sub parsecfg {
- open(CFG, $cfgfile) || die "Can't open ifmail config file";
-
- while (<CFG>) {
- chop;
- if (/^#/) { next; }
- if (/^outbound\s+(\S+)/) { $outbound = $1; }
- if (/^logfile\s+(\S+)/) { $logfile = $1; }
- }
-
- close(CFG);
-}
diff --git a/contrib/dialog/samples/copifuncs/copi.ifmcfg2 b/contrib/dialog/samples/copifuncs/copi.ifmcfg2
deleted file mode 100644
index c8a8c03d664a4..0000000000000
--- a/contrib/dialog/samples/copifuncs/copi.ifmcfg2
+++ /dev/null
@@ -1,68 +0,0 @@
-# Transport programs for mail and news, used by iftoss
-sendmail /usr/lib/sendmail -f $F $T
-rnews /usr/lib/news/rnews
-
-# Unpackers, used by ifunpack.
-# $F expands to archieve file name
-unzip /usr/bin/unzip -oq $F
-unarj /usr/bin/unarj e $F
-#unarc /usr/bin/unpack $F
-unzoo /usr/bin/zoo -extract $F
-unlzh /usr/bin/lharc -x $F
-
-# Packer program, used by ifpack
-# $F expands to archieve file name, $P - to list of packet names
-packer /usr/bin/zip $F $P
-
-# Maximum arcmail file size, will start new arcmail file if exceeds
-maxfsize 65000
-
-# Maximum packet size, ifmail/ifnews will start new packet if exeeds.
-# .out files are NOT created if nonzero specified, you must run ifpack
-# to make packets out. (unimplemented)
-maxpsize 65000
-
-# cnews log file and (temporary) database for seen-bys
-newslog /usr/lib/news/log
-msgidbm /tmp/ifmsgids
-
-# From this line on, values may be prefixed by a logical expression in
-# round brackets. Operators are: '!', '&', '|', 'Xor'.
-# Possible elements are:
-# - Nodelist flags (like "CM", "MNP", "V32" etc.)
-# - speed <operator> <numeric>
-# where <operator> is '=', '!=', '<', '>', '<=', '>='
-# - address <wildcard>
-# where <wildcard> is an (possibly incomplete) fidonet address,
-# e.g. "5020/*"
-# - time <interval>[,<interval>,...]
-# where <interval> is a day spec. with optional time spec., e.g.
-# Wk2000-0900,Sat1800-0000,Sun
-# - phone <prefix>
-# e.g. "phone 7-095-"
-
-# Dialing parameters
-# of multiple "ModemPort", "ModemReset", "ModemDial", "ModemHangup" lines,
-# first matching is used.
-# of multiple "PhoneTrans", "ModemConnect", "ModemError" lines, all matching
-# are used.
-# In send and expect strings, following substitutions are made:
-# \\ '\' character
-# \r carriage return (0x0d)
-# \n new line (0x0a)
-# \t tab (0x09)
-# \b backspace (0x08)
-# \s space (0x20)
-# \NNN (where N is an octal digit) - character with octal code NNN
-# \d 1 second delay (send strings only)
-# \p 1/4 second pause (send strings only)
-# \T translated telephone no. (send strings only)
-# \D untranslated telephone no. (send strings only)
-
-# ModemPort present a blank-separated list of ports with possible speed
-# extention (separated by colon); if speed is prefixed with 'L', it is
-# a "locked" port speed, otherwise it is a maximum speed to be set, while
-# actual speed is taken from the nodelist. If speed is omitted (or set
-# to zero), previous port speed is not changed.
-#ModemPort (time Any0000-0900,Sat,Sun) ttyS0
-#ModemPort cua0:L38400
diff --git a/contrib/dialog/samples/copifuncs/copi.ifmcfg4 b/contrib/dialog/samples/copifuncs/copi.ifmcfg4
deleted file mode 100644
index 4cb7a75b1fca5..0000000000000
--- a/contrib/dialog/samples/copifuncs/copi.ifmcfg4
+++ /dev/null
@@ -1,30 +0,0 @@
-ModemHangup +++ATH\r
-ModemOK OK
-ModemConnect CONNECT
-ModemError BUSY
-ModemError NO\sCARRIER
-ModemError NO\sDIAL
-ModemError RING\r
-ModemError ERROR
-
-# Call options (time, address and nodelist flag dependant)
-# All matching are applied in the order they are specified.
-# Possible options are "[No]Call", "[No]Hold", "[No]PUA", "[No]EMSI",
-# "[No]WaZOO", "[No]Freqs", "[No]Zmodem", "[No]ZedZap", "[No]Janus",
-# "[No]Hydra". Here, WaZOO stands for YooHoo/2U2 handshake, not for
-# the transfer scheme. FTS-0001 handshake and DietIFNA scheme cannot
-# be disallowed (because they are mandatory by standart). "Hold"
-# means really hold "hold" type packets and files: do not send them
-# if our system initiated the session, "NoHold" means send "hold"
-# packets when our system initiated the session. "NoPUA" stands for
-# "No PickUp All", i.e. PUP ("Pick Up Primary"). NoCall means do not
-# perform outbound call. This flag has no effect on the nodes
-# explicitly specified in the command line.
-# Default options are "everything allowed".
-# options ((!CM) & time Any0700-0200) Nocall
-#options (time Any0900-2100 & ! address 2:5020/*) Nocall
-
-# EMSI data for this node
-# From this line on values CANNOT be prefixed with logical expression
-# For now, escaping of '}' and ']' unimplemented, try to avoid these
-# characters please!
diff --git a/contrib/dialog/samples/copifuncs/copi.ifmcfg5 b/contrib/dialog/samples/copifuncs/copi.ifmcfg5
deleted file mode 100644
index 8221c1cf160d2..0000000000000
--- a/contrib/dialog/samples/copifuncs/copi.ifmcfg5
+++ /dev/null
@@ -1,14 +0,0 @@
-
-# PhoneTrans lines provide rules to change phone prefixes to make local
-# or long-distance calls. In the example below, my country code is 7,
-# and local dialing area is 095. From the numbers starting with "7-095-"
-# the prefix is stripped and the 7-digit remainder is dialed. For
-# the numbers starting with "7-" but not with "7-095-", the country prefix
-# "7-" is stripped and the long-distance dialing prefix "8W" substituted.
-# For the numbers not matching any of the above, international
-# call is performed: international dialing prefix "8W10" is prepended
-# to the unmodified 11-digit number. Generally, the syntax is:
-# "PhoneTrans <what-to-strip> / <what-to-substitute-instead>"
-#PhoneTrans 7-095- /
-#PhoneTrans 7- / 8W
-#PhoneTrans / 8W10
diff --git a/contrib/dialog/samples/copifuncs/copi.ifpoll1 b/contrib/dialog/samples/copifuncs/copi.ifpoll1
deleted file mode 100755
index 812c8e9cd0da3..0000000000000
--- a/contrib/dialog/samples/copifuncs/copi.ifpoll1
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-# ver 0.7
-# ifpoll, poll my boss node or the node given as argument 1
-#
-# i start this shell script every day by crond, but you can
-# start it also by hand :) start it as the owner of ifcico.
-# rasca, berlin 1993 (Rasca Gmelch, 2:2410/305.4)
-#
-# where "ifcico" and "ifpack" reside
diff --git a/contrib/dialog/samples/copifuncs/copi.ifpoll2 b/contrib/dialog/samples/copifuncs/copi.ifpoll2
deleted file mode 100644
index 216bff0858312..0000000000000
--- a/contrib/dialog/samples/copifuncs/copi.ifpoll2
+++ /dev/null
@@ -1,107 +0,0 @@
-
-# Packets backup directory - You have to CREATE this directory
-BAK=/var/spool/ifmail/BAK
-
-# logfile of ifcico
-IFLOG=/var/log/ifmail/sysiflog
-
-# log archive
-IFLOGARC=/var/log/ifmail/TheLog
-
-# owner of "ifcico"
-IFCICO_OWNER=fnet
-
-# how often should i try to call NODE?
-MaxTry=30
-
-# delay between outgoing calls in seconds
-DELAY=10
-
-# where to log processing - file or tty/console
-INFO_TTY=/dev/console
-
-# Lets backup the log and use a new one
-if [ -e $IFLOG ]; then
- echo Rearranging logs...
- cat $IFLOG >> $IFLOGARC
- cp /dev/null $IFLOG
-fi
-
-echo "`date \"+%b %d %T\"` ifpoll[$$]: starting" # >> $INFO_TTY
-
-# remember me, not to run as root..
-#
-if [ `whoami` != "$IFCICO_OWNER" ]; then
- echo "*** run $0 as the owner of ifcico ***"
- echo "`date \"+%b %d %T\"` ifpoll[$$]: wrong uid (rc 2)" # >> $INFO_TTY
- exit 2
-fi
-
-# argv[1] is the optional node to call
-#
-if [ "$1" != "" ]; then
- if [ "$1" = "-?" ] || [ "$1" = "-h" ]; then
- echo "usage: ifpoll [<node>]"
- exit 3
- else
- NODE=$1
- fi
-fi
-
-# let's pack the fido stuff..
-#
-$FIDOPATH/ifpack
-
-# loop until ifcico could connect the node or MaxTry is encountered
-#
-i=1; errlv=1
-while let 'i <= MaxTry' && let 'errlv != 0'
-do
- echo -n "`date \"+%b %d %T\"` ifpoll[$$]: $i. try ($NODE) " # >> $INFO_TTY
- #
- # start ifcico in master mode ..
- #
- $FIDOPATH/ifcico -r 1 $NODE
- errlv=$?
- if [ $errlv != "0" ]; then
- echo "failed" # >> $INFO_TTY
- if [ $i != $MaxTry ]; then
- sleep $DELAY
- fi
- let i=i+1
- else
- echo "ok :)" # >> $INFO_TTY
- fi
-done
-
-# if the poll was fine, unpacking..
-#
-if [ $errlv = "0" ]; then
- echo "`date \"+%b %d %T\"` ifpoll[$$]: unpacking.. " # >> $INFO_TTY
- cp -f /var/spool/ifmail/inb/*.* $BAK
- $FIDOPATH/ifunpack
- # add here some additional lines for processing tic files or
- # incoming file-lists or simular..
-else
- # write me a mail about the failed poll
- tail --lines=20 $IFLOG | elm -s "ifpoll: failed" $IFCICO_SYSOP >/dev/null
-fi
-
-echo "`date \"+%b %d %T\"` ifpoll[$$]: finished (rc $errlv)" # >> $INFO_TTY
-
-# Collect some infos...
-echo ""
-echo "*** Outgoing File Transfer Stats: ***"
-grep sent $IFLOG
-echo "*** Incoming File Transfer Stats: ***"
-grep received $IFLOG
-echo ""
-
-echo "---->> New mail: <<-----"
-grep echomail $IFLOG
-echo "---->> Personal mail: <<-----"
-grep "mail from" $IFLOG
-echo ""
-
-# return the errorlevel of ifcico
-exit $errlv
diff --git a/contrib/dialog/samples/copifuncs/copi.ifreq1 b/contrib/dialog/samples/copifuncs/copi.ifreq1
deleted file mode 100755
index 637293954bd50..0000000000000
--- a/contrib/dialog/samples/copifuncs/copi.ifreq1
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/perl
-$ver = "0.4";
-#
-# this perl script is designed for the ifmail package by eugene grosser.
-#
-# request a file (first argument) from a fido-node (second argument),
-# don't forget to quote if you use wildcards, e.g.:
-
-# ifreq 'files*' 2:2410/305
-# or
-# ifreq 'files newfile' 2:2410/305
-#
-# this perl script does only add an entry to the corresponding flo-file,
-# the mailer ifcico is not started!
-#
-# rasca, berlin 1994 (rasca@marie.physik.tu-berlin.de, 2:2410/305.4)
-#
-# multi-zone support added by
-# Roland Rosenfeld 15.05.1994 (roland@p13.flokiste.fido.de, 2:2450/300.13)
-
diff --git a/contrib/dialog/samples/copifuncs/copi.ifreq2 b/contrib/dialog/samples/copifuncs/copi.ifreq2
deleted file mode 100644
index 9ee78ff73fe27..0000000000000
--- a/contrib/dialog/samples/copifuncs/copi.ifreq2
+++ /dev/null
@@ -1,68 +0,0 @@
-# this is the base directory, where the req-files are stored and the
-# default outbound
-$flo_path = "/var/spool/ifmail";
-$outbound = "/outb"; # don't be confused, it means "/var/spool/ifmail/outb"
-
-# end of configuration #############################################
-
-# main()
-#
-if ((@ARGV < 1) || @ARGV > 2 || $ARGV[0] eq "-?") {
- &usage;
-} elsif ($ARGV[1] ne "") {
- $node = $ARGV[1];
-}
-$file = $ARGV[0];
-
-if (! ($node =~ /\d+:\d+\/\d+/)) {
- die "Wrong address: $node!!!";
-}
-
-($zone, $netnode) = split (/:/, $node);
-$reqfile = sprintf("%04x%04x", split(/\//, $netnode));
-
-if ($reqfile eq "00000000") {
- print ("can't resolve the fido address \"$node\"\n");
- &usage;
-} else {
- if ( $zone == 2 ) {
- $reqfile = $flo_path . $outbound . "/" . $reqfile . ".req";
- } elsif ( $zone < 7 ) {
- $reqfile = $flo_path . $outbound . ".00$zone/" . $reqfile . ".req";
- } else {
- $outbound = "";
- open (CONFIG, "< $config") || die "can't open $config";
- while ($_ = <CONFIG>) {
- if ( /^address.*$zone:.*\@(\w*)/ ) { $outbound = $1; }
- }
- if ( $outbound eq "" ) {
- die "No Zone $zone found in $config";
- }
- $reqfile = $flo_path . "/$outbound/" . $reqfile . ".req";
- }
-
- # seperate the file names of the first argument
- @files = split (/\s+/, $ARGV[0]);
-
- # open the flofile for appending
- open(FLOFILE, ">>" . $reqfile) || die "can't open $reqfile";
- while (@files) {
- print (FLOFILE shift(@files), "\n");
- }
- close(FLOFILE);
-
- print ("--- fido request $ver ---------------------------\n");
- print ("requesting \"$file\" from fido-node $node\n");
- print ("--- executing ifstat .. ------------------------\n");
- system("ifstat");
-}
-
-#
-# subroutine "usage"
-#
-sub usage {
- printf ("--- fido request %s -------------\n", $ver);
- printf ("usage: ifreq <file> [<3-d address>]\n");
- printf ("e.g. : ifreq FILES 2:2410/305\n");
- exit 1;
-}
diff --git a/contrib/dialog/samples/copifuncs/copi.rcnews b/contrib/dialog/samples/copifuncs/copi.rcnews
deleted file mode 100755
index 957a272ee4966..0000000000000
--- a/contrib/dialog/samples/copifuncs/copi.rcnews
+++ /dev/null
@@ -1,79 +0,0 @@
-#! /bin/sh
-## $Revision: 1.1 $
-## News boot script.
-
-## =()<. @<_PATH_SHELLVARS>@>()=
-. /usr/lib/news/innshellvars
-
-## Pick ${INND} or ${INNDSTART}
-WHAT=${INNDSTART}
-## Set to true or false
-DOINNWATCH=false
-MAIL="${MAILCMD} -s 'Boot-time Usenet warning on `hostname`' ${NEWSMASTER}"
-
-## RFLAG is set below; set FLAGS as appropriate.
-RFLAG=""
-FLAGS="-i0 -c0"
-
-## Clean shutdown?
-if [ -f ${SERVERPID} ] ; then
- ( echo 'INND: PID file exists -- unclean shutdown!' >/dev/console )
- RFLAG="-r"
-fi
-
-if [ ! -f ${NEWSLIB}/.news.daily ] ; then
- echo 'No .news.daily file; need to run news.daily?' | eval ${MAIL}
-else
- case `find ${NEWSLIB} -name .news.daily -mtime +1 -print 2>/dev/null` in
- "")
- ;;
- *)
- echo 'Old .news.daily file; need to run news.daily?' | eval ${MAIL}
- ;;
- esac
-fi
-
-## Active file recovery.
-if [ ! -s ${ACTIVE} ] ; then
- if [ -s ${NEWACTIVE} ] ; then
- mv ${NEWACTIVE} ${ACTIVE}
- else
- if [ -s ${OLDACTIVE} ] ; then
- cp ${OLDACTIVE} ${ACTIVE}
- else
- ( echo 'INND: No active file!' >/dev/console )
- exit 1
- fi
- fi
- RFLAG="-r"
- # You might want to rebuild the DBZ database, too:
- #echo "cd ${NEWSLIB} \
- # && makehistory -r \
- # && mv history.n.dir history.dir \
- # && mv history.n.pag history.pag" | su ${NEWSUSER}
-fi
-
-## Remove temporary batchfiles and lock files.
-( cd ${BATCH} && rm -f bch* )
-( cd ${LOCKS} && rm -f LOCK* )
-( cd ${TEMPSOCKDIR} && rm -f ${TEMPSOCK} )
-rm -f ${NEWSCONTROL} ${NNTPCONNECT} ${SERVERPID}
-
-## Start the show.
-( echo 'Starting innd.' >/dev/console )
-eval ${WHAT} ${RFLAG} ${FLAGS}
-
-# Gee, looks like lisp, doesn't it?
-${DOINNWATCH} && {
- echo "( ( sleep 60 ; ${INNWATCH} ) & )" | su ${NEWSUSER}
-}
-
-RMFILE=${MOST_LOGS}/expire.rm
-if [ -s ${MOST_LOGS}/expire.rm ] ; then
- ( echo "Removing articles from pre-downtime expire run." >/dev/console )
- (
- echo 'System shut down during expire. Unlinking articles listed in'
- echo ${RMFILE}
- ) | eval ${MAIL}
- echo "${NEWSBIN}/expirerm ${RMFILE}" | su ${NEWSUSER} &
-fi
diff --git a/contrib/dialog/samples/copifuncs/copi.sendifm1 b/contrib/dialog/samples/copifuncs/copi.sendifm1
deleted file mode 100755
index 564b9c6053383..0000000000000
--- a/contrib/dialog/samples/copifuncs/copi.sendifm1
+++ /dev/null
@@ -1,74 +0,0 @@
-#! /bin/sh
-## $Revision: 1.1 $
-## SH script to send UUCP batches out.
-
-## =()<. @<_PATH_SHELLVARS>@>()=
-. ~news/innshellvars
-
-PROGNAME=`basename $0`
-LOCK=${LOCKS}/LOCK.${PROGNAME}
-LOG=${MOST_LOGS}/${PROGNAME}.log
-
-MAXJOBS=200
-UUXFLAGS="- -r -gd"
-
-## Start logging.
-test ! -f ${LOG} && touch ${LOG}
-chmod 0660 ${LOG}
-exec >>${LOG} 2>&1
-echo "${PROGNAME}: [$$] begin `date`"
-cd ${BATCH}
-
-## Anyone else there?
-trap 'rm -f ${LOCK} ; exit 1' 1 2 3 15
-shlock -p $$ -f ${LOCK} || {
- echo "${PROGNAME}: [$$] locked by [`cat ${LOCK}`]"
- exit 0
-}
-
-## Who are we sending to?
-if [ -n "$1" ] ; then
- LIST="$*"
-else
- LIST=`ls /usr/spool/news/out.going|egrep "f[0-9]*.n[0-9]*$"`
-fi
-
-case ${HAVE_UUSTAT} in
-DONT)
- TEMP=${TMPDIR}/uuq$$
- uuq -h |tr -d : >${TEMP}
- ;;
-esac
-
-## Do the work...
-
-for SITE in ${LIST}; do
-
- ## See if any data is ready for host.
- BATCHFILE=${SITE}.uucp
- if [ -f ${SITE}.work ] ; then
- cat ${SITE}.work >>${BATCHFILE}
- rm -f ${SITE}.work
- fi
- mv ${SITE} ${SITE}.work
- ctlinnd -s -t30 flush ${SITE} || continue
- cat ${SITE}.work >>${BATCHFILE}
- rm -f ${SITE}.work
- if [ ! -s ${BATCHFILE} ] ; then
- echo "${PROGNAME}: [$$] no articles for ${SITE}"
- rm -f ${BATCHFILE}
- continue
- fi
-
- ## Get the compression flags.
- echo "${PROGNAME}: [$$] begin ${SITE}"
- case "${SITE}" in
- phreak)
- COMPRESS="compress"
- ;;
- *)
- COMPRESS="gzip"
- ;;
- esac
-
- time batcher \
diff --git a/contrib/dialog/samples/copifuncs/copi.sendifm2 b/contrib/dialog/samples/copifuncs/copi.sendifm2
deleted file mode 100644
index 1a34a1fabbc04..0000000000000
--- a/contrib/dialog/samples/copifuncs/copi.sendifm2
+++ /dev/null
@@ -1,15 +0,0 @@
- ${SITE} ${BATCHFILE}
-
- echo "${PROGNAME}: [$$] end ${SITE}"
-done
-
-case ${HAVE_UUSTAT} in
-DONT)
- rm -f ${TEMP}
- ;;
-esac
-
-## Remove the lock file.
-rm -f ${LOCK}
-
-echo "${PROGNAME}: [$$] end `date`"
diff --git a/contrib/dialog/samples/copifuncs/copi.trnrc b/contrib/dialog/samples/copifuncs/copi.trnrc
deleted file mode 100644
index 7be596f74db6b..0000000000000
--- a/contrib/dialog/samples/copifuncs/copi.trnrc
+++ /dev/null
@@ -1,13 +0,0 @@
-TRNINIT="-x -e -X -F\" :> \""
-HIDELINE="^X-FTN"
-NEWSHEADER="Newsgroups: %(%F=^\$?%C:%F)
-Subject: %(%S=^\$?%\"\n\nSubject: \":%S)
-%(%R=^\$?:References: %R
-)Sender:
-Distribution: %(%i=^\$?%\"\nDistribution: \":%D)
-Organization: %o
-X-Comment-To: %f\n\n"
-ATTRIBUTION="%f writes:\n"
-YOUSAID="In article %i \n of newsgroup %C you write about \"%s\":\n"
-MAILCALL="(New Mail)"
-export NEWSHEADER HIDELINE TRNINIT ATTRIBUTION MAILCALL YOUSAID EDITOR
diff --git a/contrib/dialog/samples/copifuncs/copi.wheel b/contrib/dialog/samples/copifuncs/copi.wheel
deleted file mode 100755
index 567e559a5abb3..0000000000000
--- a/contrib/dialog/samples/copifuncs/copi.wheel
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/bash
-# $Id: copi.wheel,v 1.2 2001/01/15 22:26:33 tom Exp $
-
-mkstemp size
-dialog --print-maxsize 2>$tmp_size
-ROWS="`cut $tmp_size -f1 -d, | cut -f2 -d:`"
-COLS="`cut $tmp_size -f2 -d,`"
-rm $tmp_size
-
-# Takes an integer, multiplies it for COLS, divides for 132
-scalex() {
- echo $[$1*$COLS/132]
-}
-scaley() {
- echo $[$1*$ROWS/60]
-}
-
-dialog --backtitle "$TITLE" --no-shadow \
---begin `scaley 27` `scalex 98` --infobox "pushd /var/log >/dev/null" 0 0 --and-widget \
---begin `scaley 35` `scalex 95` --infobox "mkdir -p news -m 755" 0 0 --and-widget \
---begin `scaley 45` `scalex 86` --infobox "chown news.news news" 0 0 --and-widget \
---begin `scaley 48` `scalex 78` --infobox "cd /var/log/news" 0 0 --and-widget \
---begin `scaley 51` `scalex 61` --infobox "mkdir -p OLD -m 755" 0 0 --and-widget \
---begin `scaley 52` `scalex 47` --infobox "chown news.news OLD" 0 0 --and-widget \
---begin `scaley 51` `scalex 40` --infobox "cd /var/spool" 0 0 --and-widget \
---begin `scaley 48` `scalex 25` --infobox "mkdir -p news -m 775" 0 0 --and-widget \
---begin `scaley 42` `scalex 13` --infobox "chown news.news news" 0 0 --and-widget \
---begin `scaley 35` `scalex 4` --infobox "cd /var/spool/news" 0 0 --and-widget \
---begin `scaley 27` `scalex 2` --infobox "CURMASK=`umask`" 0 0 --and-widget \
---begin `scaley 19` `scalex 4` --infobox "umask 02" 0 0 --and-widget \
---begin `scaley 11` `scalex 13` --infobox "mkdir -p out.going control junk in.coming" 0 0 --and-widget \
---begin `scaley 5` `scalex 25` --infobox "chown news.news out.going control junk in.coming" 0 0 --and-widget \
---begin `scaley 2` `scalex 37` --infobox "cd in.coming" 0 0 --and-widget \
---begin `scaley 1` `scalex 46` --infobox "mkdir -p bad tmp" 0 0 --and-widget \
---begin `scaley 2` `scalex 61` --infobox "chown news.news bad tmp" 0 0 --and-widget \
---begin `scaley 5` `scalex 76` --infobox "umask $CURMASK" 0 0 --and-widget \
---begin `scaley 11` `scalex 87` --infobox "ln -sf ~news /usr/local/lib/" 0 0 --and-widget \
---begin `scaley 18` `scalex 95` --infobox "ln -sf ~news/inews /usr/bin/" 0 0 --and-widget \
---begin `scaley 26` `scalex 97` --infobox "chmod 1777 /var/tmp" 0 0 --and-widget \
---begin `scaley 34` `scalex 95` --infobox "cd ~news" 0 0 --and-widget \
---begin `scaley 42` `scalex 87` --infobox "touch history history.dir history.pag errlog log" 0 0 --and-widget \
---begin `scaley 47` `scalex 76` --infobox "chown news.news history* log errlog" 0 0 --and-widget \
---sleep 1 --infobox "Creating spooling and logging directories and files..." 0 0 --and-widget \
---begin `scaley 51` `scalex 78` --infobox "chmod 664 history* log errlog" 0 0 --and-widget \
---begin `scaley 52` `scalex 60` --infobox "echo \"control 0000000000 0000000001 y\" > active" 0 0 --and-widget \
---begin `scaley 51` `scalex 42` --infobox "echo \"junk 0000000000 0000000001 y\" >> active" 0 0 --and-widget \
---begin `scaley 48` `scalex 26` --infobox "chown news.news active" 0 0 --and-widget \
---begin `scaley 42` `scalex 13` --infobox "echo \"control 814573260 usenet\" > active.times" 0 0 --and-widget \
---begin `scaley 35` `scalex 4` --infobox "echo \"junk 814573260 usenet\" >> active.times" 0 0 --and-widget \
---begin `scaley 27` `scalex 2` --infobox "chown news.news active.times" 0 0 --and-widget \
---begin `scaley 19` `scalex 4` --infobox ":>newsgroups" 0 0 --and-widget \
---begin `scaley 11` `scalex 12` --infobox "chown news.news newsgroups" 0 0 --and-widget \
---begin `scaley 6` `scalex 25` --infobox "popd >/dev/null" 0 0
-sleep 1
diff --git a/contrib/dialog/samples/copifuncs/ifpatch b/contrib/dialog/samples/copifuncs/ifpatch
deleted file mode 100644
index 1e7c7ee510e85..0000000000000
--- a/contrib/dialog/samples/copifuncs/ifpatch
+++ /dev/null
@@ -1,101 +0,0 @@
---- ifgate/message.c.orig Mon Jul 24 15:17:47 1995
-+++ ifgate/message.c Mon Jul 24 15:18:00 1995
-@@ -48,12 +48,26 @@
- if (!strcasecmp(msg->key,"X-UUCP-From")) return 0;
- if (!strcasecmp(msg->key,"X-Body-Start")) return 0;
- if (!strncasecmp(msg->key,"X-FTN-",6)) return 0;
-- if (!strcasecmp(msg->key,"Path")) return isftnpath(msg->val)?0:1;
-+ if (!strcasecmp(msg->key,"Path"))
-+
-+#ifdef LESS_RFC_KLUDGES
-+ return 0;
-+#else
-+ return isftnpath(msg->val)?0:1;
-+#endif
-+
- if (!strcasecmp(msg->key,"Newsgroups")) return newsmode?0:2;
- if (!strcasecmp(msg->key,"Xref")) return 0;
- if (!strcasecmp(msg->key,"Return-Receipt-To")) return 1;
- if (!strcasecmp(msg->key,"Received")) return newsmode?0:2;
-- if (!strcasecmp(msg->key,"From")) return ftnorigin?0:2;
-+ if (!strcasecmp(msg->key,"From"))
-+
-+#ifdef LESS_RFC_KLUDGES
-+ return 0;
-+#else
-+ return ftnorigin?0:2;
-+#endif
-+
- if (!strcasecmp(msg->key,"To"))
- {
- if (newsmode) return 0;
-@@ -66,7 +80,14 @@
- }
- if (!strcasecmp(msg->key,"Cc")) return 2;
- if (!strcasecmp(msg->key,"Bcc")) return 2;
-- if (!strcasecmp(msg->key,"Reply-To")) return 2;
-+ if (!strcasecmp(msg->key,"Reply-To"))
-+
-+#ifdef LESS_RFC_KLUDGES
-+ return 0;
-+#else
-+ return 2;
-+#endif
-+
- if (!strcasecmp(msg->key,"Lines")) return 0;
- if (!strcasecmp(msg->key,"Date")) return 0;
- if (!strcasecmp(msg->key,"Subject"))
-@@ -77,8 +98,22 @@
- if (!strcasecmp(msg->key,"Organization")) return removeorg?0:1;
- if (!strcasecmp(msg->key,"Comment-To")) return 0;
- if (!strcasecmp(msg->key,"X-Comment-To")) return 0;
-- if (!strcasecmp(msg->key,"Keywords")) return 2;
-- if (!strcasecmp(msg->key,"Summary")) return 2;
-+ if (!strcasecmp(msg->key,"Keywords"))
-+
-+#ifdef LESS_RFC_KLUDGES
-+ return 0;
-+#else
-+ return 2;
-+#endif
-+
-+ if (!strcasecmp(msg->key,"Summary"))
-+
-+#ifdef LESS_RFC_KLUDGES
-+ return 0;
-+#else
-+ return 2;
-+#endif
-+
- if (!strcasecmp(msg->key,"MIME-Version")) return removemime?0:1;
- if (!strcasecmp(msg->key,"Content-Type")) return removemime?0:1;
- if (!strcasecmp(msg->key,"Content-Length")) return removemime?0:1;
-@@ -86,8 +121,26 @@
- if (!strcasecmp(msg->key,"Content-Name")) return 2;
- if (!strcasecmp(msg->key,"Content-Description")) return 2;
- if (!strcasecmp(msg->key,"Message-ID")) return ftnorigin?0:1;
-- if (!strcasecmp(msg->key,"References")) return removeref?0:1;
-- if (!strcasecmp(msg->key,"Distribution")) return ftnorigin?0:1;
-+ if (!strcasecmp(msg->key,"References"))
-+
-+#ifdef LESS_RFC_KLUDGES
-+ return 0;
-+#else
-+ return removeref?0:1;
-+#endif
-+
-+ if (!strcasecmp(msg->key,"Distribution"))
-+
-+#ifdef LESS_RFC_KLUDGES
-+ return 0;
-+#else
-+ return ftnorigin?0:1;
-+#endif
-+
-+#ifdef LESS_RFC_KLUDGES
-+ if (!strcasecmp(msg->key,"NNTP-Posting-Host")) return 0;
-+#endif
-+
- /*if (!strcasecmp(msg->key,"")) return ;*/
- return 1;
- }
diff --git a/contrib/dialog/samples/copismall b/contrib/dialog/samples/copismall
deleted file mode 100755
index 3dfb485a4c94d..0000000000000
--- a/contrib/dialog/samples/copismall
+++ /dev/null
@@ -1,296 +0,0 @@
-#!/bin/bash
-# $Id: copismall,v 1.8 2010/01/13 10:26:52 tom Exp $
-#
-# ComeOn Point Installer! v0.9a.small (small version for cdialog v0.9a)
-# - installa il point in modo visuale e auto-detecting. Versione light.
-#
-# AUTHOR: Beppe (beppe.dem@nsm.it)
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-
-# THIS IS NOT THE ORIGINAL VERSION!!!! This files was adequate to be
-# a demo for cdialog v0.9a+. However it doesn't include all its features.
-# Look for one of the free ComeOn Linux! tools to have a complete
-# demo of cdialog. ComeOn Linux! follows the GNU philosophy.
-# Send peacefully a mail to demarco_p@abramo.it for more info.
-
-. ./setup-vars
-
-#COMEONDIR=/usr/lib/ComeOn
-#POINTDIR=$COMEONDIR/point
-POINTDIR=`pwd`
-
-AKASETUP=$POINTDIR/.akasetup
-PNTSETUP=$POINTDIR/.pntsetup
-EMSIFILE=$POINTDIR/.emsi
-COPIUSER=$POINTDIR/.copi.user
-COPIVER=v0.9a.small
-TITLE="ComeOn Point Installer! $COPIVER -+- (c) 1996 ComeOn Linux!"
-
-#FUNCSVER=v0.9.2
-#FUNCSDIR=$POINTDIR/funcs-$FUNCSVER
-FUNCSDIR=$POINTDIR/copifuncs
-
-#COPIDIR=$POINTDIR/copi-$COPIVER
-#. $COPIDIR/copishellvars
-
-#POINTVER="v1.1" # ComeOn Point version
-
-if [ $LOGNAME != root ]
-then
- $DIALOG --backtitle "$TITLE" --title "Error!" --beep --msgbox "Questo programma per funzionare correttamente deve essere avviato dall'amministratore di sistema (root)." 0 0
- exit
-fi
-
-
-$DIALOG --backtitle "$TITLE" --title "Are you sure?" --cr-wrap --msgbox "Questo installer procedera' in modalita'
-auto-detect all'installazione del point.
-Premi <Enter> per iniziare o <Esc> per uscire. " 0 0
-
-if [ $? = $DIALOG_CANCEL -o $? = $DIALOG_ESC ]; then
- exit
-fi
-
-
-pushd $FUNCSDIR >/dev/null
-. ./copi.funcs
-. ./common.funcs
-. ./admin.funcs
-
-###############################################################################
-find_incompatible_packages
-
-if [ "$PKG_TO_REMOVE" ]
-then
- $DIALOG --backtitle "$TITLE" --beep --title "Problem detected" --msgbox "Attenzione, prima di poter continuare bisogna avviare pkgtool e rimuovere i seguenti packages: $PKG_TO_REMOVE." 0 0
- exit
-fi
-
-###############################################################################
-mkstemp dialog
-
-find_necessary_packages
-
-if [ "$PKG_TO_INSTALL" ]
-then
- echo -n "Attenzione, prima di poter continuare bisogna avviare setup ed installare i seguenti packages dai disk sets N (quelli del Networking): $PKG_TO_INSTALL." >$tmp_dialog
-
- if [ "`echo $PKG_TO_INSTALL | grep tcpip`" ]
- then
- echo -n " Ricordarsi poi di effettuare lo shutdown per rendere effettive le modifiche." >>$tmp_dialog
- fi
-
- $DIALOG --backtitle "$TITLE" --beep --title "Problem detected" --msgbox "`cat $tmp_dialog`" 0 0
-
- rm $tmp_dialog
- exit
-fi
-
-###############################################################################
-mkstemp smailp
-
-SMAILTGZ=""
-if [ ! -d /usr/lib/smail ]
-then
- $DIALOG --backtitle "$TITLE" --title "Smail not found" --inputbox "Bisogna installare Smail, per cui inserire il percorso completo di dove trovarne i binari compressi" 0 0 "/cdrom/sunsite/system/Mail/delivery/smail-linuxbin-3.1.29.1.tar.gz" 2>$tmp_smailp
- SMAILTGZ="`cat $tmp_smailp`"
- rm $tmp_smailp
- while [ ! -f "$SMAILTGZ" ]
- do
- $DIALOG --backtitle "$TITLE" --beep --title "Archive not found" --inputbox "Percorso di file \"$SMAILTGZ\" non valido, controllarne la correttezza." 0 0 "/cdrom/sunsite/system/Mail/delivery/smail-linuxbin-3.1.29.1.tar.gz" 2>$tmp_smailp
- SMAILTGZ="`cat $tmp_smailp`"
- rm $tmp_smailp
- done
-fi
-
-###############################################################################
-mkstemp target
-mkstemp asetup
-mkstemp psetup
-
-AKA=""
-while [ ! "$AKA" ]
-do
- $DIALOG --backtitle "$TITLE" --title "Primary address" --inputbox "Inserire il proprio address principale, completo di point e di domain. Il poll sara' effettuato per default dal boss corrispondente." 0 0 "2:335/722.7@fidonet" 2>$tmp_target
- AKAFTN="`cat $tmp_target`"
- rm $tmp_target
- fidonetpoint2int $AKAFTN
- AKA="$_RETVAL"
-done
-echo -n "`echo $AKA | cut -f2- -d.`:" >$tmp_asetup
-echo -n "`echo $AKA | cut -f1 -d. | cut -c2-`:" >$tmp_psetup
-AKASFTN="$AKAFTN"
-AKAS="$AKA"
-while [ "$AKAFTN" ]
-do
- $DIALOG --backtitle "$TITLE" --title "AKAs" --inputbox "Inserire un eventuale address secondario, oppure lasciare la riga vuota per proseguire. Attenzione: nel caso si abbiano piu' indirizzi sulla stessa rete, bisognera' configurare solo uno di questi. Gli indirizzi correntemente definiti sono: $AKASFTN" 0 0 2>$tmp_target
- AKAFTN="`cat $tmp_target`"
- rm $tmp_target
- if [ "$AKAFTN" ]
- then
- fidonetpoint2int $AKAFTN
- AKA="$_RETVAL"
- if [ "`echo $AKAS | grep \".\`echo $AKA | cut -f5 -d.\`.\"`" ]
- then
- $DIALOG --backtitle "$TITLE" --beep --title "Invalid address" --msgbox "Non si possono avere piu' indirizzi sullo stesso dominio (net)." 0 0
- else
- AKASFTN="$AKASFTN $AKAFTN"
- AKAS="$AKAS $AKA"
- echo -n "`echo $AKA | cut -f2- -d.`:" >>$tmp_asetup
- echo -n "`echo $AKA | cut -f1 -d. | cut -c2-`:" >>$tmp_psetup
- fi
- fi
-done
-echo ":" >>$tmp_asetup
-echo ":" >>$tmp_psetup
-save $AKASETUP
-save $PNTSETUP
-mv $tmp_asetup $AKASETUP
-mv $tmp_psetup $PNTSETUP
-
-###############################################################################
-mkstemp hostnm
-
-$DIALOG --backtitle "$TITLE" --title "Hostname" --inputbox "Inserire l'hostname di questo computer qualora si abbia una rete gia' configurata, altrimenti inventarne uno fittizio da assegnare e questa macchina verra' configurata per il loopback." 0 0 "quark.comeon.org" 2>$tmp_hostnm
-NEW_HOSTNAME="`cat $tmp_hostnm`"
-rm $tmp_hostnm
-
-###############################################################################
-mkstemp master
-
-$DIALOG --backtitle "$TITLE" --title "Point admin" --inputbox "Scegliere l'user principale per la gestione e l'uso del point. Se l'user non esiste, verra' creato. Se esiste, ne verranno adattate le informazioni quali nome, gruppi, etc." 0 0 "beppe" --and-widget --title "Insert SysOp's name" --inputbox "Inserire nome e cognome del gestore ed utilizzatore principale del point (il proprio nome)." 0 0 "Giuseppe De Marco" --and-widget --title "Choose editor" --inputbox "Scegliere l'editor da usare per scrivere i messaggi" 0 0 "vim" 2>$tmp_master
-POST_USER="`cut $tmp_master -f1`"
-POST_NAME="`cut $tmp_master -f2`"
-POST_EDIT="`cut $tmp_master -f3`"
-rm $tmp_master
-save $COPIUSER
-echo $POST_USER >$COPIUSER
-
-###############################################################################
-mkstemp expire
-mkstemp origin
-
-$DIALOG --backtitle "$TITLE" --title "Origin" --inputbox "Scegliere l'Origin del sistema" 9 60 "$POST_USER's linux box" 2>$tmp_origin
-NEW_ORIGIN="`cat $tmp_origin`"
-rm $tmp_origin
-
-$DIALOG --backtitle "$TITLE" --title "News expiring" --inputbox "Decidere per quanti giorni i messaggi echomail (le news) dovranno transitare sul sistema prima di venire cancellati automaticamente da news.daily. Inserire never se si vuole che non vengano mai cancellati. Sono ammesse cifre decimali (i.e. 25.5). Notare comunque che il valore qui inserito e' quello di default, ma per ogni singola area (newsgroup) sara' possibile specificare poi un valore appropriato." 0 0 "30" 2>$tmp_expire
-KEEPDAYS="`cat $tmp_expire`"
-rm $tmp_expire
-
-###############################################################################
-mkstemp dialer
-mkstemp ifmail
-mkstemp mailvr
-mkstemp passwd
-
-IFMAILTGZ=""
-IFMAILVERS=""
-if [ ! -d /usr/lib/ifmail -o ! -d /etc/ifmail -o ! -d /var/log/ifmail -o ! -f /usr/lib/ifmail/ifcico ]
-then
- $DIALOG --backtitle "$TITLE" --title "ifmail not found" --inputbox "Inserire il percorso COMPLETO dei sorgenti compressi di ifmail che verranno decompressi in /usr/src e compilati." 0 0 "/cdrom/sunsite/system/Mail/transport/ifmail-2.8b.tar.gz" 2>$tmp_ifmail
- IFMAILTGZ="`cat $tmp_ifmail`"
- rm $tmp_ifmail
- while [ ! -f "$IFMAILTGZ" ]
- do
- $DIALOG --backtitle "$TITLE" --beep --title "invalid filename" --inputbox "Percorso di file \"$IFMAILTGZ\" non valido, controllarne la correttezza." 0 0 "/cdrom/sunsite/system/Mail/transport/ifmail-2.8b.tar.gz" 2>$tmp_ifmail
- IFMAILTGZ="`cat $tmp_ifmail`"
- rm $tmp_ifmail
- done
-
- $DIALOG --backtitle "$TITLE" --title "ifmail version" --inputbox "Specificare la versione di ifmail" 0 0 "2.8b" 2>$tmp_mailvr
- IFMAILVERS="`cat $tmp_mailvr` + ComeOn Point $POINTVER"
- rm $tmp_mailvr
-fi
-
-IAKA=1
-PASSW=""
-AKA="`cut $AKASETUP -f$IAKA -d:`"
-while [ "$AKA" ]
-do
- int2fido $AKA
- AKAFTN="$_RETVAL"
- $DIALOG --backtitle "$TITLE" --title "Password" --inputbox "Specificare la password di sessione e per i pacchetti per il nodo $AKAFTN -- attenzione che alcuni mailers accettano solo passwords da 8 caratteri in maiuscolo!!" 0 0 "MYPASSWD" 2>$tmp_passwd
- PASSW="$PASSW`cat $tmp_passwd`:"
- rm $tmp_passwd
- IAKA=$[$IAKA+1]
- AKA="`cut $AKASETUP -f$IAKA -d:`"
-done
-PASSW="$PASSW:"
-
-$DIALOG --backtitle "$TITLE" \
---title "Modem speed" --inputbox "Specificare la velocita' del proprio modem (che sta su /dev/modem)" 0 0 "16800" --and-widget \
---title "System name" --inputbox "Specificare il nome del sistema per il pacchetto EMSI" 0 0 "`cat $COPIUSER`'s linux point" --and-widget \
---title "Location" --inputbox "Inserire la localita' fisica in cui risiede il sistema" 0 0 "Catanzaro, Italy - Europe" --and-widget \
---title "Phone number" --inputbox "Inserire il proprio numero di telefono in formato internazionale, cioe' completo di doppio prefisso (xx-yyy-zzzzzz)" 0 0 "39-961-31997" --and-widget \
---title "International call prefix" --inputbox "Specificare il prefisso da comporre per poter effettuare una chiamata internazionale (se ci si trova in Italia ad es. bisogna inserire 00)" 0 0 "00" --and-widget \
---title "Long-distance call prefix" --inputbox "Specificare il prefisso da comporre per poter effettuare una chiamata interurbana in ambito nazionale, che verra' sostituito al prefisso della propria nazione quando incontrato in nodelist (per l'Italia ad es. bisogna inserire 0, che sostituira' il 39)" 0 0 "0" --and-widget \
---title "Pointlist flags" --inputbox "Inserire eventuali flags stile pointlist per il pacchetto EMSI" 0 0 "MO,V32B,V42B,ZYX" --and-widget \
---title "Modem dialing" --inputbox "Inserire la stringa da inviare al modem per comporre un numero telefonico" 0 0 "ATDT" 2>$tmp_dialer
-
-echo -en "\t$POST_NAME\t\t" >>$tmp_dialer
-save $EMSIFILE
-mv $tmp_dialer $EMSIFILE
-
-###############################################################################
-
-if [ -d /etc/smail ]
-then
- SMAILCFGDIR=/etc/smail
-else
- SMAILCFGDIR=/usr/lib/smail
-fi
-
-###############################################################################
-
-$DIALOG --backtitle "$TITLE" --title "First step completed!" --msgbox "OK, ora ho tutte le informazioni necessarie per poter installare il point. Da qui in poi faro' tutto da solo, quindi ci si puo' tranquillamente andare a prendere un caffe'. :-)" 0 0
-
-###############################################################################
-
-killall sendmail 2>/dev/null
-if [ $SMAILTGZ ]; then tar zxvf $SMAILTGZ -C / >/dev/null; fi
-/usr/sbin/sendmail -bd -q15m
-
-if [ ! "`ping -c1 $NEW_HOSTNAME | grep \"1 packets received\"`" ]; then
- configure_loopback $NEW_HOSTNAME
-fi
-
-add_postmaster "$POST_USER" "$POST_NAME"
-add_alias "$POST_NAME" "$POST_USER"
-configure_trn "$POST_USER" "$POST_EDIT"
-configure_elm "$POST_USER" "$POST_EDIT"
-
-comment_nntp_in_inetdconf
-set_organization "$NEW_ORIGIN"
-create_innconf_newsfeeds_distrib
-create_expirectl $KEEPDAYS
-create_nnrpaccess
-create_hostsnntp
-create_dirs_and_files
-install_rcnews
-install_crontab_news
-if [ $IFMAILTGZ ]; then
- install_ifmail "$IFMAILTGZ" /usr/lib/ifmail /etc/ifmail /var/log/ifmail "$IFMAILVERS" /usr/src
-fi
-configure_ifmail /usr/lib/ifmail /etc/ifmail /var/log/ifmail "$PASSW"
-configure_smail $SMAILCFGDIR
-
-###############################################################################
-$DIALOG --backtitle "$TITLE" \
---title "-=[ Enjoy! ]=-" --msgbox "Il point e' stato installato con successo!" 0 0 --and-widget \
---msgbox "trn (il newsreader, per leggere/scrivere gli echomail) ed elm (il mailreader, per leggere/scrivere i netmail) sono gia' stati configurati per l'user $POST_USER." 0 0
-
-popd >/dev/null
diff --git a/contrib/dialog/samples/debian.rc b/contrib/dialog/samples/debian.rc
index 3b42eb8433bbd..195d79877ac13 100644
--- a/contrib/dialog/samples/debian.rc
+++ b/contrib/dialog/samples/debian.rc
@@ -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
diff --git a/contrib/dialog/samples/dft-cancel b/contrib/dialog/samples/dft-cancel
new file mode 100755
index 0000000000000..2b317fc5b39c0
--- /dev/null
+++ b/contrib/dialog/samples/dft-cancel
@@ -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" "$@"
diff --git a/contrib/dialog/samples/dft-extra b/contrib/dialog/samples/dft-extra
new file mode 100755
index 0000000000000..de08cd7aabaac
--- /dev/null
+++ b/contrib/dialog/samples/dft-extra
@@ -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" "$@"
diff --git a/contrib/dialog/samples/dft-help b/contrib/dialog/samples/dft-help
new file mode 100755
index 0000000000000..cade8a75efaaf
--- /dev/null
+++ b/contrib/dialog/samples/dft-help
@@ -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" "$@"
diff --git a/contrib/dialog/samples/dft-no b/contrib/dialog/samples/dft-no
new file mode 100755
index 0000000000000..172bcb2ca4b68
--- /dev/null
+++ b/contrib/dialog/samples/dft-no
@@ -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" "$@"
diff --git a/contrib/dialog/samples/dialog.py b/contrib/dialog/samples/dialog.py
index db66fd7f2f4b3..5286b41f1db26 100644
--- a/contrib/dialog/samples/dialog.py
+++ b/contrib/dialog/samples/dialog.py
@@ -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.
diff --git a/contrib/dialog/samples/dselect b/contrib/dialog/samples/dselect
deleted file mode 100755
index 22995b4e9fd43..0000000000000
--- a/contrib/dialog/samples/dselect
+++ /dev/null
@@ -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
diff --git a/contrib/dialog/samples/form1 b/contrib/dialog/samples/form1
index cfa8a4a5d8f58..38e23649a5916 100755
--- a/contrib/dialog/samples/form1
+++ b/contrib/dialog/samples/form1
@@ -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)
diff --git a/contrib/dialog/samples/fselect0 b/contrib/dialog/samples/fselect0
new file mode 100755
index 0000000000000..3bd5b6d962a8e
--- /dev/null
+++ b/contrib/dialog/samples/fselect0
@@ -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
diff --git a/contrib/dialog/samples/inputmenu b/contrib/dialog/samples/inputmenu
index 5053cda6a45a4..3c808111dc13c 100755
--- a/contrib/dialog/samples/inputmenu
+++ b/contrib/dialog/samples/inputmenu
@@ -1,60 +1,65 @@
-#! /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" \
- --backtitle "An Example for the use of --inputmenu:" "$@" \
- --inputmenu "Originally I designed --inputmenu for a \
+ exec 3>&1
+ 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. \
" 20 50 10 \
"Username:" "$user" \
"UID:" "$uid" \
"GID:" "$gid" \
"HOME:" "$home" \
-2>&1 1>&3 )
- returncode=$?
- exec 3>&-
- case $returncode in
- $DIALOG_CANCEL)
- "$DIALOG" --clear --backtitle "An Example for the use of --inputmenu:" \
- --yesno "Really quit?" 10 30
- case $? in
- $DIALOG_OK) break;;
- $DIALOG_CANCEL) returncode=99;;
- esac
- ;;
- $DIALOG_OK)
- "$DIALOG" --clear --backtitle "An Example for the use of --inputmenu:" \
+2>&1 1>&3 `
+ returncode=$?
+ exec 3>&-
+ case $returncode in
+ $DIALOG_CANCEL)
+ "$DIALOG" \
+ --clear --backtitle "An Example for the use of --inputmenu:" \
+ --yesno "Really quit?" 10 30
+ case $? in
+ $DIALOG_OK) break;;
+ $DIALOG_CANCEL) returncode=99;;
+ esac
+ ;;
+ $DIALOG_OK)
+ "$DIALOG" \
+ --clear --backtitle "An Example for the use of --inputmenu:" \
--msgbox "useradd \n\
-d $home \n\
-u $uid \n\
-g $gid \n\
$user" 10 40
- ;;
- $DIALOG_EXTRA)
- value="${value:8:${#value}}"
- tag="${value%:*}"
- item="${value#*: }"
+ ;;
+ $DIALOG_EXTRA)
+ 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";;
- UID) uid="$item";;
- GID) gid="$item";;
- HOME) home="$item";;
- esac
- ;;
+ case "$tag" in
+ Username) user="$item" ;;
+ UID) uid="$item" ;;
+ GID) gid="$item" ;;
+ HOME) home="$item" ;;
+ esac
+ ;;
- $DIALOG_ESC)
- echo "ESC pressed."
- break
- ;;
+ $DIALOG_ESC)
+ echo "ESC pressed."
+ break
+ ;;
- esac
+ esac
done
diff --git a/contrib/dialog/samples/inputmenu-stdout b/contrib/dialog/samples/inputmenu-stdout
index 22fce0442048c..a778226b486d3 100755
--- a/contrib/dialog/samples/inputmenu-stdout
+++ b/contrib/dialog/samples/inputmenu-stdout
@@ -1,53 +1,63 @@
-#! /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" \
- --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")"
- returncode=$?
- case $returncode in
- $DIALOG_CANCEL)
- "$DIALOG" --clear --backtitle "An Example for the use of --inputmenu:" \
- --yesno "Really quit?" 10 30
- case $? in
- $DIALOG_OK) break;;
- $DIALOG_CANCEL) returncode=99;;
- esac
- ;;
- $DIALOG_OK)
- "$DIALOG" --clear --backtitle "An Example for the use of --inputmenu:" \
+ 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" \
+`
+ returncode=$?
+ case $returncode in
+ $DIALOG_CANCEL)
+ "$DIALOG" \
+ --clear --backtitle "An Example for the use of --inputmenu:" \
+ --yesno "Really quit?" 10 30
+ case $? in
+ $DIALOG_OK) break;;
+ $DIALOG_CANCEL) returncode=99;;
+ esac
+ ;;
+ $DIALOG_OK)
+ "$DIALOG" \
+ --clear --backtitle "An Example for the use of --inputmenu:" \
--msgbox "useradd \n\
-d $home \n\
-u $uid \n\
-g $gid \n\
$user" 10 40
- ;;
- $DIALOG_EXTRA)
- value="${value:8:${#value}}"
- tag="${value%:*}"
- item="${value#*: }"
+ ;;
+ $DIALOG_EXTRA)
+ 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";;
- UID) uid="$item";;
- GID) gid="$item";;
- HOME) home="$item";;
- esac
- ;;
+ case "$tag" in
+ Username) user="$item" ;;
+ UID) uid="$item" ;;
+ GID) gid="$item" ;;
+ HOME) home="$item" ;;
+ esac
+ ;;
- $DIALOG_ESC)
- echo "ESC pressed."
- break
- ;;
+ $DIALOG_ESC)
+ echo "ESC pressed."
+ break
+ ;;
- esac
+ esac
done
diff --git a/contrib/dialog/samples/inputmenu1 b/contrib/dialog/samples/inputmenu1
index 4e9bae26e5666..905c29226191a 100755
--- a/contrib/dialog/samples/inputmenu1
+++ b/contrib/dialog/samples/inputmenu1
@@ -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)
diff --git a/contrib/dialog/samples/inputmenu2 b/contrib/dialog/samples/inputmenu2
index f560aba3d2116..ecef6742cbaa5 100755
--- a/contrib/dialog/samples/inputmenu2
+++ b/contrib/dialog/samples/inputmenu2
@@ -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:)
diff --git a/contrib/dialog/samples/inputmenu3 b/contrib/dialog/samples/inputmenu3
index e3250d8a76191..4b9d5229e1d29 100755
--- a/contrib/dialog/samples/inputmenu3
+++ b/contrib/dialog/samples/inputmenu3
@@ -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:)
diff --git a/contrib/dialog/samples/inputmenu4 b/contrib/dialog/samples/inputmenu4
index a872527c9152c..6688c9ccfc0d5 100755
--- a/contrib/dialog/samples/inputmenu4
+++ b/contrib/dialog/samples/inputmenu4
@@ -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)
diff --git a/contrib/dialog/samples/install/FDISK.TEST b/contrib/dialog/samples/install/FDISK.TEST
deleted file mode 100644
index 2ad568a62d7b0..0000000000000
--- a/contrib/dialog/samples/install/FDISK.TEST
+++ /dev/null
@@ -1,28 +0,0 @@
-
-Disk /dev/hda: 14 heads, 62 sectors, 1018 cylinders
-Units = cylinders of 868 * 512 bytes
-
- Device Boot Begin Start End Blocks Id System
-/dev/hda1 1 1 3 1271 a OS/2 Boot Manager
-/dev/hda2 4 4 287 123256 6 DOS 16-bit >=32M
-/dev/hda3 * 288 288 649 157108 83 Linux native
-/dev/hda4 650 650 1018 160146 83 Linux native
-
-Disk /dev/sda: 64 heads, 32 sectors, 511 cylinders
-Units = cylinders of 2048 * 512 bytes
-
- Device Boot Begin Start End Blocks Id System
-/dev/sda1 1 1 21 21488 82 Linux swap
-/dev/sda2 22 22 511 501760 83 Linux native
-
-Disk /dev/sdb: 64 heads, 32 sectors, 4106 cylinders
-Units = cylinders of 2048 * 512 bytes
-
- Device Boot Begin Start End Blocks Id System
-/dev/sdb1 1 1 201 205808 83 Linux native
-/dev/sdb2 202 202 402 205824 83 Linux native
-/dev/sdb3 403 403 603 205824 83 Linux native
-/dev/sdb4 604 604 4106 3587072 5 Extended
-/dev/sdb5 604 604 1803 1228784 83 Linux native
-/dev/sdb6 1024 1804 3003 1228784 83 Linux native
-/dev/sdb7 2048 3004 4106 1129456 83 Linux native
diff --git a/contrib/dialog/samples/install/makefile.in b/contrib/dialog/samples/install/makefile.in
deleted file mode 100644
index 3dcdc09ba2c59..0000000000000
--- a/contrib/dialog/samples/install/makefile.in
+++ /dev/null
@@ -1,35 +0,0 @@
-# $Id: makefile.in,v 1.1 2000/10/08 17:22:53 tom Exp $
-# template makefile for DIALOG sample 'install'
-#
-SHELL = /bin/sh
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-srcdir = @srcdir@
-top_builddir = ../..
-
-DESTDIR =
-bindir = $(DESTDIR)@bindir@
-
-CFLAGS = @CFLAGS@
-CPPFLAGS = @CPPFLAGS@ @DEFS@ -I$(top_builddir) -I$(srcdir)/../.. -I. -I$(srcdir)
-EXTRA_CFLAGS = @EXTRA_CFLAGS@
-CC = @CC@
-LDFLAGS = @LDFLAGS@
-LIBS = -L../.. -ldialog @LIBS@
-RANLIB = @RANLIB@
-
-RM = rm -f
-
-all: setup
-
-setup: setup.o
- $(CC) -o $@ setup.o $(LIBS)
-
-clean:
- rm -f *.o setup
-
-test: setup
- ./setup
-
diff --git a/contrib/dialog/samples/install/setup.c b/contrib/dialog/samples/install/setup.c
deleted file mode 100644
index ae569813e865d..0000000000000
--- a/contrib/dialog/samples/install/setup.c
+++ /dev/null
@@ -1,371 +0,0 @@
-/* Copyright (C) 1995 Florian La Roche */
-/* Who wants to help coding? I don't like doing this... */
-
-/* You can just start setup as normal user and see how far it is coded
- right now. This will do a fake installation and won't actually chnage
- any data on your computer. */
-
-/* TODO: write a good package selection code
- change functions to return better error code
- */
-
-/* Show an extra text-box with the contents of all external commands,
- before they are executed. So you can abort the installation, if any
- wrong commands are to be executed. (So don't format wrong partition.) */
-#define VERBOSE 1
-
-/* If defined, don't actually execute any comands and don't actually modify
- any files. So you can test any possible installation without doing any
- damage to your computer.
- The file FDISK.TEST is used instead of real "fdisk -l" output, so that
- it can be started as normal user. */
-#define DEBUG_THIS 1
-
-#include <dialog.h>
-
-/* max length of a partition name like e.g. '/dev/hda1' */
-#define MAX_DEV_NAME 25
-
-/* max number of possible Linux/Swap/MsDos partitions */
-#define MAX_PARTS 20
-
-char *progname = NULL;
-
-static void
-error(const char *s)
-{
- fprintf(stderr, "%s: %s\n", progname, s);
- exit(1);
-}
-
-static int
-my_system(const char *s,...)
-{
- int ret, i;
- va_list ap;
- char sh[200];
-
- va_start(ap, s);
- vsprintf(sh, s, ap);
- va_end(ap);
-
-#ifdef VERBOSE
- i = dialog_msgbox("I will run the following command:", sh, 10, 65, 1);
- dialog_clear();
-#ifdef DEBUG_THIS
- return 0;
-#endif
-#endif
- ret = system(sh);
- if (!(ret >> 8))
- return 0;
- i = dialog_msgbox("Error-Exit on the following command:",
- sh, 12, 73, 1);
- dialog_clear();
- return 1;
-}
-
-/* We support to install from DOS/Linux-partitions. */
-enum partition_type {
- MsDos,
- Linux,
- Swap
-};
-
-struct partition {
- enum partition_type type;
- char name[MAX_DEV_NAME];
- int blocks;
- int flag;
-} partitions[MAX_PARTS];
-int num_partition = 0;
-int num_linux = 0;
-int num_swap = 0;
-int num_msdos = 0;
-
-static int
-get_line(char *line, int size, FILE * f)
-{
- char *ptr = line;
- int c;
-
- if (feof(f))
- return -1;
- while (size-- && ((c = getc(f)) != EOF) && (c != '\n'))
- *ptr++ = c;
- *ptr++ = '\0';
- return (int) (ptr - line);
-}
-
-static void
-read_partitions(void)
-{
- FILE *f;
- char line[200];
- int length;
-#ifndef DEBUG_THIS
- int ret = system("fdisk -l 2>/dev/null 1>/tmp/fdisk.output");
- if ((ret >> 8) != 0) {
- error("fdisk didn't run");
- }
- if ((f = fopen("/tmp/fdisk.output", "r")) == NULL)
-#else
- if ((f = fopen("FDISK.TEST", "r")) == NULL)
-#endif
- error("cannot read fdisk output");
-
- while (num_partition <= MAX_PARTS
- && (length = get_line(line, 200, f)) >= 0) {
- if (strncmp(line, "/dev/", 5) == 0) {
- int n = 0;
- char *s = line + 5;
- char *t = partitions[num_partition].name;
- strcpy(t, "/dev/");
- t += 5;
- while (n < MAX_DEV_NAME && *s != '\0'
- && !isspace((unsigned char) *s)) {
- *t++ = *s++;
- n++;
- }
- *t = '\0';
- /* Read the size of the partition. */
- t = line + 37;
- while (isspace((unsigned char) *t))
- t++;
- partitions[num_partition].blocks = atoi(t);
- if (strstr(line, "Linux native")) {
- partitions[num_partition].type = Linux;
- num_partition++;
- num_linux++;
- } else if (strstr(line, "Linux swap")) {
- partitions[num_partition].type = Swap;
- num_partition++;
- num_swap++;
- } else if (strstr(line, "DOS")) {
- partitions[num_partition].type = MsDos;
- num_partition++;
- num_msdos++;
- }
- }
- }
- fclose(f);
-#ifndef DEBUG_THIS
- unlink("/tmp/fdisk.output");
-#endif
-}
-
-static int
-select_partition(const char *title, const char *prompt, int y, int x)
-{
- int i, num, ret;
- char info[MAX_PARTS][40];
- char *items[MAX_PARTS * 2];
- int num_pa[MAX_PARTS];
-
- num = 0;
- for (i = 0; i < num_partition; i++) {
- if (partitions[i].type == Linux) {
- items[num * 2] = partitions[i].name;
- sprintf(info[num], "Linux partition with %d blocks",
- partitions[i].blocks);
- items[num * 2 + 1] = info[num];
- num_pa[num] = i;
- num++;
- }
- }
- ret = dialog_menu(title, prompt, y + num, x, num, num, items);
- dialog_clear();
- if (ret >= 0) /* item selected */
- ret = num_pa[ret];
- return ret;
-}
-
-static int
-select_install_partition(void)
-{
- return select_partition("Select Install Partition",
- "\\nWhere do you want to install Linux?\\n", 9, 60);
-}
-
-static int
-select_source_partition(void)
-{
- return select_partition("Select Source Partition",
- "\\nOn which partition is the source?\\n", 9, 60);
-}
-
-const char *null = ">/dev/null 2>/dev/null";
-const char *install_partition = NULL;
-
-static void
-extract_packages(const char *source_path)
-{
-#ifndef DEBUG_THIS
- FILE *f;
-#endif
-
- if (my_system("mkdir -p /install/var/installed/packages %s", null))
- return;
- if (my_system("cd /install; for i in /source%s/*.tgz; do "
- "tar xzplvvkf $i >> var/installed/packages/base "
- "2>>var/installed/packages/ERROR; done", source_path))
- return;
-#ifndef DEBUG_THIS
- if ((f = fopen("/install/etc/fstab", "w")) == NULL) {
- /* i = */ dialog_msgbox("Error", "Cannot write /etc/fstab",
- 12, 40, 1);
- return;
- }
- fprintf(f, "%s / ext2 defaults 1 1\n", install_partition);
- fprintf(f, "none /proc proc defaults 0 2\n");
- /* XXX write swap-partitions */
- fclose(f);
-#endif
-}
-
-static void
-install_premounted(void)
-{
- extract_packages("");
-}
-
-static void
-install_harddisk(void)
-{
- const char *name;
- int part, ret;
-
- if ((part = select_source_partition()) <= -1)
- return;
- name = partitions[part].name;
-
- if (my_system("mount -t ext2 %s /source %s", name, null))
- return;
- ret = dialog_inputbox("Path in partition",
- "Please enter the directory in which the "
- "source files are.", 13, 50, "", FALSE);
- dialog_clear();
- if (ret != 0)
- return;
- /* XXX strdup */
- extract_packages(strdup(dialog_input_result));
- if (my_system("umount /source %s", null))
- return;
-}
-
-static void
-install_nfs(void)
-{
- if (my_system("ifconfig eth0 134.96.81.36 netmask 255.255.255.224 "
- "broadcast 134.96.81.63 %s", null))
- return;
- if (my_system("route add -net 134.96.81.32 %s", null))
- return;
- if (my_system("mount -t nfs 134.96.81.38:"
- "/local/ftp/pub/linux/ELF.binary/tar /source %s", null))
- return;
- extract_packages("/base");
- if (my_system("umount /source %s", null))
- return;
- if (my_system("ifconfig eth0 down %s", null))
- return;
-}
-
-static void
-main_install(void)
-{
- int part, ret;
- const char *name;
- char *items1[] =
- {
- "1", "Harddisk Install",
- "2", "Network Install(NFS)",
- "3", "Premounted on /source"
- };
-
- if (num_linux == 0) {
- /* XXX */
- return;
- }
- if ((part = select_install_partition()) <= -1)
- return;
- install_partition = name = partitions[part].name;
- if (my_system("mke2fs %s %s", name, null))
- return;
- if (my_system("mount -t ext2 %s /install %s", name, null))
- return;
- ret = dialog_menu("Choose install medium",
- "\\nPlease say from where you want to install.\\n",
- 12, 62, 3, 3, items1);
- dialog_clear();
- switch (ret) {
- case 0:
- install_harddisk();
- break;
- case 1:
- install_nfs();
- break;
- case 2:
- install_premounted();
- break;
- case -2: /* cancel */
- case -1:
- break; /* esc */
- }
- if (my_system("umount /install %s", null))
- return;
-}
-
-int
-main(int argc, char **argv)
-{
- int stop = 0;
- int ret;
- char *items1[] =
- {
- "1", "Display a help text",
- "2", "Start an installation",
- "3", "Exit to the shell"
- };
-
- progname = argv[0];
-
- read_partitions();
- if (num_linux == 0) {
- printf("\n\nPlease start \"fdisk\" or \"cfdisk\" and create a"
- "\nnative Linux-partition to install Linux on.\n\n");
- exit(1);
- }
-
- init_dialog();
-
- while (!stop) {
- ret = dialog_menu("Linux Install Utility",
- "\\nCopyright (C) 1995 Florian La Roche\\n"
- "\\nPre-Alpha version, be careful, read the doc!!!"
- "\\nemail: florian@jurix.jura.uni-sb.de, "
- "flla@stud.uni-sb.de\\n",
- 15, 64, 3, 3, items1);
- dialog_clear();
- switch (ret) {
- case 0:
- ret = dialog_textbox("Help Text",
- "setup.help", 20, 70);
- dialog_clear();
- break;
- case 1:
- main_install();
- break;
- case 2:
- stop = 1;
- break;
- case -2: /* cancel */
- case -1:
- stop = 1; /* esc */
- }
- }
- end_dialog();
- printf("\nExecute \"reboot\" to restart your computer...\n");
-
- exit(0);
-}
diff --git a/contrib/dialog/samples/install/setup.help b/contrib/dialog/samples/install/setup.help
deleted file mode 100644
index 7ac8369d4e6e6..0000000000000
--- a/contrib/dialog/samples/install/setup.help
+++ /dev/null
@@ -1,49 +0,0 @@
-At the moment, only installation from a harddisk
-is supported. All commands are shown to you on
-the screen before executing. This is just to make
-sure that nothing bad is done to your harddisk :-)
-
-You can also select to install from a premounted dir.
-Then the "tar/base" directory must be mounted on
-"/install", so that all tar-packages from the basic
-stuff are in "/install/*.tgz". (So you could be able
-to install via NFS...)
-
-Good luck...,
-anyone wants to help programming this tool?,
-
-Florian La Roche
-
-Contents:
-=========
-- overview about what "setup" does.
-- creating a Linux-partition before starting "setup"
-- about lilo
-- how to use "setup", what keys are supported
-
-What does "setup" do on my computer?
-====================================
-Setup will ask you for a partition on your harddisk,
-where you would like to have Linux installed.
-You can then choose to install this distribution from
-your local harddisk or via network (NFS).
-setup will install a very basic system.
-At the end, you can install lilo, the Linux Loader.
-Rebooting your computer with this little linux system
-and then runing the setup-program on it, will give
-the possibility to install more packages.
-
-Creating a Linux-partition:
-===========================
-To install this Linux distribution, you need to
-create an extra partition on your harddisk for
-Linux.
-
-What is lilo and how should I install it?
-=========================================
-Read the lilo-documentation for this...
-
-
-
-Florian La Roche
-
diff --git a/contrib/dialog/samples/killall b/contrib/dialog/samples/killall
index 9d233f0a92dbb..7030fe22bf29b 100755
--- a/contrib/dialog/samples/killall
+++ b/contrib/dialog/samples/killall
@@ -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
diff --git a/contrib/dialog/samples/menubox12 b/contrib/dialog/samples/menubox12
new file mode 100755
index 0000000000000..ee4b4747dd18a
--- /dev/null
+++ b/contrib/dialog/samples/menubox12
@@ -0,0 +1,43 @@
+#!/bin/sh
+# $Id: menubox12,v 1.3 2012/12/23 22:28:26 tom Exp $
+
+. ./setup-vars
+
+. ./setup-edit
+
+case "x$DIALOGOPTS" in
+*--no-items*|*--noitem*)
+ CUT="cut -d: -f1,3"
+ ;;
+*)
+ CUT="cat"
+ ;;
+esac
+
+$CUT >$input <<-EOF
+ Linux:The Great Unix Clone for 386/486
+ NetBSD:Another free Unix Clone for 386/486
+ OS/2:IBM OS/2
+ WIN NT:Microsoft Windows NT
+ PCDOS:IBM PC DOS
+ MSDOS:Microsoft DOS
+EOF
+cat $input | sed -e 's/^/"/' -e 's/:/" "/g' -e 's/$/"/' >$output
+cat $output >$input
+
+$DIALOG --clear --title "MENU BOX" "$@" \
+ --menu "Hi, this is a menu box. You can use this to \n\
+present a list of choices for the user to \n\
+choose. If there are more items than can fit \n\
+on the screen, the menu will be scrolled. \n\
+You can use the UP/DOWN arrow keys, the first \n\
+letter of the choice as a hot key, or the \n\
+number keys 1-9 to choose an option.\n\
+Try it now!\n\n\
+ Choose the OS you like:" 20 51 4 \
+ --file $input 2> $output
+
+retval=$?
+
+tempfile=$output
+. ./report-tempfile
diff --git a/contrib/dialog/samples/prgbox b/contrib/dialog/samples/prgbox
index 9170a367d70a3..c06a6301c7a4c 100755
--- a/contrib/dialog/samples/prgbox
+++ b/contrib/dialog/samples/prgbox
@@ -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
diff --git a/contrib/dialog/samples/prgbox2 b/contrib/dialog/samples/prgbox2
index 53f3daa907ac0..ba94622cd556e 100755
--- a/contrib/dialog/samples/prgbox2
+++ b/contrib/dialog/samples/prgbox2
@@ -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
diff --git a/contrib/dialog/samples/rangebox b/contrib/dialog/samples/rangebox
new file mode 100755
index 0000000000000..d864026eb9677
--- /dev/null
+++ b/contrib/dialog/samples/rangebox
@@ -0,0 +1,11 @@
+#!/bin/sh
+# $Id: rangebox,v 1.3 2012/12/05 10:07:54 tom Exp $
+
+. ./setup-vars
+
+exec 3>&1
+RESULT=`$DIALOG --title "RANGE BOX" --rangebox "Please set the volume..." 0 60 0 123 5 2>&1 1>&3`
+retval=$?
+exec 3>&-
+
+. ./report-string
diff --git a/contrib/dialog/samples/rangebox2 b/contrib/dialog/samples/rangebox2
new file mode 100755
index 0000000000000..f67f02be254e7
--- /dev/null
+++ b/contrib/dialog/samples/rangebox2
@@ -0,0 +1,11 @@
+#!/bin/sh
+# $Id: rangebox2,v 1.1 2012/12/05 10:28:58 tom Exp $
+
+. ./setup-vars
+
+exec 3>&1
+RESULT=`$DIALOG --title "RANGE BOX" --rangebox "Please set the volume..." 0 60 0 6 5 2>&1 1>&3`
+retval=$?
+exec 3>&-
+
+. ./report-string
diff --git a/contrib/dialog/samples/rangebox3 b/contrib/dialog/samples/rangebox3
new file mode 100755
index 0000000000000..19dad64ad990e
--- /dev/null
+++ b/contrib/dialog/samples/rangebox3
@@ -0,0 +1,11 @@
+#!/bin/sh
+# $Id: rangebox3,v 1.1 2012/12/05 10:19:42 tom Exp $
+
+. ./setup-vars
+
+exec 3>&1
+RESULT=`$DIALOG --title "RANGE BOX" --rangebox "Please set the volume..." 0 60 -48 55 5 2>&1 1>&3`
+retval=$?
+exec 3>&-
+
+. ./report-string
diff --git a/contrib/dialog/samples/rangebox4 b/contrib/dialog/samples/rangebox4
new file mode 100755
index 0000000000000..b8b68c2c661c9
--- /dev/null
+++ b/contrib/dialog/samples/rangebox4
@@ -0,0 +1,11 @@
+#!/bin/sh
+# $Id: rangebox4,v 1.1 2012/12/05 11:54:04 tom Exp $
+
+. ./setup-vars
+
+exec 3>&1
+RESULT=`$DIALOG --title "RANGE BOX" --rangebox "Please set the volume..." 0 60 10 100 5 2>&1 1>&3`
+retval=$?
+exec 3>&-
+
+. ./report-string
diff --git a/contrib/dialog/samples/report-button b/contrib/dialog/samples/report-button
index e13b03afb7cdd..c6a173094573b 100644
--- a/contrib/dialog/samples/report-button
+++ b/contrib/dialog/samples/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
diff --git a/contrib/dialog/samples/report-edit b/contrib/dialog/samples/report-edit
index f17b6d32a9877..37e3eb088570e 100644
--- a/contrib/dialog/samples/report-edit
+++ b/contrib/dialog/samples/report-edit
@@ -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
diff --git a/contrib/dialog/samples/report-string b/contrib/dialog/samples/report-string
index a674517c75e25..dc96c2fab2e28 100644
--- a/contrib/dialog/samples/report-string
+++ b/contrib/dialog/samples/report-string
@@ -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
diff --git a/contrib/dialog/samples/report-tempfile b/contrib/dialog/samples/report-tempfile
index 5a88d443cf3ef..32c04e0cb54d7 100644
--- a/contrib/dialog/samples/report-tempfile
+++ b/contrib/dialog/samples/report-tempfile
@@ -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
diff --git a/contrib/dialog/samples/report-yesno b/contrib/dialog/samples/report-yesno
index 81da89b525e30..d22ebe4194e24 100644
--- a/contrib/dialog/samples/report-yesno
+++ b/contrib/dialog/samples/report-yesno
@@ -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
diff --git a/contrib/dialog/samples/setup-edit b/contrib/dialog/samples/setup-edit
index df86297764aff..8f9d284220f45 100644
--- a/contrib/dialog/samples/setup-edit
+++ b/contrib/dialog/samples/setup-edit
@@ -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
diff --git a/contrib/dialog/samples/setup-tempfile b/contrib/dialog/samples/setup-tempfile
index 6db551f034221..3a67ea625986e 100644
--- a/contrib/dialog/samples/setup-tempfile
+++ b/contrib/dialog/samples/setup-tempfile
@@ -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
diff --git a/contrib/dialog/samples/setup-utf8 b/contrib/dialog/samples/setup-utf8
index 2fd70d42a4c1b..07cff3969db67 100644
--- a/contrib/dialog/samples/setup-utf8
+++ b/contrib/dialog/samples/setup-utf8
@@ -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
diff --git a/contrib/dialog/samples/setup-vars b/contrib/dialog/samples/setup-vars
index ae5e725e292ee..f0ea779c132ed 100644
--- a/contrib/dialog/samples/setup-vars
+++ b/contrib/dialog/samples/setup-vars
@@ -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}
diff --git a/contrib/dialog/samples/slackware.rc b/contrib/dialog/samples/slackware.rc
index 967147e9ea060..82f1ee85f62e2 100644
--- a/contrib/dialog/samples/slackware.rc
+++ b/contrib/dialog/samples/slackware.rc
@@ -1,4 +1,4 @@
-# $Id: slackware.rc,v 1.7 2011/01/17 00:14:41 tom Exp $
+# $Id: slackware.rc,v 1.10 2012/12/01 00:36:55 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 = dialog_color
+
+# 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
diff --git a/contrib/dialog/samples/sourcemage.rc b/contrib/dialog/samples/sourcemage.rc
index 1ba826fa54c1f..9384798fc2ded 100644
--- a/contrib/dialog/samples/sourcemage.rc
+++ b/contrib/dialog/samples/sourcemage.rc
@@ -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
diff --git a/contrib/dialog/samples/suse.rc b/contrib/dialog/samples/suse.rc
index f2417b253071a..c8ff09942dd5f 100644
--- a/contrib/dialog/samples/suse.rc
+++ b/contrib/dialog/samples/suse.rc
@@ -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
diff --git a/contrib/dialog/samples/tailboxbg b/contrib/dialog/samples/tailboxbg
index 957d77446558f..bcc3434d34734 100755
--- a/contrib/dialog/samples/tailboxbg
+++ b/contrib/dialog/samples/tailboxbg
@@ -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
diff --git a/contrib/dialog/samples/tailboxbg1 b/contrib/dialog/samples/tailboxbg1
index 2955ad034869c..f04567a92f6de 100755
--- a/contrib/dialog/samples/tailboxbg1
+++ b/contrib/dialog/samples/tailboxbg1
@@ -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
diff --git a/contrib/dialog/samples/tailboxbg2 b/contrib/dialog/samples/tailboxbg2
index 061770895f111..628cb0571540f 100755
--- a/contrib/dialog/samples/tailboxbg2
+++ b/contrib/dialog/samples/tailboxbg2
@@ -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
diff --git a/contrib/dialog/samples/testdata-8bit b/contrib/dialog/samples/testdata-8bit
index 7810f9e34f2da..f09021dc19dbe 100755
--- a/contrib/dialog/samples/testdata-8bit
+++ b/contrib/dialog/samples/testdata-8bit
@@ -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
diff --git a/contrib/dialog/samples/treeview b/contrib/dialog/samples/treeview
new file mode 100755
index 0000000000000..34212184d4ded
--- /dev/null
+++ b/contrib/dialog/samples/treeview
@@ -0,0 +1,22 @@
+#!/bin/sh
+# $Id: treeview,v 1.2 2012/12/04 10:53:09 tom Exp $
+
+. ./setup-vars
+
+. ./setup-tempfile
+
+$DIALOG --title "TREE VIEW DIALOG" \
+ --treeview "TreeView demo" 0 0 0 \
+ tag1 one off 0 \
+ tag2 two off 1 \
+ tag3 three on 2 \
+ tag4 four off 1 \
+ tag5 five off 2 \
+ tag6 six off 3 \
+ tag7 seven off 3 \
+ tag8 eight off 4 \
+ tag9 nine off 1 2> $tempfile
+
+retval=$?
+
+. ./report-tempfile
diff --git a/contrib/dialog/samples/treeview2 b/contrib/dialog/samples/treeview2
new file mode 100755
index 0000000000000..b3dde41594831
--- /dev/null
+++ b/contrib/dialog/samples/treeview2
@@ -0,0 +1,52 @@
+#!/bin/sh
+# $Id: treeview2,v 1.3 2012/12/23 22:28:00 tom Exp $
+
+. ./setup-vars
+
+. ./setup-edit
+
+case "x$DIALOGOPTS" in
+*--no-items*|*--noitem*)
+ CUT="cut -d: -f1,3,4"
+ ;;
+*)
+ CUT="cat"
+ ;;
+esac
+
+$CUT >$input <<-EOF
+ tag1:one:off:0
+ tag2:two:off:1
+ tag3:three:on:2
+ tag4:four:off:1
+ tag5:five:off:2
+ tag6:six:off:3
+ tag7:seven:off:3
+ tag8:eight:off:4
+ tag11:1one:off:0
+ tag12:1two:off:1
+ tag13:1three:on:2
+ tag14:1four:off:1
+ tag15:1five:off:2
+ tag16:1six:off:3
+ tag17:1seven:off:3
+ tag18:1eight:off:4
+ tag21:2one:off:0
+ tag22:2two:off:1
+ tag23:2three:on:2
+ tag24:2four:off:1
+ tag25:2five:off:2
+ tag26:2six:off:3
+ tag27:2seven:off:3
+ tag28:2eight:off:4
+ tag9:nine:off:1
+EOF
+
+$DIALOG --title "TREE VIEW DIALOG" \
+ --scrollbar \
+ --treeview "TreeView demo" 0 0 10 `cat $input | sed -e 's/:/ /g'` 2> $output
+
+retval=$?
+
+tempfile=$output
+. ./report-tempfile
diff --git a/contrib/dialog/samples/valgrind.log b/contrib/dialog/samples/valgrind.log
deleted file mode 100644
index f33b862d8a62f..0000000000000
--- a/contrib/dialog/samples/valgrind.log
+++ /dev/null
@@ -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
diff --git a/contrib/dialog/samples/wheel b/contrib/dialog/samples/wheel
index ff75f71d6e046..4adef26e8e098 100755
--- a/contrib/dialog/samples/wheel
+++ b/contrib/dialog/samples/wheel
@@ -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 \
diff --git a/contrib/dialog/samples/whiptail.rc b/contrib/dialog/samples/whiptail.rc
index 85150127f48ed..81ad65307a0c5 100644
--- a/contrib/dialog/samples/whiptail.rc
+++ b/contrib/dialog/samples/whiptail.rc
@@ -1,4 +1,4 @@
-# $Id: whiptail.rc,v 1.3 2011/01/17 00:15:54 tom Exp $
+# $Id: whiptail.rc,v 1.6 2012/12/01 01:15:04 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 = screen_color
diff --git a/contrib/dialog/samples/with-dquotes b/contrib/dialog/samples/with-dquotes
new file mode 100755
index 0000000000000..604f51b9fd4d3
--- /dev/null
+++ b/contrib/dialog/samples/with-dquotes
@@ -0,0 +1,3 @@
+#!/bin/sh
+# $Id: with-dquotes,v 1.1 2012/07/03 09:40:19 tom Exp $
+DIALOGOPTS="$DIALOGOPTS --quoted" "$@"
diff --git a/contrib/dialog/samples/with-squotes b/contrib/dialog/samples/with-squotes
new file mode 100755
index 0000000000000..6a08f9fc9edef
--- /dev/null
+++ b/contrib/dialog/samples/with-squotes
@@ -0,0 +1,3 @@
+#!/bin/sh
+# $Id: with-squotes,v 1.1 2012/07/03 09:40:29 tom Exp $
+DIALOGOPTS="$DIALOGOPTS --single-quoted" "$@"
diff --git a/contrib/dialog/tailbox.c b/contrib/dialog/tailbox.c
index c111f64af6681..bbb14c0867ad7 100644
--- a/contrib/dialog/tailbox.c
+++ b/contrib/dialog/tailbox.c
@@ -1,9 +1,9 @@
/*
- * $Id: tailbox.c,v 1.63 2011/06/27 08:19:43 tom Exp $
+ * $Id: tailbox.c,v 1.68 2012/11/18 15:48:52 tom Exp $
*
* tailbox.c -- implements the tail 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
@@ -34,7 +34,7 @@ typedef struct {
const char **buttons;
int hscroll;
int old_hscroll;
- char line[MAX_LEN + 1];
+ char line[MAX_LEN + 2];
off_t last_pos;
} MY_OBJ;
@@ -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 {
diff --git a/contrib/dialog/textbox.c b/contrib/dialog/textbox.c
index 72a9b1146c10e..6398f03bb82f0 100644
--- a/contrib/dialog/textbox.c
+++ b/contrib/dialog/textbox.c
@@ -1,9 +1,9 @@
/*
- * $Id: textbox.c,v 1.101 2011/06/29 09:53:03 tom Exp $
+ * $Id: textbox.c,v 1.110 2012/12/01 01:48:08 tom 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
@@ -55,6 +55,7 @@ lseek_obj(MY_OBJ * obj, long offset, int mode)
long fpos;
if ((fpos = (long) lseek(obj->fd, (off_t) offset, mode)) == -1) {
switch (mode) {
+ default:
case SEEK_CUR:
dlg_exiterr("Cannot get file position");
break;
@@ -75,6 +76,37 @@ ftell_obj(MY_OBJ * obj)
return lseek_obj(obj, 0L, SEEK_CUR);
}
+static void
+lseek_set(MY_OBJ * obj, long offset)
+{
+ long actual = lseek_obj(obj, offset, SEEK_SET);
+
+ if (actual != offset) {
+ dlg_exiterr("Cannot set file position to %ld (actual %ld)\n",
+ offset, actual);
+ }
+}
+
+static void
+lseek_end(MY_OBJ * obj, long offset)
+{
+ long actual = lseek_obj(obj, offset, SEEK_END);
+
+ if (actual > offset) {
+ obj->file_size = actual;
+ }
+}
+
+static void
+lseek_cur(MY_OBJ * obj, long offset)
+{
+ long actual = lseek_obj(obj, offset, SEEK_CUR);
+
+ if (actual != offset) {
+ dlg_trace_msg("Lseek returned %ld, expected %ld\n", actual, offset);
+ }
+}
+
static char *
xalloc(size_t size)
{
@@ -197,7 +229,7 @@ tabize(MY_OBJ * obj, long val, long *first_pos)
fpos = ftell_obj(obj);
- lseek_obj(obj, fpos - obj->fd_bytes_read, SEEK_SET);
+ lseek_set(obj, fpos - obj->fd_bytes_read);
/* Allocate space for read buffer */
buftab = xalloc((size_t) val + 1);
@@ -224,7 +256,7 @@ tabize(MY_OBJ * obj, long val, long *first_pos)
count++;
}
- lseek_obj(obj, fpos, SEEK_SET);
+ lseek_set(obj, fpos);
free(buftab);
return count;
}
@@ -309,10 +341,10 @@ back_lines(MY_OBJ * obj, long n)
/* Really possible to move backward BUF_SIZE/2 bytes? */
if (fpos < BUF_SIZE / 2 + obj->fd_bytes_read) {
/* No, move less than */
- lseek_obj(obj, 0L, SEEK_SET);
+ lseek_set(obj, 0L);
val_to_tabize = fpos - obj->fd_bytes_read;
} else { /* Move backward BUF_SIZE/2 bytes */
- lseek_obj(obj, -(BUF_SIZE / 2 + obj->fd_bytes_read), SEEK_CUR);
+ lseek_cur(obj, -(BUF_SIZE / 2 + obj->fd_bytes_read));
val_to_tabize = BUF_SIZE / 2;
}
read_high(obj, BUF_SIZE);
@@ -340,10 +372,10 @@ back_lines(MY_OBJ * obj, long n)
/* Really possible to move backward BUF_SIZE/2 bytes? */
if (fpos < BUF_SIZE / 2 + obj->fd_bytes_read) {
/* No, move less than */
- lseek_obj(obj, 0L, SEEK_SET);
+ lseek_set(obj, 0L);
val_to_tabize = fpos - obj->fd_bytes_read;
} else { /* Move backward BUF_SIZE/2 bytes */
- lseek_obj(obj, -(BUF_SIZE / 2 + obj->fd_bytes_read), SEEK_CUR);
+ lseek_cur(obj, -(BUF_SIZE / 2 + obj->fd_bytes_read));
val_to_tabize = BUF_SIZE / 2;
}
read_high(obj, BUF_SIZE);
@@ -414,6 +446,7 @@ print_page(MY_OBJ * obj, int height, int width)
passed_end = 1;
}
(void) wnoutrefresh(obj->text);
+ dlg_trace_win(obj->text);
}
/*
@@ -488,18 +521,17 @@ 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,
- searchbox_attr,
- searchbox_border_attr);
- wattrset(widget, searchbox_title_attr);
+ dlg_draw_box2(widget, 0, 0, box_height, box_width,
+ searchbox_attr,
+ searchbox_border_attr,
+ searchbox_border2_attr);
+ (void) wattrset(widget, searchbox_title_attr);
(void) wmove(widget, 0, (box_width - len_caption) / 2);
indx = dlg_index_wchars(caption);
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);
@@ -567,7 +599,7 @@ perform_search(MY_OBJ * obj, int height, int width, int key, char *search_term)
}
#endif
/* ESC pressed, or no search term, reprint page to clear box */
- wattrset(obj->text, dialog_attr);
+ (void) wattrset(obj->text, dialog_attr);
back_lines(obj, obj->page_length);
return TRUE;
}
@@ -581,7 +613,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)
@@ -597,7 +628,7 @@ perform_search(MY_OBJ * obj, int height, int width, int key, char *search_term)
if (found == FALSE) { /* not found */
(void) beep();
/* Restore program state to that before searching */
- lseek_obj(obj, fpos, SEEK_SET);
+ lseek_set(obj, fpos);
read_high(obj, BUF_SIZE);
@@ -613,7 +644,7 @@ perform_search(MY_OBJ * obj, int height, int width, int key, char *search_term)
back_lines(obj, 1L);
}
/* Reprint page */
- wattrset(obj->text, dialog_attr);
+ (void) wattrset(obj->text, dialog_attr);
moved = TRUE;
} else { /* no need to find */
(void) beep();
@@ -675,7 +706,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 */
@@ -693,10 +724,10 @@ dialog_textbox(const char *title, const char *file, int height, int width)
/* Get file size. Actually, 'file_size' is the real file size - 1,
since it's only the last byte offset from the beginning */
- obj.file_size = lseek_obj(&obj, 0L, SEEK_END);
+ lseek_end(&obj, 0L);
/* Restore file pointer to beginning of file after getting file size */
- lseek_obj(&obj, 0L, SEEK_SET);
+ lseek_set(&obj, 0L);
read_high(&obj, BUF_SIZE);
@@ -725,8 +756,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);
@@ -834,7 +865,7 @@ dialog_textbox(const char *title, const char *file, int height, int width)
if (fpos > obj.fd_bytes_read) {
/* Yes, we have to read it in */
- lseek_obj(&obj, 0L, SEEK_SET);
+ lseek_set(&obj, 0L);
read_high(&obj, BUF_SIZE);
}
@@ -849,7 +880,7 @@ dialog_textbox(const char *title, const char *file, int height, int width)
if (fpos < obj.file_size) {
/* Yes, we have to read it in */
- lseek_obj(&obj, -BUF_SIZE, SEEK_END);
+ lseek_end(&obj, -BUF_SIZE);
read_high(&obj, BUF_SIZE);
}
@@ -915,7 +946,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);
diff --git a/contrib/dialog/timebox.c b/contrib/dialog/timebox.c
index 5a6be3e02bb54..38abeecc75dd0 100644
--- a/contrib/dialog/timebox.c
+++ b/contrib/dialog/timebox.c
@@ -1,9 +1,9 @@
/*
- * $Id: timebox.c,v 1.45 2011/06/27 08:20:22 tom Exp $
+ * $Id: timebox.c,v 1.54 2013/03/17 15:03:41 tom Exp $
*
* timebox.c -- implements the timebox dialog
*
- * Copyright 2001-2010,2011 Thomas E. Dickey
+ * Copyright 2001-2012,2013 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -41,8 +41,6 @@ typedef enum {
struct _box;
-typedef int (*BOX_DRAW) (struct _box *, struct tm *);
-
typedef struct _box {
WINDOW *parent;
WINDOW *window;
@@ -82,9 +80,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 +182,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 +219,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 +273,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 +294,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 +304,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 +354,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;
@@ -415,6 +412,7 @@ dialog_timebox(const char *title,
dlg_add_result(buffer);
dlg_add_separator();
+ dlg_add_last_key(-1);
return CleanupResult(result, dialog, prompt, &save_vars);
}
diff --git a/contrib/dialog/trace.c b/contrib/dialog/trace.c
index a742ae8a1e779..50ccfac6dfbfb 100644
--- a/contrib/dialog/trace.c
+++ b/contrib/dialog/trace.c
@@ -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,38 +58,94 @@ dlg_trace_win(WINDOW *win)
if (myFP != 0) {
int y, x;
int j, k;
- int rc = getmaxy(win);
- int cc = getmaxx(win);
- chtype ch, c2;
-
- fprintf(myFP, "window %dx%d at %d,%d\n",
- rc, cc, getbegy(win), getbegx(win));
-
- getyx(win, y, x);
- for (j = 0; j < rc; ++j) {
- fprintf(myFP, "%3d:", j);
- for (k = 0; k < cc; ++k) {
- ch = mvwinch(win, j, k) & (A_CHARTEXT | A_ALTCHARSET);
- c2 = dlg_asciibox(ch);
- if (c2 != 0) {
- ch = c2;
- } else if (unctrl(ch) == 0 || strlen(unctrl(ch)) > 1) {
- ch = '.';
+ 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;
+
+ fprintf(myFP, "window %dx%d at %d,%d\n",
+ rc, cc, getbegy(win), getbegx(win));
+
+ getyx(win, y, x);
+ 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) {
+ ch = c2;
+ } else if (unctrl(ch) == 0 || strlen(unctrl(ch)) > 1) {
+ ch = '.';
+ }
+ fputc((int) (ch & 0xff), myFP);
+#endif
}
- fputc((int) (ch & 0xff), myFP);
+ fputc('\n', myFP);
}
- fputc('\n', myFP);
+ wmove(win, y, x);
+ fflush(myFP);
}
- wmove(win, y, x);
- 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)
diff --git a/contrib/dialog/treeview.c b/contrib/dialog/treeview.c
new file mode 100644
index 0000000000000..a373519a8241e
--- /dev/null
+++ b/contrib/dialog/treeview.c
@@ -0,0 +1,672 @@
+/*
+ * $Id: treeview.c,v 1.22 2013/05/23 23:35:46 tom Exp $
+ *
+ * treeview.c -- implements the treeview dialog
+ *
+ * Copyright 2012,2013 Thomas E. Dickey
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License, version 2.1
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to
+ * Free Software Foundation, Inc.
+ * 51 Franklin St., Fifth Floor
+ * Boston, MA 02110, USA.
+ */
+
+#include <dialog.h>
+#include <dlg_keys.h>
+
+#define INDENT 3
+#define MIN_HIGH (1 + (5 * MARGIN))
+
+typedef struct {
+ /* the outer-window */
+ WINDOW *dialog;
+ bool is_check;
+ int box_y;
+ int box_x;
+ int check_x;
+ int item_x;
+ int use_height;
+ int use_width;
+ /* the inner-window */
+ WINDOW *list;
+ DIALOG_LISTITEM *items;
+ int item_no;
+ int *depths;
+ const char *states;
+} ALL_DATA;
+
+/*
+ * Print list item. The 'selected' parameter is true if 'choice' is the
+ * current item. That one is colored differently from the other items.
+ */
+static void
+print_item(ALL_DATA * data,
+ DIALOG_LISTITEM * item,
+ const char *states,
+ int depths,
+ int choice,
+ int selected)
+{
+ WINDOW *win = data->list;
+ chtype save = dlg_get_attrs(win);
+ int i;
+ bool first = TRUE;
+ int climit = (getmaxx(win) - data->check_x + 1);
+ const char *show = (dialog_vars.no_items
+ ? item->name
+ : item->text);
+
+ /* Clear 'residue' of last item */
+ (void) wattrset(win, menubox_attr);
+ (void) wmove(win, choice, 0);
+ for (i = 0; i < data->use_width; i++)
+ (void) waddch(win, ' ');
+
+ (void) wmove(win, choice, data->check_x);
+ (void) wattrset(win, selected ? check_selected_attr : check_attr);
+ (void) wprintw(win,
+ data->is_check ? "[%c]" : "(%c)",
+ states[item->state]);
+ (void) wattrset(win, menubox_attr);
+
+ (void) wattrset(win, selected ? item_selected_attr : item_attr);
+ for (i = 0; i < depths; ++i) {
+ int j;
+ (void) wmove(win, choice, data->item_x + INDENT * i);
+ (void) waddch(win, ACS_VLINE);
+ for (j = INDENT - 1; j > 0; --j)
+ (void) waddch(win, ' ');
+ }
+ (void) wmove(win, choice, data->item_x + INDENT * depths);
+
+ dlg_print_listitem(win, show, climit, first, selected);
+
+ if (selected) {
+ dlg_item_help(item->help);
+ }
+ (void) wattrset(win, save);
+}
+
+static void
+print_list(ALL_DATA * data,
+ int choice,
+ int scrollamt,
+ int max_choice)
+{
+ int i;
+ int cur_y, cur_x;
+
+ getyx(data->dialog, cur_y, cur_x);
+
+ for (i = 0; i < max_choice; i++) {
+ print_item(data,
+ &data->items[scrollamt + i],
+ data->states,
+ data->depths[scrollamt + i],
+ i, i == choice);
+ }
+ (void) wnoutrefresh(data->list);
+
+ dlg_draw_scrollbar(data->dialog,
+ (long) (scrollamt),
+ (long) (scrollamt),
+ (long) (scrollamt + max_choice),
+ (long) (data->item_no),
+ data->box_x + data->check_x,
+ data->box_x + data->use_width,
+ data->box_y,
+ data->box_y + data->use_height + 1,
+ menubox_border2_attr,
+ menubox_border_attr);
+
+ (void) wmove(data->dialog, cur_y, cur_x);
+}
+
+static bool
+check_hotkey(DIALOG_LISTITEM * items, int choice)
+{
+ bool result = FALSE;
+
+ if (dlg_match_char(dlg_last_getc(),
+ (dialog_vars.no_tags
+ ? items[choice].text
+ : items[choice].name))) {
+ result = TRUE;
+ }
+ return result;
+}
+
+/*
+ * This is an alternate interface to 'treeview' which allows the application
+ * to read the list item states back directly without putting them in the
+ * output buffer.
+ */
+int
+dlg_treeview(const char *title,
+ const char *cprompt,
+ int height,
+ int width,
+ int list_height,
+ int item_no,
+ DIALOG_LISTITEM * items,
+ const char *states,
+ int *depths,
+ int flag,
+ int *current_item)
+{
+ /* *INDENT-OFF* */
+ static DLG_KEYS_BINDING binding[] = {
+ HELPKEY_BINDINGS,
+ ENTERKEY_BINDINGS,
+ DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_RIGHT ),
+ DLG_KEYS_DATA( DLGK_FIELD_NEXT, TAB ),
+ DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
+ DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_LEFT ),
+ DLG_KEYS_DATA( DLGK_ITEM_FIRST, KEY_HOME ),
+ DLG_KEYS_DATA( DLGK_ITEM_LAST, KEY_END ),
+ DLG_KEYS_DATA( DLGK_ITEM_LAST, KEY_LL ),
+ DLG_KEYS_DATA( DLGK_ITEM_NEXT, '+' ),
+ DLG_KEYS_DATA( DLGK_ITEM_NEXT, KEY_DOWN ),
+ DLG_KEYS_DATA( DLGK_ITEM_NEXT, CHR_NEXT ),
+ DLG_KEYS_DATA( DLGK_ITEM_PREV, '-' ),
+ DLG_KEYS_DATA( DLGK_ITEM_PREV, KEY_UP ),
+ DLG_KEYS_DATA( DLGK_ITEM_PREV, CHR_PREVIOUS ),
+ DLG_KEYS_DATA( DLGK_PAGE_NEXT, KEY_NPAGE ),
+ DLG_KEYS_DATA( DLGK_PAGE_NEXT, DLGK_MOUSE(KEY_NPAGE) ),
+ DLG_KEYS_DATA( DLGK_PAGE_PREV, KEY_PPAGE ),
+ DLG_KEYS_DATA( DLGK_PAGE_PREV, DLGK_MOUSE(KEY_PPAGE) ),
+ END_KEYS_BINDING
+ };
+ /* *INDENT-ON* */
+
+#ifdef KEY_RESIZE
+ int old_height = height;
+ int old_width = width;
+#endif
+ ALL_DATA all;
+ int i, j, key2, found, x, y, cur_y, box_x, box_y;
+ int key = 0, fkey;
+ int button = dialog_state.visit_items ? -1 : dlg_default_button();
+ int choice = dlg_default_listitem(items);
+ int scrollamt = 0;
+ int max_choice;
+ int was_mouse;
+ int use_height;
+ int use_width, name_width, text_width, tree_width;
+ int result = DLG_EXIT_UNKNOWN;
+ int num_states;
+ WINDOW *dialog, *list;
+ char *prompt = dlg_strclone(cprompt);
+ const char **buttons = dlg_ok_labels();
+ const char *widget_name;
+
+ /* we need at least two states */
+ if (states == 0 || strlen(states) < 2)
+ states = " *";
+ num_states = (int) strlen(states);
+
+ memset(&all, 0, sizeof(all));
+ all.items = items;
+ all.item_no = item_no;
+ all.states = states;
+ all.depths = depths;
+
+ dlg_does_output();
+ dlg_tab_correct_str(prompt);
+
+ /*
+ * If this is a radiobutton list, ensure that no more than one item is
+ * selected initially. Allow none to be selected, since some users may
+ * wish to provide this flavor.
+ */
+ if (flag == FLAG_RADIO) {
+ bool first = TRUE;
+
+ for (i = 0; i < item_no; i++) {
+ if (items[i].state) {
+ if (first) {
+ first = FALSE;
+ } else {
+ items[i].state = 0;
+ }
+ }
+ }
+ } else {
+ all.is_check = TRUE;
+ }
+ widget_name = "treeview";
+#ifdef KEY_RESIZE
+ retry:
+#endif
+
+ use_height = list_height;
+ 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, use_width);
+ dlg_calc_listh(&height, &use_height, item_no);
+ } else {
+ dlg_auto_size(title, prompt, &height, &width, MIN_HIGH + use_height, use_width);
+ }
+ dlg_button_layout(buttons, &width);
+ dlg_print_size(height, width);
+ dlg_ctl_size(height, width);
+
+ x = dlg_box_x_ordinate(width);
+ y = dlg_box_y_ordinate(height);
+
+ dialog = dlg_new_window(height, width, y, x);
+ dlg_register_window(dialog, widget_name, binding);
+ dlg_register_buttons(dialog, widget_name, buttons);
+
+ dlg_mouse_setbase(x, y);
+
+ 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);
+
+ (void) wattrset(dialog, dialog_attr);
+ dlg_print_autowrap(dialog, prompt, height, width);
+
+ all.use_width = width - 4;
+ cur_y = getcury(dialog);
+ box_y = cur_y + 1;
+ box_x = (width - all.use_width) / 2 - 1;
+
+ /*
+ * After displaying the prompt, we know how much space we really have.
+ * Limit the list to avoid overwriting the ok-button.
+ */
+ if (use_height + MIN_HIGH > height - cur_y)
+ use_height = height - MIN_HIGH - cur_y;
+ if (use_height <= 0)
+ use_height = 1;
+
+ max_choice = MIN(use_height, item_no);
+
+ /* create new window for the list */
+ list = dlg_sub_window(dialog, use_height, all.use_width,
+ y + box_y + 1, x + box_x + 1);
+
+ /* draw a box around the list items */
+ dlg_draw_box(dialog, box_y, box_x,
+ use_height + 2 * MARGIN,
+ all.use_width + 2 * MARGIN,
+ menubox_border_attr, menubox_border2_attr);
+
+ text_width = 0;
+ name_width = 0;
+ tree_width = 0;
+ /* Find length of longest item to center treeview */
+ for (i = 0; i < item_no; i++) {
+ tree_width = MAX(tree_width, INDENT * depths[i]);
+ text_width = MAX(text_width, dlg_count_columns(items[i].text));
+ name_width = MAX(name_width, dlg_count_columns(items[i].name));
+ }
+ if (dialog_vars.no_tags && !dialog_vars.no_items) {
+ tree_width += text_width;
+ } else if (dialog_vars.no_items) {
+ tree_width += name_width;
+ } else {
+ tree_width += (text_width + name_width);
+ }
+
+ use_width = (all.use_width - 4);
+ tree_width = MIN(tree_width, all.use_width);
+
+ all.check_x = (use_width - tree_width) / 2;
+ all.item_x = ((dialog_vars.no_tags
+ ? 0
+ : (dialog_vars.no_items
+ ? 0
+ : (2 + name_width)))
+ + all.check_x + 4);
+
+ /* ensure we are scrolled to show the current choice */
+ if (choice >= (max_choice + scrollamt)) {
+ scrollamt = choice - max_choice + 1;
+ choice = max_choice - 1;
+ }
+
+ /* register the new window, along with its borders */
+ dlg_mouse_mkbigregion(box_y + 1, box_x,
+ use_height, all.use_width + 2,
+ KEY_MAX, 1, 1, 1 /* by lines */ );
+
+ all.dialog = dialog;
+ all.box_x = box_x;
+ all.box_y = box_y;
+ all.use_height = use_height;
+ all.list = list;
+ print_list(&all, choice, scrollamt, max_choice);
+
+ 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 + all.check_x + 2);
+
+ key = dlg_mouse_wgetch(dialog, &fkey);
+ if (dlg_result_key(key, fkey, &result))
+ break;
+
+ was_mouse = (fkey && is_DLGK_MOUSE(key));
+ if (was_mouse)
+ key -= M_EVENT;
+
+ if (was_mouse && (key >= KEY_MAX)) {
+ i = (key - KEY_MAX);
+ if (i < max_choice) {
+ choice = (key - KEY_MAX);
+ print_list(&all, choice, scrollamt, max_choice);
+
+ key = ' '; /* force the selected item to toggle */
+ } else {
+ beep();
+ continue;
+ }
+ fkey = FALSE;
+ } else if (was_mouse && key >= KEY_MIN) {
+ key = dlg_lookup_key(dialog, key, &fkey);
+ }
+
+ /*
+ * A space toggles the item status.
+ */
+ if (key == ' ') {
+ int current = scrollamt + choice;
+ int next = items[current].state + 1;
+
+ if (next >= num_states)
+ next = 0;
+
+ if (flag == FLAG_CHECK) { /* checklist? */
+ items[current].state = next;
+ } else {
+ for (i = 0; i < item_no; i++) {
+ if (i != current) {
+ items[i].state = 0;
+ }
+ }
+ if (items[current].state) {
+ items[current].state = next ? next : 1;
+ } else {
+ items[current].state = 1;
+ }
+ }
+ print_list(&all, choice, scrollamt, max_choice);
+ continue; /* wait for another key press */
+ }
+
+ /*
+ * Check if key pressed matches first character of any item tag in
+ * list. If there is more than one match, we will cycle through
+ * each one as the same key is pressed repeatedly.
+ */
+ found = FALSE;
+ if (!fkey) {
+ if (button < 0 || !dialog_state.visit_items) {
+ for (j = scrollamt + choice + 1; j < item_no; j++) {
+ if (check_hotkey(items, j)) {
+ found = TRUE;
+ i = j - scrollamt;
+ break;
+ }
+ }
+ if (!found) {
+ for (j = 0; j <= scrollamt + choice; j++) {
+ if (check_hotkey(items, j)) {
+ found = TRUE;
+ i = j - scrollamt;
+ break;
+ }
+ }
+ }
+ if (found)
+ dlg_flush_getc();
+ } else if ((j = dlg_char_to_button(key, buttons)) >= 0) {
+ button = j;
+ ungetch('\n');
+ continue;
+ }
+ }
+
+ /*
+ * A single digit (1-9) positions the selection to that line in the
+ * current screen.
+ */
+ if (!found
+ && (key <= '9')
+ && (key > '0')
+ && (key - '1' < max_choice)) {
+ found = TRUE;
+ i = key - '1';
+ }
+
+ if (!found) {
+ if (fkey) {
+ found = TRUE;
+ switch (key) {
+ case DLGK_ITEM_FIRST:
+ i = -scrollamt;
+ break;
+ case DLGK_ITEM_LAST:
+ i = item_no - 1 - scrollamt;
+ break;
+ case DLGK_PAGE_PREV:
+ if (choice)
+ i = 0;
+ else if (scrollamt != 0)
+ i = -MIN(scrollamt, max_choice);
+ else
+ continue;
+ break;
+ case DLGK_PAGE_NEXT:
+ i = MIN(choice + max_choice, item_no - scrollamt - 1);
+ break;
+ case DLGK_ITEM_PREV:
+ i = choice - 1;
+ if (choice == 0 && scrollamt == 0)
+ continue;
+ break;
+ case DLGK_ITEM_NEXT:
+ i = choice + 1;
+ if (scrollamt + choice >= item_no - 1)
+ continue;
+ break;
+ default:
+ found = FALSE;
+ break;
+ }
+ }
+ }
+
+ if (found) {
+ if (i != choice) {
+ if (i < 0 || i >= max_choice) {
+ if (i < 0) {
+ scrollamt += i;
+ choice = 0;
+ } else {
+ choice = max_choice - 1;
+ scrollamt += (i - max_choice + 1);
+ }
+ print_list(&all, choice, scrollamt, max_choice);
+ } else {
+ choice = i;
+ print_list(&all, choice, scrollamt, max_choice);
+ }
+ }
+ continue; /* wait for another key press */
+ }
+
+ if (fkey) {
+ switch (key) {
+ case DLGK_ENTER:
+ result = dlg_enter_buttoncode(button);
+ break;
+ case DLGK_FIELD_PREV:
+ button = dlg_prev_button(buttons, button);
+ dlg_draw_buttons(dialog, height - 2, 0, buttons, button,
+ FALSE, width);
+ break;
+ case DLGK_FIELD_NEXT:
+ button = dlg_next_button(buttons, button);
+ dlg_draw_buttons(dialog, height - 2, 0, buttons, button,
+ FALSE, width);
+ break;
+#ifdef KEY_RESIZE
+ case KEY_RESIZE:
+ /* reset data */
+ height = old_height;
+ width = old_width;
+ /* repaint */
+ dlg_clear();
+ dlg_del_window(dialog);
+ refresh();
+ dlg_mouse_free_regions();
+ goto retry;
+#endif
+ default:
+ if (was_mouse) {
+ if ((key2 = dlg_ok_buttoncode(key)) >= 0) {
+ result = key2;
+ break;
+ }
+ beep();
+ }
+ }
+ } else {
+ beep();
+ }
+ }
+
+ dlg_del_window(dialog);
+ dlg_mouse_free_regions();
+ free(prompt);
+ *current_item = (scrollamt + choice);
+ return result;
+}
+
+/*
+ * Display a set of items as a tree.
+ */
+int
+dialog_treeview(const char *title,
+ const char *cprompt,
+ int height,
+ int width,
+ int list_height,
+ int item_no,
+ char **items,
+ int flag)
+{
+ int result;
+ int i, j;
+ DIALOG_LISTITEM *listitems;
+ int *depths;
+ bool show_status = FALSE;
+ int current = 0;
+
+ listitems = dlg_calloc(DIALOG_LISTITEM, (size_t) item_no + 1);
+ assert_ptr(listitems, "dialog_treeview");
+
+ depths = dlg_calloc(int, (size_t) item_no + 1);
+ assert_ptr(depths, "dialog_treeview");
+
+ for (i = j = 0; i < item_no; ++i) {
+ listitems[i].name = items[j++];
+ listitems[i].text = (dialog_vars.no_items
+ ? dlg_strempty()
+ : items[j++]);
+ listitems[i].state = !dlg_strcmp(items[j++], "on");
+ depths[i] = atoi(items[j++]);
+ listitems[i].help = ((dialog_vars.item_help)
+ ? items[j++]
+ : dlg_strempty());
+ }
+ dlg_align_columns(&listitems[0].text, (int) sizeof(DIALOG_LISTITEM), item_no);
+
+ result = dlg_treeview(title,
+ cprompt,
+ height,
+ width,
+ list_height,
+ item_no,
+ listitems,
+ NULL,
+ depths,
+ flag,
+ &current);
+
+ switch (result) {
+ case DLG_EXIT_OK: /* FALLTHRU */
+ case DLG_EXIT_EXTRA:
+ show_status = TRUE;
+ break;
+ case DLG_EXIT_HELP:
+ dlg_add_result("HELP ");
+ show_status = dialog_vars.help_status;
+ if (USE_ITEM_HELP(listitems[current].help)) {
+ if (show_status) {
+ if (dialog_vars.separate_output) {
+ dlg_add_string(listitems[current].help);
+ dlg_add_separator();
+ } else {
+ dlg_add_quoted(listitems[current].help);
+ }
+ } else {
+ dlg_add_string(listitems[current].help);
+ }
+ result = DLG_EXIT_ITEM_HELP;
+ } else {
+ if (show_status) {
+ if (dialog_vars.separate_output) {
+ dlg_add_string(listitems[current].name);
+ dlg_add_separator();
+ } else {
+ dlg_add_quoted(listitems[current].name);
+ }
+ } else {
+ dlg_add_string(listitems[current].name);
+ }
+ }
+ break;
+ }
+
+ if (show_status) {
+ for (i = 0; i < item_no; i++) {
+ if (listitems[i].state) {
+ if (dialog_vars.separate_output) {
+ dlg_add_string(listitems[i].name);
+ dlg_add_separator();
+ } 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);
+ }
+ }
+ }
+ dlg_add_last_key(-1);
+ }
+
+ dlg_free_columns(&listitems[0].text, (int) sizeof(DIALOG_LISTITEM), item_no);
+ free(depths);
+ free(listitems);
+ return result;
+}
diff --git a/contrib/dialog/ui_getc.c b/contrib/dialog/ui_getc.c
index d9d5a93a00e23..33e571fd0e301 100644
--- a/contrib/dialog/ui_getc.c
+++ b/contrib/dialog/ui_getc.c
@@ -1,9 +1,9 @@
/*
- * $Id: ui_getc.c,v 1.63 2011/07/07 22:05:58 tom Exp $
+ * $Id: ui_getc.c,v 1.67 2013/03/24 23:53:19 tom Exp $
*
* ui_getc.c - user interface glue for getc()
*
- * Copyright 2001-2010,2011 Thomas E. Dickey
+ * Copyright 2001-2012,2013 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -284,6 +284,36 @@ dlg_flush_getc(void)
}
/*
+ * Report the last key entered by the user. The 'mode' parameter controls
+ * the way it is separated from other results:
+ * -2 (no separator)
+ * -1 (separator after the key name)
+ * 0 (separator is optionally before the key name)
+ * 1 (same as -1)
+ */
+void
+dlg_add_last_key(int mode)
+{
+ if (dialog_vars.last_key) {
+ if (mode >= 0) {
+ if (mode > 0) {
+ dlg_add_last_key(-1);
+ } else {
+ if (dlg_need_separator())
+ dlg_add_separator();
+ dlg_add_last_key(-2);
+ }
+ } else {
+ char temp[80];
+ sprintf(temp, "%d", last_getc);
+ dlg_add_string(temp);
+ if (mode == -1)
+ dlg_add_separator();
+ }
+ }
+}
+
+/*
* Check if the stream has been unexpectedly closed, returning false in that
* case.
*/
@@ -294,8 +324,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;
}
}
@@ -441,12 +470,9 @@ dlg_getc(WINDOW *win, int *fkey)
if (!*fkey || *fkey != before_fkey) {
switch (ch) {
case CHR_LITERAL:
- if (!literal) {
- literal = TRUE;
- keypad(win, FALSE);
- continue;
- }
- break;
+ literal = TRUE;
+ keypad(win, FALSE);
+ continue;
case CHR_REPAINT:
(void) touchwin(win);
(void) wrefresh(curscr);
@@ -530,6 +556,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;
diff --git a/contrib/dialog/util.c b/contrib/dialog/util.c
index 82ef4fa67414a..ddd32469adccb 100644
--- a/contrib/dialog/util.c
+++ b/contrib/dialog/util.c
@@ -1,9 +1,9 @@
/*
- * $Id: util.c,v 1.227 2011/07/07 23:42:30 tom Exp $
+ * $Id: util.c,v 1.255 2013/05/23 22:58:28 tom Exp $
*
* util.c -- miscellaneous utilities for dialog
*
- * Copyright 2000-2010,2011 Thomas E. Dickey
+ * Copyright 2000-2012,2013 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -27,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,11 +131,57 @@ 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 ...
*/
void
@@ -132,7 +193,7 @@ dlg_put_backtitle(void)
chtype attr = A_NORMAL;
int backwidth = dlg_count_columns(dialog_vars.backtitle);
- wattrset(stdscr, screen_attr);
+ (void) wattrset(stdscr, screen_attr);
(void) wmove(stdscr, 0, 1);
dlg_print_text(stdscr, dialog_vars.backtitle, COLS - 2, &attr);
for (i = 0; i < COLS - backwidth; i++)
@@ -154,7 +215,7 @@ dlg_attr_clear(WINDOW *win, int height, int width, chtype attr)
{
int i, j;
- wattrset(win, attr);
+ (void) wattrset(win, attr);
for (i = 0; i < height; i++) {
(void) wmove(win, i, 0);
for (j = 0; j < width; j++)
@@ -210,6 +271,18 @@ open_terminal(char **result, int mode)
return open(device, mode);
}
+#ifdef NCURSES_VERSION
+static int
+my_putc(int ch)
+{
+ char buffer[2];
+ int fd = fileno(dialog_state.screen_output);
+
+ buffer[0] = (char) ch;
+ return (int) write(fd, buffer, (size_t) 1);
+}
+#endif
+
/*
* Do some initialization for dialog.
*
@@ -226,6 +299,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;
@@ -258,16 +333,20 @@ init_dialog(FILE *input, FILE *output)
dialog_state.pipe_input = fdopen(fd2, "r");
if (fileno(stdin) != 0) /* some functions may read fd #0 */
(void) dup2(fileno(stdin), 0);
- } else
+ } else {
dlg_exiterr("cannot open tty-input");
+ }
+ close(fd1);
} else if (!isatty(fileno(stdin))) {
- if ((fd1 = open_terminal(&device, O_RDONLY)) >= 0
- && (fd2 = dup(fileno(stdin))) >= 0) {
- dialog_state.pipe_input = fdopen(fd2, "r");
- if (freopen(device, "r", stdin) == 0)
- dlg_exiterr("cannot open tty-input");
- if (fileno(stdin) != 0) /* some functions may read fd #0 */
- (void) dup2(fileno(stdin), 0);
+ if ((fd1 = open_terminal(&device, O_RDONLY)) >= 0) {
+ if ((fd2 = dup(fileno(stdin))) >= 0) {
+ dialog_state.pipe_input = fdopen(fd2, "r");
+ if (freopen(device, "r", stdin) == 0)
+ dlg_exiterr("cannot open tty-input");
+ if (fileno(stdin) != 0) /* some functions may read fd #0 */
+ (void) dup2(fileno(stdin), 0);
+ }
+ close(fd1);
}
free(device);
}
@@ -310,19 +389,20 @@ init_dialog(FILE *input, FILE *output)
* Cancel xterm's alternate-screen mode.
*/
if (!dialog_vars.keep_tite
- && (dialog_state.screen_output != stdout
+ && (fileno(dialog_state.screen_output) != fileno(stdout)
|| isatty(fileno(dialog_state.screen_output)))
&& key_mouse != 0 /* xterm and kindred */
&& isprivate(enter_ca_mode)
&& isprivate(exit_ca_mode)) {
/*
- * initscr() or newterm() already did putp(enter_ca_mode) as a side
+ * initscr() or newterm() already wrote enter_ca_mode as a side
* effect of initializing the screen. It would be nice to not even
* do that, but we do not really have access to the correct copy of
* the terminfo description until those functions have been invoked.
*/
- (void) putp(exit_ca_mode);
- (void) putp(clear_screen);
+ (void) refresh();
+ (void) tputs(exit_ca_mode, 0, my_putc);
+ (void) tputs(clear_screen, 0, my_putc);
/*
* Prevent ncurses from switching "back" to the normal screen when
* exiting from dialog. That would move the cursor to the original
@@ -506,22 +586,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;
@@ -556,6 +646,58 @@ is_combining(const char *txt, int *combined)
#endif
/*
+ * Print the name (tag) or text from a DIALOG_LISTITEM, highlighting the
+ * first character if selected.
+ */
+void
+dlg_print_listitem(WINDOW *win,
+ const char *text,
+ int climit,
+ bool first,
+ int selected)
+{
+ chtype attr = A_NORMAL;
+ int limit;
+ const int *cols;
+ chtype attrs[4];
+
+ if (text == 0)
+ text = "";
+
+ if (first) {
+ const int *indx = dlg_index_wchars(text);
+ attrs[3] = tag_key_selected_attr;
+ attrs[2] = tag_key_attr;
+ attrs[1] = tag_selected_attr;
+ attrs[0] = tag_attr;
+
+ (void) wattrset(win, selected ? attrs[3] : attrs[2]);
+ (void) waddnstr(win, text, indx[1]);
+
+ if ((int) strlen(text) > indx[1]) {
+ limit = dlg_limit_columns(text, climit, 1);
+ if (limit > 1) {
+ (void) wattrset(win, selected ? attrs[1] : attrs[0]);
+ (void) waddnstr(win,
+ text + indx[1],
+ indx[limit] - indx[1]);
+ }
+ }
+ } else {
+ attrs[1] = item_selected_attr;
+ attrs[0] = item_attr;
+
+ cols = dlg_index_columns(text);
+ limit = dlg_limit_columns(text, climit, 0);
+
+ if (limit > 0) {
+ (void) wattrset(win, selected ? attrs[1] : attrs[0]);
+ dlg_print_text(win, text, cols[limit], &attr);
+ }
+ }
+}
+
+/*
* Print up to 'cols' columns from 'text', optionally rendering our escape
* sequence for attributes and color.
*/
@@ -647,8 +789,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))
@@ -676,8 +820,8 @@ dlg_print_line(WINDOW *win,
const char *prompt,
int lm, int rm, int *x)
{
- const char *wrap_ptr = prompt;
- const char *test_ptr = prompt;
+ const char *wrap_ptr;
+ const char *test_ptr;
const char *hide_ptr = 0;
const int *cols = dlg_index_columns(prompt);
const int *indx = dlg_index_wchars(prompt);
@@ -704,7 +848,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 +895,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 {
@@ -902,15 +1046,16 @@ dlg_print_scrolled(WINDOW *win,
#endif
dummy = newwin(high, width, 0, 0);
if (dummy == 0) {
- wattrset(win, dialog_attr);
+ (void) wattrset(win, dialog_attr);
dlg_print_autowrap(win, prompt, height + 1 + (3 * MARGIN), width);
last = 0;
} else {
wbkgdset(dummy, dialog_attr | ' ');
- wattrset(dummy, dialog_attr);
+ (void) wattrset(dummy, dialog_attr);
werase(dummy);
dlg_print_autowrap(dummy, prompt, high, width);
getyx(dummy, y, x);
+ (void) x;
copywin(dummy, /* srcwin */
win, /* dstwin */
@@ -937,7 +1082,7 @@ dlg_print_scrolled(WINDOW *win,
(void) sprintf(buffer, "%d%%", percent);
(void) waddstr(win, buffer);
if ((len = (int) strlen(buffer)) < 4) {
- wattrset(win, border_attr);
+ (void) wattrset(win, border_attr);
whline(win, dlg_boxchar(ACS_HLINE), 4 - len);
}
}
@@ -948,7 +1093,7 @@ dlg_print_scrolled(WINDOW *win,
#endif
{
(void) offset;
- wattrset(win, dialog_attr);
+ (void) wattrset(win, dialog_attr);
dlg_print_autowrap(win, prompt, height + 1 + (3 * MARGIN), width);
last = 0;
}
@@ -1081,25 +1226,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,23 +1258,24 @@ real_auto_size(const char *title,
high = SLINES - y;
}
- if (*width > 0) {
- wide = *width;
- } else if (prompt != 0) {
- wide = MAX(title_length, mincols);
- if (strchr(prompt, '\n') == 0) {
- double val = dialog_state.aspect_ratio * count_real_columns(prompt);
- double xxx = sqrt(val);
- int tmp = (int) xxx;
- wide = MAX(wide, tmp);
- wide = MAX(wide, longest_word(prompt));
- justify_text((WINDOW *) 0, prompt, high, wide, height, width);
+ if (*width <= 0) {
+ if (prompt != 0) {
+ wide = MAX(title_length, mincols);
+ if (strchr(prompt, '\n') == 0) {
+ double val = (dialog_state.aspect_ratio *
+ dlg_count_real_columns(prompt));
+ double xxx = sqrt(val);
+ int tmp = (int) xxx;
+ wide = MAX(wide, tmp);
+ wide = MAX(wide, longest_word(prompt));
+ justify_text((WINDOW *) 0, prompt, high, wide, height, width);
+ } else {
+ auto_size_preformatted(prompt, height, width);
+ }
} else {
- auto_size_preformatted(prompt, height, width);
+ wide = SCOLS - x;
+ justify_text((WINDOW *) 0, prompt, high, wide, height, width);
}
- } else {
- wide = SCOLS - x;
- justify_text((WINDOW *) 0, prompt, high, wide, height, width);
}
if (*width < title_length) {
@@ -1291,13 +1418,13 @@ 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);
- wattrset(win, 0);
+ (void) wattrset(win, 0);
for (i = 0; i < height; i++) {
(void) wmove(win, y + i, x);
for (j = 0; j < width; j++)
@@ -1306,21 +1433,28 @@ 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) 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 *
@@ -1454,7 +1588,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
{
@@ -1476,7 +1610,7 @@ repaint_shadow(DIALOG_WINDOWS * dw, bool draw, int y, int x, int height, int wid
if (UseShadow(dw)) {
#if !USE_WCHGAT
chtype save = dlg_get_attrs(dw->shadow);
- wattrset(dw->shadow, draw ? shadow_attr : screen_attr);
+ (void) wattrset(dw->shadow, draw ? shadow_attr : screen_attr);
#endif
for (i = 0; i < SHADOW_ROWS; ++i) {
for (j = 0; j < width; ++j) {
@@ -1490,7 +1624,7 @@ repaint_shadow(DIALOG_WINDOWS * dw, bool draw, int y, int x, int height, int wid
}
(void) wnoutrefresh(dw->shadow);
#if !USE_WCHGAT
- wattrset(dw->shadow, save);
+ (void) wattrset(dw->shadow, save);
#endif
}
}
@@ -1732,11 +1866,26 @@ int
dlg_calc_list_width(int item_no, DIALOG_LISTITEM * items)
{
int n, i, len1 = 0, len2 = 0;
+ int bits = ((dialog_vars.no_tags ? 1 : 0)
+ + (dialog_vars.no_items ? 2 : 0));
+
for (i = 0; i < item_no; ++i) {
- if ((n = dlg_count_columns(items[i].name)) > len1)
- len1 = n;
- if ((n = dlg_count_columns(items[i].text)) > len2)
- len2 = n;
+ switch (bits) {
+ case 0:
+ /* FALLTHRU */
+ case 1:
+ if ((n = dlg_count_columns(items[i].name)) > len1)
+ len1 = n;
+ if ((n = dlg_count_columns(items[i].text)) > len2)
+ len2 = n;
+ break;
+ case 2:
+ /* FALLTHRU */
+ case 3:
+ if ((n = dlg_count_columns(items[i].name)) > len1)
+ len1 = n;
+ break;
+ }
}
return len1 + len2;
}
@@ -1836,32 +1985,39 @@ dlg_draw_title(WINDOW *win, const char *title)
chtype save = dlg_get_attrs(win);
int x = centered(getmaxx(win), title);
- wattrset(win, title_attr);
+ (void) wattrset(win, title_attr);
wmove(win, 0, x);
dlg_print_text(win, title, getmaxx(win) - x, &attr);
- wattrset(win, save);
+ (void) wattrset(win, save);
}
}
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);
+ (void) 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);
+ (void) wattrset(win, on_right);
(void) waddch(win, dlg_boxchar(ACS_RTEE));
+ (void) 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,8 +2063,9 @@ dlg_del_window(WINDOW *win)
if (q) {
if (dialog_state.all_windows != 0)
erase_childs_shadow(q);
- delwin(q->normal);
+ del_subwindows(q->normal);
dlg_unregister_window(q->normal);
+ delwin(q->normal);
free(q);
}
doupdate();
@@ -1934,7 +2091,8 @@ dlg_new_modal_window(WINDOW *parent, int height, int width, int y, int x)
DIALOG_WINDOWS *p = dlg_calloc(DIALOG_WINDOWS, 1);
(void) parent;
- if ((win = newwin(height, width, y, x)) == 0) {
+ if (p == 0
+ || (win = newwin(height, width, y, x)) == 0) {
dlg_exiterr("Can't make new window at (%d,%d), size (%d,%d).\n",
y, x, height, width);
}
@@ -1996,6 +2154,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;
}
@@ -2049,7 +2208,7 @@ dlg_item_help(const char *txt)
chtype attr = A_NORMAL;
int y, x;
- wattrset(stdscr, itemhelp_attr);
+ (void) wattrset(stdscr, itemhelp_attr);
(void) wmove(stdscr, LINES - 1, 0);
(void) wclrtoeol(stdscr);
(void) addch(' ');
@@ -2057,6 +2216,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 +2500,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 +2592,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 +2609,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 +2626,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 +2643,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
diff --git a/contrib/dialog/yesno.c b/contrib/dialog/yesno.c
index 4efb073926afb..d8a0c0bb02e6f 100644
--- a/contrib/dialog/yesno.c
+++ b/contrib/dialog/yesno.c
@@ -1,9 +1,9 @@
/*
- * $Id: yesno.c,v 1.51 2011/06/27 08:20:57 tom Exp $
+ * $Id: yesno.c,v 1.57 2012/12/01 01:48:21 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,12 +81,12 @@ 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);
- wattrset(dialog, dialog_attr);
+ (void) wattrset(dialog, dialog_attr);
page = height - (1 + 3 * MARGIN);
dlg_draw_buttons(dialog,
@@ -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);