summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2010-04-28 22:01:07 +0200
committerAndreas Baumann <abaumann@yahoo.com>2010-04-28 22:01:07 +0200
commita8208e10d8f313e07e0b2cc72048fa511567e391 (patch)
treebe74cc237b9367b0b16bf189d1549ea68dfb1d2f
parent8332a3ab755597610b2135278f39656c4c29c8a0 (diff)
downloadtvisiontest-a8208e10d8f313e07e0b2cc72048fa511567e391.tar.gz
tvisiontest-a8208e10d8f313e07e0b2cc72048fa511567e391.tar.bz2
added dldialog
-rw-r--r--dldialog/ABOUT-NLS226
-rw-r--r--dldialog/AUTHORS16
-rw-r--r--dldialog/COPYING280
-rw-r--r--dldialog/ChangeLog494
-rw-r--r--dldialog/INSTALL182
-rw-r--r--dldialog/Makefile.am22
-rw-r--r--dldialog/Makefile.in445
-rw-r--r--dldialog/NEWS101
-rw-r--r--dldialog/README70
-rw-r--r--dldialog/README.QT19
-rw-r--r--dldialog/README.developer49
-rw-r--r--dldialog/TODO22
-rw-r--r--dldialog/acconfig.h34
-rw-r--r--dldialog/acinclude.m4462
-rw-r--r--dldialog/aclocal.m41374
-rwxr-xr-xdldialog/config.guess1121
-rw-r--r--dldialog/config.h.in142
-rwxr-xr-xdldialog/config.sub954
-rwxr-xr-xdldialog/configure6190
-rw-r--r--dldialog/configure.in139
-rw-r--r--dldialog/dldialog.spec80
-rw-r--r--dldialog/dldialog.spec.in80
-rwxr-xr-xdldialog/install-sh250
-rw-r--r--dldialog/intl/ChangeLog1086
-rw-r--r--dldialog/intl/Makefile.in214
-rw-r--r--dldialog/intl/VERSION1
-rw-r--r--dldialog/intl/bindtextdom.c203
-rw-r--r--dldialog/intl/cat-compat.c262
-rw-r--r--dldialog/intl/dcgettext.c624
-rw-r--r--dldialog/intl/dgettext.c59
-rw-r--r--dldialog/intl/explodename.c188
-rw-r--r--dldialog/intl/finddomain.c216
-rw-r--r--dldialog/intl/gettext.c70
-rw-r--r--dldialog/intl/gettext.h105
-rw-r--r--dldialog/intl/gettextP.h89
-rw-r--r--dldialog/intl/hash-string.h59
-rw-r--r--dldialog/intl/intl-compat.c76
-rw-r--r--dldialog/intl/l10nflist.c411
-rw-r--r--dldialog/intl/libgettext.h182
-rw-r--r--dldialog/intl/linux-msg.sed100
-rw-r--r--dldialog/intl/loadinfo.h76
-rw-r--r--dldialog/intl/loadmsgcat.c222
-rw-r--r--dldialog/intl/localealias.c424
-rw-r--r--dldialog/intl/po2tbl.sed.in102
-rw-r--r--dldialog/intl/textdomain.c108
-rw-r--r--dldialog/intl/xopen-msg.sed104
-rwxr-xr-xdldialog/ltconfig2101
-rw-r--r--dldialog/ltmain.sh3079
-rwxr-xr-xdldialog/missing188
-rwxr-xr-xdldialog/mkinstalldirs40
-rw-r--r--dldialog/perl/DlButton.pm51
-rw-r--r--dldialog/perl/DlButtonGroup.pm127
-rw-r--r--dldialog/perl/DlCheckList.pm106
-rw-r--r--dldialog/perl/DlComboBox.pm117
-rw-r--r--dldialog/perl/DlDialog.pm406
-rw-r--r--dldialog/perl/DlFileSelect.pm309
-rw-r--r--dldialog/perl/DlHelp.pm99
-rw-r--r--dldialog/perl/DlInputField.pm88
-rw-r--r--dldialog/perl/DlList.pm196
-rw-r--r--dldialog/perl/DlMessage.pm65
-rw-r--r--dldialog/perl/DlRadioList.pm106
-rw-r--r--dldialog/perl/DlWidgetGroup.pm107
-rw-r--r--dldialog/perl/DlWizzard.pm156
-rw-r--r--dldialog/perl/I18n.pm96
-rw-r--r--dldialog/perl/Makefile.am27
-rw-r--r--dldialog/perl/Makefile.in365
-rw-r--r--dldialog/perl/dldialog.pm177
-rw-r--r--dldialog/perl/doc/DlDialog.html1293
-rw-r--r--dldialog/perl/doc/DlDialog.pod451
-rw-r--r--dldialog/perl/doc/DlDialog.tex360
-rw-r--r--dldialog/perl/doc/Makefile.am25
-rw-r--r--dldialog/perl/doc/Makefile.in281
-rwxr-xr-xdldialog/perl/test.dl113
-rw-r--r--dldialog/perl/test.hlp9
-rw-r--r--dldialog/po/ChangeLog0
-rw-r--r--dldialog/po/Makefile.in.in248
-rw-r--r--dldialog/po/POTFILES.in3
-rw-r--r--dldialog/po/cat-id-tbl.c53
-rw-r--r--dldialog/po/de.gmobin0 -> 3276 bytes
-rw-r--r--dldialog/po/de.po148
-rw-r--r--dldialog/po/dldialog.pot132
-rw-r--r--dldialog/po/stamp-cat-id1
-rw-r--r--dldialog/src/DLD_GEN/Makefile.am16
-rw-r--r--dldialog/src/DLD_GEN/Makefile.in376
-rw-r--r--dldialog/src/DLD_GEN/dld_gengui.h279
-rw-r--r--dldialog/src/DLD_GEN/dld_lib.cc139
-rw-r--r--dldialog/src/DLD_QT/Makefile.am50
-rw-r--r--dldialog/src/DLD_QT/Makefile.in507
-rw-r--r--dldialog/src/DLD_QT/dld_button.cc297
-rw-r--r--dldialog/src/DLD_QT/dld_button.h60
-rw-r--r--dldialog/src/DLD_QT/dld_check.cc65
-rw-r--r--dldialog/src/DLD_QT/dld_check.h47
-rw-r--r--dldialog/src/DLD_QT/dld_checklist.cc126
-rw-r--r--dldialog/src/DLD_QT/dld_checklist.h69
-rw-r--r--dldialog/src/DLD_QT/dld_col.cc96
-rw-r--r--dldialog/src/DLD_QT/dld_col.h53
-rw-r--r--dldialog/src/DLD_QT/dld_combobox.cc159
-rw-r--r--dldialog/src/DLD_QT/dld_combobox.h65
-rw-r--r--dldialog/src/DLD_QT/dld_comboitem.cc33
-rw-r--r--dldialog/src/DLD_QT/dld_comboitem.h32
-rw-r--r--dldialog/src/DLD_QT/dld_dialog.cc242
-rw-r--r--dldialog/src/DLD_QT/dld_dialog.h82
-rw-r--r--dldialog/src/DLD_QT/dld_form.cc90
-rw-r--r--dldialog/src/DLD_QT/dld_form.h53
-rw-r--r--dldialog/src/DLD_QT/dld_gauge.cc87
-rw-r--r--dldialog/src/DLD_QT/dld_gauge.h38
-rw-r--r--dldialog/src/DLD_QT/dld_image.cc158
-rw-r--r--dldialog/src/DLD_QT/dld_image.h51
-rw-r--r--dldialog/src/DLD_QT/dld_input.cc230
-rw-r--r--dldialog/src/DLD_QT/dld_input.h96
-rw-r--r--dldialog/src/DLD_QT/dld_lib.cc18
-rw-r--r--dldialog/src/DLD_QT/dld_list.cc198
-rw-r--r--dldialog/src/DLD_QT/dld_list.h71
-rw-r--r--dldialog/src/DLD_QT/dld_listitem.cc93
-rw-r--r--dldialog/src/DLD_QT/dld_listitem.h53
-rw-r--r--dldialog/src/DLD_QT/dld_qtapp.cc226
-rw-r--r--dldialog/src/DLD_QT/dld_qtapp.h81
-rw-r--r--dldialog/src/DLD_QT/dld_qtcontainer.cc199
-rw-r--r--dldialog/src/DLD_QT/dld_qtcontainer.h110
-rw-r--r--dldialog/src/DLD_QT/dld_qtlib.h19
-rw-r--r--dldialog/src/DLD_QT/dld_qtobj.cc64
-rw-r--r--dldialog/src/DLD_QT/dld_qtobj.h75
-rw-r--r--dldialog/src/DLD_QT/dld_radio.cc64
-rw-r--r--dldialog/src/DLD_QT/dld_radio.h52
-rw-r--r--dldialog/src/DLD_QT/dld_radiolist.cc122
-rw-r--r--dldialog/src/DLD_QT/dld_radiolist.h77
-rw-r--r--dldialog/src/DLD_QT/dld_row.cc96
-rw-r--r--dldialog/src/DLD_QT/dld_row.h52
-rw-r--r--dldialog/src/DLD_QT/dld_text.cc60
-rw-r--r--dldialog/src/DLD_QT/dld_text.h39
-rw-r--r--dldialog/src/DLD_QT/dld_textbox.cc88
-rw-r--r--dldialog/src/DLD_QT/dld_textbox.h51
-rw-r--r--dldialog/src/DLD_QT/mdld_button.cc102
-rw-r--r--dldialog/src/DLD_QT/mdld_check.cc94
-rw-r--r--dldialog/src/DLD_QT/mdld_checklist.cc81
-rw-r--r--dldialog/src/DLD_QT/mdld_combobox.cc81
-rw-r--r--dldialog/src/DLD_QT/mdld_dialog.cc94
-rw-r--r--dldialog/src/DLD_QT/mdld_image.cc95
-rw-r--r--dldialog/src/DLD_QT/mdld_input.cc95
-rw-r--r--dldialog/src/DLD_QT/mdld_list.cc81
-rw-r--r--dldialog/src/DLD_QT/mdld_qtapp.cc81
-rw-r--r--dldialog/src/DLD_QT/mdld_radio.cc94
-rw-r--r--dldialog/src/DLD_QT/mdld_radiolist.cc81
-rw-r--r--dldialog/src/DLD_TV/Makefile.am52
-rw-r--r--dldialog/src/DLD_TV/Makefile.in494
-rw-r--r--dldialog/src/DLD_TV/dld_button.cc337
-rw-r--r--dldialog/src/DLD_TV/dld_button.h64
-rw-r--r--dldialog/src/DLD_TV/dld_checklist.cc199
-rw-r--r--dldialog/src/DLD_TV/dld_checklist.h77
-rw-r--r--dldialog/src/DLD_TV/dld_col.cc137
-rw-r--r--dldialog/src/DLD_TV/dld_col.h54
-rw-r--r--dldialog/src/DLD_TV/dld_combobox.cc173
-rw-r--r--dldialog/src/DLD_TV/dld_combobox.h110
-rw-r--r--dldialog/src/DLD_TV/dld_comboitem.cc12
-rw-r--r--dldialog/src/DLD_TV/dld_comboitem.h37
-rw-r--r--dldialog/src/DLD_TV/dld_dialog.cc208
-rw-r--r--dldialog/src/DLD_TV/dld_dialog.h53
-rw-r--r--dldialog/src/DLD_TV/dld_form.cc126
-rw-r--r--dldialog/src/DLD_TV/dld_form.h54
-rw-r--r--dldialog/src/DLD_TV/dld_gauge.cc133
-rw-r--r--dldialog/src/DLD_TV/dld_gauge.h50
-rw-r--r--dldialog/src/DLD_TV/dld_geom.cc271
-rw-r--r--dldialog/src/DLD_TV/dld_geom.h169
-rw-r--r--dldialog/src/DLD_TV/dld_input.cc196
-rw-r--r--dldialog/src/DLD_TV/dld_input.h83
-rw-r--r--dldialog/src/DLD_TV/dld_lib.cc50
-rw-r--r--dldialog/src/DLD_TV/dld_list.cc428
-rw-r--r--dldialog/src/DLD_TV/dld_list.h98
-rw-r--r--dldialog/src/DLD_TV/dld_listitem.cc27
-rw-r--r--dldialog/src/DLD_TV/dld_listitem.h43
-rw-r--r--dldialog/src/DLD_TV/dld_radiolist.cc214
-rw-r--r--dldialog/src/DLD_TV/dld_radiolist.h80
-rw-r--r--dldialog/src/DLD_TV/dld_row.cc129
-rw-r--r--dldialog/src/DLD_TV/dld_row.h55
-rw-r--r--dldialog/src/DLD_TV/dld_text.cc113
-rw-r--r--dldialog/src/DLD_TV/dld_text.h41
-rw-r--r--dldialog/src/DLD_TV/dld_textbox.cc154
-rw-r--r--dldialog/src/DLD_TV/dld_textbox.h48
-rw-r--r--dldialog/src/DLD_TV/dld_tvapp.cc313
-rw-r--r--dldialog/src/DLD_TV/dld_tvapp.h136
-rw-r--r--dldialog/src/DLD_TV/dld_tvcheck.cc26
-rw-r--r--dldialog/src/DLD_TV/dld_tvcheck.h39
-rw-r--r--dldialog/src/DLD_TV/dld_tvcontainer.cc308
-rw-r--r--dldialog/src/DLD_TV/dld_tvcontainer.h151
-rw-r--r--dldialog/src/DLD_TV/dld_tvlib.h21
-rw-r--r--dldialog/src/DLD_TV/dld_tvobj.cc102
-rw-r--r--dldialog/src/DLD_TV/dld_tvobj.h89
-rw-r--r--dldialog/src/DLD_TV/dld_tvradio.cc27
-rw-r--r--dldialog/src/DLD_TV/dld_tvradio.h42
-rw-r--r--dldialog/src/DLD_TV/fileview.cc163
-rw-r--r--dldialog/src/DLD_TV/fileview.h76
-rw-r--r--dldialog/src/DLD_TV/nmcmbobx.cpp23
-rw-r--r--dldialog/src/DLD_TV/nmcmbovw.cpp23
-rw-r--r--dldialog/src/DLD_TV/nmcmbown.cpp23
-rw-r--r--dldialog/src/DLD_TV/nmsinput.cpp23
-rw-r--r--dldialog/src/DLD_TV/tcmbovwr.cpp163
-rw-r--r--dldialog/src/DLD_TV/tcmbowin.cpp105
-rw-r--r--dldialog/src/DLD_TV/tcombobx.cpp179
-rw-r--r--dldialog/src/DLD_TV/tcombobx.h215
-rw-r--r--dldialog/src/DLD_TV/tsinputl.cpp165
-rw-r--r--dldialog/src/DLD_TV/tsinputl.h54
-rw-r--r--dldialog/src/Makefile.am57
-rw-r--r--dldialog/src/Makefile.in511
-rw-r--r--dldialog/src/dld_button.h47
-rw-r--r--dldialog/src/dld_checkbutton.h42
-rw-r--r--dldialog/src/dld_checklist.h82
-rw-r--r--dldialog/src/dld_col.h40
-rw-r--r--dldialog/src/dld_combobox.h60
-rw-r--r--dldialog/src/dld_comboitem.h40
-rw-r--r--dldialog/src/dld_container.h147
-rw-r--r--dldialog/src/dld_dialog.cc211
-rw-r--r--dldialog/src/dld_dialog.h110
-rw-r--r--dldialog/src/dld_form.h40
-rw-r--r--dldialog/src/dld_gauge.cc106
-rw-r--r--dldialog/src/dld_gauge.h65
-rw-r--r--dldialog/src/dld_gui.cc160
-rw-r--r--dldialog/src/dld_gui.h124
-rw-r--r--dldialog/src/dld_image.h45
-rw-r--r--dldialog/src/dld_input.h60
-rw-r--r--dldialog/src/dld_lib.h93
-rw-r--r--dldialog/src/dld_list.h92
-rw-r--r--dldialog/src/dld_listitem.h42
-rw-r--r--dldialog/src/dld_menu.h46
-rw-r--r--dldialog/src/dld_obj.cc267
-rw-r--r--dldialog/src/dld_obj.h279
-rw-r--r--dldialog/src/dld_out.cc51
-rw-r--r--dldialog/src/dld_out.h85
-rw-r--r--dldialog/src/dld_parser.h89
-rw-r--r--dldialog/src/dld_parser_lex.cc2504
-rw-r--r--dldialog/src/dld_parser_lex.ll202
-rw-r--r--dldialog/src/dld_parser_yacc.cc1671
-rw-r--r--dldialog/src/dld_parser_yacc.h55
-rw-r--r--dldialog/src/dld_parser_yacc.yy421
-rw-r--r--dldialog/src/dld_radiobutton.h40
-rw-r--r--dldialog/src/dld_radiolist.h61
-rw-r--r--dldialog/src/dld_row.h41
-rw-r--r--dldialog/src/dld_text.h41
-rw-r--r--dldialog/src/dld_textbox.h44
-rw-r--r--dldialog/src/dldialog.cc920
-rw-r--r--dldialog/src/dldialog.h57
-rw-r--r--dldialog/src/parser.sed66
-rw-r--r--dldialog/stamp-h.in1
-rw-r--r--dldialog/tests/DLD-start.xpm69
-rw-r--r--dldialog/tests/DLD.xpm155
-rw-r--r--dldialog/tests/Makefile.am28
-rw-r--r--dldialog/tests/Makefile.in289
-rwxr-xr-xdldialog/tests/calc39
-rw-r--r--dldialog/tests/dldialog-scripts.po56
-rw-r--r--dldialog/tests/dldialog_funcs70
-rwxr-xr-xdldialog/tests/example155
-rwxr-xr-xdldialog/tests/example260
-rwxr-xr-xdldialog/tests/example310
-rwxr-xr-xdldialog/tests/example416
-rw-r--r--dldialog/tests/extractstr.awk9
-rw-r--r--dldialog/tests/pnglogo.pngbin0 -> 17421 bytes
-rwxr-xr-xdldialog/tests/test1106
-rw-r--r--dldialog/tests/test1.cmp15
-rwxr-xr-xdldialog/tests/test2136
-rw-r--r--dldialog/tests/test2.cmp24
-rwxr-xr-xdldialog/tests/test3115
-rwxr-xr-xdldialog/tests/test463
-rw-r--r--dldialog/tests/test529
-rwxr-xr-xdldialog/tests/test679
-rw-r--r--dldialog/tests/test7116
-rwxr-xr-xdldialog/tests/test8115
-rw-r--r--dldialog/tests/test911
266 files changed, 53154 insertions, 0 deletions
diff --git a/dldialog/ABOUT-NLS b/dldialog/ABOUT-NLS
new file mode 100644
index 0000000..28d38c7
--- /dev/null
+++ b/dldialog/ABOUT-NLS
@@ -0,0 +1,226 @@
+Notes on the Free Translation Project
+*************************************
+
+ Free software is going international! The Free Translation Project
+is a way to get maintainers of free software, translators, and users all
+together, so that will gradually become able to speak many languages.
+A few packages already provide translations for their messages.
+
+ If you found this `ABOUT-NLS' file inside a distribution, you may
+assume that the distributed package does use GNU `gettext' internally,
+itself available at your nearest GNU archive site. But you do *not*
+need to install GNU `gettext' prior to configuring, installing or using
+this package with messages translated.
+
+ Installers will find here some useful hints. These notes also
+explain how users should proceed for getting the programs to use the
+available translations. They tell how people wanting to contribute and
+work at translations should contact the appropriate team.
+
+ When reporting bugs in the `intl/' directory or bugs which may be
+related to internationalization, you should tell about the version of
+`gettext' which is used. The information can be found in the
+`intl/VERSION' file, in internationalized packages.
+
+One advise in advance
+=====================
+
+ If you want to exploit the full power of internationalization, you
+should configure it using
+
+ ./configure --with-included-gettext
+
+to force usage of internationalizing routines provided within this
+package, despite the existence of internationalizing capabilities in the
+operating system where this package is being installed. So far, only
+the `gettext' implementation in the GNU C library version 2 provides as
+many features (such as locale alias or message inheritance) as the
+implementation here. It is also not possible to offer this additional
+functionality on top of a `catgets' implementation. Future versions of
+GNU `gettext' will very likely convey even more functionality. So it
+might be a good idea to change to GNU `gettext' as soon as possible.
+
+ So you need not provide this option if you are using GNU libc 2 or
+you have installed a recent copy of the GNU gettext package with the
+included `libintl'.
+
+INSTALL Matters
+===============
+
+ Some packages are "localizable" when properly installed; the
+programs they contain can be made to speak your own native language.
+Most such packages use GNU `gettext'. Other packages have their own
+ways to internationalization, predating GNU `gettext'.
+
+ By default, this package will be installed to allow translation of
+messages. It will automatically detect whether the system provides
+usable `catgets' (if using this is selected by the installer) or
+`gettext' functions. If neither is available, the GNU `gettext' own
+library will be used. This library is wholly contained within this
+package, usually in the `intl/' subdirectory, so prior installation of
+the GNU `gettext' package is *not* required. Installers may use
+special options at configuration time for changing the default
+behaviour. The commands:
+
+ ./configure --with-included-gettext
+ ./configure --with-catgets
+ ./configure --disable-nls
+
+will respectively bypass any pre-existing `catgets' or `gettext' to use
+the internationalizing routines provided within this package, enable
+the use of the `catgets' functions (if found on the locale system), or
+else, *totally* disable translation of messages.
+
+ When you already have GNU `gettext' installed on your system and run
+configure without an option for your new package, `configure' will
+probably detect the previously built and installed `libintl.a' file and
+will decide to use this. This might be not what is desirable. You
+should use the more recent version of the GNU `gettext' library. I.e.
+if the file `intl/VERSION' shows that the library which comes with this
+package is more recent, you should use
+
+ ./configure --with-included-gettext
+
+to prevent auto-detection.
+
+ By default the configuration process will not test for the `catgets'
+function and therefore they will not be used. The reasons are already
+given above: the emulation on top of `catgets' cannot provide all the
+extensions provided by the GNU `gettext' library. If you nevertheless
+want to use the `catgets' functions use
+
+ ./configure --with-catgets
+
+to enable the test for `catgets' (this causes no harm if `catgets' is
+not available on your system). If you really select this option we
+would like to hear about the reasons because we cannot think of any
+good one ourself.
+
+ Internationalized packages have usually many `po/LL.po' files, where
+LL gives an ISO 639 two-letter code identifying the language. Unless
+translations have been forbidden at `configure' time by using the
+`--disable-nls' switch, all available translations are installed
+together with the package. However, the environment variable `LINGUAS'
+may be set, prior to configuration, to limit the installed set.
+`LINGUAS' should then contain a space separated list of two-letter
+codes, stating which languages are allowed.
+
+Using This Package
+==================
+
+ As a user, if your language has been installed for this package, you
+only have to set the `LANG' environment variable to the appropriate
+ISO 639 `LL' two-letter code prior to using the programs in the
+package. For example, let's suppose that you speak German. At the
+shell prompt, merely execute `setenv LANG de' (in `csh'),
+`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash'). This
+can be done from your `.login' or `.profile' file, once and for all.
+
+ An operating system might already offer message localization for
+many of its programs, while other programs have been installed locally
+with the full capabilities of GNU `gettext'. Just using `gettext'
+extended syntax for `LANG' would break proper localization of already
+available operating system programs. In this case, users should set
+both `LANGUAGE' and `LANG' variables in their environment, as programs
+using GNU `gettext' give preference to `LANGUAGE'. For example, some
+Swedish users would rather read translations in German than English for
+when Swedish is not available. This is easily accomplished by setting
+`LANGUAGE' to `sv:de' while leaving `LANG' to `sv'.
+
+Translating Teams
+=================
+
+ For the Free Translation Project to be a success, we need interested
+people who like their own language and write it well, and who are also
+able to synergize with other translators speaking the same language.
+Each translation team has its own mailing list, courtesy of Linux
+International. You may reach your translation team at the address
+`LL@li.org', replacing LL by the two-letter ISO 639 code for your
+language. Language codes are *not* the same as the country codes given
+in ISO 3166. The following translation teams exist, as of December
+1997:
+
+ Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en',
+ Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian
+ `hu', Irish `ga', Italian `it', Indonesian `id', Japanese `ja',
+ Korean `ko', Latin `la', Norwegian `no', Persian `fa', Polish
+ `pl', Portuguese `pt', Russian `ru', Slovenian `sl', Spanish `es',
+ Swedish `sv', and Turkish `tr'.
+
+For example, you may reach the Chinese translation team by writing to
+`zh@li.org'.
+
+ If you'd like to volunteer to *work* at translating messages, you
+should become a member of the translating team for your own language.
+The subscribing address is *not* the same as the list itself, it has
+`-request' appended. For example, speakers of Swedish can send a
+message to `sv-request@li.org', having this message body:
+
+ subscribe
+
+ Keep in mind that team members are expected to participate
+*actively* in translations, or at solving translational difficulties,
+rather than merely lurking around. If your team does not exist yet and
+you want to start one, or if you are unsure about what to do or how to
+get started, please write to `translation@iro.umontreal.ca' to reach the
+coordinator for all translator teams.
+
+ The English team is special. It works at improving and uniformizing
+the terminology in use. Proven linguistic skill are praised more than
+programming skill, here.
+
+Available Packages
+==================
+
+ Languages are not equally supported in all packages. The following
+matrix shows the current state of internationalization, as of December
+1997. The matrix shows, in regard of each package, for which languages
+PO files have been submitted to translation coordination.
+
+ Ready PO files cs da de en es fi fr it ja ko nl no pl pt ru sl sv
+ .----------------------------------------------------.
+ bash | [] [] [] | 3
+ bison | [] [] [] | 3
+ clisp | [] [] [] [] | 4
+ cpio | [] [] [] [] [] [] | 6
+ diffutils | [] [] [] [] [] | 5
+ enscript | [] [] [] [] [] [] | 6
+ fileutils | [] [] [] [] [] [] [] [] [] [] | 10
+ findutils | [] [] [] [] [] [] [] [] [] | 9
+ flex | [] [] [] [] | 4
+ gcal | [] [] [] [] [] | 5
+ gettext | [] [] [] [] [] [] [] [] [] [] [] | 12
+ grep | [] [] [] [] [] [] [] [] [] [] | 10
+ hello | [] [] [] [] [] [] [] [] [] [] [] | 11
+ id-utils | [] [] [] | 3
+ indent | [] [] [] [] [] | 5
+ libc | [] [] [] [] [] [] [] | 7
+ m4 | [] [] [] [] [] [] | 6
+ make | [] [] [] [] [] [] | 6
+ music | [] [] | 2
+ ptx | [] [] [] [] [] [] [] [] | 8
+ recode | [] [] [] [] [] [] [] [] [] | 9
+ sh-utils | [] [] [] [] [] [] [] [] | 8
+ sharutils | [] [] [] [] [] [] | 6
+ tar | [] [] [] [] [] [] [] [] [] [] [] | 11
+ texinfo | [] [] [] | 3
+ textutils | [] [] [] [] [] [] [] [] [] | 9
+ wdiff | [] [] [] [] [] [] [] [] | 8
+ `----------------------------------------------------'
+ 17 languages cs da de en es fi fr it ja ko nl no pl pt ru sl sv
+ 27 packages 6 4 25 1 18 1 26 2 1 12 20 9 19 7 4 7 17 179
+
+ Some counters in the preceding matrix are higher than the number of
+visible blocks let us expect. This is because a few extra PO files are
+used for implementing regional variants of languages, or language
+dialects.
+
+ For a PO file in the matrix above to be effective, the package to
+which it applies should also have been internationalized and
+distributed as such by its maintainer. There might be an observable
+lag between the mere existence a PO file and its wide availability in a
+distribution.
+
+ If December 1997 seems to be old, you may fetch a more recent copy
+of this `ABOUT-NLS' file on most GNU archive sites.
+
diff --git a/dldialog/AUTHORS b/dldialog/AUTHORS
new file mode 100644
index 0000000..47b673c
--- /dev/null
+++ b/dldialog/AUTHORS
@@ -0,0 +1,16 @@
+Main author(s):
+===============
+
+Harald Hoyer E-Mail:
+ DLDialog@parzelle.de
+ Harald.Hoyer@redhat.de
+ Harald.Hoyer@redhat.com
+
+ HTTP:
+ http://parzelle.de
+ http://hot.spotline.de
+
+Perl modules:
+=============
+
+Thomas Hagedorn <Thomas.Hagedorn@delix.de>
diff --git a/dldialog/COPYING b/dldialog/COPYING
new file mode 100644
index 0000000..df91aa3
--- /dev/null
+++ b/dldialog/COPYING
@@ -0,0 +1,280 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS \ No newline at end of file
diff --git a/dldialog/ChangeLog b/dldialog/ChangeLog
new file mode 100644
index 0000000..97b5a8c
--- /dev/null
+++ b/dldialog/ChangeLog
@@ -0,0 +1,494 @@
+1999-09-15 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_QT/dld_list.cc (create): curious setCurrentItem(0)
+
+ * src/DLD_TV/dld_list.cc (close_brace): no preselection of multilist
+
+1999-09-13 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * many many variable fixes
+
+ * create() to all objects
+
+ * src/dld_obj.h: added is_created, was_created
+
+ * src/dld_obj.cc (create): added
+
+ * src/dld_gauge.cc (create): likewise
+
+ * src/dld_obj.cc (activate): resolve symbolic "/bin/sh" link
+
+1999-09-07 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/dld_dialog.h: gcc-2.95 tweaks
+
+ * src/DLD_QT/dld_button.cc (movieUpdate): gcc-2.95 tweaks
+
+1999-09-06 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_TV/dld_combobox.cc (create): initial value is the first
+
+1999-09-01 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/dld_parser_lex.ll: added -fork
+
+ * src/dld_parser_yacc.yy: added FORK
+
+ * src/dld_obj.h: added killchilds flag, set_killchild
+
+ * src/dld_gauge.cc (create): likewise
+
+ * src/dld_obj.cc (activate): changed $SHELL to /bin/sh
+
+1999-08-19 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_QT/dld_check.cc (slot_activate): signal_cbpress in deactivate
+
+1999-08-18 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_QT/dld_combobox.cc (DLD_QTComboBox): removed slot activate
+
+ * src/DLD_TV/dld_dialog.cc (handleEvent): added UP and DOWN keys
+
+1999-08-16 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_TV/dld_combobox.cc (create): cleanup of preset variables
+
+1999-08-10 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_TV/dld_row.cc (DLD_TVRow): likewise
+
+ * src/DLD_TV/dld_col.cc (DLD_TVObj): setSizeAdd(1)
+
+1999-08-09 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_QT/dld_list.h (class DLD_QTList): dict now with listitems
+
+ * src/DLD_QT/dld_list.cc (create): create listitems
+
+ * src/DLD_QT/dld_listitem.cc: load image only once
+
+ * src/DLD_TV/dld_tvobj.cc (conname): tabs corrected
+
+1999-07-21 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_QT/dld_radiolist.cc (DLD_QTRadioList): likewise
+
+ * src/DLD_QT/dld_checklist.cc (DLD_QTCheckList): no frame if no name
+
+ * src/DLD_TV/dld_radiolist.cc (DLD_TVRadioList): likewise
+
+ * src/DLD_TV/dld_checklist.cc (DLD_TVCheckList): no frame if no name
+
+ * src/dldialog.cc: fixed exit and return values
+
+1999-07-19 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_TV/dld_textbox.cc (handleEvent): added keys for scrolling
+
+1999-06-18 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_TV/dld_input.cc (DLD_TVInput): minimal width=3 (test13)
+
+1999-06-17 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_TV/dld_list.cc (handleEvent): if key pressed, jump to items
+
+1999-06-09 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_QT/dld_text.cc (create): -font added
+
+ * src/DLD_QT/dld_textbox.cc (create): -font added
+
+1999-05-19 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_QT/dld_button.cc (movieUpdate): optimizations
+
+1999-05-07 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/dld_parser_yacc.yy: MOVIE and MOVIEFILE added
+ * src/dld_parser_lex.ll: likewise
+
+ * src/dld_image.h (class DLD_Image): setIsMovie added
+
+ * src/dld_obj.h (class DLD_Obj): is_movie added
+
+1999-05-06 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_TV/dld_button.h (class DLD_TVButton): can now have
+ multiple lines
+
+1999-05-05 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_TV/dld_button.h (class DLD_TVButton): added -disable
+
+ * src/DLD_QT/dld_button.cc: movies
+ * src/DLD_QT/dld_image.cc: movies
+
+1999-04-22 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/dldialog.cc (dld_server): catch no tty
+ (dld_send): fixed problem with buffer length
+
+ * src/DLD_QT/dld_dialog.cc (closeEvent): handle window close
+ (done): don't call QDialog::done if mainDialog
+
+ * src/DLD_QT/dld_qtapp.cc (exec): cleanup moved to dialog
+
+1999-04-21 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_QT/dld_button.cc (drawButtonLabel): center pixmap
+
+ * src/DLD_QT/dld_form.cc (DLD_QTForm): setBorder
+
+ * src/DLD_QT/dld_col.cc (DLD_QTCol): setBorder
+
+ * src/DLD_QT/dld_row.cc (DLD_QTRow): setBorder
+
+ * src/DLD_TV/dld_list.cc (DLD_TVList): forgot isMulti(false)
+
+ * src/DLD_TV/dld_col.cc (DLD_TVObj): use label
+
+ * src/DLD_TV/dld_row.cc (DLD_TVRow): use label
+
+ * src/DLD_TV/dld_form.cc (DLD_TVForm): use label
+
+1999-04-19 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_TV/dld_gauge.cc (draw): can now display 100
+
+ * src/DLD_QT/dld_gauge.cc (set_progress): can now display smaller
+ values
+
+ * src/DLD_QT/dld_button.cc (create): check is image is loaded
+ (minimumSize): fallback to parent class if no pixmap is loaded
+ (drawButtonLabel): likewise
+
+ * src/dld_parser_lex.ll: no more spaces between concatenation
+ strings
+
+ * src/dld_obj.cc (activate): set_env with this
+ (activate): dup2 with STDERR was wrong
+ (activate): DLD_run++
+
+ * acinclude.m4: added --with-qt, --with-tv and qimgio testing
+ * configure.in: likewise
+
+ * src/dld_gui.h: splitted into seperate header files
+
+ * src/dld_gauge.cc (parse): fixed child handling (zombies)
+
+1999-04-14 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/dld_app.cc (parse): improved parsing
+ (parse): improved parsing
+
+ * src/DLD_QT/dld_qtapp.cc (exec): fixed usleep call (microseconds)
+
+1999-04-13 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_QT/dld_button.cc (drawButtonLabel): improved
+
+ * src/DLD_QT/dld_image.cc: added
+
+ * src/DLD_QT/dld_button.cc (drawButtonLabel): image added
+
+ * src/parser.sed: better error messages from the parser
+
+ * src/DLD_QT/dld_qtapp.cc (exec): switched to processEvents
+
+ * src/DLD_QT/dld_dialog.cc (create): geometry handling
+
+1999-04-12 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/dldialog.cc: gettext
+
+ * src/dld_parser_lex.ll: gettext
+
+ * src/DLD_QT/dld_qtobj.cc (DLD_QTObj): handle fixed height, width
+
+ * src/DLD_QT/dld_row.cc (create): handle fixed height, width
+
+ * src/DLD_QT/dld_col.cc (create): handle fixed height, width
+
+ * src/DLD_TV/dld_button.cc (DLD_TVButton): fixed height
+
+1999-04-09 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_QT/dld_dialog.cc: correct geometry management
+ * src/DLD_QT/dld_form.cc: likewise
+ * src/DLD_QT/dld_col.cc: likewise
+ * src/DLD_QT/dld_row.cc: likewise
+
+1999-04-08 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_TV/dld_gauge.cc (set_progress): set variable every time
+
+ * src/DLD_QT/dld_qtobj.cc (activate): added (for -exit)
+
+ * src/DLD_QT/dld_qtcontainer.cc (gauge): implemented
+ (combobox): implemented
+
+ * src/DLD_QT/dld_combobox.cc: added
+ * src/DLD_QT/dld_combobox.h: added
+
+ * src/DLD_QT/dld_gauge.cc: added
+ * src/DLD_QT/dld_gauge.h: added
+
+1999-04-07 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/dld_parser_yacc.yy: textbox can have no <name>
+
+ * src/DLD_QT/dld_textbox.h (class DLD_QTTextBox):
+ changed to new interface
+
+ * src/DLD_QT/dld_textbox.cc (class DLD_QTTextBox):
+ changed to new interface
+
+ * src/DLD_QT/dld_qtobj.cc (DLD_QTObj): variable init´s
+
+ * src/DLD_QT/dld_qtcontainer.cc (textbox): added
+
+ * src/dldialog.cc (dld_server): init of tty_fdin,
+ tty_fdout if not in tvision mode
+
+ * src/dld_obj.cc (activate): init of stdin, stdout
+
+ * src/dld_gui.h (class DLD_Obj): init of varaddflag
+
+ * src/dld_parser_yacc.yy: added old style syntax
+
+ * src/dldialog.cc (dld_client): added -q -t -T arguments,
+ but they are ignored (compatibility)
+
+ * src/DLD_QT/dld_input.cc (class DLD_QTInput):
+ changed to new interface
+
+ * src/DLD_QT/dld_input.h (class DLD_QTInput): likewise
+
+ * src/DLD_QT: added convstr to initialisation, -Wall corrections
+
+ * src/dldialog.cc (dld_server): don't close stderr
+ (dld_server): changed some cerr to DLDerr
+
+ * src/dld_gui.h: changed ordering for -Wall
+
+1999-04-02 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/dld_gui.h: Documentation updates.
+
+ * src/DLD_TV/dld_radiolist.cc (create): select the radiobuutons first
+
+ * src/DLD_TV/dld_list.cc (close_brace): select listitems that have their variable set
+
+1999-04-01 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_TV/dld_list.cc (handleEvent): activate listitems only if they are doubleclicked
+
+ * src/DLD_TV/dld_tvobj.h (DLD_Obj): make is_exit public
+
+ * src/DLD_TV/tcmbovwr.cpp (handleEvent): fixed mouse
+
+ * src/DLD_TV/dld_radiolist.cc (movedTo): fixed activation
+ (create): fixed initialisation
+
+ * src/DLD_TV/dld_input.cc (DLD_TVInput): added -exit behaviour
+
+ * src/Makefile.am: removed LIBDIR
+
+ * src/DLD_TV/dld_combobox.cc (comboitem): set minimal width
+
+ * src/DLD_TV/dld_list.cc (handleEvent): add handling of mouse in nonmulti list
+ (selectItem): likewise
+
+ * src/DLD_TV/dld_input.cc (handleEvent): activate if Enter pressed
+
+ * src/DLD_TV/Makefile.am (libdld_tv_la_SOURCES): dld_comboitem.cc added
+
+ * src/dld_parser_lex.ll: -gaugevar removed
+
+ * src/dld_parser_yacc.yy: some cleanups, -gaugevar removed
+
+1999-03-26 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_TV/dld_list.cc (selectItem): fixed setting
+
+ * src/DLD_QT/dld_radiolist.cc (create): fixed presetting
+
+ * src/dld_obj.cc (deactivate): unset variable if it is -set
+
+ * src/DLD_QT/dld_check.cc (create): fixed presetting
+
+ * src/DLD_QT/dld_checklist.cc (create): fixed presetting
+
+ * src/DLD_TV/dld_checklist.cc (create): fixed presetting
+
+ * perl: moved all perl files in perl directory
+
+ * src/DLD_TV/dld_input.cc (DLD_TVInput): isPasswd initialised
+
+1999-03-18 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * src/DLD_TV/dld_list.cc: cosmetic -Wall changes
+
+ * src/DLD_TV/dld_dialog.cc (close_brace): put child dialogs in front
+
+ * src/DLD_QT/dld_qtcontainer.cc: app replaced with dld_app
+ Assertions for nonimplemented functions added
+
+ * src/DLD_QT/dld_qtapp.cc (~DLD_QTApp): destroyes now
+ child dialogs at end.
+ (DLD_QTApp): lastWindowClosed connected
+ (dialog): small cleanup
+ (exec): better handling of cleanup, reuse old mainDialog
+
+ * src/DLD_QT/dld_dialog.h (class DLD_QTDialog): isEmpty added
+ has_exited changed
+
+ * src/DLD_QT/dld_dialog.cc (create): major dialog is now reused
+ (done): better handling of close
+ (cleanup): reusing old dialog
+
+ * src/dld_parser_yacc.yy (YYERROR_VERBOSE): added
+ small cleanups, better error handling
+
+ * src/dld_parser_lex.ll (YY_INPUT): small error in length :)
+
+ * src/dld_gui.h: modified DLD_Out
+ DLD_Out& instead of DLD_Out
+
+ * src/dld_app.cc (init): added
+ (DLD_Out): moved to init
+ (flush): added
+ (DLD_Out): call flush
+ (close): out check
+
+ * released dldialog-0.19.2
+
+ * src/DLD_TV/dld_dialog.cc (changeBounds): faster window moves
+ * src/DLD_TV/dld_list.cc (DLD_TVList): changed tag char
+ * src/DLD_TV/dld_tvapp.cc: new background color
+
+1999-03-17 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ * src/DLD_TV/dld_list.cc: -multi added
+ * src/DLD_TV/dld_input.cc (set_length): added
+
+1999-03-12 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ * added -passwd to input
+
+1999-03-03 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ * src/DLD_QT/dld_list.cc (sizeHint): changed from 24 to 12 lines
+ * src/DLD_QT/dld_input.cc (DLD_Input): setMaxLength (1024)
+
+1999-02-25 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ * src/dld_parser_yacc.yy: made old style syntax work
+
+1999-02-17 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ * dld_app.cc: (DLD_Dialog::DLD_Dialog) set_dialog added
+ * dld_app.cc: gauges changed from stack to list
+ * dld_gui.h: likewise
+ * dld_gui.h: major cleanup
+ * dld_obj.cc: deactivate(), add/del_child added
+ * dld_parser_lex.ll: dld_env_end added, added prefix dld to protocol keywords
+ * dld_parser_yacc.yy: DLD_lineno correction
+ * dldialog.cc: removed annoying debugging messages from client
+ * dldialog.cc: added prefix dld to protocol keywords
+ * DLD_QT: radiolist, radiobutton, checklist, checkbutton, list, listitem added
+ * DLD_QT: col, form, row added
+ * DLD_TV/tsinputl.cpp: newData instead of strcpy for the possible notification
+
+1999-02-12 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * dld_app.cc: export environment in forks
+ * dld_obj.cc: likewise, convstr to global function
+ * dld_app.cc: check exitstatus of gauge execs
+ * dld_parser_lex.ll: moved line saving from lex-rule to YY_INPUT
+ * dldialog.cc: restauration of environment in dld_send
+ * DLD_TV/dld_gauge.cc: updated progress handling with child exitstatus
+ * DLD_TV/dld_list.cc: updated to activate immediatly if selected
+ * DLD_TV/dld_radiolist.cc: likewise
+ * DLD_TV/dld_checklist.cc: likewise
+
+1999-02-11 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * acinclude.m4: QT_LIBS added
+ * dld_app.c: gauges have 100 percent if the child ends
+
+1999-02-09 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * dldialog.spec.in: defattr added
+ * dld_parser_yacc.yy: changed tmpnam to tempnam
+ * dldialog.cc: sprintf replaced with strstream
+ * DLD_TV/dld_lib.cc: (dld_lib_init) better terminal settings
+ * DLD_TV/dld_tvapp.cc: ignoring SIGTSTP, menuBar redraw obsoleted
+ with setsid
+
+1999-02-08 Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+
+ * dldialog.cc: DLD_Gui::parse argument wait added
+ * dld_app.cc: likewise, changed select timeout to 0
+
+1999-01-29 Harald Hoyer <HarryH@Royal.Net>
+
+ * dldialog.spec.in: tests and dldialog_funcs to %doc added
+ * dld_app.cc: modified for socket protocol
+ * dld_parser.h: small cleanups
+ * dld_parser_lex.ll: YY_INPUT rewritten to cope with sockets.
+ It now reads lines.
+ * dld_parser_yacc.yy: DLD_run=-1 and listen(0) for real end
+ * dldialog.cc: modified for socket protocol. outfifo, outpath removed
+ * dldialog.h: likewise
+ * test: added dldialog_funcs for easier shell programming
+
+1999-01-28 Harald Hoyer <HarryH@Royal.Net>
+
+ * configure.in: added enable debug, -fno-rtti
+ * DLD_GEN: added --parse should now work
+ * doc/: make clean removes the generated documents
+ * dld_app.cc: bugfix with DLD_Out counter
+ * dld_app.cc: DLD_Gui::idle -> DLD_Gui::parse improved
+ * dld_parser_lex.ll: improved server-client protocol
+ * dld_parser_yacc.yy: likewise
+ * dldialog.cc: likewise, added flock of pipes, setsid of dldialog.cc
+ * DLD_QT: beginning of migration
+
+1999-01-15 Harald Hoyer <HarryH@Royal.Net>
+
+ * major interface change
+ * tvision mostly implemented
+
+1998-10-13 Harald Hoyer <HarryH@Royal.Net>
+
+ * released dldialog-0.8
+ * added combobox to QT Module
+ * fixed input widget of QT Module
+ * added classdoc documentation
+ * added dummy server arguments
+ * fixed QT geometry
+ * fixed -r argument
+
+1998-08-29 Harald Hoyer <HarryH@Royal.Net>
+
+ * added TV checklist, radiolist ENV Variable checking
+
+1998-08-27 Harald Hoyer <HarryH@Royal.Net>
+
+ * Released Version 0.74
+
+1998-08-24 Harald Hoyer <HarryH@Royal.Net>
+
+ * melted documentation to dldialog.sgml.cpp
+
+1998-08-17 Harald Hoyer <HarryH@Royal.Net>
+
+ * added combobox, comboitem, input
+ * added -numeric, -ip, -width, -height, -file to parser
+ * added generic parsing (without any GUI)
+
+1998-06-26 Harald Hoyer <HarryH@Royal.Net>
+
+ * added list, listitem
+ * updated doc
+ * added preset of radiolist, checklist and list with -var
+ * updated tvision interface
+ * changed to GNU automake, autoconfig
diff --git a/dldialog/INSTALL b/dldialog/INSTALL
new file mode 100644
index 0000000..b42a17a
--- /dev/null
+++ b/dldialog/INSTALL
@@ -0,0 +1,182 @@
+Basic Installation
+==================
+
+ These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, a file
+`config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file `config.log' containing compiler output
+(useful mainly for debugging `configure').
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If at some point `config.cache'
+contains results you don't want to keep, you may remove or edit it.
+
+ The file `configure.in' is used to create `configure' by a program
+called `autoconf'. You only need `configure.in' if you want to change
+it or regenerate `configure' using a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes awhile. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. You can give `configure'
+initial values for variables by setting them in the environment. Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+ CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+Or on systems that have the `env' program, you can do it like this:
+ env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory. After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Installation Names
+==================
+
+ By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' can not figure out
+automatically, but needs to determine by the type of host the package
+will run on. Usually `configure' can figure that out, but if it prints
+a message saying it can not guess the host type, give it the
+`--host=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+ CPU-COMPANY-SYSTEM
+
+See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the host type.
+
+ If you are building compiler tools for cross-compiling, you can also
+use the `--target=TYPE' option to select the type of system they will
+produce code for and the `--build=TYPE' option to select the type of
+system on which you are compiling the package.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Operation Controls
+==================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--cache-file=FILE'
+ Use and save the results of the tests in FILE instead of
+ `./config.cache'. Set FILE to `/dev/null' to disable caching, for
+ debugging `configure'.
+
+`--help'
+ Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--version'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`configure' also accepts some other, not widely useful, options.
diff --git a/dldialog/Makefile.am b/dldialog/Makefile.am
new file mode 100644
index 0000000..07bc383
--- /dev/null
+++ b/dldialog/Makefile.am
@@ -0,0 +1,22 @@
+#/***********************************************************************
+#**
+#** $Id: Makefile.am,v 1.16 2000/03/15 20:02:14 harald Exp $
+#**
+#** 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.
+#**
+#** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+#**
+#***********************************************************************/
+AUTOMAKE_OPTIONS = gnu
+
+SUBDIRS = intl src po perl tests
+dnl SUBDIRS = intl doc src po perl tests
+
+EXTRA_DIST = README.developer dldialog.spec README.QT
+
+docdir = $(prefix)/doc/dldialog-@VERSION@
+
+doc_DATA = AUTHORS COPYING ChangeLog INSTALL TODO NEWS README README.QT
diff --git a/dldialog/Makefile.in b/dldialog/Makefile.in
new file mode 100644
index 0000000..9eca5d0
--- /dev/null
+++ b/dldialog/Makefile.in
@@ -0,0 +1,445 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+#/***********************************************************************
+#**
+#** $Id: Makefile.am,v 1.16 2000/03/15 20:02:14 harald Exp $
+#**
+#** 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.
+#**
+#** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+#**
+#***********************************************************************/
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = .
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AS = @AS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CXX = @CXX@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
+GENCAT = @GENCAT@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+GUI_VERSION_INFO = @GUI_VERSION_INFO@
+HAVE_FINAL = @HAVE_FINAL@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+KDOC = @KDOC@
+LATEX = @LATEX@
+LEX = @LEX@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIBS = @QT_LIBS@
+RANLIB = @RANLIB@
+SGML2HTML = @SGML2HTML@
+TV_INCLUDES = @TV_INCLUDES@
+TV_LDFLAGS = @TV_LDFLAGS@
+TV_LIBS = @TV_LIBS@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+YACC = @YACC@
+l = @l@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+tv_includes = @tv_includes@
+tv_libraries = @tv_libraries@
+
+AUTOMAKE_OPTIONS = gnu
+
+SUBDIRS = intl src po perl tests
+
+EXTRA_DIST = README.developer dldialog.spec README.QT
+
+docdir = $(prefix)/doc/dldialog-@VERSION@
+
+doc_DATA = AUTHORS COPYING ChangeLog INSTALL TODO NEWS README README.QT
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = dldialog.spec
+DATA = $(doc_DATA)
+
+DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \
+INSTALL Makefile.am Makefile.in NEWS TODO acconfig.h acinclude.m4 \
+aclocal.m4 config.guess config.h.in config.sub configure configure.in \
+dldialog.spec.in install-sh ltconfig ltmain.sh missing mkinstalldirs
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(ACLOCAL_M4): configure.in acinclude.m4
+ cd $(srcdir) && $(ACLOCAL)
+
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+config.h: stamp-h
+ @if test ! -f $@; then \
+ rm -f stamp-h; \
+ $(MAKE) stamp-h; \
+ else :; fi
+stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES= CONFIG_HEADERS=config.h \
+ $(SHELL) ./config.status
+ @echo timestamp > stamp-h 2> /dev/null
+$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
+ @if test ! -f $@; then \
+ rm -f $(srcdir)/stamp-h.in; \
+ $(MAKE) $(srcdir)/stamp-h.in; \
+ else :; fi
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
+ cd $(top_srcdir) && $(AUTOHEADER)
+ @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
+
+mostlyclean-hdr:
+
+clean-hdr:
+
+distclean-hdr:
+ -rm -f config.h
+
+maintainer-clean-hdr:
+dldialog.spec: $(top_builddir)/config.status dldialog.spec.in
+ cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+install-docDATA: $(doc_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(docdir)
+ @list='$(doc_DATA)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(docdir)/$$p"; \
+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(docdir)/$$p; \
+ else if test -f $$p; then \
+ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(docdir)/$$p"; \
+ $(INSTALL_DATA) $$p $(DESTDIR)$(docdir)/$$p; \
+ fi; fi; \
+ done
+
+uninstall-docDATA:
+ @$(NORMAL_UNINSTALL)
+ list='$(doc_DATA)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(docdir)/$$p; \
+ done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+
+@SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+ rev="$$subdir $$rev"; \
+ test "$$subdir" = "." && dot_seen=yes; \
+ done; \
+ test "$$dot_seen" = "no" && rev=". $$rev"; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ -rm -rf $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
+ mkdir $(distdir)/=build
+ mkdir $(distdir)/=inst
+ dc_install_base=`cd $(distdir)/=inst && pwd`; \
+ cd $(distdir)/=build \
+ && ../configure --with-included-gettext --srcdir=.. --prefix=$$dc_install_base \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) dist
+ -rm -rf $(distdir)
+ @banner="$(distdir).tar.gz is ready for distribution"; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"
+dist: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+dist-all: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+distdir: $(DISTFILES)
+ -rm -rf $(distdir)
+ mkdir $(distdir)
+ -chmod 777 $(distdir)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+ for subdir in $(SUBDIRS); do \
+ if test "$$subdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ chmod 777 $(distdir)/$$subdir; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ || exit 1; \
+ fi; \
+ done
+info-am:
+info: info-recursive
+dvi-am:
+dvi: dvi-recursive
+check-am: all-am
+check: check-recursive
+installcheck-am:
+installcheck: installcheck-recursive
+all-recursive-am: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+install-exec-am:
+install-exec: install-exec-recursive
+
+install-data-am: install-docDATA
+install-data: install-data-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-recursive
+uninstall-am: uninstall-docDATA
+uninstall: uninstall-recursive
+all-am: Makefile $(DATA) config.h
+all-redirect: all-recursive-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs: installdirs-recursive
+installdirs-am:
+ $(mkinstalldirs) $(DESTDIR)$(docdir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-recursive
+
+clean-am: clean-hdr clean-tags clean-generic mostlyclean-am
+
+clean: clean-recursive
+
+distclean-am: distclean-hdr distclean-tags distclean-generic clean-am
+ -rm -f libtool
+
+distclean: distclean-recursive
+ -rm -f config.status
+
+maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \
+ maintainer-clean-generic distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f config.status
+
+.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+uninstall-docDATA install-docDATA install-data-recursive \
+uninstall-data-recursive install-exec-recursive \
+uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
+all-recursive check-recursive installcheck-recursive info-recursive \
+dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \
+install-exec-am install-exec install-data-am install-data install-am \
+install uninstall-am uninstall all-redirect all-am all installdirs-am \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+dnl SUBDIRS = intl doc src po perl tests
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/dldialog/NEWS b/dldialog/NEWS
new file mode 100644
index 0000000..635a9a4
--- /dev/null
+++ b/dldialog/NEWS
@@ -0,0 +1,101 @@
+Changes in release 1.3.0:
+* many many variable fixes
+
+Changes in release 1.1.7:
+* you can move now with cursor up and down instead of tab
+
+Changes in release 1.1.6:
+* combobox in text should work
+
+Changes in release 1.1.1:
+* movie and -movie added: cause of resize bugs in dld_image(QT)
+* gauge exits dialog only if the forked child exits
+* listitems can have images
+
+Changes in release 1.1.0:
+* buttons can now have multiple lines of text
+* dld_col and dld_row with title: bug fixed
+
+Changes in release 1.0.12:
+* animated pictures now supported with qmovie class
+* list variables are now handled correctly
+* buttons can now be disabled
+
+Changes in release 1.0.11:
+
+Changes in release 1.0.10:
+* handle X11-window closes in qt mode correctly
+* can now start without controlling terminal (e.g. X-filemanager)
+* can now parse lines with inifinite length
+* better string conversion for tv
+
+Changes in release 1.0.9:
+* list non-multi (tv) fixed
+* col, row, form cosmetic changes
+* gauge (qt) cosmetic changes
+* button images (qt) cosmetic changes
+
+Changes in release 1.0.8:
+* Gauge fixes
+* image fixes
+* configure fixes (--with-qt, --with-tv and qimgio testing)
+* parser fixes
+* no more zombies.
+
+Changes in release 1.0.6:
+* qt and tv are nearly complete
+* more verbose error messages from the parser
+* images in qt
+* several improvements
+* gauge exec now can parse floats and overreads non-digits
+
+Changes in release 1.0.2:
+* better geometry handling
+* more verbose parser messages.
+
+Changes in release 1.0.0:
+* small fixes
+* gettext support (i18n) for dldialog and for scripts
+
+Changes in release 0.27.0:
+* TV and QT are now fully implemented (except menus)
+
+Changes in release 0.23.0:
+* exit dialog if -exit in listitem´s is set and item is double-clicked
+
+Changes in release 0.19.2:
+* tvision module stabilised
+* new tags for input
+* -multi in lists
+* the RPM has been split
+
+Changes in release 0.16:
+* set variables immediatly in lists, radio and checks
+* gauge variables contain negative exit status of child if non-null
+
+Changes in release 0.15:
+* Now more secure with /tmp/.dldialog_ttyXXX Dir
+* More security, due to dynamic strings (no buffer overflows)
+* Better terminal behaviour
+
+Changes in release 0.13:
+* server-client protocol now mainly with sockets
+* test/dldialog_funcs added to easily program with bash
+
+Changes in release 0.12:
+* small testsuite, try make check
+* setsid
+* made dldialog multiparsing safe
+* removed dlclose cause it segfaulted
+* fixes for glibc-2.0.111 and egcs-1.1.1
+* --parse now works with libdld_gen.so
+
+Changes in release 0.11:
+* Major interface change
+* tvision port nearly complete
+
+Changes in release 0.6:
+* added list, listitem
+* updated doc
+* preset of radiolist, checklist and list with -var
+* updated tvision interface
diff --git a/dldialog/README b/dldialog/README
new file mode 100644
index 0000000..614af82
--- /dev/null
+++ b/dldialog/README
@@ -0,0 +1,70 @@
+ dldialog - a shell interface to user dialogs
+ ============================================
+
+ dldialog was mainly developed for the
+
+ ========================================================================
+ | Deutsche Linux Distribution (DLD) of delix Computer GmbH (www.delix.de)|
+ ========================================================================
+
+dldialog offers the capability to draw a variety of widgets, in order to
+ease the human user in feeding input to the script. The program is designed
+to be particularly useful to implement system administration scripts.
+
+Requirements:
+=============
+- qt-1.33 or newer versions
+- qimgio with png extension if you want to display png images with qt
+- tvision 0.5.6 or newer versions
+- libdl
+- gettext, if you want i18n (internationalisation)
+- automake version 1.4 or newer versions
+- Autoconf version 2.13 or newer versions
+- libtool version 1.2 or newer versions
+- kdoc (ftp.kde.org part of kdevelop) for documentation purposes
+- sgml-tools version >= 1.0.8 for documentation purposes
+
+Normal compilation procedure:
+=============================
+
+> aclocal
+> autoheader
+> automake -a
+> autoconf
+> ./configure --prefix=/usr
+
+If you do have kdoc installed:
+> make
+
+else:
+> cd src;make
+
+For installing:
+> su -c "make install"
+
+If you want to deinstall it just do a:
+> su -c "make uninstall"
+
+More options for `configure':
+=============================
+ --without-qt if you want to build dldialog without qt
+ --with-qt-dir=<dir> where the root of qt is installed
+ --with-qt-includes=<dir> where the qt includes are.
+ --with-qt-libraries=<dir> where the qt library is installed.
+ --without-tv if you want to build dldialog without tvision
+ --with-tvision-dir=<dir> where the root of tv is installed
+ --with-tvision-includes=<dir> where the tv includes are.
+ --with-tvision-libraries=<dir> where the tv library is installed.
+
+Read the `INSTALL' file for generic informations on installing this program.
+
+For more informations about dldialog please read the html documentation in the
+`doc' directory.
+
+If you compile dldialog with qt it requires the Qt library,
+which is copyright Troll Tech AS.
+Freely distributable programs may generally use Qt Free Edition free of charge,
+see README.QT for details.
+
+- Harald Hoyer <DLDialog@parzelle.de>
+
diff --git a/dldialog/README.QT b/dldialog/README.QT
new file mode 100644
index 0000000..721e717
--- /dev/null
+++ b/dldialog/README.QT
@@ -0,0 +1,19 @@
+This software was developed with the Free Edition of Qt, the
+multi-platform C++ Graphical User Interface toolkit.
+
+Qt is a product of Troll Tech (see http://www.troll.no). Qt is
+released in two different editions:
+
+- The Qt Free Edition, which may be used free of charge for developing
+ free (non-proprietary) software on X11. This version is available
+ for download from http://www.troll.no/dl/ and is used by this
+ program.
+
+- The Qt Professional Edition, which may be used to develop
+ commercial/proprietary software on X11 and Microsoft Windows. For
+ pricing and availability of the Professional Edition, please see
+ http://www.troll.no/pricing.html or contact Troll Tech at
+ sales@troll.no
+
+For further information about Qt, please see the Troll Tech web site:
+http://www.troll.no or contact Troll Tech at info@troll.no
diff --git a/dldialog/README.developer b/dldialog/README.developer
new file mode 100644
index 0000000..f75c24c
--- /dev/null
+++ b/dldialog/README.developer
@@ -0,0 +1,49 @@
+IMPORTANT:
+=========
+
+ If you modify dld_gui.h or dld_obj.h you have to modify
+ GUI_VERSION_INFO in configure.in following the guidelines
+ in this document.
+
+Updating library version information
+====================================
+
+ If you want to use libtool's versioning system, then you must specify
+the version information to libtool using the `-version-info' flag
+during link mode (*note Link mode::.).
+
+ This flag accepts an argument of the form
+`CURRENT[:REVISION[:AGE]]'. So, passing `-version-info 3:12:1' sets
+CURRENT to 3, REVISION to 12, and AGE to 1.
+
+ If either REVISION or AGE are omitted, they default to 0. Also note
+that AGE must be less than or equal to the CURRENT interface number.
+
+ Here are a set of rules to help you update your library version
+information:
+
+ 1. Start with version information of `0:0:0' for each libtool library.
+
+ 2. Update the version information only immediately before a public
+ release of your software. More frequent updates are unnecessary,
+ and only guarantee that the current interface number gets larger
+ faster.
+
+ 3. If the library source code has changed at all since the last
+ update, then increment REVISION (`C:R:A' becomes `C:R+1:A').
+
+ 4. If any interfaces have been added, removed, or changed since the
+ last update, increment CURRENT, and set REVISION to 0.
+
+ 5. If any interfaces have been added since the last public release,
+ then increment AGE.
+
+ 6. If any interfaces have been removed since the last public release,
+ then set AGE to 0.
+
+ **Never** try to set the interface numbers so that they correspond
+to the release number of your package. This is an abuse that only
+fosters misunderstanding of the purpose of library versions. Instead,
+use the `-release' flag (*note Release numbers::.), but be warned that
+every release of your package will not be binary compatibility with any
+other release.
diff --git a/dldialog/TODO b/dldialog/TODO
new file mode 100644
index 0000000..11fd283
--- /dev/null
+++ b/dldialog/TODO
@@ -0,0 +1,22 @@
+Items in order of priority:
+---------------------------
+
+* is_exit in allen Elementen, check of Elemente gleich aktiviert werden!
+
+* gauge: parsen von Output ... Variablen setzen
+
+* -focus
+
+* -deactivate
+
+* QLabel for checklist, radiolist
+
+* menuitem, menucheck: QT/TV
+
+* tooltips / jumplabel
+
+* shortcut autogeneration: parser, dld_obj
+
+
+
+
diff --git a/dldialog/acconfig.h b/dldialog/acconfig.h
new file mode 100644
index 0000000..a7a50b6
--- /dev/null
+++ b/dldialog/acconfig.h
@@ -0,0 +1,34 @@
+/* Define if the C++ compiler supports BOOL */
+#undef HAVE_BOOL
+
+#undef PACKAGE
+
+#undef VERSION
+
+#undef HAVE_CATGETS
+
+#undef HAVE_GETTEXT
+
+/* define if you have setenv */
+#undef HAVE_FUNC_SETENV
+
+/* Define to 1 if NLS is requested. */
+#undef ENABLE_NLS
+
+/* Define as 1 if you have the stpcpy function. */
+#undef HAVE_STPCPY
+
+/* Define if your locale.h file contains LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
+/* Define if you need the GNU extensions to compile */
+#undef _GNU_SOURCE
+
+#undef HAVE_TVISION
+
+#undef HAVE_QT
+
+#undef HAVE_QIMGIO
+
+#undef DLDIALOG_LIBDIR
+
diff --git a/dldialog/acinclude.m4 b/dldialog/acinclude.m4
new file mode 100644
index 0000000..bf2d081
--- /dev/null
+++ b/dldialog/acinclude.m4
@@ -0,0 +1,462 @@
+## KDE/acinclude.m4 (Macros for autoconf)
+##
+## (C) 1997 Janos Farkas
+## (C) 1997 Stephan Kulow
+
+## ------------------------------------------------------------------------
+## Find a file (or one of more files in a list of dirs)
+## ------------------------------------------------------------------------
+##
+AC_DEFUN(AC_FIND_FILE,
+[
+$3=NO
+for i in $2;
+do
+ for j in $1;
+ do
+ if test -r "$i/$j"; then
+ $3=$i
+ break 2
+ fi
+ done
+done
+])
+
+## ------------------------------------------------------------------------
+## Internal macros to find if we don't need extra flags to find these
+## This is not yet used
+## ------------------------------------------------------------------------
+##
+AC_DEFUN(AC_PATH_QT_DIRECT,
+[if test "$ac_qt_includes" = NO; then
+AC_TRY_CPP([#include <qtstream.h>],
+[
+ac_qt_includes=
+],[
+])
+fi
+])
+
+## ------------------------------------------------------------------------
+## Find the meta object compiler in the PATH, in $QTDIR/bin, and some
+## more usual places
+## ------------------------------------------------------------------------
+##
+AC_DEFUN(AC_PATH_QT_MOC,
+[
+AC_PATH_PROG(MOC, moc, /usr/bin/moc,
+ $PATH:/usr/bin:/usr/X11R6/bin:$QTDIR/bin:/usr/lib/qt/bin:/usr/local/qt/bin)
+])
+
+
+
+## ------------------------------------------------------------------------
+## Find the header files and libraries for X-Windows. Extended the
+## macro AC_PATH_X
+## ------------------------------------------------------------------------
+##
+AC_DEFUN(K_PATH_X,
+[
+AC_MSG_CHECKING(for X)
+AC_CACHE_VAL(ac_cv_have_x,
+[# One or both of the vars are not set, and there is no cached value.
+ac_x_includes=NO ac_x_libraries=NO
+AC_PATH_X_DIRECT
+AC_PATH_X_XMKMF
+if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
+ AC_MSG_ERROR([Can't find X. Please add the correct paths. View configure --help for usage!])
+else
+ # Record where we found X for the cache.
+ ac_cv_have_x="have_x=yes \
+ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
+fi])dnl
+eval "$ac_cv_have_x"
+
+if test "$have_x" != yes; then
+ AC_MSG_RESULT($have_x)
+ no_x=yes
+else
+ # If each of the values was on the command line, it overrides each guess.
+ test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+ test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+ # Update the cache value to reflect the command line values.
+ ac_cv_have_x="have_x=yes \
+ ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
+ AC_MSG_RESULT([libraries $x_libraries, headers $x_includes])
+fi
+
+if test -z "$x_includes" || test "x$x_includes" = xNONE; then
+ X_INCLUDES=""
+ x_includes="."; dnl better than nothing :-
+ else
+ X_INCLUDES="-I$x_includes"
+fi
+
+if test -z "$x_libraries" || test "$x_libraries" = xNONE; then
+ X_LDFLAGS=""
+ x_libraries="/usr/lib"; dnl better than nothing :-
+ all_libraries=""
+ else
+ X_LDFLAGS="-L$x_libraries"
+ all_libraries=$X_LDFLAGS
+fi
+
+AC_SUBST(X_INCLUDES)
+AC_SUBST(X_LDFLAGS)
+all_includes=$X_INCLUDES
+])
+## ------------------------------------------------------------------------
+## Try to find the QT headers and libraries.
+## $(QT_LDLFLAGS) will be -Lqtliblocation (if needed)
+## and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
+## ------------------------------------------------------------------------
+##
+AC_DEFUN(AC_PATH_QT_1_3,
+[
+AC_REQUIRE([K_PATH_X])
+
+AC_MSG_CHECKING([for QT-1.30])
+ac_qt_includes=NO ac_qt_libraries=NO
+qt_libraries=""
+qt_includes=""
+AC_ARG_WITH(qt-dir,
+ [ --with-qt-dir where the root of qt is installed ],
+ [ ac_qt_includes="$withval"/include
+ ac_qt_libraries="$withval"/lib
+ ])
+
+AC_ARG_WITH(qt-includes,
+ [ --with-qt-includes where the qt includes are. ],
+ [
+ ac_qt_includes="$withval"
+ ])
+
+AC_ARG_WITH(qt-libraries,
+ [ --with-qt-libraries where the qt library is installed.],
+ [ ac_qt_libraries="$withval"
+ ])
+
+if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
+
+AC_CACHE_VAL(ac_cv_have_qt,
+AC_PATH_QT_DIRECT
+[#try to guess qt locations
+
+qt_incdirs="/usr/lib/qt/include /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt $x_includes $QTINC"
+test -n "$QTDIR" && qt_incdirs="$QTDIR/include $QTDIR $qt_incdirs"
+AC_FIND_FILE(qglobal.h, $qt_incdirs, qt_incdir)
+ac_qt_includes=$qt_incdir
+
+qt_libdirs="/usr/lib/qt/lib /usr/local/qt/lib /usr/lib/qt /usr/lib $x_libraries $QTLIB"
+test -n "$QTDIR" && qt_libdirs="$QTDIR/lib $QTDIR $qt_libdirs"
+AC_FIND_FILE(libqt.so libqt.so.1.30 libqt.so.1 libqt.a libqt.sl, $qt_libdirs, qt_libdir)
+ac_qt_libraries=$qt_libdir
+
+ac_cxxflags_safe=$CXXFLAGS
+ac_ldflags_safe=$LDFLAGS
+ac_libs_safe=$LIBS
+CXXFLAGS="$CXXFLAGS -I$qt_incdir"
+LDFLAGS="-L$qt_libdir $X_LDFLAGS"
+LIBS="-lqt -lXext -lX11 $LIBSOCKET"
+AC_LANG_CPLUSPLUS
+cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#include <stdio.h>
+#include <qglobal.h>
+#if QT_VERSION < 130
+#error QT_VERSION is too small
+#else
+main()
+{
+ puts(QT_VERSION_STR);
+ return 0;
+}
+#endif
+EOF
+
+if AC_TRY_EVAL(ac_link) && test -s conftest; then
+ rm -f conftest*
+else
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat conftest.$ac_ext >&AC_FD_CC
+ ac_qt_libraries="NO"
+fi
+rm -f conftest*
+CXXFLAGS=$ac_cxxflags_safe
+LDFLAGS=$ac_ldflags_safe
+LIBS=$ac_libs_safe
+
+if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
+ ac_cv_have_qt="have_qt=no"
+ ac_qt_notfound=""
+ if test "$ac_qt_includes" = NO; then
+ if test "$ac_qt_libraries" = NO; then
+ ac_qt_notfound="(headers and libraries)";
+ else
+ ac_qt_notfound="(headers)";
+ fi
+ else
+ ac_qt_notfound="(libraries)";
+ fi
+
+ AC_MSG_ERROR([QT-1.30 $ac_qt_notfound not found. Please check your installation! ]);
+else
+ have_qt="yes"
+fi
+])
+else
+ have_qt="yes"
+fi
+
+eval "$ac_cv_have_qt"
+
+if test "$have_qt" != yes; then
+ AC_MSG_RESULT([$have_qt]);
+else
+ ac_cv_have_qt="have_qt=yes \
+ ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
+ AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes])
+
+ qt_libraries=$ac_qt_libraries
+ qt_includes=$ac_qt_includes
+ QT_LIBS="-lqt -lXext -lX11 $LIBSOCKET"
+
+ac_cxxflags_safe=$CXXFLAGS
+ac_ldflags_safe=$LDFLAGS
+ac_libs_safe=$LIBS
+
+ AC_MSG_CHECKING([for qInitPngIo in -lqimgio])
+ CXXFLAGS="$CXXFLAGS -I ./ -I $ac_qt_includes"
+ LDFLAGS="-L$ac_qt_libraries $X_LDFLAGS"
+ LIBS="$QT_LIBS -lqimgio -ljpeg -lpng -lXext -lX11 $LIBSOCKET"
+ AC_LANG_CPLUSPLUS
+ cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#include <stdio.h>
+#include <qglobal.h>
+#include <qpngio.h>
+main()
+{
+ qInitPngIO ();
+ return 0;
+}
+EOF
+
+ if AC_TRY_EVAL(ac_link) && test -s conftest; then
+ rm -f conftest*
+ AC_DEFINE(HAVE_QIMGIO)
+ QT_LIBS="$QT_LIBS -lqimgio -ljpeg -lpng"
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN([dldialog will not be able to display png images!])
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat conftest.$ac_ext >&AC_FD_CC
+ fi
+ rm -f conftest*
+ CXXFLAGS=$ac_cxxflags_safe
+ LDFLAGS=$ac_ldflags_safe
+ LIBS=$ac_libs_safe
+
+fi
+AC_SUBST(qt_libraries)
+AC_SUBST(qt_includes)
+
+if test "$qt_includes" = "$x_includes"; then
+ QT_INCLUDES="";
+else
+ QT_INCLUDES="-I$qt_includes"
+ all_includes="$QT_INCLUDES $all_includes"
+fi
+
+if test "$qt_libraries" = "$x_libraries"; then
+ QT_LDFLAGS=""
+else
+ QT_LDFLAGS="-L$qt_libraries"
+ all_libraries="$QT_LDFLAGS $all_libraries"
+fi
+
+AC_SUBST(QT_INCLUDES)
+AC_SUBST(QT_LDFLAGS)
+AC_SUBST(QT_LIBS)
+AC_PATH_QT_MOC
+AC_DEFINE(HAVE_QT)
+])
+
+AC_DEFUN(AC_PATH_QT,
+[
+AC_PATH_QT_1_3
+])
+
+
+## ------------------------------------------------------------------------
+## Internal macros to find if we don't need extra flags to find these
+## This is not yet used
+## ------------------------------------------------------------------------
+##
+AC_DEFUN(AC_PATH_TV_DIRECT,
+[if test "$ac_tv_includes" = NO; then
+AC_TRY_CPP([#include <tvision/tvconfig.h>],
+[
+ac_qt_includes=
+],[
+])
+fi
+])
+
+## ------------------------------------------------------------------------
+## Try to find the TV headers and libraries.
+## $(TV_LDLFLAGS) will be -Ltvliblocation (if needed)
+## and $(TV_INCLUDES) will be -Itvhdrlocation (if needed)
+## ------------------------------------------------------------------------
+##
+AC_DEFUN(AC_PATH_TV,
+[
+ac_tv_libs="-ltvision"
+
+AC_LANG_C
+AC_CHECK_LIB(ncurses, initscr,
+ [ ac_tv_libs="$ac_tv_libs -lncurses" ],
+ AC_MSG_ERROR("ncurses library not found!"))
+
+AC_CHECK_LIB(gpm, Gpm_Close,
+ [ ac_tv_libs="$ac_tv_libs -lgpm" ],
+ AC_MSG_ERROR("gpm library not found!"), [ -lncurses ])
+
+AC_MSG_CHECKING([for tvision library])
+ac_tv_includes=NO
+ac_tv_libraries=NO
+tv_libraries=""
+tv_includes=""
+
+AC_ARG_WITH(tvision-dir,
+ [ --with-tvision-dir where the root of tv is installed ],
+ [ ac_tv_includes="$withval"/include
+ ac_tv_libraries="$withval"/lib
+ ])
+
+AC_ARG_WITH(tv-includes,
+ [ --with-tvision-includes where the tv includes are. ],
+ [
+ ac_tv_includes="$withval"
+ ])
+
+AC_ARG_WITH(tv-libraries,
+ [ --with-tvision-libraries where the tv library is installed.],
+ [ ac_tv_libraries="$withval"
+ ])
+
+if test "$ac_tv_includes" = NO || test "$ac_tv_libraries" = NO; then
+
+AC_CACHE_VAL(ac_cv_have_tv,
+AC_PATH_TV_DIRECT
+[#try to guess tv locations
+
+tv_incdirs="/usr/lib/tvision/include /usr/local/lib/tvision/include /usr/include/tvision /usr/local/include /usr/include"
+AC_FIND_FILE(tvision/tv.h, $tv_incdirs, tv_incdir)
+ac_tv_includes=$tv_incdir
+
+tv_libdirs="/usr/lib/tvision/lib /usr/local/tvision/lib /usr/lib/tvision /usr/local/lib /usr/lib "
+AC_FIND_FILE(libtvision.so libtvision.a libtvision.sl, $tv_libdirs, tv_libdir)
+ac_tv_libraries=$tv_libdir
+
+ac_cxxflags_safe=$CXXFLAGS
+ac_ldflags_safe=$LDFLAGS
+ac_libs_safe=$LIBS
+CXXFLAGS="$CXXFLAGS -I$tv_incdir"
+LDFLAGS="-L$tv_libdir $X_LDFLAGS"
+LIBS="$ac_tv_libs"
+
+AC_LANG_CPLUSPLUS
+cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#define Uses_TApplication
+#include <tvision/tvconfig.h>
+#include <tvision/tv.h>
+
+class TMyApp : public TApplication
+{
+
+public:
+TMyApp();
+
+};
+
+TMyApp::TMyApp() :
+TProgInit( &TMyApp::initStatusLine,
+&TMyApp::initMenuBar,
+&TMyApp::initDeskTop
+)
+{
+}
+
+int main()
+{
+TMyApp myApp;
+myApp.run();
+return 0;
+}
+EOF
+
+if AC_TRY_EVAL(ac_link) && test -s conftest; then
+ rm -f conftest*
+else
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat conftest.$ac_ext >&AC_FD_CC
+ ac_tv_libraries="NO"
+fi
+rm -f conftest*
+CXXFLAGS=$ac_cxxflags_safe
+LDFLAGS=$ac_ldflags_safe
+LIBS=$ac_libs_safe
+
+if test "$ac_tv_includes" = NO || test "$ac_tv_libraries" = NO; then
+ ac_cv_have_tv="have_tv=no"
+ ac_tv_notfound=""
+ if test "$ac_tv_includes" = NO; then
+ if test "$ac_tv_libraries" = NO; then
+ ac_tv_notfound="(headers and libraries)";
+ else
+ ac_tv_notfound="(headers)";
+ fi
+ else
+ ac_tv_notfound="(libraries)";
+ fi
+
+ AC_MSG_ERROR([TVISION $ac_tv_notfound not found. Please check your installation! ]);
+else
+ have_tv="yes"
+fi
+])
+else
+ have_tv="yes"
+fi
+
+eval "$ac_cv_have_tv"
+
+if test "$have_tv" != yes; then
+ AC_MSG_RESULT([$have_tv]);
+else
+ ac_cv_have_tv="have_tv=yes \
+ ac_tv_includes=$ac_tv_includes ac_tv_libraries=$ac_tv_libraries"
+ AC_MSG_RESULT([libraries $ac_tv_libraries, headers $ac_tv_includes])
+
+ tv_libraries=$ac_tv_libraries
+ tv_includes=$ac_tv_includes
+fi
+
+AC_SUBST(tv_libraries)
+AC_SUBST(tv_includes)
+
+TV_INCLUDES="-I$tv_includes"
+all_includes="$TV_INCLUDES $all_includes"
+
+TV_LDFLAGS="-L$tv_libraries"
+TV_LIBS="$ac_tv_libs"
+
+AC_SUBST(TV_INCLUDES)
+AC_SUBST(TV_LDFLAGS)
+AC_SUBST(TV_LIBS)
+
+AC_DEFINE(HAVE_TVISION)
+])
diff --git a/dldialog/aclocal.m4 b/dldialog/aclocal.m4
new file mode 100644
index 0000000..479fb5f
--- /dev/null
+++ b/dldialog/aclocal.m4
@@ -0,0 +1,1374 @@
+dnl aclocal.m4 generated automatically by aclocal 1.4
+
+dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
+
+AC_DEFUN(AC_FIND_FILE,
+[
+$3=NO
+for i in $2;
+do
+ for j in $1;
+ do
+ if test -r "$i/$j"; then
+ $3=$i
+ break 2
+ fi
+ done
+done
+])
+
+AC_DEFUN(AC_PATH_QT_DIRECT,
+[if test "$ac_qt_includes" = NO; then
+AC_TRY_CPP([#include <qtstream.h>],
+[
+ac_qt_includes=
+],[
+])
+fi
+])
+
+AC_DEFUN(AC_PATH_QT_MOC,
+[
+AC_PATH_PROG(MOC, moc, /usr/bin/moc,
+ $PATH:/usr/bin:/usr/X11R6/bin:$QTDIR/bin:/usr/lib/qt/bin:/usr/local/qt/bin)
+])
+
+
+
+AC_DEFUN(K_PATH_X,
+[
+AC_MSG_CHECKING(for X)
+AC_CACHE_VAL(ac_cv_have_x,
+[# One or both of the vars are not set, and there is no cached value.
+ac_x_includes=NO ac_x_libraries=NO
+AC_PATH_X_DIRECT
+AC_PATH_X_XMKMF
+if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
+ AC_MSG_ERROR([Can't find X. Please add the correct paths. View configure --help for usage!])
+else
+ # Record where we found X for the cache.
+ ac_cv_have_x="have_x=yes \
+ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
+fi])dnl
+eval "$ac_cv_have_x"
+
+if test "$have_x" != yes; then
+ AC_MSG_RESULT($have_x)
+ no_x=yes
+else
+ # If each of the values was on the command line, it overrides each guess.
+ test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+ test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+ # Update the cache value to reflect the command line values.
+ ac_cv_have_x="have_x=yes \
+ ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
+ AC_MSG_RESULT([libraries $x_libraries, headers $x_includes])
+fi
+
+if test -z "$x_includes" || test "x$x_includes" = xNONE; then
+ X_INCLUDES=""
+ x_includes="."; dnl better than nothing :-
+ else
+ X_INCLUDES="-I$x_includes"
+fi
+
+if test -z "$x_libraries" || test "$x_libraries" = xNONE; then
+ X_LDFLAGS=""
+ x_libraries="/usr/lib"; dnl better than nothing :-
+ all_libraries=""
+ else
+ X_LDFLAGS="-L$x_libraries"
+ all_libraries=$X_LDFLAGS
+fi
+
+AC_SUBST(X_INCLUDES)
+AC_SUBST(X_LDFLAGS)
+all_includes=$X_INCLUDES
+])
+AC_DEFUN(AC_PATH_QT_1_3,
+[
+AC_REQUIRE([K_PATH_X])
+
+AC_MSG_CHECKING([for QT-1.30])
+ac_qt_includes=NO ac_qt_libraries=NO
+qt_libraries=""
+qt_includes=""
+AC_ARG_WITH(qt-dir,
+ [ --with-qt-dir where the root of qt is installed ],
+ [ ac_qt_includes="$withval"/include
+ ac_qt_libraries="$withval"/lib
+ ])
+
+AC_ARG_WITH(qt-includes,
+ [ --with-qt-includes where the qt includes are. ],
+ [
+ ac_qt_includes="$withval"
+ ])
+
+AC_ARG_WITH(qt-libraries,
+ [ --with-qt-libraries where the qt library is installed.],
+ [ ac_qt_libraries="$withval"
+ ])
+
+if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
+
+AC_CACHE_VAL(ac_cv_have_qt,
+AC_PATH_QT_DIRECT
+[#try to guess qt locations
+
+qt_incdirs="/usr/lib/qt/include /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt $x_includes $QTINC"
+test -n "$QTDIR" && qt_incdirs="$QTDIR/include $QTDIR $qt_incdirs"
+AC_FIND_FILE(qglobal.h, $qt_incdirs, qt_incdir)
+ac_qt_includes=$qt_incdir
+
+qt_libdirs="/usr/lib/qt/lib /usr/local/qt/lib /usr/lib/qt /usr/lib $x_libraries $QTLIB"
+test -n "$QTDIR" && qt_libdirs="$QTDIR/lib $QTDIR $qt_libdirs"
+AC_FIND_FILE(libqt.so libqt.so.1.30 libqt.so.1 libqt.a libqt.sl, $qt_libdirs, qt_libdir)
+ac_qt_libraries=$qt_libdir
+
+ac_cxxflags_safe=$CXXFLAGS
+ac_ldflags_safe=$LDFLAGS
+ac_libs_safe=$LIBS
+CXXFLAGS="$CXXFLAGS -I$qt_incdir"
+LDFLAGS="-L$qt_libdir $X_LDFLAGS"
+LIBS="-lqt -lXext -lX11 $LIBSOCKET"
+AC_LANG_CPLUSPLUS
+cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#include <stdio.h>
+#include <qglobal.h>
+#if QT_VERSION < 130
+#error QT_VERSION is too small
+#else
+main()
+{
+ puts(QT_VERSION_STR);
+ return 0;
+}
+#endif
+EOF
+
+if AC_TRY_EVAL(ac_link) && test -s conftest; then
+ rm -f conftest*
+else
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat conftest.$ac_ext >&AC_FD_CC
+ ac_qt_libraries="NO"
+fi
+rm -f conftest*
+CXXFLAGS=$ac_cxxflags_safe
+LDFLAGS=$ac_ldflags_safe
+LIBS=$ac_libs_safe
+
+if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
+ ac_cv_have_qt="have_qt=no"
+ ac_qt_notfound=""
+ if test "$ac_qt_includes" = NO; then
+ if test "$ac_qt_libraries" = NO; then
+ ac_qt_notfound="(headers and libraries)";
+ else
+ ac_qt_notfound="(headers)";
+ fi
+ else
+ ac_qt_notfound="(libraries)";
+ fi
+
+ AC_MSG_ERROR([QT-1.30 $ac_qt_notfound not found. Please check your installation! ]);
+else
+ have_qt="yes"
+fi
+])
+else
+ have_qt="yes"
+fi
+
+eval "$ac_cv_have_qt"
+
+if test "$have_qt" != yes; then
+ AC_MSG_RESULT([$have_qt]);
+else
+ ac_cv_have_qt="have_qt=yes \
+ ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
+ AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes])
+
+ qt_libraries=$ac_qt_libraries
+ qt_includes=$ac_qt_includes
+ QT_LIBS="-lqt -lXext -lX11 $LIBSOCKET"
+
+ac_cxxflags_safe=$CXXFLAGS
+ac_ldflags_safe=$LDFLAGS
+ac_libs_safe=$LIBS
+
+ AC_MSG_CHECKING([for qInitPngIo in -lqimgio])
+ CXXFLAGS="$CXXFLAGS -I ./ -I $ac_qt_includes"
+ LDFLAGS="-L$ac_qt_libraries $X_LDFLAGS"
+ LIBS="$QT_LIBS -lqimgio -ljpeg -lpng -lXext -lX11 $LIBSOCKET"
+ AC_LANG_CPLUSPLUS
+ cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#include <stdio.h>
+#include <qglobal.h>
+#include <qpngio.h>
+main()
+{
+ qInitPngIO ();
+ return 0;
+}
+EOF
+
+ if AC_TRY_EVAL(ac_link) && test -s conftest; then
+ rm -f conftest*
+ AC_DEFINE(HAVE_QIMGIO)
+ QT_LIBS="$QT_LIBS -lqimgio -ljpeg -lpng"
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN([dldialog will not be able to display png images!])
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat conftest.$ac_ext >&AC_FD_CC
+ fi
+ rm -f conftest*
+ CXXFLAGS=$ac_cxxflags_safe
+ LDFLAGS=$ac_ldflags_safe
+ LIBS=$ac_libs_safe
+
+fi
+AC_SUBST(qt_libraries)
+AC_SUBST(qt_includes)
+
+if test "$qt_includes" = "$x_includes"; then
+ QT_INCLUDES="";
+else
+ QT_INCLUDES="-I$qt_includes"
+ all_includes="$QT_INCLUDES $all_includes"
+fi
+
+if test "$qt_libraries" = "$x_libraries"; then
+ QT_LDFLAGS=""
+else
+ QT_LDFLAGS="-L$qt_libraries"
+ all_libraries="$QT_LDFLAGS $all_libraries"
+fi
+
+AC_SUBST(QT_INCLUDES)
+AC_SUBST(QT_LDFLAGS)
+AC_SUBST(QT_LIBS)
+AC_PATH_QT_MOC
+AC_DEFINE(HAVE_QT)
+])
+
+AC_DEFUN(AC_PATH_QT,
+[
+AC_PATH_QT_1_3
+])
+
+
+AC_DEFUN(AC_PATH_TV_DIRECT,
+[if test "$ac_tv_includes" = NO; then
+AC_TRY_CPP([#include <tvision/tvconfig.h>],
+[
+ac_qt_includes=
+],[
+])
+fi
+])
+
+AC_DEFUN(AC_PATH_TV,
+[
+ac_tv_libs="-ltvision"
+
+AC_LANG_C
+AC_CHECK_LIB(ncurses, initscr,
+ [ ac_tv_libs="$ac_tv_libs -lncurses" ],
+ AC_MSG_ERROR("ncurses library not found!"))
+
+AC_CHECK_LIB(gpm, Gpm_Close,
+ [ ac_tv_libs="$ac_tv_libs -lgpm" ],
+ AC_MSG_ERROR("gpm library not found!"), [ -lncurses ])
+
+AC_MSG_CHECKING([for tvision library])
+ac_tv_includes=NO
+ac_tv_libraries=NO
+tv_libraries=""
+tv_includes=""
+
+AC_ARG_WITH(tvision-dir,
+ [ --with-tvision-dir where the root of tv is installed ],
+ [ ac_tv_includes="$withval"/include
+ ac_tv_libraries="$withval"/lib
+ ])
+
+AC_ARG_WITH(tv-includes,
+ [ --with-tvision-includes where the tv includes are. ],
+ [
+ ac_tv_includes="$withval"
+ ])
+
+AC_ARG_WITH(tv-libraries,
+ [ --with-tvision-libraries where the tv library is installed.],
+ [ ac_tv_libraries="$withval"
+ ])
+
+if test "$ac_tv_includes" = NO || test "$ac_tv_libraries" = NO; then
+
+AC_CACHE_VAL(ac_cv_have_tv,
+AC_PATH_TV_DIRECT
+[#try to guess tv locations
+
+tv_incdirs="/usr/lib/tvision/include /usr/local/lib/tvision/include /usr/include/tvision /usr/local/include /usr/include"
+AC_FIND_FILE(tvision/tv.h, $tv_incdirs, tv_incdir)
+ac_tv_includes=$tv_incdir
+
+tv_libdirs="/usr/lib/tvision/lib /usr/local/tvision/lib /usr/lib/tvision /usr/local/lib /usr/lib "
+AC_FIND_FILE(libtvision.so libtvision.a libtvision.sl, $tv_libdirs, tv_libdir)
+ac_tv_libraries=$tv_libdir
+
+ac_cxxflags_safe=$CXXFLAGS
+ac_ldflags_safe=$LDFLAGS
+ac_libs_safe=$LIBS
+CXXFLAGS="$CXXFLAGS -I$tv_incdir"
+LDFLAGS="-L$tv_libdir $X_LDFLAGS"
+LIBS="$ac_tv_libs"
+
+AC_LANG_CPLUSPLUS
+cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#define Uses_TApplication
+#include <tvision/tvconfig.h>
+#include <tvision/tv.h>
+
+class TMyApp : public TApplication
+{
+
+public:
+TMyApp();
+
+};
+
+TMyApp::TMyApp() :
+TProgInit( &TMyApp::initStatusLine,
+&TMyApp::initMenuBar,
+&TMyApp::initDeskTop
+)
+{
+}
+
+int main()
+{
+TMyApp myApp;
+myApp.run();
+return 0;
+}
+EOF
+
+if AC_TRY_EVAL(ac_link) && test -s conftest; then
+ rm -f conftest*
+else
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat conftest.$ac_ext >&AC_FD_CC
+ ac_tv_libraries="NO"
+fi
+rm -f conftest*
+CXXFLAGS=$ac_cxxflags_safe
+LDFLAGS=$ac_ldflags_safe
+LIBS=$ac_libs_safe
+
+if test "$ac_tv_includes" = NO || test "$ac_tv_libraries" = NO; then
+ ac_cv_have_tv="have_tv=no"
+ ac_tv_notfound=""
+ if test "$ac_tv_includes" = NO; then
+ if test "$ac_tv_libraries" = NO; then
+ ac_tv_notfound="(headers and libraries)";
+ else
+ ac_tv_notfound="(headers)";
+ fi
+ else
+ ac_tv_notfound="(libraries)";
+ fi
+
+ AC_MSG_ERROR([TVISION $ac_tv_notfound not found. Please check your installation! ]);
+else
+ have_tv="yes"
+fi
+])
+else
+ have_tv="yes"
+fi
+
+eval "$ac_cv_have_tv"
+
+if test "$have_tv" != yes; then
+ AC_MSG_RESULT([$have_tv]);
+else
+ ac_cv_have_tv="have_tv=yes \
+ ac_tv_includes=$ac_tv_includes ac_tv_libraries=$ac_tv_libraries"
+ AC_MSG_RESULT([libraries $ac_tv_libraries, headers $ac_tv_includes])
+
+ tv_libraries=$ac_tv_libraries
+ tv_includes=$ac_tv_includes
+fi
+
+AC_SUBST(tv_libraries)
+AC_SUBST(tv_includes)
+
+TV_INCLUDES="-I$tv_includes"
+all_includes="$TV_INCLUDES $all_includes"
+
+TV_LDFLAGS="-L$tv_libraries"
+TV_LIBS="$ac_tv_libs"
+
+AC_SUBST(TV_INCLUDES)
+AC_SUBST(TV_LDFLAGS)
+AC_SUBST(TV_LIBS)
+
+AC_DEFINE(HAVE_TVISION)
+])
+
+# Do all the work for Automake. This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 1
+
+dnl Usage:
+dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+
+AC_DEFUN(AM_INIT_AUTOMAKE,
+[AC_REQUIRE([AC_PROG_INSTALL])
+PACKAGE=[$1]
+AC_SUBST(PACKAGE)
+VERSION=[$2]
+AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+ifelse([$3],,
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
+AC_REQUIRE([AM_SANITY_CHECK])
+AC_REQUIRE([AC_ARG_PROGRAM])
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
+AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
+AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN(AM_SANITY_CHECK,
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "[$]*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "[$]*" != "X $srcdir/configure conftestfile" \
+ && test "[$]*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "[$]2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])
+
+dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+dnl The program must properly implement --version.
+AC_DEFUN(AM_MISSING_PROG,
+[AC_MSG_CHECKING(for working $2)
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if ($2 --version) < /dev/null > /dev/null 2>&1; then
+ $1=$2
+ AC_MSG_RESULT(found)
+else
+ $1="$3/missing $2"
+ AC_MSG_RESULT(missing)
+fi
+AC_SUBST($1)])
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file.
+
+AC_DEFUN(AM_CONFIG_HEADER,
+[AC_PREREQ([2.12])
+AC_CONFIG_HEADER([$1])
+dnl When config.status generates a header, we must update the stamp-h file.
+dnl This file resides in the same directory as the config header
+dnl that is generated. We must strip everything past the first ":",
+dnl and everything past the last "/".
+AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
+ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
+<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
+<<am_indx=1
+for am_file in <<$1>>; do
+ case " <<$>>CONFIG_HEADERS " in
+ *" <<$>>am_file "*<<)>>
+ echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
+ ;;
+ esac
+ am_indx=`expr "<<$>>am_indx" + 1`
+done<<>>dnl>>)
+changequote([,]))])
+
+
+dnl AM_PROG_LEX
+dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
+AC_DEFUN(AM_PROG_LEX,
+[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
+AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
+AC_PROG_LEX
+AC_DECL_YYTEXT])
+
+
+# serial 40 AC_PROG_LIBTOOL
+AC_DEFUN(AC_PROG_LIBTOOL,
+[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+
+# Save cache, so that ltconfig can load it
+AC_CACHE_SAVE
+
+# Actually configure libtool. ac_aux_dir is where install-sh is found.
+CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
+DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
+|| AC_MSG_ERROR([libtool configure failed])
+
+# Reload cache, that may have been modified by ltconfig
+AC_CACHE_LOAD
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Redirect the config.log output again, so that the ltconfig log is not
+# clobbered by the next message.
+exec 5>>./config.log
+])
+
+AC_DEFUN(AC_LIBTOOL_SETUP,
+[AC_PREREQ(2.13)dnl
+AC_REQUIRE([AC_ENABLE_SHARED])dnl
+AC_REQUIRE([AC_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([AC_PROG_RANLIB])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+dnl
+
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
+
+# Check for any special flags to pass to ltconfig.
+#
+# the following will cause an existing older ltconfig to fail, so
+# we ignore this at the expense of the cache file... Checking this
+# will just take longer ... bummer!
+#libtool_flags="--cache-file=$cache_file"
+#
+test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
+test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
+test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
+test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
+[libtool_flags="$libtool_flags --enable-dlopen"])
+ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
+[libtool_flags="$libtool_flags --enable-win32-dll"])
+AC_ARG_ENABLE(libtool-lock,
+ [ --disable-libtool-lock avoid locking (might break parallel builds)])
+test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
+test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case "$lt_target" in
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case "`/usr/bin/file conftest.o`" in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+ [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+
+ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
+[*-*-cygwin* | *-*-mingw*)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+])
+esac
+])
+
+# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
+AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
+
+# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
+AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
+
+# AC_ENABLE_SHARED - implement the --enable-shared flag
+# Usage: AC_ENABLE_SHARED[(DEFAULT)]
+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+# `yes'.
+AC_DEFUN(AC_ENABLE_SHARED, [dnl
+define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(shared,
+changequote(<<, >>)dnl
+<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
+changequote([, ])dnl
+[p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_shared=yes ;;
+no) enable_shared=no ;;
+*)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac],
+enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
+])
+
+# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
+AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_SHARED(no)])
+
+# AC_ENABLE_STATIC - implement the --enable-static flag
+# Usage: AC_ENABLE_STATIC[(DEFAULT)]
+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+# `yes'.
+AC_DEFUN(AC_ENABLE_STATIC, [dnl
+define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(static,
+changequote(<<, >>)dnl
+<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
+changequote([, ])dnl
+[p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_static=yes ;;
+no) enable_static=no ;;
+*)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac],
+enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
+])
+
+# AC_DISABLE_STATIC - set the default static flag to --disable-static
+AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_STATIC(no)])
+
+
+# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
+# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+# `yes'.
+AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
+define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(fast-install,
+changequote(<<, >>)dnl
+<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
+changequote([, ])dnl
+[p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_fast_install=yes ;;
+no) enable_fast_install=no ;;
+*)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac],
+enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
+])
+
+# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
+AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_FAST_INSTALL(no)])
+
+# AC_PROG_LD - find the path to the GNU or non-GNU linker
+AC_DEFUN(AC_PROG_LD,
+[AC_ARG_WITH(gnu-ld,
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ac_prog=ld
+if test "$ac_cv_prog_gcc" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ ac_prog=`($CC -print-prog-name=ld) 2>&5`
+ case "$ac_prog" in
+ # Accept absolute paths.
+changequote(,)dnl
+ [\\/]* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+changequote([,])dnl
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(ac_cv_path_LD,
+[if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ ac_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ ac_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$ac_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_PROG_LD_GNU
+])
+
+AC_DEFUN(AC_PROG_LD_GNU,
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ ac_cv_prog_gnu_ld=yes
+else
+ ac_cv_prog_gnu_ld=no
+fi])
+])
+
+# AC_PROG_NM - find the path to a BSD-compatible name lister
+AC_DEFUN(AC_PROG_NM,
+[AC_MSG_CHECKING([for BSD-compatible nm])
+AC_CACHE_VAL(ac_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ ac_cv_path_NM="$NM"
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -B"
+ break
+ elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -p"
+ break
+ else
+ ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+fi])
+NM="$ac_cv_path_NM"
+AC_MSG_RESULT([$NM])
+])
+
+# AC_CHECK_LIBM - check for math library
+AC_DEFUN(AC_CHECK_LIBM,
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case "$lt_target" in
+*-*-beos* | *-*-cygwin*)
+ # These system don't have libm
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, main, LIBM="-lm")
+ ;;
+esac
+])
+
+# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
+# the libltdl convenience library and INCLTDL to the include flags for
+# the libltdl header and adds --enable-ltdl-convenience to the
+# configure arguments. Note that LIBLTDL and INCLTDL are not
+# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
+# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
+# with '${top_builddir}/' and INCLTDL will be prefixed with
+# '${top_srcdir}/' (note the single quotes!). If your package is not
+# flat and you're not using automake, define top_builddir and
+# top_srcdir appropriately in the Makefiles.
+AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+ case "$enable_ltdl_convenience" in
+ no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+ "") enable_ltdl_convenience=yes
+ ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+ esac
+ LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
+ INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+])
+
+# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
+# the libltdl installable library and INCLTDL to the include flags for
+# the libltdl header and adds --enable-ltdl-install to the configure
+# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
+# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
+# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
+# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
+# with '${top_srcdir}/' (note the single quotes!). If your package is
+# not flat and you're not using automake, define top_builddir and
+# top_srcdir appropriately in the Makefiles.
+# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+ AC_CHECK_LIB(ltdl, main,
+ [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+ [if test x"$enable_ltdl_install" = xno; then
+ AC_MSG_WARN([libltdl not installed, but installation disabled])
+ else
+ enable_ltdl_install=yes
+ fi
+ ])
+ if test x"$enable_ltdl_install" = x"yes"; then
+ ac_configure_args="$ac_configure_args --enable-ltdl-install"
+ LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
+ INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+ else
+ ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+ LIBLTDL="-lltdl"
+ INCLTDL=
+ fi
+])
+
+dnl old names
+AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
+AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
+AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
+AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
+AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
+AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
+AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
+
+dnl This is just to silence aclocal about the macro not being used
+ifelse([AC_DISABLE_FAST_INSTALL])dnl
+
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 5
+
+AC_DEFUN(AM_WITH_NLS,
+ [AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE(nls,
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT($USE_NLS)
+ AC_SUBST(USE_NLS)
+
+ USE_INCLUDED_LIBINTL=no
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ AC_DEFINE(ENABLE_NLS)
+ AC_MSG_CHECKING([whether included gettext is requested])
+ AC_ARG_WITH(included-gettext,
+ [ --with-included-gettext use the GNU gettext library included here],
+ nls_cv_force_use_gnu_gettext=$withval,
+ nls_cv_force_use_gnu_gettext=no)
+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ dnl User does not insist on using GNU NLS library. Figure out what
+ dnl to use. If gettext or catgets are available (in this order) we
+ dnl use this. Else we have to fall back to GNU NLS library.
+ dnl catgets is only used if permitted by option --with-catgets.
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+ CATOBJEXT=NONE
+
+ AC_CHECK_HEADER(libintl.h,
+ [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
+ [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
+ gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
+
+ if test "$gt_cv_func_gettext_libc" != "yes"; then
+ AC_CHECK_LIB(intl, bindtextdomain,
+ [AC_CACHE_CHECK([for gettext in libintl],
+ gt_cv_func_gettext_libintl,
+ [AC_CHECK_LIB(intl, gettext,
+ gt_cv_func_gettext_libintl=yes,
+ gt_cv_func_gettext_libintl=no)],
+ gt_cv_func_gettext_libintl=no)])
+ fi
+
+ if test "$gt_cv_func_gettext_libc" = "yes" \
+ || test "$gt_cv_func_gettext_libintl" = "yes"; then
+ AC_DEFINE(HAVE_GETTEXT)
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
+ if test "$MSGFMT" != "no"; then
+ AC_CHECK_FUNCS(dcgettext)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr],
+ [CATOBJEXT=.gmo
+ DATADIRNAME=share],
+ [CATOBJEXT=.mo
+ DATADIRNAME=lib])
+ INSTOBJEXT=.mo
+ fi
+ fi
+ ])
+
+ if test "$CATOBJEXT" = "NONE"; then
+ AC_MSG_CHECKING([whether catgets can be used])
+ AC_ARG_WITH(catgets,
+ [ --with-catgets use catgets functions if available],
+ nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
+ AC_MSG_RESULT($nls_cv_use_catgets)
+
+ if test "$nls_cv_use_catgets" = "yes"; then
+ dnl No gettext in C library. Try catgets next.
+ AC_CHECK_LIB(i, main)
+ AC_CHECK_FUNC(catgets,
+ [AC_DEFINE(HAVE_CATGETS)
+ INTLOBJS="\$(CATOBJS)"
+ AC_PATH_PROG(GENCAT, gencat, no)dnl
+ if test "$GENCAT" != "no"; then
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
+ if test "$GMSGFMT" = "no"; then
+ AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
+ fi
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.cat
+ INSTOBJEXT=.cat
+ DATADIRNAME=lib
+ INTLDEPS='$(top_builddir)/intl/libintl.a'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi])
+ fi
+ fi
+
+ if test "$CATOBJEXT" = "NONE"; then
+ dnl Neither gettext nor catgets in included in the C library.
+ dnl Fall back on GNU gettext library.
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions used to generate GNU NLS library.
+ INTLOBJS="\$(GETTOBJS)"
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ AC_SUBST(MSGFMT)
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.gmo
+ INSTOBJEXT=.mo
+ DATADIRNAME=share
+ INTLDEPS='$(top_builddir)/intl/libintl.a'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi
+
+ dnl Test whether we really found GNU xgettext.
+ if test "$XGETTEXT" != ":"; then
+ dnl If it is no GNU xgettext we define it as : so that the
+ dnl Makefiles still can work.
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ AC_MSG_RESULT(
+ [found xgettext program is not GNU xgettext; ignore it])
+ XGETTEXT=":"
+ fi
+ fi
+
+ # We need to process the po/ directory.
+ POSUB=po
+ else
+ DATADIRNAME=share
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi
+ AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
+ AC_OUTPUT_COMMANDS(
+ [case "$CONFIG_FILES" in *po/Makefile.in*)
+ sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+ esac])
+
+
+ # If this is used in GNU gettext we have to set USE_NLS to `yes'
+ # because some of the sources are only built for this goal.
+ if test "$PACKAGE" = gettext; then
+ USE_NLS=yes
+ USE_INCLUDED_LIBINTL=yes
+ fi
+
+ dnl These rules are solely for the distribution goal. While doing this
+ dnl we only have to keep exactly one list of the available catalogs
+ dnl in configure.in.
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST(USE_INCLUDED_LIBINTL)
+ AC_SUBST(CATALOGS)
+ AC_SUBST(CATOBJEXT)
+ AC_SUBST(DATADIRNAME)
+ AC_SUBST(GMOFILES)
+ AC_SUBST(INSTOBJEXT)
+ AC_SUBST(INTLDEPS)
+ AC_SUBST(INTLLIBS)
+ AC_SUBST(INTLOBJS)
+ AC_SUBST(POFILES)
+ AC_SUBST(POSUB)
+ ])
+
+AC_DEFUN(AM_GNU_GETTEXT,
+ [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_CC])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_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
+unistd.h sys/param.h])
+ AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
+strdup __argz_count __argz_stringify __argz_next])
+
+ if test "${ac_cv_func_stpcpy+set}" != "set"; then
+ AC_CHECK_FUNCS(stpcpy)
+ fi
+ if test "${ac_cv_func_stpcpy}" = "yes"; then
+ AC_DEFINE(HAVE_STPCPY)
+ fi
+
+ AM_LC_MESSAGES
+ AM_WITH_NLS
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ AC_MSG_CHECKING(for catalogs to be installed)
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ AC_MSG_RESULT($LINGUAS)
+ fi
+
+ dnl Construct list of names of catalog files to be constructed.
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ dnl The reference to <locale.h> in the installed <libintl.h> file
+ dnl must be resolved because we cannot expect the users of this
+ dnl to define HAVE_LOCALE_H.
+ if test $ac_cv_header_locale_h = yes; then
+ INCLUDE_LOCALE_H="#include <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. Take care yourself. */"
+ fi
+ AC_SUBST(INCLUDE_LOCALE_H)
+
+ dnl Determine which catalog format we have (if any is needed)
+ dnl For now we know about two different formats:
+ dnl Linux libc-5 and the normal X/Open format
+ test -d intl || mkdir intl
+ if test "$CATOBJEXT" = ".cat"; then
+ AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
+
+ dnl Transform the SED scripts while copying because some dumb SEDs
+ dnl cannot handle comments.
+ sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
+ fi
+ dnl po2tbl.sed is always needed.
+ sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
+ $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
+
+ dnl In the intl/Makefile.in we have a special dependency which makes
+ dnl only sense for gettext. We comment this out for non-gettext
+ dnl packages.
+ if test "$PACKAGE" = "gettext"; then
+ GT_NO="#NO#"
+ GT_YES=
+ else
+ GT_NO=
+ GT_YES="#YES#"
+ fi
+ AC_SUBST(GT_NO)
+ AC_SUBST(GT_YES)
+
+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+ dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
+ dnl Try to locate is.
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+ AC_SUBST(MKINSTALLDIRS)
+
+ dnl *** For now the libtool support in intl/Makefile is not for real.
+ l=
+ AC_SUBST(l)
+
+ dnl Generate list of files to be processed by xgettext which will
+ dnl be included in po/Makefile.
+ test -d po || mkdir po
+ if test "x$srcdir" != "x."; then
+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+ posrcprefix="$srcdir/"
+ else
+ posrcprefix="../$srcdir/"
+ fi
+ else
+ posrcprefix="../"
+ fi
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+ ])
+
+# Search path for a program which passes the given test.
+# Ulrich Drepper <drepper@cygnus.com>, 1996.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN(AM_PATH_PROG_WITH_TEST,
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ /*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test -n "[$]$1"; then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+AC_DEFUN(AM_LC_MESSAGES,
+ [if test $ac_cv_header_locale_h = yes; then
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES)
+ fi
+ fi])
+
+# Define a conditional.
+
+AC_DEFUN(AM_CONDITIONAL,
+[AC_SUBST($1_TRUE)
+AC_SUBST($1_FALSE)
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi])
+
diff --git a/dldialog/config.guess b/dldialog/config.guess
new file mode 100755
index 0000000..e1b5871
--- /dev/null
+++ b/dldialog/config.guess
@@ -0,0 +1,1121 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
+# Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Written by Per Bothner <bothner@cygnus.com>.
+# The master version of this file is at the FSF in /home/gd/gnu/lib.
+# Please send patches to <autoconf-patches@gnu.org>.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit system type (host/target name).
+#
+# Only a few systems have been added to this list; please add others
+# (but try to keep the structure clean).
+#
+
+# Use $HOST_CC if defined. $CC may point to a cross-compiler
+if test x"$CC_FOR_BUILD" = x; then
+ if test x"$HOST_CC" != x; then
+ CC_FOR_BUILD="$HOST_CC"
+ else
+ if test x"$CC" != x; then
+ CC_FOR_BUILD="$CC"
+ else
+ CC_FOR_BUILD=cc
+ fi
+ fi
+fi
+
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 8/24/94.)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ alpha:OSF1:*:*)
+ if test $UNAME_RELEASE = "V4.0"; then
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ fi
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ cat <<EOF >$dummy.s
+ .globl main
+ .ent main
+main:
+ .frame \$30,0,\$26,0
+ .prologue 0
+ .long 0x47e03d80 # implver $0
+ lda \$2,259
+ .long 0x47e20c21 # amask $2,$1
+ srl \$1,8,\$2
+ sll \$2,2,\$2
+ sll \$0,3,\$0
+ addl \$1,\$0,\$0
+ addl \$2,\$0,\$0
+ ret \$31,(\$26),1
+ .end main
+EOF
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./$dummy
+ case "$?" in
+ 7)
+ UNAME_MACHINE="alpha"
+ ;;
+ 15)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 14)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 10)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 16)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ esac
+ fi
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit 0 ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit 0 ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit 0 ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-cbm-sysv4
+ exit 0;;
+ amiga:NetBSD:*:*)
+ echo m68k-cbm-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit 0 ;;
+ arc64:OpenBSD:*:*)
+ echo mips64el-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hkmips:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ wgrisc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit 0 ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit 0;;
+ arm32:NetBSD:*:*)
+ echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ SR2?01:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit 0;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit 0 ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit 0 ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit 0 ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit 0 ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:NetBSD:*:*)
+ echo m68k-atari-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit 0 ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit 0 ;;
+ sun3*:NetBSD:*:*)
+ echo m68k-sun-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:NetBSD:*:*)
+ echo m68k-apple-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:NetBSD:*:*)
+ echo powerpc-apple-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit 0 ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit 0 ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy \
+ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit 0 ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit 0 ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit 0 ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit 0 ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit 0 ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit 0 ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit 0 ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit 0 ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i?86:AIX:*:*)
+ echo i386-ibm-aix
+ exit 0 ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo rs6000-ibm-aix3.2.5
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit 0 ;;
+ *:AIX:*:4)
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=4.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit 0 ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit 0 ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit 0 ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit 0 ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit 0 ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit 0 ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit 0 ;;
+ 9000/[34678]??:HP-UX:*:*)
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ sed 's/^ //' << EOF >$dummy.c
+ #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);
+
+ 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 $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+ rm -f $dummy.c $dummy
+ esac
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ 3050*:HI-UX:*:*)
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo unknown-hitachi-hiuxwe2
+ exit 0 ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit 0 ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit 0 ;;
+ *9??*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit 0 ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit 0 ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit 0 ;;
+ i?86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit 0 ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit 0 ;;
+ hppa*:OpenBSD:*:*)
+ echo hppa-unknown-openbsd
+ exit 0 ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ CRAY*X-MP:*:*:*)
+ echo xmp-cray-unicos
+ exit 0 ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+ exit 0 ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY*T3E:*:*:*)
+ echo alpha-cray-unicosmk${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY-2:*:*:*)
+ echo cray2-cray-unicos
+ exit 0 ;;
+ F300:UNIX_System_V:*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit 0 ;;
+ F301:UNIX_System_V:*:*)
+ echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
+ exit 0 ;;
+ hp3[0-9][05]:NetBSD:*:*)
+ echo m68k-hp-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:FreeBSD:*:*)
+ if test -x /usr/bin/objformat; then
+ if test "elf" = "`/usr/bin/objformat`"; then
+ echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
+ exit 0
+ fi
+ fi
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit 0 ;;
+ *:NetBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
+ exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit 0 ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit 0 ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i386-pc-interix
+ exit 0 ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit 0 ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit 0 ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ *:GNU:*:*)
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit 0 ;;
+ *:Linux:*:*)
+
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ ld_help_string=`cd /; ld --help 2>&1`
+ ld_supported_emulations=`echo $ld_help_string \
+ | sed -ne '/supported emulations:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported emulations: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_emulations" in
+ *ia64)
+ echo "${UNAME_MACHINE}-unknown-linux"
+ exit 0
+ ;;
+ i?86linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit 0
+ ;;
+ i?86coff)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit 0
+ ;;
+ sparclinux)
+ echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+ exit 0
+ ;;
+ armlinux)
+ echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+ exit 0
+ ;;
+ elf32arm*)
+ echo "${UNAME_MACHINE}-unknown-linux-gnu"
+ exit 0
+ ;;
+ armelf_linux*)
+ echo "${UNAME_MACHINE}-unknown-linux-gnu"
+ exit 0
+ ;;
+ m68klinux)
+ echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+ exit 0
+ ;;
+ elf32ppc)
+ # Determine Lib Version
+ cat >$dummy.c <<EOF
+#include <features.h>
+#if defined(__GLIBC__)
+extern char __libc_version[];
+extern char __libc_release[];
+#endif
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+#if defined(__GLIBC__)
+ printf("%s %s\n", __libc_version, __libc_release);
+#else
+ printf("unkown\n");
+#endif
+ return 0;
+}
+EOF
+ LIBC=""
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./$dummy | grep 1\.99 > /dev/null
+ if test "$?" = 0 ; then
+ LIBC="libc1"
+ fi
+ fi
+ rm -f $dummy.c $dummy
+ echo powerpc-unknown-linux-gnu${LIBC}
+ exit 0
+ ;;
+ esac
+
+ if test "${UNAME_MACHINE}" = "alpha" ; then
+ sed 's/^ //' <<EOF >$dummy.s
+ .globl main
+ .ent main
+ main:
+ .frame \$30,0,\$26,0
+ .prologue 0
+ .long 0x47e03d80 # implver $0
+ lda \$2,259
+ .long 0x47e20c21 # amask $2,$1
+ srl \$1,8,\$2
+ sll \$2,2,\$2
+ sll \$0,3,\$0
+ addl \$1,\$0,\$0
+ addl \$2,\$0,\$0
+ ret \$31,(\$26),1
+ .end main
+EOF
+ LIBC=""
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./$dummy
+ case "$?" in
+ 7)
+ UNAME_MACHINE="alpha"
+ ;;
+ 15)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 14)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 10)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 16)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ esac
+
+ objdump --private-headers $dummy | \
+ grep ld.so.1 > /dev/null
+ if test "$?" = 0 ; then
+ LIBC="libc1"
+ fi
+ fi
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
+ elif test "${UNAME_MACHINE}" = "mips" ; then
+ cat >$dummy.c <<EOF
+#ifdef __cplusplus
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __MIPSEB__
+ printf ("%s-unknown-linux-gnu\n", argv[1]);
+#endif
+#ifdef __MIPSEL__
+ printf ("%sel-unknown-linux-gnu\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ else
+ # Either a pre-BFD a.out linker (linux-gnuoldld)
+ # or one that does not give us useful --help.
+ # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
+ # If ld does not provide *any* "supported emulations:"
+ # that means it is gnuoldld.
+ echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
+ test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+
+ case "${UNAME_MACHINE}" in
+ i?86)
+ VENDOR=pc;
+ ;;
+ *)
+ VENDOR=unknown;
+ ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ cat >$dummy.c <<EOF
+#include <features.h>
+#ifdef __cplusplus
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __ELF__
+# ifdef __GLIBC__
+# if __GLIBC__ >= 2
+ printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
+# else
+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
+# else
+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
+#else
+ printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ fi ;;
+# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
+# are messed up and put the nodename in both sysname and nodename.
+ i?86:DYNIX/ptx:4*:*)
+ echo i386-sequent-sysv4
+ exit 0 ;;
+ i?86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit 0 ;;
+ i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit 0 ;;
+ i?86:*:5:7*)
+ # Fixed at (any) Pentium or better
+ UNAME_MACHINE=i586
+ if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
+ echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ i?86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit 0 ;;
+ pc:*:*:*)
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit 0 ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit 0 ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit 0 ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit 0 ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit 0 ;;
+ M68*:*:R3V[567]*:*)
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+ 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4 && exit 0 ;;
+ m68*:LynxOS:2.*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit 0 ;;
+ i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit 0 ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit 0 ;;
+ PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit 0 ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit 0 ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit 0 ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit 0 ;;
+ news*:NEWS-OS:*:6*)
+ echo mips-sony-newsos6
+ exit 0 ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit 0 ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit 0 ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit 0 ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:QNX:*:4*)
+ echo i386-qnx-qnx${UNAME_VERSION}
+ exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+ printf ("vax-dec-bsd\n"); exit (0);
+#else
+ printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
+rm -f $dummy.c $dummy
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ c34*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ c38*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ c4*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ esac
+fi
+
+#echo '(Unable to guess system type)' 1>&2
+
+exit 1
diff --git a/dldialog/config.h.in b/dldialog/config.h.in
new file mode 100644
index 0000000..78c8d71
--- /dev/null
+++ b/dldialog/config.h.in
@@ -0,0 +1,142 @@
+/* config.h.in. Generated automatically from configure.in by autoheader. */
+
+/* Define if using alloca.c. */
+#undef C_ALLOCA
+
+/* Define to empty if the keyword does not work. */
+#undef const
+
+/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
+ This function is required for alloca.c support on those systems. */
+#undef CRAY_STACKSEG_END
+
+/* Define if you have alloca, as a function or macro. */
+#undef HAVE_ALLOCA
+
+/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+#undef HAVE_ALLOCA_H
+
+/* Define if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
+/* Define as __inline if that's what the C compiler calls it. */
+#undef inline
+
+/* Define to `long' if <sys/types.h> doesn't define. */
+#undef off_t
+
+/* Define if you need to in order for stat and other things to work. */
+#undef _POSIX_SOURCE
+
+/* Define to `unsigned' if <sys/types.h> doesn't define. */
+#undef size_t
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown
+ */
+#undef STACK_DIRECTION
+
+/* Define if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define if lex declares yytext as a char * by default, not a char[]. */
+#undef YYTEXT_POINTER
+
+#undef HAVE_CATGETS
+
+#undef HAVE_GETTEXT
+
+/* Define to 1 if NLS is requested. */
+#undef ENABLE_NLS
+
+/* Define as 1 if you have the stpcpy function. */
+#undef HAVE_STPCPY
+
+/* Define if your locale.h file contains LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
+#undef HAVE_TVISION
+
+#undef HAVE_QT
+
+#undef HAVE_QIMGIO
+
+/* Define if you have the __argz_count function. */
+#undef HAVE___ARGZ_COUNT
+
+/* Define if you have the __argz_next function. */
+#undef HAVE___ARGZ_NEXT
+
+/* Define if you have the __argz_stringify function. */
+#undef HAVE___ARGZ_STRINGIFY
+
+/* Define if you have the dcgettext function. */
+#undef HAVE_DCGETTEXT
+
+/* Define if you have the getcwd function. */
+#undef HAVE_GETCWD
+
+/* Define if you have the getpagesize function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define if you have the munmap function. */
+#undef HAVE_MUNMAP
+
+/* Define if you have the putenv function. */
+#undef HAVE_PUTENV
+
+/* Define if you have the setenv function. */
+#undef HAVE_SETENV
+
+/* Define if you have the setlocale function. */
+#undef HAVE_SETLOCALE
+
+/* Define if you have the stpcpy function. */
+#undef HAVE_STPCPY
+
+/* Define if you have the strcasecmp function. */
+#undef HAVE_STRCASECMP
+
+/* Define if you have the strchr function. */
+#undef HAVE_STRCHR
+
+/* Define if you have the strdup function. */
+#undef HAVE_STRDUP
+
+/* Define if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
+
+/* Define if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define if you have the <nl_types.h> header file. */
+#undef HAVE_NL_TYPES_H
+
+/* Define if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define if you have the i library (-li). */
+#undef HAVE_LIBI
+
+/* Name of package */
+#undef PACKAGE
+
+/* Version number of package */
+#undef VERSION
+
diff --git a/dldialog/config.sub b/dldialog/config.sub
new file mode 100755
index 0000000..213a6d4
--- /dev/null
+++ b/dldialog/config.sub
@@ -0,0 +1,954 @@
+#! /bin/sh
+# Configuration validation subroutine script, version 1.1.
+# Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (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., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+if [ x$1 = x ]
+then
+ echo Configuration name missing. 1>&2
+ echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
+ echo "or $0 ALIAS" 1>&2
+ echo where ALIAS is a recognized configuration type. 1>&2
+ exit 1
+fi
+
+# First pass through any local machine types.
+case $1 in
+ *local*)
+ echo $1
+ exit 0
+ ;;
+ *)
+ ;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ linux-gnu*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple)
+ os=
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco5)
+ os=sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
+ | arme[lb] | pyramid | mn10200 | mn10300 \
+ | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
+ | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
+ | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
+ | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
+ | mipstx39 | mipstx39el \
+ | sparc | sparclet | sparclite | sparc64 | v850)
+ basic_machine=$basic_machine-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[3456]86)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
+ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
+ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
+ | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
+ | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
+ | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
+ | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
+ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+ | sparc64-* | mips64-* | mipsel-* \
+ | mips64el-* | mips64orion-* | mips64orionel-* \
+ | mipstx39-* | mipstx39el-* \
+ | f301-*)
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-cbm
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-cbm
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-cbm
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ cray2)
+ basic_machine=cray2-cray
+ os=-unicos
+ ;;
+ [ctj]90-cray)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i[3456]86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i[3456]86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i[3456]86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i[3456]86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ mipsel*-linux*)
+ basic_machine=mipsel-unknown
+ os=-linux-gnu
+ ;;
+ mips*-linux*)
+ basic_machine=mips-unknown
+ os=-linux-gnu
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pentium | p5)
+ basic_machine=i586-intel
+ ;;
+ pentiumpro | p6)
+ basic_machine=i686-intel
+ ;;
+ pentium-* | p5-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ k5)
+ # We don't have specific support for AMD's K5 yet, so just call it a Pentium
+ basic_machine=i586-amd
+ ;;
+ nexen)
+ # We don't have specific support for Nexgen yet, so just call it a Pentium
+ basic_machine=i586-nexgen
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=rs6000-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ xmp)
+ basic_machine=xmp-cray
+ os=-unicos
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ mips)
+ if [ x$os = x-linux-gnu ]; then
+ basic_machine=mips-unknown
+ else
+ basic_machine=mips-mips
+ fi
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sparc)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -uxpv*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f301-fujitsu)
+ os=-uxpv
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -vxsim* | -vxworks*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
diff --git a/dldialog/configure b/dldialog/configure
new file mode 100755
index 0000000..f76cf2a
--- /dev/null
+++ b/dldialog/configure
@@ -0,0 +1,6190 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+ --enable-static[=PKGS] build static libraries [default=no]"
+ac_help="$ac_help
+ --enable-shared[=PKGS] build shared libraries [default=yes]"
+ac_help="$ac_help
+ --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
+ac_help="$ac_help
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
+ac_help="$ac_help
+ --disable-libtool-lock avoid locking (might break parallel builds)"
+ac_help="$ac_help
+ --disable-nls do not use Native Language Support"
+ac_help="$ac_help
+ --with-included-gettext use the GNU gettext library included here"
+ac_help="$ac_help
+ --with-catgets use catgets functions if available"
+ac_help="$ac_help
+ --enable-debug debug [default=>>no]"
+ac_help="$ac_help
+ --without-qt build dldialog without qt support. "
+ac_help="$ac_help
+ --with-qt-dir where the root of qt is installed "
+ac_help="$ac_help
+ --with-qt-includes where the qt includes are. "
+ac_help="$ac_help
+ --with-qt-libraries where the qt library is installed."
+ac_help="$ac_help
+ --with-qt-dir where the root of qt is installed "
+ac_help="$ac_help
+ --with-qt-includes where the qt includes are. "
+ac_help="$ac_help
+ --with-qt-libraries where the qt library is installed."
+ac_help="$ac_help
+ --without-tv build dldialog without tvision support. "
+ac_help="$ac_help
+ --with-tvision-dir where the root of tv is installed "
+ac_help="$ac_help
+ --with-tvision-includes where the tv includes are. "
+ac_help="$ac_help
+ --with-tvision-libraries where the tv library is installed."
+ac_help="$ac_help
+ --with-tvision-dir where the root of tv is installed "
+ac_help="$ac_help
+ --with-tvision-includes where the tv includes are. "
+ac_help="$ac_help
+ --with-tvision-libraries where the tv library is installed."
+ac_help="$ac_help
+ --enable-final build size optimized lib (needs lots of memory)"
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+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'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.13"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=./acinclude.m4
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+
+CURRENT=26
+
+REVISION=0
+
+AGE=0
+
+PROG_MAJOR=1
+PROG_MINOR=$[$CURRENT-22].$[$REVISION-1+2]
+
+PROG_VERSION=$PROG_MAJOR.$PROG_MINOR
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# 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 $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:617: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
+echo "configure:670: checking whether build environment is sane" >&5
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "$*" != "X $srcdir/configure conftestfile" \
+ && test "$*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" 1>&2; exit 1; }
+ fi
+
+ test "$2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ { echo "configure: error: newly created file is older than distributed files!
+Check your system clock" 1>&2; exit 1; }
+fi
+rm -f conftest*
+echo "$ac_t""yes" 1>&6
+if test "$program_transform_name" = s,x,x,; then
+ program_transform_name=
+else
+ # Double any \ or $. echo might interpret backslashes.
+ cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+ program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+ rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,${program_prefix},; $program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:727: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftestmake <<\EOF
+all:
+ @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ SET_MAKE=
+else
+ echo "$ac_t""no" 1>&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+PACKAGE=dldialog
+
+VERSION=$PROG_VERSION
+
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+fi
+cat >> confdefs.h <<EOF
+#define PACKAGE "$PACKAGE"
+EOF
+
+cat >> confdefs.h <<EOF
+#define VERSION "$VERSION"
+EOF
+
+
+
+missing_dir=`cd $ac_aux_dir && pwd`
+echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
+echo "configure:773: checking for working aclocal" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (aclocal --version) < /dev/null > /dev/null 2>&1; then
+ ACLOCAL=aclocal
+ echo "$ac_t""found" 1>&6
+else
+ ACLOCAL="$missing_dir/missing aclocal"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
+echo "configure:786: checking for working autoconf" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoconf --version) < /dev/null > /dev/null 2>&1; then
+ AUTOCONF=autoconf
+ echo "$ac_t""found" 1>&6
+else
+ AUTOCONF="$missing_dir/missing autoconf"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working automake""... $ac_c" 1>&6
+echo "configure:799: checking for working automake" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (automake --version) < /dev/null > /dev/null 2>&1; then
+ AUTOMAKE=automake
+ echo "$ac_t""found" 1>&6
+else
+ AUTOMAKE="$missing_dir/missing automake"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
+echo "configure:812: checking for working autoheader" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoheader --version) < /dev/null > /dev/null 2>&1; then
+ AUTOHEADER=autoheader
+ echo "$ac_t""found" 1>&6
+else
+ AUTOHEADER="$missing_dir/missing autoheader"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
+echo "configure:825: checking for working makeinfo" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
+ MAKEINFO=makeinfo
+ echo "$ac_t""found" 1>&6
+else
+ MAKEINFO="$missing_dir/missing makeinfo"
+ echo "$ac_t""missing" 1>&6
+fi
+
+
+
+
+
+
+
+GUI_VERSION_INFO=$CURRENT:$REVISION:$AGE
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:849: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:879: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:930: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ ;;
+ esac
+ fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:962: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 973 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1004: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:1009: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1037: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:1069: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftestmake <<\EOF
+all:
+ @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ SET_MAKE=
+else
+ echo "$ac_t""no" 1>&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
+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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1100: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CXX="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CXX="$ac_cv_prog_CXX"
+if test -n "$CXX"; then
+ echo "$ac_t""$CXX" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$CXX" && break
+done
+test -n "$CXX" || CXX="gcc"
+
+
+echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1132: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+
+ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 1143 "configure"
+#include "confdefs.h"
+
+int main(){return(0);}
+EOF
+if { (eval echo configure:1148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cxx_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cxx_cross=no
+ else
+ ac_cv_prog_cxx_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cxx_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
+if test $ac_cv_prog_cxx_works = no; then
+ { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1174: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
+cross_compiling=$ac_cv_prog_cxx_cross
+
+echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
+echo "configure:1179: checking whether we are using GNU C++" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.C <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gxx=yes
+else
+ ac_cv_prog_gxx=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gxx" 1>&6
+
+if test $ac_cv_prog_gxx = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+
+ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ac_save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS=
+echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
+echo "configure:1207: checking whether ${CXX-g++} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.cc
+if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
+ ac_cv_prog_cxx_g=yes
+else
+ ac_cv_prog_cxx_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS="$ac_save_CXXFLAGS"
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1239: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 1254 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 1271 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 1288 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+missing_dir=`cd $ac_aux_dir && pwd`
+for ac_prog in flex lex
+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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1324: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$LEX"; then
+ ac_cv_prog_LEX="$LEX" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_LEX="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+LEX="$ac_cv_prog_LEX"
+if test -n "$LEX"; then
+ echo "$ac_t""$LEX" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$LEX" && break
+done
+test -n "$LEX" || LEX=""$missing_dir/missing flex""
+
+# Extract the first word of "flex", so it can be a program name with args.
+set dummy flex; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1357: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$LEX"; then
+ ac_cv_prog_LEX="$LEX" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_LEX="flex"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
+fi
+fi
+LEX="$ac_cv_prog_LEX"
+if test -n "$LEX"; then
+ echo "$ac_t""$LEX" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$LEXLIB"
+then
+ case "$LEX" in
+ flex*) ac_lib=fl ;;
+ *) ac_lib=l ;;
+ esac
+ echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
+echo "configure:1391: checking for yywrap in -l$ac_lib" >&5
+ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-l$ac_lib $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1399 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char yywrap();
+
+int main() {
+yywrap()
+; return 0; }
+EOF
+if { (eval echo configure:1410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ LEXLIB="-l$ac_lib"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+echo $ac_n "checking lex output file root""... $ac_c" 1>&6
+echo "configure:1433: checking lex output file root" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # The minimal lex program is just a single line: %%. But some broken lexes
+# (Solaris, I think it was) want two %% lines, so accommodate them.
+echo '%%
+%%' | $LEX
+if test -f lex.yy.c; then
+ ac_cv_prog_lex_root=lex.yy
+elif test -f lexyy.c; then
+ ac_cv_prog_lex_root=lexyy
+else
+ { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
+LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+
+echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
+echo "configure:1454: checking whether yytext is a pointer" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # POSIX says lex can declare yytext either as a pointer or an array; the
+# default is implementation-dependent. Figure out which it is, since
+# not all implementations provide the %pointer and %array declarations.
+ac_cv_prog_lex_yytext_pointer=no
+echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
+ac_save_LIBS="$LIBS"
+LIBS="$LIBS $LEXLIB"
+cat > conftest.$ac_ext <<EOF
+#line 1466 "configure"
+#include "confdefs.h"
+`cat $LEX_OUTPUT_ROOT.c`
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_prog_lex_yytext_pointer=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+rm -f "${LEX_OUTPUT_ROOT}.c"
+
+fi
+
+echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
+if test $ac_cv_prog_lex_yytext_pointer = yes; then
+ cat >> confdefs.h <<\EOF
+#define YYTEXT_POINTER 1
+EOF
+
+fi
+
+for ac_prog in 'bison -y' byacc
+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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1499: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$YACC"; then
+ ac_cv_prog_YACC="$YACC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_YACC="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+YACC="$ac_cv_prog_YACC"
+if test -n "$YACC"; then
+ echo "$ac_t""$YACC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
+
+
+# Check whether --enable-static or --disable-static was given.
+if test "${enable_static+set}" = set; then
+ enableval="$enable_static"
+ p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_static=yes ;;
+no) enable_static=no ;;
+*)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+else
+ enable_static=no
+fi
+
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+ enableval="$enable_shared"
+ p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_shared=yes ;;
+no) enable_shared=no ;;
+*)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+else
+ enable_shared=yes
+fi
+
+# Check whether --enable-fast-install or --disable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+ enableval="$enable_fast_install"
+ p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_fast_install=yes ;;
+no) enable_fast_install=no ;;
+*)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+else
+ enable_fast_install=yes
+fi
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:1606: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:1627: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+ case $nonopt in
+ NONE) build_alias=$host_alias ;;
+ *) build_alias=$nonopt ;;
+ esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+# Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1647: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+ withval="$with_gnu_ld"
+ test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$ac_cv_prog_gcc" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
+echo "configure:1686: checking for ld used by GCC" >&5
+ ac_prog=`($CC -print-prog-name=ld) 2>&5`
+ case "$ac_prog" in
+ # Accept absolute paths.
+ [\\/]* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
+echo "configure:1710: checking for GNU ld" >&5
+else
+ echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
+echo "configure:1713: checking for non-GNU ld" >&5
+fi
+if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ ac_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ ac_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$ac_cv_path_LD"
+if test -n "$LD"; then
+ echo "$ac_t""$LD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
+echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
+echo "configure:1748: checking if the linker ($LD) is GNU ld" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ ac_cv_prog_gnu_ld=yes
+else
+ ac_cv_prog_gnu_ld=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
+
+
+echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
+echo "configure:1764: checking for BSD-compatible nm" >&5
+if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$NM"; then
+ # Let the user override the test.
+ ac_cv_path_NM="$NM"
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -B"
+ break
+ elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -p"
+ break
+ else
+ ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+fi
+fi
+
+NM="$ac_cv_path_NM"
+echo "$ac_t""$NM" 1>&6
+
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:1800: checking whether ln -s works" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+ rm -f conftestdata
+ ac_cv_prog_LN_S="ln -s"
+else
+ ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
+
+# Check for any special flags to pass to ltconfig.
+#
+# the following will cause an existing older ltconfig to fail, so
+# we ignore this at the expense of the cache file... Checking this
+# will just take longer ... bummer!
+#libtool_flags="--cache-file=$cache_file"
+#
+test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
+test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
+test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
+test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+ enableval="$enable_libtool_lock"
+ :
+fi
+
+test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
+test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case "$lt_target" in
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line 1854 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ case "`/usr/bin/file conftest.o`" in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
+echo "configure:1876: checking whether the C compiler needs -belf" >&5
+if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1881 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ lt_cv_cc_needs_belf=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ lt_cv_cc_needs_belf=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+
+
+esac
+
+
+# Save cache, so that ltconfig can load it
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+
+# Actually configure libtool. ac_aux_dir is where install-sh is found.
+CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
+DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
+|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+
+# Reload cache, that may have been modified by ltconfig
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+# Redirect the config.log output again, so that the ltconfig log is not
+# clobbered by the next message.
+exec 5>>./config.log
+
+
+ALL_LINGUAS="de"
+echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
+echo "configure:1992: checking for POSIXized ISC" >&5
+if test -d /etc/conf/kconfig.d &&
+ grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
+then
+ echo "$ac_t""yes" 1>&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 "$ac_t""no" 1>&6
+ ISC=
+fi
+
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:2013: checking for ANSI C header files" >&5
+if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2018 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ ac_cv_header_stdc=yes
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 2043 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+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 <<EOF
+#line 2061 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+ :
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2082 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:2093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+ cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:2117: checking for working const" >&5
+if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2122 "configure"
+#include "confdefs.h"
+
+int main() {
+
+/* 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;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:2171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_const=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_c_const=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+ cat >> confdefs.h <<\EOF
+#define const
+EOF
+
+fi
+
+echo $ac_n "checking for inline""... $ac_c" 1>&6
+echo "configure:2192: checking for inline" >&5
+if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat > conftest.$ac_ext <<EOF
+#line 2199 "configure"
+#include "confdefs.h"
+
+int main() {
+} $ac_kw foo() {
+; return 0; }
+EOF
+if { (eval echo configure:2206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_inline=$ac_kw; break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+
+fi
+
+echo "$ac_t""$ac_cv_c_inline" 1>&6
+case "$ac_cv_c_inline" in
+ inline | yes) ;;
+ no) cat >> confdefs.h <<\EOF
+#define inline
+EOF
+ ;;
+ *) cat >> confdefs.h <<EOF
+#define inline $ac_cv_c_inline
+EOF
+ ;;
+esac
+
+echo $ac_n "checking for off_t""... $ac_c" 1>&6
+echo "configure:2232: checking for off_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2237 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_off_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_off_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_off_t" 1>&6
+if test $ac_cv_type_off_t = no; then
+ cat >> confdefs.h <<\EOF
+#define off_t long
+EOF
+
+fi
+
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:2265: checking for size_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2270 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_size_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_size_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
+if test $ac_cv_type_size_t = no; then
+ cat >> confdefs.h <<\EOF
+#define size_t unsigned
+EOF
+
+fi
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments. Useless!
+echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
+echo "configure:2300: checking for working alloca.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2305 "configure"
+#include "confdefs.h"
+#include <alloca.h>
+int main() {
+char *p = alloca(2 * sizeof(int));
+; return 0; }
+EOF
+if { (eval echo configure:2312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_header_alloca_h=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_alloca_h=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
+if test $ac_cv_header_alloca_h = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA_H 1
+EOF
+
+fi
+
+echo $ac_n "checking for alloca""... $ac_c" 1>&6
+echo "configure:2333: checking for alloca" >&5
+if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2338 "configure"
+#include "confdefs.h"
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# if HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int main() {
+char *p = (char *) alloca(1);
+; return 0; }
+EOF
+if { (eval echo configure:2366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_func_alloca_works=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_func_alloca_works=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
+if test $ac_cv_func_alloca_works = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA 1
+EOF
+
+fi
+
+if test $ac_cv_func_alloca_works = no; then
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+ # that cause trouble. Some versions do not even contain alloca or
+ # contain a buggy version. If you still want to use their alloca,
+ # use ar to extract alloca.o from them instead of compiling alloca.c.
+ ALLOCA=alloca.${ac_objext}
+ cat >> confdefs.h <<\EOF
+#define C_ALLOCA 1
+EOF
+
+
+echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
+echo "configure:2398: checking whether alloca needs Cray hooks" >&5
+if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2403 "configure"
+#include "confdefs.h"
+#if defined(CRAY) && ! defined(CRAY2)
+webecray
+#else
+wenotbecray
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "webecray" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_os_cray=yes
+else
+ rm -rf conftest*
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_os_cray" 1>&6
+if test $ac_cv_os_cray = yes; then
+for ac_func in _getb67 GETB67 getb67; do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2428: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2433 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<EOF
+#define CRAY_STACKSEG_END $ac_func
+EOF
+
+ break
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+done
+fi
+
+echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
+echo "configure:2483: checking stack direction for C alloca" >&5
+if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_c_stack_direction=0
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2491 "configure"
+#include "confdefs.h"
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+main ()
+{
+ exit (find_stack_direction() < 0);
+}
+EOF
+if { (eval echo configure:2510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_c_stack_direction=1
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_c_stack_direction=-1
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
+cat >> confdefs.h <<EOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+EOF
+
+fi
+
+for ac_hdr in unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2535: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2540 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in getpagesize
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2574: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2579 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:2627: checking for working mmap" >&5
+if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_mmap_fixed_mapped=no
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2635 "configure"
+#include "confdefs.h"
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+ Here is a matrix of mmap possibilities:
+ mmap private not fixed
+ mmap private fixed at somewhere currently unmapped
+ mmap private fixed at somewhere already mapped
+ mmap shared not fixed
+ mmap shared fixed at somewhere currently unmapped
+ mmap shared fixed at somewhere already mapped
+ For private mappings, we should verify that changes cannot be read()
+ back from the file, nor mmap's back from the file at a different
+ address. (There have been systems where private was not correctly
+ implemented like the infamous i386 svr4.0, and systems where the
+ VM page cache was not coherent with the filesystem buffer cache
+ like early versions of FreeBSD and possibly contemporary NetBSD.)
+ For shared mappings, we should conversely verify that changes get
+ propogated back to all the places they're supposed to be.
+
+ Grep wants private fixed already mapped.
+ The main things grep needs to know about mmap are:
+ * does it exist and is it safe to write into the mmap'd area
+ * how to use it (BSD variants) */
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+/* This mess was copied from the GNU getpagesize.h. */
+#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
+
+/* Assume that all systems that can run configure have sys/param.h. */
+# ifndef HAVE_SYS_PARAM_H
+# define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+# define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+# ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define getpagesize() EXEC_PAGESIZE
+# else /* no EXEC_PAGESIZE */
+# ifdef NBPG
+# define getpagesize() NBPG * CLSIZE
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif /* no CLSIZE */
+# else /* no NBPG */
+# ifdef NBPC
+# define getpagesize() NBPC
+# else /* no NBPC */
+# ifdef PAGESIZE
+# define getpagesize() PAGESIZE
+# endif /* PAGESIZE */
+# endif /* no NBPC */
+# endif /* no NBPG */
+# endif /* no EXEC_PAGESIZE */
+# else /* no HAVE_SYS_PARAM_H */
+# define getpagesize() 8192 /* punt totally */
+# endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+#ifdef __cplusplus
+extern "C" { void *malloc(unsigned); }
+#else
+char *malloc();
+#endif
+
+int
+main()
+{
+ char *data, *data2, *data3;
+ int i, pagesize;
+ int fd;
+
+ pagesize = getpagesize();
+
+ /*
+ * First, make a file with some known garbage in it.
+ */
+ data = malloc(pagesize);
+ if (!data)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand();
+ umask(0);
+ fd = creat("conftestmmap", 0600);
+ if (fd < 0)
+ exit(1);
+ if (write(fd, data, pagesize) != pagesize)
+ exit(1);
+ close(fd);
+
+ /*
+ * Next, try to mmap the file at a fixed address which
+ * already has something else allocated at it. If we can,
+ * also make sure that we see the same garbage.
+ */
+ fd = open("conftestmmap", O_RDWR);
+ if (fd < 0)
+ exit(1);
+ data2 = malloc(2 * pagesize);
+ if (!data2)
+ exit(1);
+ data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+ if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ exit(1);
+
+ /*
+ * Finally, make sure that changes to the mapped area
+ * do not percolate back to the file as seen by read().
+ * (This is a bug on some variants of i386 svr4.0.)
+ */
+ for (i = 0; i < pagesize; ++i)
+ *(data2 + i) = *(data2 + i) + 1;
+ data3 = malloc(pagesize);
+ if (!data3)
+ exit(1);
+ if (read(fd, data3, pagesize) != pagesize)
+ exit(1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ exit(1);
+ close(fd);
+ unlink("conftestmmap");
+ exit(0);
+}
+
+EOF
+if { (eval echo configure:2775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_func_mmap_fixed_mapped=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+fi
+
+
+ for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
+unistd.h sys/param.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2803: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2808 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
+strdup __argz_count __argz_stringify __argz_next
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2843: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2848 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+ if test "${ac_cv_func_stpcpy+set}" != "set"; then
+ for ac_func in stpcpy
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2900: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2905 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ fi
+ if test "${ac_cv_func_stpcpy}" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STPCPY 1
+EOF
+
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+ echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
+echo "configure:2962: checking for LC_MESSAGES" >&5
+if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2967 "configure"
+#include "confdefs.h"
+#include <locale.h>
+int main() {
+return LC_MESSAGES
+; return 0; }
+EOF
+if { (eval echo configure:2974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ am_cv_val_LC_MESSAGES=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_val_LC_MESSAGES=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LC_MESSAGES 1
+EOF
+
+ fi
+ fi
+ echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
+echo "configure:2995: checking whether NLS is requested" >&5
+ # Check whether --enable-nls or --disable-nls was given.
+if test "${enable_nls+set}" = set; then
+ enableval="$enable_nls"
+ USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi
+
+ echo "$ac_t""$USE_NLS" 1>&6
+
+
+ USE_INCLUDED_LIBINTL=no
+
+ if test "$USE_NLS" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define ENABLE_NLS 1
+EOF
+
+ echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
+echo "configure:3015: checking whether included gettext is requested" >&5
+ # Check whether --with-included-gettext or --without-included-gettext was given.
+if test "${with_included_gettext+set}" = set; then
+ withval="$with_included_gettext"
+ nls_cv_force_use_gnu_gettext=$withval
+else
+ nls_cv_force_use_gnu_gettext=no
+fi
+
+ echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+ CATOBJEXT=NONE
+
+ ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
+echo "configure:3034: checking for libintl.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3039 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
+echo "configure:3061: checking for gettext in libc" >&5
+if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3066 "configure"
+#include "confdefs.h"
+#include <libintl.h>
+int main() {
+return (int) gettext ("")
+; return 0; }
+EOF
+if { (eval echo configure:3073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ gt_cv_func_gettext_libc=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gt_cv_func_gettext_libc=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
+
+ if test "$gt_cv_func_gettext_libc" != "yes"; then
+ echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
+echo "configure:3089: checking for bindtextdomain in -lintl" >&5
+ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lintl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3097 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char bindtextdomain();
+
+int main() {
+bindtextdomain()
+; return 0; }
+EOF
+if { (eval echo configure:3108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
+echo "configure:3124: checking for gettext in libintl" >&5
+if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
+echo "configure:3129: checking for gettext in -lintl" >&5
+ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lintl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3137 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gettext();
+
+int main() {
+gettext()
+; return 0; }
+EOF
+if { (eval echo configure:3148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ gt_cv_func_gettext_libintl=yes
+else
+ echo "$ac_t""no" 1>&6
+gt_cv_func_gettext_libintl=no
+fi
+
+fi
+
+echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ if test "$gt_cv_func_gettext_libc" = "yes" \
+ || test "$gt_cv_func_gettext_libintl" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_GETTEXT 1
+EOF
+
+ # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3187: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ if test "$MSGFMT" != "no"; then
+ for ac_func in dcgettext
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3221: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3226 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3276: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ # Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3312: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ cat > conftest.$ac_ext <<EOF
+#line 3344 "configure"
+#include "confdefs.h"
+
+int main() {
+extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr
+; return 0; }
+EOF
+if { (eval echo configure:3352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ CATOBJEXT=.gmo
+ DATADIRNAME=share
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+fi
+rm -f conftest*
+ INSTOBJEXT=.mo
+ fi
+ fi
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+ if test "$CATOBJEXT" = "NONE"; then
+ echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
+echo "configure:3375: checking whether catgets can be used" >&5
+ # Check whether --with-catgets or --without-catgets was given.
+if test "${with_catgets+set}" = set; then
+ withval="$with_catgets"
+ nls_cv_use_catgets=$withval
+else
+ nls_cv_use_catgets=no
+fi
+
+ echo "$ac_t""$nls_cv_use_catgets" 1>&6
+
+ if test "$nls_cv_use_catgets" = "yes"; then
+ echo $ac_n "checking for main in -li""... $ac_c" 1>&6
+echo "configure:3388: checking for main in -li" >&5
+ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-li $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3396 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:3403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-li $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ echo $ac_n "checking for catgets""... $ac_c" 1>&6
+echo "configure:3431: checking for catgets" >&5
+if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3436 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char catgets(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char catgets();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_catgets) || defined (__stub___catgets)
+choke me
+#else
+catgets();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_catgets=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_catgets=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE_CATGETS 1
+EOF
+
+ INTLOBJS="\$(CATOBJS)"
+ # Extract the first word of "gencat", so it can be a program name with args.
+set dummy gencat; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3481: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GENCAT" in
+ /*)
+ ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GENCAT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no"
+ ;;
+esac
+fi
+GENCAT="$ac_cv_path_GENCAT"
+if test -n "$GENCAT"; then
+ echo "$ac_t""$GENCAT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ if test "$GENCAT" != "no"; then
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3517: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test "$GMSGFMT" = "no"; then
+ # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3554: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+ # Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3589: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.cat
+ INSTOBJEXT=.cat
+ DATADIRNAME=lib
+ INTLDEPS='$(top_builddir)/intl/libintl.a'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+ fi
+
+ if test "$CATOBJEXT" = "NONE"; then
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ INTLOBJS="\$(GETTOBJS)"
+ # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3647: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+ echo "$ac_t""$MSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3681: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GMSGFMT" in
+ /*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+ echo "$ac_t""$GMSGFMT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ # Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3717: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+ echo "$ac_t""$XGETTEXT" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.gmo
+ INSTOBJEXT=.mo
+ DATADIRNAME=share
+ INTLDEPS='$(top_builddir)/intl/libintl.a'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi
+
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
+ XGETTEXT=":"
+ fi
+ fi
+
+ # We need to process the po/ directory.
+ POSUB=po
+ else
+ DATADIRNAME=share
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi
+
+
+
+
+ # If this is used in GNU gettext we have to set USE_NLS to `yes'
+ # because some of the sources are only built for this goal.
+ if test "$PACKAGE" = gettext; then
+ USE_NLS=yes
+ USE_INCLUDED_LIBINTL=yes
+ fi
+
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
+echo "configure:3810: checking for catalogs to be installed" >&5
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ echo "$ac_t""$LINGUAS" 1>&6
+ fi
+
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+ INCLUDE_LOCALE_H="#include <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. Take care yourself. */"
+ fi
+
+
+ test -d intl || mkdir intl
+ if test "$CATOBJEXT" = ".cat"; then
+ ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
+echo "configure:3838: checking for linux/version.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3843 "configure"
+#include "confdefs.h"
+#include <linux/version.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ msgformat=linux
+else
+ echo "$ac_t""no" 1>&6
+msgformat=xopen
+fi
+
+
+ sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
+ fi
+ sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
+ $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
+
+ if test "$PACKAGE" = "gettext"; then
+ GT_NO="#NO#"
+ GT_YES=
+ else
+ GT_NO=
+ GT_YES="#YES#"
+ fi
+
+
+
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+
+
+ l=
+
+
+ test -d po || mkdir po
+ if test "x$srcdir" != "x."; then
+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+ posrcprefix="$srcdir/"
+ else
+ posrcprefix="../$srcdir/"
+ fi
+ else
+ posrcprefix="../"
+ fi
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+
+
+
+# Check whether --enable-debug or --disable-debug was given.
+if test "${enable_debug+set}" = set; then
+ enableval="$enable_debug"
+
+case "$enableval" in
+yes) DEBUG="-DDEBUG -g" ;;
+*)
+ DEBUG="";;
+esac
+else
+ DEBUG=""
+fi
+
+
+ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
+echo "configure:3936: checking how to run the C++ preprocessor" >&5
+if test -z "$CXXCPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+ CXXCPP="${CXX-g++} -E"
+ cat > conftest.$ac_ext <<EOF
+#line 3949 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CXXCPP=/lib/cpp
+fi
+rm -f conftest*
+ ac_cv_prog_CXXCPP="$CXXCPP"
+ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+fi
+fi
+CXXCPP="$ac_cv_prog_CXXCPP"
+echo "$ac_t""$CXXCPP" 1>&6
+
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:3979: checking for ANSI C header files" >&5
+if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3984 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ ac_cv_header_stdc=yes
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 4009 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+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 <<EOF
+#line 4027 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+ :
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4048 "configure"
+#include "confdefs.h"
+#ifdef __cplusplus
+extern "C" void exit(int) throw();
+#endif
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:4062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+ cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+
+
+
+echo $ac_n "checking for X""... $ac_c" 1>&6
+echo "configure:4089: checking for X" >&5
+if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # One or both of the vars are not set, and there is no cached value.
+ac_x_includes=NO ac_x_libraries=NO
+if test "$ac_x_includes" = NO; then
+ # Guess where to find include files, by looking for this one X11 .h file.
+ test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
+
+ # First, try using that file with no special directory specified.
+cat > conftest.$ac_ext <<EOF
+#line 4101 "configure"
+#include "confdefs.h"
+#include <$x_direct_test_include>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ # Look for the header file in a standard set of common directories.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ for ac_dir in \
+ /usr/X11/include \
+ /usr/X11R6/include \
+ /usr/X11R5/include \
+ /usr/X11R4/include \
+ \
+ /usr/include/X11 \
+ /usr/include/X11R6 \
+ /usr/include/X11R5 \
+ /usr/include/X11R4 \
+ \
+ /usr/local/X11/include \
+ /usr/local/X11R6/include \
+ /usr/local/X11R5/include \
+ /usr/local/X11R4/include \
+ \
+ /usr/local/include/X11 \
+ /usr/local/include/X11R6 \
+ /usr/local/include/X11R5 \
+ /usr/local/include/X11R4 \
+ \
+ /usr/X386/include \
+ /usr/x386/include \
+ /usr/XFree86/include/X11 \
+ \
+ /usr/include \
+ /usr/local/include \
+ /usr/unsupported/include \
+ /usr/athena/include \
+ /usr/local/x11r5/include \
+ /usr/lpp/Xamples/include \
+ \
+ /usr/openwin/include \
+ /usr/openwin/share/include \
+ ; \
+ do
+ if test -r "$ac_dir/$x_direct_test_include"; then
+ ac_x_includes=$ac_dir
+ break
+ fi
+ done
+fi
+rm -f conftest*
+fi # $ac_x_includes = NO
+
+if test "$ac_x_libraries" = NO; then
+ # Check for the libraries.
+
+ test -z "$x_direct_test_library" && x_direct_test_library=Xt
+ test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
+
+ # See if we find them without any special options.
+ # Don't add to $LIBS permanently.
+ ac_save_LIBS="$LIBS"
+ LIBS="-l$x_direct_test_library $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4175 "configure"
+#include "confdefs.h"
+
+int main() {
+${x_direct_test_function}()
+; return 0; }
+EOF
+if { (eval echo configure:4182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ LIBS="$ac_save_LIBS"
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ LIBS="$ac_save_LIBS"
+# First see if replacing the include by lib works.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
+ /usr/X11/lib \
+ /usr/X11R6/lib \
+ /usr/X11R5/lib \
+ /usr/X11R4/lib \
+ \
+ /usr/lib/X11 \
+ /usr/lib/X11R6 \
+ /usr/lib/X11R5 \
+ /usr/lib/X11R4 \
+ \
+ /usr/local/X11/lib \
+ /usr/local/X11R6/lib \
+ /usr/local/X11R5/lib \
+ /usr/local/X11R4/lib \
+ \
+ /usr/local/lib/X11 \
+ /usr/local/lib/X11R6 \
+ /usr/local/lib/X11R5 \
+ /usr/local/lib/X11R4 \
+ \
+ /usr/X386/lib \
+ /usr/x386/lib \
+ /usr/XFree86/lib/X11 \
+ \
+ /usr/lib \
+ /usr/local/lib \
+ /usr/unsupported/lib \
+ /usr/athena/lib \
+ /usr/local/x11r5/lib \
+ /usr/lpp/Xamples/lib \
+ /lib/usr/lib/X11 \
+ \
+ /usr/openwin/lib \
+ /usr/openwin/share/lib \
+ ; \
+do
+ for ac_extension in a so sl; do
+ if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
+ ac_x_libraries=$ac_dir
+ break 2
+ fi
+ done
+done
+fi
+rm -f conftest*
+fi # $ac_x_libraries = NO
+
+rm -fr conftestdir
+if mkdir conftestdir; then
+ cd conftestdir
+ # Make sure to not put "make" in the Imakefile rules, since we grep it out.
+ cat > Imakefile <<'EOF'
+acfindx:
+ @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
+EOF
+ if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
+ # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+ eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
+ # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+ for ac_extension in a so sl; do
+ if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
+ test -f $ac_im_libdir/libX11.$ac_extension; then
+ ac_im_usrlibdir=$ac_im_libdir; break
+ fi
+ done
+ # Screen out bogus values from the imake configuration. They are
+ # bogus both because they are the default anyway, and because
+ # using them would break gcc on systems where it needs fixed includes.
+ case "$ac_im_incroot" in
+ /usr/include) ;;
+ *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
+ esac
+ case "$ac_im_usrlibdir" in
+ /usr/lib | /lib) ;;
+ *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
+ esac
+ fi
+ cd ..
+ rm -fr conftestdir
+fi
+
+if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
+ { echo "configure: error: Can't find X. Please add the correct paths. View configure --help for usage!" 1>&2; exit 1; }
+else
+ # Record where we found X for the cache.
+ ac_cv_have_x="have_x=yes \
+ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
+fi
+fi
+eval "$ac_cv_have_x"
+
+if test "$have_x" != yes; then
+ echo "$ac_t""$have_x" 1>&6
+ no_x=yes
+else
+ # If each of the values was on the command line, it overrides each guess.
+ test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+ test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+ # Update the cache value to reflect the command line values.
+ ac_cv_have_x="have_x=yes \
+ ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
+ echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
+fi
+
+if test -z "$x_includes" || test "x$x_includes" = xNONE; then
+ X_INCLUDES=""
+ x_includes="."; else
+ X_INCLUDES="-I$x_includes"
+fi
+
+if test -z "$x_libraries" || test "$x_libraries" = xNONE; then
+ X_LDFLAGS=""
+ x_libraries="/usr/lib"; all_libraries=""
+ else
+ X_LDFLAGS="-L$x_libraries"
+ all_libraries=$X_LDFLAGS
+fi
+
+
+
+all_includes=$X_INCLUDES
+
+# Check whether --with-qt or --without-qt was given.
+if test "${with_qt+set}" = set; then
+ withval="$with_qt"
+
+case "$withval" in
+yes)
+
+
+
+echo $ac_n "checking for QT-1.30""... $ac_c" 1>&6
+echo "configure:4327: checking for QT-1.30" >&5
+ac_qt_includes=NO ac_qt_libraries=NO
+qt_libraries=""
+qt_includes=""
+# Check whether --with-qt-dir or --without-qt-dir was given.
+if test "${with_qt_dir+set}" = set; then
+ withval="$with_qt_dir"
+ ac_qt_includes="$withval"/include
+ ac_qt_libraries="$withval"/lib
+
+fi
+
+
+# Check whether --with-qt-includes or --without-qt-includes was given.
+if test "${with_qt_includes+set}" = set; then
+ withval="$with_qt_includes"
+
+ ac_qt_includes="$withval"
+
+fi
+
+
+# Check whether --with-qt-libraries or --without-qt-libraries was given.
+if test "${with_qt_libraries+set}" = set; then
+ withval="$with_qt_libraries"
+ ac_qt_libraries="$withval"
+
+fi
+
+
+if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
+
+if eval "test \"`echo '$''{'ac_cv_have_qt'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$ac_qt_includes" = NO; then
+cat > conftest.$ac_ext <<EOF
+#line 4364 "configure"
+#include "confdefs.h"
+#include <qtstream.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+
+ac_qt_includes=
+
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+
+fi
+rm -f conftest*
+fi
+
+#try to guess qt locations
+
+qt_incdirs="/usr/lib/qt/include /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt $x_includes $QTINC"
+test -n "$QTDIR" && qt_incdirs="$QTDIR/include $QTDIR $qt_incdirs"
+
+qt_incdir=NO
+for i in $qt_incdirs;
+do
+ for j in qglobal.h;
+ do
+ if test -r "$i/$j"; then
+ qt_incdir=$i
+ break 2
+ fi
+ done
+done
+
+ac_qt_includes=$qt_incdir
+
+qt_libdirs="/usr/lib/qt/lib /usr/local/qt/lib /usr/lib/qt /usr/lib $x_libraries $QTLIB"
+test -n "$QTDIR" && qt_libdirs="$QTDIR/lib $QTDIR $qt_libdirs"
+
+qt_libdir=NO
+for i in $qt_libdirs;
+do
+ for j in libqt.so libqt.so.1.30 libqt.so.1 libqt.a libqt.sl;
+ do
+ if test -r "$i/$j"; then
+ qt_libdir=$i
+ break 2
+ fi
+ done
+done
+
+ac_qt_libraries=$qt_libdir
+
+ac_cxxflags_safe=$CXXFLAGS
+ac_ldflags_safe=$LDFLAGS
+ac_libs_safe=$LIBS
+CXXFLAGS="$CXXFLAGS -I$qt_incdir"
+LDFLAGS="-L$qt_libdir $X_LDFLAGS"
+LIBS="-lqt -lXext -lX11 $LIBSOCKET"
+ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#include <stdio.h>
+#include <qglobal.h>
+#if QT_VERSION < 130
+#error QT_VERSION is too small
+#else
+main()
+{
+ puts(QT_VERSION_STR);
+ return 0;
+}
+#endif
+EOF
+
+if { (eval echo configure:4451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -f conftest*
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_qt_libraries="NO"
+fi
+rm -f conftest*
+CXXFLAGS=$ac_cxxflags_safe
+LDFLAGS=$ac_ldflags_safe
+LIBS=$ac_libs_safe
+
+if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
+ ac_cv_have_qt="have_qt=no"
+ ac_qt_notfound=""
+ if test "$ac_qt_includes" = NO; then
+ if test "$ac_qt_libraries" = NO; then
+ ac_qt_notfound="(headers and libraries)";
+ else
+ ac_qt_notfound="(headers)";
+ fi
+ else
+ ac_qt_notfound="(libraries)";
+ fi
+
+ { echo "configure: error: QT-1.30 $ac_qt_notfound not found. Please check your installation! " 1>&2; exit 1; };
+else
+ have_qt="yes"
+fi
+
+fi
+
+else
+ have_qt="yes"
+fi
+
+eval "$ac_cv_have_qt"
+
+if test "$have_qt" != yes; then
+ echo "$ac_t""$have_qt" 1>&6;
+else
+ ac_cv_have_qt="have_qt=yes \
+ ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
+ echo "$ac_t""libraries $ac_qt_libraries, headers $ac_qt_includes" 1>&6
+
+ qt_libraries=$ac_qt_libraries
+ qt_includes=$ac_qt_includes
+ QT_LIBS="-lqt -lXext -lX11 $LIBSOCKET"
+
+ac_cxxflags_safe=$CXXFLAGS
+ac_ldflags_safe=$LDFLAGS
+ac_libs_safe=$LIBS
+
+ echo $ac_n "checking for qInitPngIo in -lqimgio""... $ac_c" 1>&6
+echo "configure:4505: checking for qInitPngIo in -lqimgio" >&5
+ CXXFLAGS="$CXXFLAGS -I ./ -I $ac_qt_includes"
+ LDFLAGS="-L$ac_qt_libraries $X_LDFLAGS"
+ LIBS="$QT_LIBS -lqimgio -ljpeg -lpng -lXext -lX11 $LIBSOCKET"
+ ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+ cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#include <stdio.h>
+#include <qglobal.h>
+#include <qpngio.h>
+main()
+{
+ qInitPngIO ();
+ return 0;
+}
+EOF
+
+ if { (eval echo configure:4528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -f conftest*
+ cat >> confdefs.h <<\EOF
+#define HAVE_QIMGIO 1
+EOF
+
+ QT_LIBS="$QT_LIBS -lqimgio -ljpeg -lpng"
+ echo "$ac_t""yes" 1>&6
+ else
+ echo "$ac_t""no" 1>&6
+ echo "configure: warning: dldialog will not be able to display png images!" 1>&2
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest*
+ CXXFLAGS=$ac_cxxflags_safe
+ LDFLAGS=$ac_ldflags_safe
+ LIBS=$ac_libs_safe
+
+fi
+
+
+
+if test "$qt_includes" = "$x_includes"; then
+ QT_INCLUDES="";
+else
+ QT_INCLUDES="-I$qt_includes"
+ all_includes="$QT_INCLUDES $all_includes"
+fi
+
+if test "$qt_libraries" = "$x_libraries"; then
+ QT_LDFLAGS=""
+else
+ QT_LDFLAGS="-L$qt_libraries"
+ all_libraries="$QT_LDFLAGS $all_libraries"
+fi
+
+
+
+
+
+# Extract the first word of "moc", so it can be a program name with args.
+set dummy moc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4572: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_MOC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MOC" in
+ /*)
+ ac_cv_path_MOC="$MOC" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_MOC="$MOC" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH:/usr/bin:/usr/X11R6/bin:$QTDIR/bin:/usr/lib/qt/bin:/usr/local/qt/bin"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_MOC="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MOC" && ac_cv_path_MOC="/usr/bin/moc"
+ ;;
+esac
+fi
+MOC="$ac_cv_path_MOC"
+if test -n "$MOC"; then
+ echo "$ac_t""$MOC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+cat >> confdefs.h <<\EOF
+#define HAVE_QT 1
+EOF
+
+
+;;
+no) echo "configure: warning: dldialog will be build without qt support! " 1>&2;;
+*);;
+esac
+else
+
+
+
+
+echo $ac_n "checking for QT-1.30""... $ac_c" 1>&6
+echo "configure:4621: checking for QT-1.30" >&5
+ac_qt_includes=NO ac_qt_libraries=NO
+qt_libraries=""
+qt_includes=""
+# Check whether --with-qt-dir or --without-qt-dir was given.
+if test "${with_qt_dir+set}" = set; then
+ withval="$with_qt_dir"
+ ac_qt_includes="$withval"/include
+ ac_qt_libraries="$withval"/lib
+
+fi
+
+
+# Check whether --with-qt-includes or --without-qt-includes was given.
+if test "${with_qt_includes+set}" = set; then
+ withval="$with_qt_includes"
+
+ ac_qt_includes="$withval"
+
+fi
+
+
+# Check whether --with-qt-libraries or --without-qt-libraries was given.
+if test "${with_qt_libraries+set}" = set; then
+ withval="$with_qt_libraries"
+ ac_qt_libraries="$withval"
+
+fi
+
+
+if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
+
+if eval "test \"`echo '$''{'ac_cv_have_qt'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$ac_qt_includes" = NO; then
+cat > conftest.$ac_ext <<EOF
+#line 4658 "configure"
+#include "confdefs.h"
+#include <qtstream.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+
+ac_qt_includes=
+
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+
+fi
+rm -f conftest*
+fi
+
+#try to guess qt locations
+
+qt_incdirs="/usr/lib/qt/include /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt $x_includes $QTINC"
+test -n "$QTDIR" && qt_incdirs="$QTDIR/include $QTDIR $qt_incdirs"
+
+qt_incdir=NO
+for i in $qt_incdirs;
+do
+ for j in qglobal.h;
+ do
+ if test -r "$i/$j"; then
+ qt_incdir=$i
+ break 2
+ fi
+ done
+done
+
+ac_qt_includes=$qt_incdir
+
+qt_libdirs="/usr/lib/qt/lib /usr/local/qt/lib /usr/lib/qt /usr/lib $x_libraries $QTLIB"
+test -n "$QTDIR" && qt_libdirs="$QTDIR/lib $QTDIR $qt_libdirs"
+
+qt_libdir=NO
+for i in $qt_libdirs;
+do
+ for j in libqt.so libqt.so.1.30 libqt.so.1 libqt.a libqt.sl;
+ do
+ if test -r "$i/$j"; then
+ qt_libdir=$i
+ break 2
+ fi
+ done
+done
+
+ac_qt_libraries=$qt_libdir
+
+ac_cxxflags_safe=$CXXFLAGS
+ac_ldflags_safe=$LDFLAGS
+ac_libs_safe=$LIBS
+CXXFLAGS="$CXXFLAGS -I$qt_incdir"
+LDFLAGS="-L$qt_libdir $X_LDFLAGS"
+LIBS="-lqt -lXext -lX11 $LIBSOCKET"
+ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#include <stdio.h>
+#include <qglobal.h>
+#if QT_VERSION < 130
+#error QT_VERSION is too small
+#else
+main()
+{
+ puts(QT_VERSION_STR);
+ return 0;
+}
+#endif
+EOF
+
+if { (eval echo configure:4745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -f conftest*
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_qt_libraries="NO"
+fi
+rm -f conftest*
+CXXFLAGS=$ac_cxxflags_safe
+LDFLAGS=$ac_ldflags_safe
+LIBS=$ac_libs_safe
+
+if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
+ ac_cv_have_qt="have_qt=no"
+ ac_qt_notfound=""
+ if test "$ac_qt_includes" = NO; then
+ if test "$ac_qt_libraries" = NO; then
+ ac_qt_notfound="(headers and libraries)";
+ else
+ ac_qt_notfound="(headers)";
+ fi
+ else
+ ac_qt_notfound="(libraries)";
+ fi
+
+ { echo "configure: error: QT-1.30 $ac_qt_notfound not found. Please check your installation! " 1>&2; exit 1; };
+else
+ have_qt="yes"
+fi
+
+fi
+
+else
+ have_qt="yes"
+fi
+
+eval "$ac_cv_have_qt"
+
+if test "$have_qt" != yes; then
+ echo "$ac_t""$have_qt" 1>&6;
+else
+ ac_cv_have_qt="have_qt=yes \
+ ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
+ echo "$ac_t""libraries $ac_qt_libraries, headers $ac_qt_includes" 1>&6
+
+ qt_libraries=$ac_qt_libraries
+ qt_includes=$ac_qt_includes
+ QT_LIBS="-lqt -lXext -lX11 $LIBSOCKET"
+
+ac_cxxflags_safe=$CXXFLAGS
+ac_ldflags_safe=$LDFLAGS
+ac_libs_safe=$LIBS
+
+ echo $ac_n "checking for qInitPngIo in -lqimgio""... $ac_c" 1>&6
+echo "configure:4799: checking for qInitPngIo in -lqimgio" >&5
+ CXXFLAGS="$CXXFLAGS -I ./ -I $ac_qt_includes"
+ LDFLAGS="-L$ac_qt_libraries $X_LDFLAGS"
+ LIBS="$QT_LIBS -lqimgio -ljpeg -lpng -lXext -lX11 $LIBSOCKET"
+ ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+ cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#include <stdio.h>
+#include <qglobal.h>
+#include <qpngio.h>
+main()
+{
+ qInitPngIO ();
+ return 0;
+}
+EOF
+
+ if { (eval echo configure:4822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -f conftest*
+ cat >> confdefs.h <<\EOF
+#define HAVE_QIMGIO 1
+EOF
+
+ QT_LIBS="$QT_LIBS -lqimgio -ljpeg -lpng"
+ echo "$ac_t""yes" 1>&6
+ else
+ echo "$ac_t""no" 1>&6
+ echo "configure: warning: dldialog will not be able to display png images!" 1>&2
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest*
+ CXXFLAGS=$ac_cxxflags_safe
+ LDFLAGS=$ac_ldflags_safe
+ LIBS=$ac_libs_safe
+
+fi
+
+
+
+if test "$qt_includes" = "$x_includes"; then
+ QT_INCLUDES="";
+else
+ QT_INCLUDES="-I$qt_includes"
+ all_includes="$QT_INCLUDES $all_includes"
+fi
+
+if test "$qt_libraries" = "$x_libraries"; then
+ QT_LDFLAGS=""
+else
+ QT_LDFLAGS="-L$qt_libraries"
+ all_libraries="$QT_LDFLAGS $all_libraries"
+fi
+
+
+
+
+
+# Extract the first word of "moc", so it can be a program name with args.
+set dummy moc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4866: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_MOC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$MOC" in
+ /*)
+ ac_cv_path_MOC="$MOC" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_MOC="$MOC" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH:/usr/bin:/usr/X11R6/bin:$QTDIR/bin:/usr/lib/qt/bin:/usr/local/qt/bin"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_MOC="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MOC" && ac_cv_path_MOC="/usr/bin/moc"
+ ;;
+esac
+fi
+MOC="$ac_cv_path_MOC"
+if test -n "$MOC"; then
+ echo "$ac_t""$MOC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+cat >> confdefs.h <<\EOF
+#define HAVE_QT 1
+EOF
+
+
+
+fi
+
+
+
+if test "$with_qt" != "no"; then
+ BUILDQT_TRUE=
+ BUILDQT_FALSE='#'
+else
+ BUILDQT_TRUE='#'
+ BUILDQT_FALSE=
+fi
+
+# Check whether --with-tv or --without-tv was given.
+if test "${with_tv+set}" = set; then
+ withval="$with_tv"
+
+case "$withval" in
+yes)
+ac_tv_libs="-ltvision"
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
+echo "configure:4934: checking for initscr in -lncurses" >&5
+ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lncurses $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4942 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char initscr();
+
+int main() {
+initscr()
+; return 0; }
+EOF
+if { (eval echo configure:4953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tv_libs="$ac_tv_libs -lncurses"
+else
+ echo "$ac_t""no" 1>&6
+{ echo "configure: error: "ncurses library not found!"" 1>&2; exit 1; }
+fi
+
+
+echo $ac_n "checking for Gpm_Close in -lgpm""... $ac_c" 1>&6
+echo "configure:4976: checking for Gpm_Close in -lgpm" >&5
+ac_lib_var=`echo gpm'_'Gpm_Close | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lgpm -lncurses $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4984 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char Gpm_Close();
+
+int main() {
+Gpm_Close()
+; return 0; }
+EOF
+if { (eval echo configure:4995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tv_libs="$ac_tv_libs -lgpm"
+else
+ echo "$ac_t""no" 1>&6
+{ echo "configure: error: "gpm library not found!"" 1>&2; exit 1; }
+fi
+
+
+echo $ac_n "checking for tvision library""... $ac_c" 1>&6
+echo "configure:5018: checking for tvision library" >&5
+ac_tv_includes=NO
+ac_tv_libraries=NO
+tv_libraries=""
+tv_includes=""
+
+# Check whether --with-tvision-dir or --without-tvision-dir was given.
+if test "${with_tvision_dir+set}" = set; then
+ withval="$with_tvision_dir"
+ ac_tv_includes="$withval"/include
+ ac_tv_libraries="$withval"/lib
+
+fi
+
+
+# Check whether --with-tv-includes or --without-tv-includes was given.
+if test "${with_tv_includes+set}" = set; then
+ withval="$with_tv_includes"
+
+ ac_tv_includes="$withval"
+
+fi
+
+
+# Check whether --with-tv-libraries or --without-tv-libraries was given.
+if test "${with_tv_libraries+set}" = set; then
+ withval="$with_tv_libraries"
+ ac_tv_libraries="$withval"
+
+fi
+
+
+if test "$ac_tv_includes" = NO || test "$ac_tv_libraries" = NO; then
+
+if eval "test \"`echo '$''{'ac_cv_have_tv'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$ac_tv_includes" = NO; then
+cat > conftest.$ac_ext <<EOF
+#line 5057 "configure"
+#include "confdefs.h"
+#include <tvision/tvconfig.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+
+ac_qt_includes=
+
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+
+fi
+rm -f conftest*
+fi
+
+#try to guess tv locations
+
+tv_incdirs="/usr/lib/tvision/include /usr/local/lib/tvision/include /usr/include/tvision /usr/local/include /usr/include"
+
+tv_incdir=NO
+for i in $tv_incdirs;
+do
+ for j in tvision/tv.h;
+ do
+ if test -r "$i/$j"; then
+ tv_incdir=$i
+ break 2
+ fi
+ done
+done
+
+ac_tv_includes=$tv_incdir
+
+tv_libdirs="/usr/lib/tvision/lib /usr/local/tvision/lib /usr/lib/tvision /usr/local/lib /usr/lib "
+
+tv_libdir=NO
+for i in $tv_libdirs;
+do
+ for j in libtvision.so libtvision.a libtvision.sl;
+ do
+ if test -r "$i/$j"; then
+ tv_libdir=$i
+ break 2
+ fi
+ done
+done
+
+ac_tv_libraries=$tv_libdir
+
+ac_cxxflags_safe=$CXXFLAGS
+ac_ldflags_safe=$LDFLAGS
+ac_libs_safe=$LIBS
+CXXFLAGS="$CXXFLAGS -I$tv_incdir"
+LDFLAGS="-L$tv_libdir $X_LDFLAGS"
+LIBS="$ac_tv_libs"
+
+ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#define Uses_TApplication
+#include <tvision/tvconfig.h>
+#include <tvision/tv.h>
+
+class TMyApp : public TApplication
+{
+
+public:
+TMyApp();
+
+};
+
+TMyApp::TMyApp() :
+TProgInit( &TMyApp::initStatusLine,
+&TMyApp::initMenuBar,
+&TMyApp::initDeskTop
+)
+{
+}
+
+int main()
+{
+TMyApp myApp;
+myApp.run();
+return 0;
+}
+EOF
+
+if { (eval echo configure:5158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -f conftest*
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_tv_libraries="NO"
+fi
+rm -f conftest*
+CXXFLAGS=$ac_cxxflags_safe
+LDFLAGS=$ac_ldflags_safe
+LIBS=$ac_libs_safe
+
+if test "$ac_tv_includes" = NO || test "$ac_tv_libraries" = NO; then
+ ac_cv_have_tv="have_tv=no"
+ ac_tv_notfound=""
+ if test "$ac_tv_includes" = NO; then
+ if test "$ac_tv_libraries" = NO; then
+ ac_tv_notfound="(headers and libraries)";
+ else
+ ac_tv_notfound="(headers)";
+ fi
+ else
+ ac_tv_notfound="(libraries)";
+ fi
+
+ { echo "configure: error: TVISION $ac_tv_notfound not found. Please check your installation! " 1>&2; exit 1; };
+else
+ have_tv="yes"
+fi
+
+fi
+
+else
+ have_tv="yes"
+fi
+
+eval "$ac_cv_have_tv"
+
+if test "$have_tv" != yes; then
+ echo "$ac_t""$have_tv" 1>&6;
+else
+ ac_cv_have_tv="have_tv=yes \
+ ac_tv_includes=$ac_tv_includes ac_tv_libraries=$ac_tv_libraries"
+ echo "$ac_t""libraries $ac_tv_libraries, headers $ac_tv_includes" 1>&6
+
+ tv_libraries=$ac_tv_libraries
+ tv_includes=$ac_tv_includes
+fi
+
+
+
+
+TV_INCLUDES="-I$tv_includes"
+all_includes="$TV_INCLUDES $all_includes"
+
+TV_LDFLAGS="-L$tv_libraries"
+TV_LIBS="$ac_tv_libs"
+
+
+
+
+
+cat >> confdefs.h <<\EOF
+#define HAVE_TVISION 1
+EOF
+
+;;
+no) echo "configure: warning: dldialog will be build without tvision support! " 1>&2;;
+*);;
+esac
+else
+
+ac_tv_libs="-ltvision"
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
+echo "configure:5240: checking for initscr in -lncurses" >&5
+ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lncurses $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 5248 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char initscr();
+
+int main() {
+initscr()
+; return 0; }
+EOF
+if { (eval echo configure:5259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tv_libs="$ac_tv_libs -lncurses"
+else
+ echo "$ac_t""no" 1>&6
+{ echo "configure: error: "ncurses library not found!"" 1>&2; exit 1; }
+fi
+
+
+echo $ac_n "checking for Gpm_Close in -lgpm""... $ac_c" 1>&6
+echo "configure:5282: checking for Gpm_Close in -lgpm" >&5
+ac_lib_var=`echo gpm'_'Gpm_Close | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lgpm -lncurses $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 5290 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char Gpm_Close();
+
+int main() {
+Gpm_Close()
+; return 0; }
+EOF
+if { (eval echo configure:5301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tv_libs="$ac_tv_libs -lgpm"
+else
+ echo "$ac_t""no" 1>&6
+{ echo "configure: error: "gpm library not found!"" 1>&2; exit 1; }
+fi
+
+
+echo $ac_n "checking for tvision library""... $ac_c" 1>&6
+echo "configure:5324: checking for tvision library" >&5
+ac_tv_includes=NO
+ac_tv_libraries=NO
+tv_libraries=""
+tv_includes=""
+
+# Check whether --with-tvision-dir or --without-tvision-dir was given.
+if test "${with_tvision_dir+set}" = set; then
+ withval="$with_tvision_dir"
+ ac_tv_includes="$withval"/include
+ ac_tv_libraries="$withval"/lib
+
+fi
+
+
+# Check whether --with-tv-includes or --without-tv-includes was given.
+if test "${with_tv_includes+set}" = set; then
+ withval="$with_tv_includes"
+
+ ac_tv_includes="$withval"
+
+fi
+
+
+# Check whether --with-tv-libraries or --without-tv-libraries was given.
+if test "${with_tv_libraries+set}" = set; then
+ withval="$with_tv_libraries"
+ ac_tv_libraries="$withval"
+
+fi
+
+
+if test "$ac_tv_includes" = NO || test "$ac_tv_libraries" = NO; then
+
+if eval "test \"`echo '$''{'ac_cv_have_tv'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$ac_tv_includes" = NO; then
+cat > conftest.$ac_ext <<EOF
+#line 5363 "configure"
+#include "confdefs.h"
+#include <tvision/tvconfig.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+
+ac_qt_includes=
+
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+
+fi
+rm -f conftest*
+fi
+
+#try to guess tv locations
+
+tv_incdirs="/usr/lib/tvision/include /usr/local/lib/tvision/include /usr/include/tvision /usr/local/include /usr/include"
+
+tv_incdir=NO
+for i in $tv_incdirs;
+do
+ for j in tvision/tv.h;
+ do
+ if test -r "$i/$j"; then
+ tv_incdir=$i
+ break 2
+ fi
+ done
+done
+
+ac_tv_includes=$tv_incdir
+
+tv_libdirs="/usr/lib/tvision/lib /usr/local/tvision/lib /usr/lib/tvision /usr/local/lib /usr/lib "
+
+tv_libdir=NO
+for i in $tv_libdirs;
+do
+ for j in libtvision.so libtvision.a libtvision.sl;
+ do
+ if test -r "$i/$j"; then
+ tv_libdir=$i
+ break 2
+ fi
+ done
+done
+
+ac_tv_libraries=$tv_libdir
+
+ac_cxxflags_safe=$CXXFLAGS
+ac_ldflags_safe=$LDFLAGS
+ac_libs_safe=$LIBS
+CXXFLAGS="$CXXFLAGS -I$tv_incdir"
+LDFLAGS="-L$tv_libdir $X_LDFLAGS"
+LIBS="$ac_tv_libs"
+
+ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#define Uses_TApplication
+#include <tvision/tvconfig.h>
+#include <tvision/tv.h>
+
+class TMyApp : public TApplication
+{
+
+public:
+TMyApp();
+
+};
+
+TMyApp::TMyApp() :
+TProgInit( &TMyApp::initStatusLine,
+&TMyApp::initMenuBar,
+&TMyApp::initDeskTop
+)
+{
+}
+
+int main()
+{
+TMyApp myApp;
+myApp.run();
+return 0;
+}
+EOF
+
+if { (eval echo configure:5464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -f conftest*
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_tv_libraries="NO"
+fi
+rm -f conftest*
+CXXFLAGS=$ac_cxxflags_safe
+LDFLAGS=$ac_ldflags_safe
+LIBS=$ac_libs_safe
+
+if test "$ac_tv_includes" = NO || test "$ac_tv_libraries" = NO; then
+ ac_cv_have_tv="have_tv=no"
+ ac_tv_notfound=""
+ if test "$ac_tv_includes" = NO; then
+ if test "$ac_tv_libraries" = NO; then
+ ac_tv_notfound="(headers and libraries)";
+ else
+ ac_tv_notfound="(headers)";
+ fi
+ else
+ ac_tv_notfound="(libraries)";
+ fi
+
+ { echo "configure: error: TVISION $ac_tv_notfound not found. Please check your installation! " 1>&2; exit 1; };
+else
+ have_tv="yes"
+fi
+
+fi
+
+else
+ have_tv="yes"
+fi
+
+eval "$ac_cv_have_tv"
+
+if test "$have_tv" != yes; then
+ echo "$ac_t""$have_tv" 1>&6;
+else
+ ac_cv_have_tv="have_tv=yes \
+ ac_tv_includes=$ac_tv_includes ac_tv_libraries=$ac_tv_libraries"
+ echo "$ac_t""libraries $ac_tv_libraries, headers $ac_tv_includes" 1>&6
+
+ tv_libraries=$ac_tv_libraries
+ tv_includes=$ac_tv_includes
+fi
+
+
+
+
+TV_INCLUDES="-I$tv_includes"
+all_includes="$TV_INCLUDES $all_includes"
+
+TV_LDFLAGS="-L$tv_libraries"
+TV_LIBS="$ac_tv_libs"
+
+
+
+
+
+cat >> confdefs.h <<\EOF
+#define HAVE_TVISION 1
+EOF
+
+
+fi
+
+
+
+
+
+if test "$with_tv" != "no"; then
+ BUILDTV_TRUE=
+ BUILDTV_FALSE='#'
+else
+ BUILDTV_TRUE='#'
+ BUILDTV_FALSE=
+fi
+
+# Extract the first word of "kdoc", so it can be a program name with args.
+set dummy kdoc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:5548: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_KDOC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$KDOC"; then
+ ac_cv_prog_KDOC="$KDOC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_KDOC="kdoc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+KDOC="$ac_cv_prog_KDOC"
+if test -n "$KDOC"; then
+ echo "$ac_t""$KDOC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of "sgml2html", so it can be a program name with args.
+set dummy sgml2html; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:5577: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_SGML2HTML'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$SGML2HTML"; then
+ ac_cv_prog_SGML2HTML="$SGML2HTML" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_SGML2HTML="sgml2html"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+SGML2HTML="$ac_cv_prog_SGML2HTML"
+if test -n "$SGML2HTML"; then
+ echo "$ac_t""$SGML2HTML" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of "latex", so it can be a program name with args.
+set dummy latex; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:5606: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LATEX'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$LATEX"; then
+ ac_cv_prog_LATEX="$LATEX" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_LATEX="latex"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+LATEX="$ac_cv_prog_LATEX"
+if test -n "$LATEX"; then
+ echo "$ac_t""$LATEX" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+
+
+if test -n "$KDOC"; then
+ CLASSDOC_TRUE=
+ CLASSDOC_FALSE='#'
+else
+ CLASSDOC_TRUE='#'
+ CLASSDOC_FALSE=
+fi
+
+
+if test -n "$SGML2HTML"; then
+ SGMLTOOLS_TRUE=
+ SGMLTOOLS_FALSE='#'
+else
+ SGMLTOOLS_TRUE='#'
+ SGMLTOOLS_FALSE=
+fi
+
+
+if test -n "$LATEX"; then
+ HAVE_LATEX_TRUE=
+ HAVE_LATEX_FALSE='#'
+else
+ HAVE_LATEX_TRUE='#'
+ HAVE_LATEX_FALSE=
+fi
+
+CXXFLAGS="$CXXFLAGS $DEBUG"
+
+# Check whether --enable-final or --disable-final was given.
+if test "${enable_final+set}" = set; then
+ enableval="$enable_final"
+ use_final=$enableval
+else
+ use_final=no
+fi
+
+
+
+HAVE_FINAL=$use_final
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+DEFS=-DHAVE_CONFIG_H
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "Makefile \
+ dldialog.spec \
+ tests/Makefile \
+ doc/Makefile \
+ doc/classdoc/Makefile \
+ doc/classdoc/qt/Makefile \
+ doc/classdoc/tv/Makefile \
+ src/Makefile \
+ src/DLD_GEN/Makefile \
+ src/DLD_TV/Makefile \
+ src/DLD_QT/Makefile \
+ perl/Makefile \
+ perl/doc/Makefile \
+ intl/Makefile \
+ po/Makefile.in \
+ config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@PACKAGE@%$PACKAGE%g
+s%@VERSION@%$VERSION%g
+s%@ACLOCAL@%$ACLOCAL%g
+s%@AUTOCONF@%$AUTOCONF%g
+s%@AUTOMAKE@%$AUTOMAKE%g
+s%@AUTOHEADER@%$AUTOHEADER%g
+s%@MAKEINFO@%$MAKEINFO%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@GUI_VERSION_INFO@%$GUI_VERSION_INFO%g
+s%@CC@%$CC%g
+s%@CXX@%$CXX%g
+s%@LEX@%$LEX%g
+s%@LEXLIB@%$LEXLIB%g
+s%@CPP@%$CPP%g
+s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
+s%@YACC@%$YACC%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+s%@RANLIB@%$RANLIB%g
+s%@LN_S@%$LN_S%g
+s%@LIBTOOL@%$LIBTOOL%g
+s%@ALLOCA@%$ALLOCA%g
+s%@USE_NLS@%$USE_NLS%g
+s%@MSGFMT@%$MSGFMT%g
+s%@GMSGFMT@%$GMSGFMT%g
+s%@XGETTEXT@%$XGETTEXT%g
+s%@GENCAT@%$GENCAT%g
+s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
+s%@CATALOGS@%$CATALOGS%g
+s%@CATOBJEXT@%$CATOBJEXT%g
+s%@DATADIRNAME@%$DATADIRNAME%g
+s%@GMOFILES@%$GMOFILES%g
+s%@INSTOBJEXT@%$INSTOBJEXT%g
+s%@INTLDEPS@%$INTLDEPS%g
+s%@INTLLIBS@%$INTLLIBS%g
+s%@INTLOBJS@%$INTLOBJS%g
+s%@POFILES@%$POFILES%g
+s%@POSUB@%$POSUB%g
+s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
+s%@GT_NO@%$GT_NO%g
+s%@GT_YES@%$GT_YES%g
+s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
+s%@l@%$l%g
+s%@CXXCPP@%$CXXCPP%g
+s%@X_INCLUDES@%$X_INCLUDES%g
+s%@X_LDFLAGS@%$X_LDFLAGS%g
+s%@qt_libraries@%$qt_libraries%g
+s%@qt_includes@%$qt_includes%g
+s%@QT_INCLUDES@%$QT_INCLUDES%g
+s%@QT_LDFLAGS@%$QT_LDFLAGS%g
+s%@QT_LIBS@%$QT_LIBS%g
+s%@MOC@%$MOC%g
+s%@BUILDQT_TRUE@%$BUILDQT_TRUE%g
+s%@BUILDQT_FALSE@%$BUILDQT_FALSE%g
+s%@tv_libraries@%$tv_libraries%g
+s%@tv_includes@%$tv_includes%g
+s%@TV_INCLUDES@%$TV_INCLUDES%g
+s%@TV_LDFLAGS@%$TV_LDFLAGS%g
+s%@TV_LIBS@%$TV_LIBS%g
+s%@BUILDTV_TRUE@%$BUILDTV_TRUE%g
+s%@BUILDTV_FALSE@%$BUILDTV_FALSE%g
+s%@KDOC@%$KDOC%g
+s%@SGML2HTML@%$SGML2HTML%g
+s%@LATEX@%$LATEX%g
+s%@CLASSDOC_TRUE@%$CLASSDOC_TRUE%g
+s%@CLASSDOC_FALSE@%$CLASSDOC_FALSE%g
+s%@SGMLTOOLS_TRUE@%$SGMLTOOLS_TRUE%g
+s%@SGMLTOOLS_FALSE@%$SGMLTOOLS_FALSE%g
+s%@HAVE_LATEX_TRUE@%$HAVE_LATEX_TRUE%g
+s%@HAVE_LATEX_FALSE@%$HAVE_LATEX_FALSE%g
+s%@HAVE_FINAL@%$HAVE_FINAL%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile \
+ dldialog.spec \
+ tests/Makefile \
+ doc/Makefile \
+ doc/classdoc/Makefile \
+ doc/classdoc/qt/Makefile \
+ doc/classdoc/tv/Makefile \
+ src/Makefile \
+ src/DLD_GEN/Makefile \
+ src/DLD_TV/Makefile \
+ src/DLD_QT/Makefile \
+ perl/Makefile \
+ perl/doc/Makefile \
+ intl/Makefile \
+ po/Makefile.in \
+"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ case "$ac_given_INSTALL" in
+ [/$]*) INSTALL="$ac_given_INSTALL" ;;
+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ esac
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='\([ ]\)%\1#\2define\3'
+ac_uC=' '
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <<EOF
+ CONFIG_HEADERS="config.h"
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ echo creating $ac_file
+
+ rm -f conftest.frag conftest.in conftest.out
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ cat $ac_file_inputs > conftest.in
+
+EOF
+
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h. And first:
+# Protect against being on the right side of a sed subst in config.status.
+# Protect against being in an unquoted here document in config.status.
+rm -f conftest.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
+
+# This sed command replaces #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >> conftest.vals <<\EOF
+s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+EOF
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+while :
+do
+ ac_lines=`grep -c . conftest.vals`
+ # grep -c gives empty output for an empty file on some AIX systems.
+ if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+ # Write a limited-size here document to conftest.frag.
+ echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ echo 'CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+ rm -f conftest.vals
+ mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+cat >> $CONFIG_STATUS <<\EOF
+ rm -f conftest.frag conftest.h
+ echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
+ cat conftest.in >> conftest.h
+ rm -f conftest.in
+ if cmp -s $ac_file conftest.h 2>/dev/null; then
+ echo "$ac_file is unchanged"
+ rm -f conftest.h
+ else
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ fi
+ rm -f $ac_file
+ mv conftest.h $ac_file
+ fi
+fi; done
+
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+ac_sources="$nls_cv_header_libgt"
+ac_dests="$nls_cv_header_intl"
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+srcdir=$ac_given_srcdir
+while test -n "$ac_sources"; do
+ set $ac_dests; ac_dest=$1; shift; ac_dests=$*
+ set $ac_sources; ac_source=$1; shift; ac_sources=$*
+
+ echo "linking $srcdir/$ac_source to $ac_dest"
+
+ if test ! -r $srcdir/$ac_source; then
+ { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
+ fi
+ rm -f $ac_dest
+
+ # Make relative symlinks.
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
+ # The dest file is in a subdirectory.
+ test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
+ ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dest_dir_suffix.
+ ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dest_dir_suffix= ac_dots=
+ fi
+
+ case "$srcdir" in
+ [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
+ *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
+ esac
+
+ # Make a symlink if possible; otherwise try a hard link.
+ if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
+ ln $srcdir/$ac_source $ac_dest; then :
+ else
+ { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
+ fi
+done
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
+case "$CONFIG_FILES" in *po/Makefile.in*)
+ sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+ esac
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
+
diff --git a/dldialog/configure.in b/dldialog/configure.in
new file mode 100644
index 0000000..b74fc07
--- /dev/null
+++ b/dldialog/configure.in
@@ -0,0 +1,139 @@
+#/*****************************************************************************
+#**
+#** $Id: configure.in,v 1.64 2000/03/15 20:02:14 harald Exp $
+#**
+#** 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.
+#**
+#** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+#**
+#*****************************************************************************/
+dnl We need autoconf --version >= 2.1
+AC_PREREQ(2.13)
+
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(./acinclude.m4)
+
+
+dnl dld_gui.h Version see README.developer
+dnl Increment CURRENT if any interfaces have been added, removed,
+dnl or changed since the last update and set REVISION to 0.
+CURRENT=26
+
+dnl Increment this every time the code changes
+REVISION=0
+
+dnl If any interfaces have been added since the last public release,
+dnl then increment AGE.
+dnl If any interfaces have been removed since the last public release,
+dnl then set AGE to 0.
+AGE=0
+
+PROG_MAJOR=1
+PROG_MINOR=$[[$CURRENT-22]].$[[$REVISION-1+2]]
+
+PROG_VERSION=$PROG_MAJOR.$PROG_MINOR
+
+AM_INIT_AUTOMAKE(dldialog, $PROG_VERSION)
+
+AM_CONFIG_HEADER(config.h)
+
+GUI_VERSION_INFO=$CURRENT:$REVISION:$AGE
+AC_SUBST(GUI_VERSION_INFO)
+
+dnl Checks for programs.
+AC_PROG_CC
+AC_PROG_MAKE_SET
+AC_PROG_CXX
+AM_PROG_LEX
+AC_PROG_YACC
+
+dnl Checks for dynamic libraries.
+AM_DISABLE_STATIC
+AM_ENABLE_SHARED
+AM_PROG_LIBTOOL
+
+ALL_LINGUAS="de"
+AM_GNU_GETTEXT
+
+dnl Checks for libraries.
+
+AC_ARG_ENABLE(debug,
+[ --enable-debug debug [default=>>no]],
+[
+case "$enableval" in
+yes) DEBUG="-DDEBUG -g" ;;
+*)
+ DEBUG="";;
+esac],
+DEBUG="")
+
+AC_LANG_CPLUSPLUS dnl switch to C++
+
+dnl Checks for header files.
+AC_HEADER_STDC
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+dnl AC_C_CONST Produces error with linux egcs
+
+dnl Check for QT Libraries
+AC_ARG_WITH(qt,
+ [ --without-qt build dldialog without qt support. ],
+ [
+case "$withval" in
+yes) AC_PATH_QT;;
+no) AC_MSG_WARN([ dldialog will be build without qt support! ]);;
+*);;
+esac ], [ AC_PATH_QT ])
+AM_CONDITIONAL(BUILDQT, test "$with_qt" != "no")
+
+dnl Check for TV Libraries
+AC_ARG_WITH(tv,
+ [ --without-tv build dldialog without tvision support. ],
+ [
+case "$withval" in
+yes) AC_PATH_TV;;
+no) AC_MSG_WARN([ dldialog will be build without tvision support! ]);;
+*);;
+esac ], [AC_PATH_TV ])
+
+
+AM_CONDITIONAL(BUILDTV, test "$with_tv" != "no")
+
+AC_CHECK_PROG(KDOC, kdoc, kdoc)
+AC_CHECK_PROG(SGML2HTML, sgml2html, sgml2html)
+AC_CHECK_PROG(LATEX, latex, latex)
+
+AM_CONDITIONAL(CLASSDOC, test -n "$KDOC")
+AM_CONDITIONAL(SGMLTOOLS, test -n "$SGML2HTML")
+AM_CONDITIONAL(HAVE_LATEX, test -n "$LATEX")
+
+CXXFLAGS="$CXXFLAGS $DEBUG"
+
+AC_ARG_ENABLE(final,
+ [ --enable-final build size optimized lib (needs lots of memory)],
+ use_final=$enableval, use_final=no)
+
+AC_SUBST(HAVE_FINAL)
+HAVE_FINAL=$use_final
+
+
+AC_OUTPUT(Makefile \
+ dldialog.spec \
+ tests/Makefile \
+ doc/Makefile \
+ doc/classdoc/Makefile \
+ doc/classdoc/qt/Makefile \
+ doc/classdoc/tv/Makefile \
+ src/Makefile \
+ src/DLD_GEN/Makefile \
+ src/DLD_TV/Makefile \
+ src/DLD_QT/Makefile \
+ perl/Makefile \
+ perl/doc/Makefile \
+ intl/Makefile \
+ po/Makefile.in \
+)
+
diff --git a/dldialog/dldialog.spec b/dldialog/dldialog.spec
new file mode 100644
index 0000000..098f501
--- /dev/null
+++ b/dldialog/dldialog.spec
@@ -0,0 +1,80 @@
+Summary: A program to build simple and complex dialog boxes
+Summary(de): Ein Programm zum Aufbau einfacher und komplexer Dialogboxen
+Name: dldialog
+Version: 1.4.1
+Release: 1
+Copyright: Harald Hoyer (GPL)
+Group: Utilities/Terminal
+Source: dldialog-%{PACKAGE_VERSION}.tar.gz
+Packager: Harald Hoyer
+BuildRoot: /tmp/dldialog-root
+
+%description
+DLDialog is a utility that allows you to easily build user interfaces with
+simple scripts.
+You can call DLDialog from within a shell script to ask the user questions
+or present choices in a more user friendly manner.
+DLDialog can be started in two modes. One is for textual presentation using
+the tvision library and the other one for graphical presentation using X11
+and the qt library to display the dialogs.
+
+%description -l de
+DLDialog dient dazu Benutzereingaben grafisch aufzubereiten. Es kann von
+beliebigen Shells aufgerufen werden, um dem Benutzer Fragen zu stellen oder
+benutzerfreundlich Auswahlboxen zu präsentieren. DLDialog kann in zwei
+Modi gestartet werden, zum einen im Textmodus, wobei hier die TVision
+Bibliothek verwendet wird, und zum anderen im X-Window Mode, unter Benutzung
+der QT Bibliothek.
+
+%changelog
+* Tue Feb 15 2001 Harald Hoyer <harald@redhat.de>
+
+* Tue Feb 29 2000 Harald Hoyer <harald@redhat.de>
+- various changes for the red hat distribution
+
+%prep
+%setup
+
+%build
+CXXFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/usr
+%makeinstall
+
+mv $RPM_BUILD_ROOT%/usr/doc/dldialog-1.4.1 $RPM_BUILD_ROOT/%{_docdir}/dldialog
+
+%post
+/sbin/ldconfig
+/sbin/install-info /usr/info/dldialog.info.gz /usr/info/dir \
+ --entry="* dldialog: (dldialog). A program to build simple and complex dialog boxes."
+
+%postun
+/sbin/ldconfig
+
+%preun
+if [ $1 = 0 ]; then
+ /sbin/install-info --delete /usr/info/dldialog.info.gz /usr/info/dir \
+ --entry="* dldialog: (dldialog). A program to build simple and complex dialog boxes."
+fi
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%doc $RPM_BUILD_ROOT%{_docdir}/dldialog/*
+%doc tests/test1 tests/test2 tests/test4 tests/test6 tests/test8
+%doc tests/DLD.xpm tests/DLD-start.xpm tests/pnglogo.png
+%doc tests/dldialog_funcs
+%doc /usr/lib/perl5/site_perl/*.pod
+/usr/bin/*
+/usr/man/man?/*
+/usr/info/*.info*
+/usr/share/*
+/usr/lib/libdld_gen*
+/usr/lib/perl5/site_perl/*.pm
+/usr/lib/libdld_tv*
+/usr/lib/libdld_qt*
diff --git a/dldialog/dldialog.spec.in b/dldialog/dldialog.spec.in
new file mode 100644
index 0000000..c3db527
--- /dev/null
+++ b/dldialog/dldialog.spec.in
@@ -0,0 +1,80 @@
+Summary: A program to build simple and complex dialog boxes
+Summary(de): Ein Programm zum Aufbau einfacher und komplexer Dialogboxen
+Name: dldialog
+Version: @VERSION@
+Release: 1
+Copyright: Harald Hoyer (GPL)
+Group: Utilities/Terminal
+Source: dldialog-%{PACKAGE_VERSION}.tar.gz
+Packager: Harald Hoyer
+BuildRoot: /tmp/dldialog-root
+
+%description
+DLDialog is a utility that allows you to easily build user interfaces with
+simple scripts.
+You can call DLDialog from within a shell script to ask the user questions
+or present choices in a more user friendly manner.
+DLDialog can be started in two modes. One is for textual presentation using
+the tvision library and the other one for graphical presentation using X11
+and the qt library to display the dialogs.
+
+%description -l de
+DLDialog dient dazu Benutzereingaben grafisch aufzubereiten. Es kann von
+beliebigen Shells aufgerufen werden, um dem Benutzer Fragen zu stellen oder
+benutzerfreundlich Auswahlboxen zu präsentieren. DLDialog kann in zwei
+Modi gestartet werden, zum einen im Textmodus, wobei hier die TVision
+Bibliothek verwendet wird, und zum anderen im X-Window Mode, unter Benutzung
+der QT Bibliothek.
+
+%changelog
+* Tue Feb 15 2001 Harald Hoyer <harald@redhat.de>
+
+* Tue Feb 29 2000 Harald Hoyer <harald@redhat.de>
+- various changes for the red hat distribution
+
+%prep
+%setup
+
+%build
+CXXFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/usr
+%makeinstall
+
+mv $RPM_BUILD_ROOT%/usr/doc/dldialog-@VERSION@ $RPM_BUILD_ROOT/%{_docdir}/dldialog
+
+%post
+/sbin/ldconfig
+/sbin/install-info /usr/info/dldialog.info.gz /usr/info/dir \
+ --entry="* dldialog: (dldialog). A program to build simple and complex dialog boxes."
+
+%postun
+/sbin/ldconfig
+
+%preun
+if [ $1 = 0 ]; then
+ /sbin/install-info --delete /usr/info/dldialog.info.gz /usr/info/dir \
+ --entry="* dldialog: (dldialog). A program to build simple and complex dialog boxes."
+fi
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%doc $RPM_BUILD_ROOT%{_docdir}/dldialog/*
+%doc tests/test1 tests/test2 tests/test4 tests/test6 tests/test8
+%doc tests/DLD.xpm tests/DLD-start.xpm tests/pnglogo.png
+%doc tests/dldialog_funcs
+%doc /usr/lib/perl5/site_perl/*.pod
+/usr/bin/*
+/usr/man/man?/*
+/usr/info/*.info*
+/usr/share/*
+/usr/lib/libdld_gen*
+/usr/lib/perl5/site_perl/*.pm
+/usr/lib/libdld_tv*
+/usr/lib/libdld_qt*
diff --git a/dldialog/install-sh b/dldialog/install-sh
new file mode 100755
index 0000000..e843669
--- /dev/null
+++ b/dldialog/install-sh
@@ -0,0 +1,250 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission. M.I.T. makes no representations about the
+# suitability of this software for any purpose. It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd="$cpprog"
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd="$stripprog"
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ # this colon is to work around a 386BSD /bin/sh bug
+ :
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "install: no input file specified"
+ exit 1
+else
+ true
+fi
+
+if [ x"$dir_arg" != x ]; then
+ dst=$src
+ src=""
+
+ if [ -d $dst ]; then
+ instcmd=:
+ else
+ instcmd=mkdir
+ fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+ if [ -f $src -o -d $src ]
+ then
+ true
+ else
+ echo "install: $src does not exist"
+ exit 1
+ fi
+
+ if [ x"$dst" = x ]
+ then
+ echo "install: no destination specified"
+ exit 1
+ else
+ true
+ fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+ if [ -d $dst ]
+ then
+ dst="$dst"/`basename $src`
+ else
+ true
+ fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+# this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+ pathcomp="${pathcomp}${1}"
+ shift
+
+ if [ ! -d "${pathcomp}" ] ;
+ then
+ $mkdirprog "${pathcomp}"
+ else
+ true
+ fi
+
+ pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+ $doit $instcmd $dst &&
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+ if [ x"$transformarg" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ dstfile=`basename $dst $transformbasename |
+ sed $transformarg`$transformbasename
+ fi
+
+# don't allow the sed command to completely eliminate the filename
+
+ if [ x"$dstfile" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ true
+ fi
+
+# Make a temp file name in the proper directory.
+
+ dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+ $doit $instcmd $src $dsttmp &&
+
+ trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing. If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+ $doit $rmcmd -f $dstdir/$dstfile &&
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
+
+fi &&
+
+
+exit 0
diff --git a/dldialog/intl/ChangeLog b/dldialog/intl/ChangeLog
new file mode 100644
index 0000000..1989501
--- /dev/null
+++ b/dldialog/intl/ChangeLog
@@ -0,0 +1,1086 @@
+1998-04-29 Ulrich Drepper <drepper@cygnus.com>
+
+ * intl/localealias.c (read_alias_file): Use unsigned char for
+ local variables. Remove unused variable tp.
+ * intl/l10nflist.c (_nl_normalize_codeset): Use unsigned char *
+ for type of codeset. For loosing Solaris systems.
+ * intl/loadinfo.h: Adapt prototype of _nl_normalize_codeset.
+ * intl/bindtextdom.c (BINDTEXTDOMAIN): Don't define local variable
+ len if not needed.
+ Patches by Jim Meyering.
+
+1998-04-28 Ulrich Drepper <drepper@cygnus.com>
+
+ * loadmsgcat.c (_nl_load_domain): Don't assign the element use_mmap if
+ mmap is not supported.
+
+ * hash-string.h: Don't include <values.h>.
+
+1998-04-27 Ulrich Drepper <drepper@cygnus.com>
+
+ * textdomain.c: Use strdup is available.
+
+ * localealias.c: Define HAVE_MEMPCPY so that we can use this
+ function. Define and use semapahores to protect modfication of
+ global objects when compiling for glibc. Add code to allow
+ freeing alias table.
+
+ * l10nflist.c: Don't assume stpcpy not being a macro.
+
+ * gettextP.h: Define internal_function macri if not already done.
+ Use glibc byte-swap macros instead of defining SWAP when compiled
+ for glibc.
+ (struct loaded_domain): Add elements to allow unloading.
+
+ * Makefile.in (distclean): Don't remove libintl.h here.
+
+ * bindtextdomain.c: Carry over changes from glibc. Use strdup if
+ available.
+
+ * dcgettext.c: Don't assume stpcpy not being a macro. Mark internal
+ functions. Add memory freeing code for glibc.
+
+ * dgettext.c: Update copyright.
+
+ * explodename.c: Include stdlib.h and string.h only if they exist.
+ Use strings.h eventually.
+
+ * finddomain.c: Mark internal functions. Use strdup if available.
+ Add memory freeing code for glibc.
+
+1997-10-10 20:00 Ulrich Drepper <drepper@cygnus.com>
+
+ * libgettext.h: Fix dummy textdomain and bindtextdomain macros.
+ They should return reasonable values.
+ Reported by Tom Tromey <tromey@cygnus.com>.
+
+1997-09-16 03:33 Ulrich Drepper <drepper@cygnus.com>
+
+ * libgettext.h: Define PARAMS also to `args' if __cplusplus is defined.
+ * intlh.inst.in: Likewise.
+ Reported by Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>.
+
+ * libintl.glibc: Update from current glibc version.
+
+1997-09-06 02:10 Ulrich Drepper <drepper@cygnus.com>
+
+ * intlh.inst.in: Reformat copyright.
+
+1997-08-19 15:22 Ulrich Drepper <drepper@cygnus.com>
+
+ * dcgettext.c (DCGETTEXT): Remove wrong comment.
+
+1997-08-16 00:13 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in (install-data): Don't change directory to install.
+
+1997-08-01 14:30 Ulrich Drepper <drepper@cygnus.com>
+
+ * cat-compat.c: Fix copyright.
+
+ * localealias.c: Don't define strchr unless !HAVE_STRCHR.
+
+ * loadmsgcat.c: Update copyright. Fix typos.
+
+ * l10nflist.c: Don't define strchr unless !HAVE_STRCHR.
+ (_nl_make_l10nflist): Handle sponsor and revision correctly.
+
+ * gettext.c: Update copyright.
+ * gettext.h: Likewise.
+ * hash-string.h: Likewise.
+
+ * finddomain.c: Remoave dead code. Define strchr only if
+ !HAVE_STRCHR.
+
+ * explodename.c: Include <sys/types.h>.
+
+ * explodename.c: Reformat copyright text.
+ (_nl_explode_name): Fix typo.
+
+ * dcgettext.c: Define and use __set_errno.
+ (guess_category_value): Don't use setlocale if HAVE_LC_MESSAGES is
+ not defined.
+
+ * bindtextdom.c: Pretty printing.
+
+1997-05-01 02:25 Ulrich Drepper <drepper@cygnus.com>
+
+ * dcgettext.c (guess_category_value): Don't depend on
+ HAVE_LC_MESSAGES. We don't need the macro here.
+ Patch by Bruno Haible <haible@ilog.fr>.
+
+ * cat-compat.c (textdomain): DoN't refer to HAVE_SETLOCALE_NULL
+ macro. Instead use HAVE_LOCALE_NULL and define it when using
+ glibc, as in dcgettext.c.
+ Patch by Bruno Haible <haible@ilog.fr>.
+
+ * Makefile.in (CPPFLAGS): New variable. Reported by Franc,ois
+ Pinard.
+
+Mon Mar 10 06:51:17 1997 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in: Implement handling of libtool.
+
+ * gettextP.h: Change data structures for use of generic lowlevel
+ i18n file handling.
+
+Wed Dec 4 20:21:18 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * textdomain.c: Put parentheses around arguments of memcpy macro
+ definition.
+ * localealias.c: Likewise.
+ * l10nflist.c: Likewise.
+ * finddomain.c: Likewise.
+ * bindtextdom.c: Likewise.
+ Reported by Thomas Esken.
+
+Mon Nov 25 22:57:51 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * textdomain.c: Move definition of `memcpy` macro to right
+ position.
+
+Fri Nov 22 04:01:58 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * finddomain.c [!HAVE_STRING_H && !_LIBC]: Define memcpy using
+ bcopy if not already defined. Reported by Thomas Esken.
+ * bindtextdom.c: Likewise.
+ * l10nflist.c: Likewise.
+ * localealias.c: Likewise.
+ * textdomain.c: Likewise.
+
+Tue Oct 29 11:10:27 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in (libdir): Change to use exec_prefix instead of
+ prefix. Reported by Knut-HåvardAksnes <etokna@eto.ericsson.se>.
+
+Sat Aug 31 03:07:09 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * l10nflist.c (_nl_normalize_codeset): We convert to lower case,
+ so don't prepend uppercase `ISO' for only numeric arg.
+
+Fri Jul 19 00:15:46 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * l10nflist.c: Move inclusion of argz.h, ctype.h, stdlib.h after
+ definition of _GNU_SOURCE. Patch by Roland McGrath.
+
+ * Makefile.in (uninstall): Fix another bug with `for' loop and
+ empty arguments. Patch by Jim Meyering. Correct name os
+ uninstalled files: no intl- prefix anymore.
+
+ * Makefile.in (install-data): Again work around shells which
+ cannot handle mpty for list. Reported by Jim Meyering.
+
+Sat Jul 13 18:11:35 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in (install): Split goal. Now depend on install-exec
+ and install-data.
+ (install-exec, install-data): New goals. Created from former
+ install goal.
+ Reported by Karl Berry.
+
+Sat Jun 22 04:58:14 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in (MKINSTALLDIRS): New variable. Path to
+ mkinstalldirs script.
+ (install): use MKINSTALLDIRS variable or if the script is not present
+ try to find it in the $top_scrdir).
+
+Wed Jun 19 02:56:56 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * l10nflist.c: Linux libc *partly* includes the argz_* functions.
+ Grr. Work around by renaming the static version and use macros
+ for renaming.
+
+Tue Jun 18 20:11:17 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * l10nflist.c: Correct presence test macros of __argz_* functions.
+
+ * l10nflist.c: Include <argz.h> based on test of it instead when
+ __argz_* functions are available.
+ Reported by Andreas Schwab.
+
+Thu Jun 13 15:17:44 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * explodename.c, l10nflist.c: Define NULL for dumb systems.
+
+Tue Jun 11 17:05:13 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * intlh.inst.in, libgettext.h (dcgettext): Rename local variable
+ result to __result to prevent name clash.
+
+ * l10nflist.c, localealias.c, dcgettext.c: Define _GNU_SOURCE to
+ get prototype for stpcpy and strcasecmp.
+
+ * intlh.inst.in, libgettext.h: Move declaration of
+ `_nl_msg_cat_cntr' outside __extension__ block to prevent warning
+ from gcc's -Wnested-extern option.
+
+Fri Jun 7 01:58:00 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in (install): Remove comment.
+
+Thu Jun 6 17:28:17 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in (install): Work around for another Buglix stupidity.
+ Always use an `else' close for `if's. Reported by Nelson Beebe.
+
+ * Makefile.in (intlh.inst): Correct typo in phony rule.
+ Reported by Nelson Beebe.
+
+Thu Jun 6 01:49:52 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * dcgettext.c (read_alias_file): Rename variable alloca_list to
+ block_list as the macro calls assume.
+ Patch by Eric Backus.
+
+ * localealias.c [!HAVE_ALLOCA]: Define alloca as macro using
+ malloc.
+ (read_alias_file): Rename varriabe alloca_list to block_list as the
+ macro calls assume.
+ Patch by Eric Backus.
+
+ * l10nflist.c: Correct conditional for <argz.h> inclusion.
+ Reported by Roland McGrath.
+
+ * Makefile.in (all): Depend on all-@USE_INCLUDED_LIBINTL@, not
+ all-@USE_NLS@.
+
+ * Makefile.in (install): intlh.inst comes from local dir, not
+ $(srcdir).
+
+ * Makefile.in (intlh.inst): Special handling of this goal. If
+ used in gettext, this is really a rul to construct this file. If
+ used in any other package it is defined as a .PHONY rule with
+ empty body.
+
+ * finddomain.c: Extract locale file information handling into
+ l10nfile.c. Rename local stpcpy__ function to stpcpy.
+
+ * dcgettext.c (stpcpy): Add local definition.
+
+ * l10nflist.c: Solve some portability problems. Patches partly by
+ Thomas Esken. Add local definition of stpcpy.
+
+Tue Jun 4 02:47:49 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * intlh.inst.in: Don't depend including <locale.h> on
+ HAVE_LOCALE_H. Instead configure must rewrite this fiile
+ depending on the result of the configure run.
+
+ * Makefile.in (install): libintl.inst is now called intlh.inst.
+ Add rules for updating intlh.inst from intlh.inst.in.
+
+ * libintl.inst: Renamed to intlh.inst.in.
+
+ * localealias.c, dcgettext.c [__GNUC__]: Define HAVE_ALLOCA to 1
+ because gcc has __buitlin_alloca.
+ Reported by Roland McGrath.
+
+Mon Jun 3 00:32:16 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makefile.in (installcheck): New goal to fulfill needs of
+ automake's distcheck.
+
+ * Makefile.in (install): Reorder commands so that VERSION is
+ found.
+
+ * Makefile.in (gettextsrcdir): Now use subdirectory intl/ in
+ @datadir@/gettext.
+ (COMSRCS): Add l10nfile.c.
+ (OBJECTS): Add l10nfile.o.
+ (DISTFILES): Rename to DISTFILE.normal. Remove $(DISTFILES.common).
+ (DISTFILE.gettext): Remove $(DISTFILES.common).
+ (all-gettext): Remove goal.
+ (install): If $(PACKAGE) = gettext install, otherwose do nothing. No
+ package but gettext itself should install libintl.h + headers.
+ (dist): Extend goal to work for gettext, too.
+ (dist-gettext): Remove goal.
+
+ * dcgettext.c [!HAVE_ALLOCA]: Define macro alloca by using malloc.
+
+Sun Jun 2 17:33:06 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * loadmsgcat.c (_nl_load_domain): Parameter is now comes from
+ find_l10nfile.
+
+Sat Jun 1 02:23:03 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * l10nflist.c (__argz_next): Add definition.
+
+ * dcgettext.c [!HAVE_ALLOCA]: Add code for handling missing alloca
+ code. Use new l10nfile handling.
+
+ * localealias.c [!HAVE_ALLOCA]: Add code for handling missing
+ alloca code.
+
+ * l10nflist.c: Initial revision.
+
+Tue Apr 2 18:51:18 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (all-gettext): New goal. Same as all-yes.
+
+Thu Mar 28 23:01:22 1996 Karl Eichwalder <ke@ke.central.de>
+
+ * Makefile.in (gettextsrcdir): Define using @datadir@.
+
+Tue Mar 26 12:39:14 1996 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c: Include <ctype.h>. Reported by Roland McGrath.
+
+Sat Mar 23 02:00:35 1996 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c (stpcpy): Rename to stpcpy__ to prevent clashing
+ with external declaration.
+
+Sat Mar 2 00:47:09 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (all-no): Rename from all_no.
+
+Sat Feb 17 00:25:59 1996 Ulrich Drepper <drepper@myware>
+
+ * gettextP.h [loaded_domain]: Array `successor' must now contain up
+ to 63 elements (because of codeset name normalization).
+
+ * finddomain.c: Implement codeset name normalization.
+
+Thu Feb 15 04:39:09 1996 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (all): Define to `all-@USE_NLS@'.
+ (all-yes, all_no): New goals. `all-no' is noop, `all-yes'
+ is former all.
+
+Mon Jan 15 21:46:01 1996 Howard Gayle <howard@hal.com>
+
+ * localealias.c (alias_compare): Increment string pointers in loop
+ of strcasecmp replacement.
+
+Fri Dec 29 21:16:34 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (install-src): Who commented this goal out ? :-)
+
+Fri Dec 29 15:08:16 1995 Ulrich Drepper <drepper@myware>
+
+ * dcgettext.c (DCGETTEXT): Save `errno'. Failing system calls
+ should not effect it because a missing catalog is no error.
+ Reported by Harald K<o:>nig <koenig@tat.physik.uni-tuebingen.de>.
+
+Tue Dec 19 22:09:13 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (Makefile): Explicitly use $(SHELL) for running
+ shell scripts.
+
+Fri Dec 15 17:34:59 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * Makefile.in (install-src): Only install library and header when
+ we use the own implementation. Don't do it when using the
+ system's gettext or catgets functions.
+
+ * dcgettext.c (find_msg): Must not swap domain->hash_size here.
+
+Sat Dec 9 16:24:37 1995 Ulrich Drepper <drepper@myware>
+
+ * localealias.c, libintl.inst, libgettext.h, hash-string.h,
+ gettextP.h, finddomain.c, dcgettext.c, cat-compat.c:
+ Use PARAMS instead of __P. Suggested by Roland McGrath.
+
+Tue Dec 5 11:39:14 1995 Larry Schwimmer <rosebud@cyclone.stanford.edu>
+
+ * libgettext.h: Use `#if !defined (_LIBINTL_H)' instead of `#if
+ !_LIBINTL_H' because Solaris defines _LIBINTL_H as empty.
+
+Mon Dec 4 15:42:07 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (install-src):
+ Install libintl.inst instead of libintl.h.install.
+
+Sat Dec 2 22:51:38 1995 Marcus Daniels <marcus@sysc.pdx.edu>
+
+ * cat-compat.c (textdomain):
+ Reverse order in which files are tried you load. First
+ try local file, when this failed absolute path.
+
+Wed Nov 29 02:03:53 1995 Nelson H. F. Beebe <beebe@math.utah.edu>
+
+ * cat-compat.c (bindtextdomain): Add missing { }.
+
+Sun Nov 26 18:21:41 1995 Ulrich Drepper <drepper@myware>
+
+ * libintl.inst: Add missing __P definition. Reported by Nelson Beebe.
+
+ * Makefile.in:
+ Add dummy `all' and `dvi' goals. Reported by Tom Tromey.
+
+Sat Nov 25 16:12:01 1995 Franc,ois Pinard <pinard@iro.umontreal.ca>
+
+ * hash-string.h: Capitalize arguments of macros.
+
+Sat Nov 25 12:01:36 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): Prevent files names longer than 13
+ characters. libintl.h.glibc->libintl.glibc,
+ libintl.h.install->libintl.inst. Reported by Joshua R. Poulson.
+
+Sat Nov 25 11:31:12 1995 Eric Backus <ericb@lsid.hp.com>
+
+ * dcgettext.c: Fix bug in preprocessor conditionals.
+
+Sat Nov 25 02:35:27 1995 Nelson H. F. Beebe <beebe@math.utah.edu>
+
+ * libgettext.h: Solaris cc does not understand
+ #if !SYMBOL1 && !SYMBOL2. Sad but true.
+
+Thu Nov 23 16:22:14 1995 Ulrich Drepper <drepper@myware>
+
+ * hash-string.h (hash_string):
+ Fix for machine with >32 bit `unsigned long's.
+
+ * dcgettext.c (DCGETTEXT):
+ Fix horrible bug in loop for alternative translation.
+
+Thu Nov 23 01:45:29 1995 Ulrich Drepper <drepper@myware>
+
+ * po2tbl.sed.in, linux-msg.sed, xopen-msg.sed:
+ Some further simplifications in message number generation.
+
+Mon Nov 20 21:08:43 1995 Ulrich Drepper <drepper@myware>
+
+ * libintl.h.glibc: Use __const instead of const in prototypes.
+
+ * Makefile.in (install-src):
+ Install libintl.h.install instead of libintl.h. This
+ is a stripped-down version. Suggested by Peter Miller.
+
+ * libintl.h.install, libintl.h.glibc: Initial revision.
+
+ * localealias.c (_nl_expand_alias, read_alias_file):
+ Protect prototypes in type casts by __P.
+
+Tue Nov 14 16:43:58 1995 Ulrich Drepper <drepper@myware>
+
+ * hash-string.h: Correct prototype for hash_string.
+
+Sun Nov 12 12:42:30 1995 Ulrich Drepper <drepper@myware>
+
+ * hash-string.h (hash_string): Add prototype.
+
+ * gettextP.h: Fix copyright.
+ (SWAP): Add prototype.
+
+Wed Nov 8 22:56:33 1995 Ulrich Drepper <drepper@myware>
+
+ * localealias.c (read_alias_file): Forgot sizeof.
+ Avoid calling *printf function. This introduces a big overhead.
+ Patch by Roland McGrath.
+
+Tue Nov 7 14:21:08 1995 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c, cat-compat.c: Wrong indentation in #if for stpcpy.
+
+ * finddomain.c (stpcpy):
+ Define substitution function local. The macro was to flaky.
+
+ * cat-compat.c: Fix typo.
+
+ * xopen-msg.sed, linux-msg.sed:
+ While bringing message number to right place only accept digits.
+
+ * linux-msg.sed, xopen-msg.sed: Now that the counter does not have
+ leading 0s we don't need to remove them. Reported by Marcus
+ Daniels.
+
+ * Makefile.in (../po/cat-id-tbl.o): Use $(top_srdir) in
+ dependency. Reported by Marcus Daniels.
+
+ * cat-compat.c: (stpcpy) [!_LIBC && !HAVE_STPCPY]: Define replacement.
+ Generally cleanup using #if instead of #ifndef.
+
+ * Makefile.in: Correct typos in comment. By Franc,ois Pinard.
+
+Mon Nov 6 00:27:02 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (install-src): Don't install libintl.h and libintl.a
+ if we use an available gettext implementation.
+
+Sun Nov 5 22:02:08 1995 Ulrich Drepper <drepper@myware>
+
+ * libgettext.h: Fix typo: HAVE_CATGETTS -> HAVE_CATGETS. Reported
+ by Franc,ois Pinard.
+
+ * libgettext.h: Use #if instead of #ifdef/#ifndef.
+
+ * finddomain.c:
+ Comments describing what has to be done should start with FIXME.
+
+Sun Nov 5 19:38:01 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): Split. Use DISTFILES with normal meaning.
+ DISTFILES.common names the files common to both dist goals.
+ DISTFILES.gettext are the files only distributed in GNU gettext.
+
+Sun Nov 5 17:32:54 1995 Ulrich Drepper <drepper@myware>
+
+ * dcgettext.c (DCGETTEXT): Correct searching in derived locales.
+ This was necessary since a change in _nl_find_msg several weeks
+ ago. I really don't know this is still not fixed.
+
+Sun Nov 5 12:43:12 1995 Ulrich Drepper <drepper@myware>
+
+ * loadmsgcat.c (_nl_load_domain): Test for FILENAME == NULL. This
+ might mark a special condition.
+
+ * finddomain.c (make_entry_rec): Don't make illegal entry as decided.
+
+ * Makefile.in (dist): Suppress error message when ln failed.
+ Get files from $(srcdir) explicitly.
+
+ * libgettext.h (gettext_const): Rename to gettext_noop.
+
+Fri Nov 3 07:36:50 1995 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c (make_entry_rec):
+ Protect against wrong locale names by testing mask.
+
+ * libgettext.h (gettext_const): Add macro definition.
+ Capitalize macro arguments.
+
+Thu Nov 2 23:15:51 1995 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c (_nl_find_domain):
+ Test for pointer != NULL before accessing value.
+ Reported by Tom Tromey.
+
+ * gettext.c (NULL):
+ Define as (void*)0 instad of 0. Reported by Franc,ois Pinard.
+
+Mon Oct 30 21:28:52 1995 Ulrich Drepper <drepper@myware>
+
+ * po2tbl.sed.in: Serious typo bug fixed by Jim Meyering.
+
+Sat Oct 28 23:20:47 1995 Ulrich Drepper <drepper@myware>
+
+ * libgettext.h: Disable dcgettext optimization for Solaris 2.3.
+
+ * localealias.c (alias_compare):
+ Peter Miller reported that tolower in some systems is
+ even dumber than I thought. Protect call by `isupper'.
+
+Fri Oct 27 22:22:51 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (libdir, includedir): New variables.
+ (install-src): Install libintl.a and libintl.h in correct dirs.
+
+Fri Oct 27 22:07:29 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (SOURCES): Fix typo: intrl.compat.c -> intl-compat.c.
+
+ * po2tbl.sed.in: Patch for buggy SEDs by Christian von Roques.
+
+ * localealias.c:
+ Fix typo and superflous test. Reported by Christian von Roques.
+
+Fri Oct 6 11:52:05 1995 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c (_nl_find_domain):
+ Correct some remainder from the pre-CEN syntax. Now
+ we don't have a constant number of successors anymore.
+
+Wed Sep 27 21:41:13 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): Add libintl.h.glibc.
+
+ * Makefile.in (dist-libc): Add goal for packing sources for glibc.
+ (COMSRCS, COMHDRS): Splitted to separate sources shared with glibc.
+
+ * loadmsgcat.c: Forget to continue #if line.
+
+ * localealias.c:
+ [_LIBC]: Rename strcasecmp to __strcasecmp to keep ANSI C name
+ space clean.
+
+ * dcgettext.c, finddomain.c: Better comment to last change.
+
+ * loadmsgcat.c:
+ [_LIBC]: Rename fstat, open, close, read, mmap, and munmap to
+ __fstat, __open, __close, __read, __mmap, and __munmap resp
+ to keep ANSI C name space clean.
+
+ * finddomain.c:
+ [_LIBC]: Rename stpcpy to __stpcpy to keep ANSI C name space clean.
+
+ * dcgettext.c:
+ [_LIBC]: Rename getced and stpcpy to __getcwd and __stpcpy resp to
+ keep ANSI C name space clean.
+
+ * libgettext.h:
+ Include sys/types.h for those old SysV systems out there.
+ Reported by Francesco Potorti`.
+
+ * loadmsgcat.c (use_mmap): Define if compiled for glibc.
+
+ * bindtextdom.c: Include all those standard headers
+ unconditionally if _LIBC is defined.
+
+ * finddomain.c: Fix 2 times defiend -> defined.
+
+ * textdomain.c: Include libintl.h instead of libgettext.h when
+ compiling for glibc. Include all those standard headers
+ unconditionally if _LIBC is defined.
+
+ * localealias.c, loadmsgcat.c: Prepare to be compiled in glibc.
+
+ * gettext.c:
+ Include libintl.h instead of libgettext.h when compiling for glibc.
+ Get NULL from stddef.h if we compile for glibc.
+
+ * finddomain.c: Include libintl.h instead of libgettext.h when
+ compiling for glibc. Include all those standard headers
+ unconditionally if _LIBC is defined.
+
+ * dcgettext.c: Include all those standard headers unconditionally
+ if _LIBC is defined.
+
+ * dgettext.c: If compiled in glibc include libintl.h instead of
+ libgettext.h.
+ (locale.h): Don't rely on HAVE_LOCALE_H when compiling for glibc.
+
+ * dcgettext.c: If compiled in glibc include libintl.h instead of
+ libgettext.h.
+ (getcwd): Don't rely on HAVE_GETCWD when compiling for glibc.
+
+ * bindtextdom.c:
+ If compiled in glibc include libintl.h instead of libgettext.h.
+
+Mon Sep 25 22:23:06 1995 Ulrich Drepper <drepper@myware>
+
+ * localealias.c (_nl_expand_alias): Don't call bsearch if NMAP <= 0.
+ Reported by Marcus Daniels.
+
+ * cat-compat.c (bindtextdomain):
+ String used in putenv must not be recycled.
+ Reported by Marcus Daniels.
+
+ * libgettext.h (__USE_GNU_GETTEXT):
+ Additional symbol to signal that we use GNU gettext
+ library.
+
+ * cat-compat.c (bindtextdomain):
+ Fix bug with the strange stpcpy replacement.
+ Reported by Nelson Beebe.
+
+Sat Sep 23 08:23:51 1995 Ulrich Drepper <drepper@myware>
+
+ * cat-compat.c: Include <string.h> for stpcpy prototype.
+
+ * localealias.c (read_alias_file):
+ While expand strdup code temporary variable `cp' hided
+ higher level variable with same name. Rename to `tp'.
+
+ * textdomain.c (textdomain):
+ Avoid warning by using temporary variable in strdup code.
+
+ * finddomain.c (_nl_find_domain): Remove unused variable `application'.
+
+Thu Sep 21 15:51:44 1995 Ulrich Drepper <drepper@myware>
+
+ * localealias.c (alias_compare):
+ Use strcasecmp() only if available. Else use
+ implementation in place.
+
+ * intl-compat.c:
+ Wrapper functions now call *__ functions instead of __*.
+
+ * libgettext.h: Declare prototypes for *__ functions instead for __*.
+
+ * cat-compat.c, loadmsgcat.c:
+ Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
+ of the standard libc and so prevent libintl.a from being used
+ standalone.
+
+ * bindtextdom.c:
+ Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
+ of the standard libc and so prevent libintl.a from being used
+ standalone.
+ Rename to bindtextdomain__ if not used in GNU C Library.
+
+ * dgettext.c:
+ Rename function to dgettext__ if not used in GNU C Library.
+
+ * gettext.c:
+ Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
+ of the standard libc and so prevent libintl.a from being used
+ standalone.
+ Functions now called gettext__ if not used in GNU C Library.
+
+ * dcgettext.c, localealias.c, textdomain.c, finddomain.c:
+ Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
+ of the standard libc and so prevent libintl.a from being used
+ standalone.
+
+Sun Sep 17 23:14:49 1995 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c: Correct some bugs in handling of CEN standard
+ locale definitions.
+
+Thu Sep 7 01:49:28 1995 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c: Implement CEN syntax.
+
+ * gettextP.h (loaded_domain): Extend number of successors to 31.
+
+Sat Aug 19 19:25:29 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (aliaspath): Remove path to X11 locale dir.
+
+ * Makefile.in: Make install-src depend on install. This helps
+ gettext to install the sources and other packages can use the
+ install goal.
+
+Sat Aug 19 15:19:33 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (uninstall): Remove stuff installed by install-src.
+
+Tue Aug 15 13:13:53 1995 Ulrich Drepper <drepper@myware>
+
+ * VERSION.in: Initial revision.
+
+ * Makefile.in (DISTFILES):
+ Add VERSION file. This is not necessary for gettext, but
+ for other packages using this library.
+
+Tue Aug 15 06:16:44 1995 Ulrich Drepper <drepper@myware>
+
+ * gettextP.h (_nl_find_domain):
+ New prototype after changing search strategy.
+
+ * finddomain.c (_nl_find_domain):
+ We now try only to find a specified catalog. Fall back to other
+ catalogs listed in the locale list is now done in __dcgettext.
+
+ * dcgettext.c (__dcgettext):
+ Now we provide message fall back even to different languages.
+ I.e. if a message is not available in one language all the other
+ in the locale list a tried. Formerly fall back was only possible
+ within one language. Implemented by moving one loop from
+ _nl_find_domain to here.
+
+Mon Aug 14 23:45:50 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (gettextsrcdir):
+ Directory where source of GNU gettext library are made
+ available.
+ (INSTALL, INSTALL_DATA): Programs used for installing sources.
+ (gettext-src): New. Rule to install GNU gettext sources for use in
+ gettextize shell script.
+
+Sun Aug 13 14:40:48 1995 Ulrich Drepper <drepper@myware>
+
+ * loadmsgcat.c (_nl_load_domain):
+ Use mmap for loading only when munmap function is
+ also available.
+
+ * Makefile.in (install): Depend on `all' goal.
+
+Wed Aug 9 11:04:33 1995 Ulrich Drepper <drepper@myware>
+
+ * localealias.c (read_alias_file):
+ Do not overwrite '\n' when terminating alias value string.
+
+ * localealias.c (read_alias_file):
+ Handle long lines. Ignore the rest not fitting in
+ the buffer after the initial `fgets' call.
+
+Wed Aug 9 00:54:29 1995 Ulrich Drepper <drepper@myware>
+
+ * gettextP.h (_nl_load_domain):
+ Add prototype, replacing prototype for _nl_load_msg_cat.
+
+ * finddomain.c (_nl_find_domain):
+ Remove unneeded variable filename and filename_len.
+ (expand_alias): Remove prototype because functions does not
+ exist anymore.
+
+ * localealias.c (read_alias_file):
+ Change type of fname_len parameter to int.
+ (xmalloc): Add prototype.
+
+ * loadmsgcat.c: Better prototypes for xmalloc.
+
+Tue Aug 8 22:30:39 1995 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c (_nl_find_domain):
+ Allow alias name to be constructed from the four components.
+
+ * Makefile.in (aliaspath): New variable. Set to preliminary value.
+ (SOURCES): Add localealias.c.
+ (OBJECTS): Add localealias.o.
+
+ * gettextP.h: Add prototype for _nl_expand_alias.
+
+ * finddomain.c: Aliasing handled in intl/localealias.c.
+
+ * localealias.c: Aliasing for locale names.
+
+ * bindtextdom.c: Better prototypes for xmalloc and xstrdup.
+
+Mon Aug 7 23:47:42 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES): gettext.perl is now found in misc/.
+
+ * cat-compat.c (bindtextdomain):
+ Correct implementation. dirname parameter was not used.
+ Reported by Marcus Daniels.
+
+ * gettextP.h (loaded_domain):
+ New fields `successor' and `decided' for oo, lazy
+ message handling implementation.
+
+ * dcgettext.c:
+ Adopt for oo, lazy message handliing.
+ Now we can inherit translations from less specific locales.
+ (find_msg): New function.
+
+ * loadmsgcat.c, finddomain.c:
+ Complete rewrite. Implement oo, lazy message handling :-).
+ We now have an additional environment variable `LANGUAGE' with
+ a higher priority than LC_ALL for the LC_MESSAGE locale.
+ Here we can set a colon separated list of specifications each
+ of the form `language[_territory[.codeset]][@modifier]'.
+
+Sat Aug 5 09:55:42 1995 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c (unistd.h):
+ Include to get _PC_PATH_MAX defined on system having it.
+
+Fri Aug 4 22:42:00 1995 Ulrich Drepper <drepper@myware>
+
+ * finddomain.c (stpcpy): Include prototype.
+
+ * Makefile.in (dist): Remove `copying instead' message.
+
+Wed Aug 2 18:52:03 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (ID, TAGS): Do not use $^.
+
+Tue Aug 1 20:07:11 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (TAGS, ID): Use $^ as command argument.
+ (TAGS): Give etags -o option t write to current directory,
+ not $(srcdir).
+ (ID): Use $(srcdir) instead os $(top_srcdir)/src.
+ (distclean): Remove ID.
+
+Sun Jul 30 11:51:46 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (gnulocaledir):
+ New variable, always using share/ for data directory.
+ (DEFS): Add GNULOCALEDIR, used in finddomain.c.
+
+ * finddomain.c (_nl_default_dirname):
+ Set to GNULOCALEDIR, because it always has to point
+ to the directory where GNU gettext Library writes it to.
+
+ * intl-compat.c (textdomain, bindtextdomain):
+ Undefine macros before function definition.
+
+Sat Jul 22 01:10:02 1995 Ulrich Drepper <drepper@myware>
+
+ * libgettext.h (_LIBINTL_H):
+ Protect definition in case where this file is included as
+ libgettext.h on Solaris machines. Add comment about this.
+
+Wed Jul 19 02:36:42 1995 Ulrich Drepper <drepper@myware>
+
+ * intl-compat.c (textdomain): Correct typo.
+
+Wed Jul 19 01:51:35 1995 Ulrich Drepper <drepper@myware>
+
+ * dcgettext.c (dcgettext): Function now called __dcgettext.
+
+ * dgettext.c (dgettext): Now called __dgettext and calls
+ __dcgettext.
+
+ * gettext.c (gettext):
+ Function now called __gettext and calls __dgettext.
+
+ * textdomain.c (textdomain): Function now called __textdomain.
+
+ * bindtextdom.c (bindtextdomain): Function now called
+ __bindtextdomain.
+
+ * intl-compat.c: Initial revision.
+
+ * Makefile.in (SOURCES): Add intl-compat.c.
+ (OBJECTS): We always compile the GNU gettext library functions.
+ OBJECTS contains all objects but cat-compat.o, ../po/cat-if-tbl.o,
+ and intl-compat.o.
+ (GETTOBJS): Contains now only intl-compat.o.
+
+ * libgettext.h:
+ Re-include protection matches dualistic character of libgettext.h.
+ For all functions in GNU gettext library define __ counter part.
+
+ * finddomain.c (strchr): Define as index if not found in C library.
+ (_nl_find_domain): For relative paths paste / in between.
+
+Tue Jul 18 16:37:45 1995 Ulrich Drepper <drepper@myware>
+
+ * loadmsgcat.c, finddomain.c: Add inclusion of sys/types.h.
+
+ * xopen-msg.sed: Fix bug with `msgstr ""' lines.
+ A little bit better comments.
+
+Tue Jul 18 01:18:27 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in:
+ po-mode.el, makelinks, combine-sh are now found in ../misc.
+
+ * po-mode.el, makelinks, combine-sh, elisp-comp:
+ Moved to ../misc/.
+
+ * libgettext.h, gettextP.h, gettext.h: Uniform test for __STDC__.
+
+Sun Jul 16 22:33:02 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (INSTALL, INSTALL_DATA): New variables.
+ (install-data, uninstall): Install/uninstall .elc file.
+
+ * po-mode.el (Installation comment):
+ Add .pox as possible extension of .po files.
+
+Sun Jul 16 13:23:27 1995 Ulrich Drepper <drepper@myware>
+
+ * elisp-comp: Complete new version by Franc,ois: This does not
+ fail when not compiling in the source directory.
+
+Sun Jul 16 00:12:17 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (../po/cat-id-tbl.o):
+ Use $(MAKE) instead of make for recursive make.
+
+ * Makefile.in (.el.elc): Use $(SHELL) instead of /bin/sh.
+ (install-exec): Add missing dummy goal.
+ (install-data, uninstall): @ in multi-line shell command at
+ beginning, not in front of echo. Reported by Eric Backus.
+
+Sat Jul 15 00:21:28 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (DISTFILES):
+ Rename libgettext.perl to gettext.perl to fit in 14 chars
+ file systems.
+
+ * gettext.perl:
+ Rename to gettext.perl to fit in 14 chars file systems.
+
+Thu Jul 13 23:17:20 1995 Ulrich Drepper <drepper@myware>
+
+ * cat-compat.c: If !STDC_HEADERS try to include malloc.h.
+
+Thu Jul 13 20:55:02 1995 Ulrich Drepper <drepper@myware>
+
+ * po2tbl.sed.in: Pretty printing.
+
+ * linux-msg.sed, xopen-msg.sed:
+ Correct bugs with handling substitute flags in branches.
+
+ * hash-string.h (hash_string):
+ Old K&R compilers don't under stand `unsigned char'.
+
+ * gettext.h (nls_uint32):
+ Some old K&R compilers (eg HP) don't understand `unsigned int'.
+
+ * cat-compat.c (msg_to_cat_id): De-ANSI-fy prototypes.
+
+Thu Jul 13 01:34:33 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (ELCFILES): New variable.
+ (DISTFILES): Add elisp-comp.
+ Add implicit rule for .el -> .elc compilation.
+ (install-data): install $ELCFILES
+ (clean): renamed po-to-tbl and po-to-msg to po2tbl and po2msg resp.
+
+ * elisp-comp: Initial revision
+
+Wed Jul 12 16:14:52 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in:
+ cat-id-tbl.c is now found in po/. This enables us to use an identical
+ intl/ directory in all packages.
+
+ * dcgettext.c (dcgettext): hashing does not work for table size <= 2.
+
+ * textdomain.c: fix typo (#if def -> #if defined)
+
+Tue Jul 11 18:44:43 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in (stamp-cat-id): use top_srcdir to address source files
+ (DISTFILES,distclean): move tupdate.perl to src/
+
+ * po-to-tbl.sed.in:
+ add additional jump to clear change flag to recognize multiline strings
+
+Tue Jul 11 01:32:50 1995 Ulrich Drepper <drepper@myware>
+
+ * textdomain.c: Protect inclusion of stdlib.h and string.h.
+
+ * loadmsgcat.c: Protect inclusion of stdlib.h.
+
+ * libgettext.h: Protect inclusion of locale.h.
+ Allow use in C++ programs.
+ Define NULL is not happened already.
+
+ * Makefile.in (DISTFILES): ship po-to-tbl.sed.in instead of
+ po-to-tbl.sed.
+ (distclean): remove po-to-tbl.sed and tupdate.perl.
+
+ * tupdate.perl.in: Substitute Perl path even in exec line.
+ Don't include entries without translation from old .po file.
+
+Tue Jul 4 00:41:51 1995 Ulrich Drepper <drepper@myware>
+
+ * tupdate.perl.in: use "Updated: " in msgid "".
+
+ * cat-compat.c: Fix typo (LOCALDIR -> LOCALEDIR).
+ Define getenv if !__STDC__.
+
+ * bindtextdom.c: Protect stdlib.h and string.h inclusion.
+ Define free if !__STDC__.
+
+ * finddomain.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
+ Define free if !__STDC__.
+
+ * cat-compat.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
+
+Mon Jul 3 23:56:30 1995 Ulrich Drepper <drepper@myware>
+
+ * Makefile.in: Use LOCALEDIR instead of DEF_MSG_DOM_DIR.
+ Remove unneeded $(srcdir) from Makefile.in dependency.
+
+ * makelinks: Add copyright and short description.
+
+ * po-mode.el: Last version for 0.7.
+
+ * tupdate.perl.in: Fix die message.
+
+ * dcgettext.c: Protect include of string.h.
+
+ * gettext.c: Protect include of stdlib.h and further tries to get NULL.
+
+ * finddomain.c: Some corrections in includes.
+
+ * Makefile.in (INCLUDES): Prune list correct path to Makefile.in.
+
+ * po-to-tbl.sed: Adopt for new .po file format.
+
+ * linux-msg.sed, xopen-msg.sed: Adopt for new .po file format.
+
+Sun Jul 2 23:55:03 1995 Ulrich Drepper <drepper@myware>
+
+ * tupdate.perl.in: Complete rewrite for new .po file format.
+
+Sun Jul 2 02:06:50 1995 Ulrich Drepper <drepper@myware>
+
+ * First official release. This directory contains all the code
+ needed to internationalize own packages. It provides functions
+ which allow to use the X/Open catgets function with an interface
+ like the Uniforum gettext function. For system which does not
+ have neither of those a complete implementation is provided.
diff --git a/dldialog/intl/Makefile.in b/dldialog/intl/Makefile.in
new file mode 100644
index 0000000..4bdb186
--- /dev/null
+++ b/dldialog/intl/Makefile.in
@@ -0,0 +1,214 @@
+# Makefile for directory with message catalog handling in GNU NLS Utilities.
+# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+#
+# 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = ..
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+transform = @program_transform_name@
+libdir = $(exec_prefix)/lib
+includedir = $(prefix)/include
+datadir = $(prefix)/@DATADIRNAME@
+localedir = $(datadir)/locale
+gnulocaledir = $(prefix)/share/locale
+gettextsrcdir = @datadir@/gettext/intl
+aliaspath = $(localedir):.
+subdir = intl
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+
+l = @l@
+
+AR = ar
+CC = @CC@
+LIBTOOL = @LIBTOOL@
+RANLIB = @RANLIB@
+
+DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \
+-DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@
+CPPFLAGS = @CPPFLAGS@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+HEADERS = $(COMHDRS) libgettext.h loadinfo.h
+COMHDRS = gettext.h gettextP.h hash-string.h
+SOURCES = $(COMSRCS) intl-compat.c cat-compat.c
+COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
+finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
+explodename.c
+OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
+finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
+explodename.$lo
+CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo
+GETTOBJS = intl-compat.$lo
+DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \
+xopen-msg.sed $(HEADERS) $(SOURCES)
+DISTFILES.normal = VERSION
+DISTFILES.gettext = libintl.glibc intlh.inst.in
+
+.SUFFIXES:
+.SUFFIXES: .c .o .lo
+.c.o:
+ $(COMPILE) $<
+.c.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) $<
+
+INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib
+
+all: all-@USE_INCLUDED_LIBINTL@
+
+all-yes: libintl.$la intlh.inst
+all-no:
+
+libintl.a: $(OBJECTS)
+ rm -f $@
+ $(AR) cru $@ $(OBJECTS)
+ $(RANLIB) $@
+
+libintl.la: $(OBJECTS)
+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \
+ -version-info 1:0 -rpath $(libdir)
+
+../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot
+ cd ../po && $(MAKE) cat-id-tbl.$lo
+
+check: all
+
+# This installation goal is only used in GNU gettext. Packages which
+# only use the library should use install instead.
+
+# We must not install the libintl.h/libintl.a files if we are on a
+# system which has the gettext() function in its C library or in a
+# separate library or use the catgets interface. A special case is
+# where configure found a previously installed GNU gettext library.
+# If you want to use the one which comes with this version of the
+# package, you have to use `configure --with-included-gettext'.
+install: install-exec install-data
+install-exec: all
+ if test "$(PACKAGE)" = "gettext" \
+ && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $(libdir) $(includedir); \
+ else \
+ $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \
+ fi; \
+ $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \
+ $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \
+ else \
+ : ; \
+ fi
+install-data: all
+ if test "$(PACKAGE)" = "gettext"; then \
+ if test -r $(MKINSTALLDIRS); then \
+ $(MKINSTALLDIRS) $(gettextsrcdir); \
+ else \
+ $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \
+ dists="$(DISTFILES.common)"; \
+ for file in $$dists; do \
+ $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ dists="$(DISTFILES.common)"; \
+ for file in $$dists; do \
+ rm -f $(gettextsrcdir)/$$file; \
+ done
+
+info dvi:
+
+$(OBJECTS): ../config.h libgettext.h
+bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
+dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
+
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES)
+ here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
+
+id: ID
+
+ID: $(HEADERS) $(SOURCES)
+ here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
+
+
+mostlyclean:
+ rm -f *.a *.o *.lo core core.*
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile ID TAGS po2msg.sed po2tbl.sed
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+
+# GNU gettext needs not contain the file `VERSION' but contains some
+# other files which should not be distributed in other packages.
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: Makefile $(DISTFILES)
+ if test "$(PACKAGE)" = gettext; then \
+ additional="$(DISTFILES.gettext)"; \
+ else \
+ additional="$(DISTFILES.normal)"; \
+ fi; \
+ for file in $(DISTFILES.common) $$additional; do \
+ ln $(srcdir)/$$file $(distdir) 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir); \
+ done
+
+dist-libc:
+ tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc
+
+Makefile: Makefile.in ../config.status
+ cd .. \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+# The dependency for intlh.inst is different in gettext and all other
+# packages. Because we cannot you GNU make features we have to solve
+# the problem while rewriting Makefile.in.
+@GT_YES@intlh.inst: intlh.inst.in ../config.status
+@GT_YES@ cd .. \
+@GT_YES@ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
+@GT_YES@ $(SHELL) ./config.status
+@GT_NO@.PHONY: intlh.inst
+@GT_NO@intlh.inst:
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/dldialog/intl/VERSION b/dldialog/intl/VERSION
new file mode 100644
index 0000000..ee66b06
--- /dev/null
+++ b/dldialog/intl/VERSION
@@ -0,0 +1 @@
+GNU gettext library from gettext-0.10.35
diff --git a/dldialog/intl/bindtextdom.c b/dldialog/intl/bindtextdom.c
new file mode 100644
index 0000000..d9c3f34
--- /dev/null
+++ b/dldialog/intl/bindtextdom.c
@@ -0,0 +1,203 @@
+/* Implementation of the bindtextdomain(3) function
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+
+ 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#else
+# ifdef HAVE_MALLOC_H
+# include <malloc.h>
+# else
+void free ();
+# endif
+#endif
+
+#if defined HAVE_STRING_H || defined _LIBC
+# include <string.h>
+#else
+# include <strings.h>
+# ifndef memcpy
+# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+# endif
+#endif
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.h"
+#endif
+#include "gettext.h"
+#include "gettextP.h"
+
+/* @@ end of prolog @@ */
+
+/* Contains the default location of the message catalogs. */
+extern const char _nl_default_dirname[];
+
+/* List with bindings of specific domains. */
+extern struct binding *_nl_domain_bindings;
+
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define BINDTEXTDOMAIN __bindtextdomain
+# ifndef strdup
+# define strdup(str) __strdup (str)
+# endif
+#else
+# define BINDTEXTDOMAIN bindtextdomain__
+#endif
+
+/* Specify that the DOMAINNAME message catalog will be found
+ in DIRNAME rather than in the system locale data base. */
+char *
+BINDTEXTDOMAIN (domainname, dirname)
+ const char *domainname;
+ const char *dirname;
+{
+ struct binding *binding;
+
+ /* Some sanity checks. */
+ if (domainname == NULL || domainname[0] == '\0')
+ return NULL;
+
+ for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
+ {
+ int compare = strcmp (domainname, binding->domainname);
+ if (compare == 0)
+ /* We found it! */
+ break;
+ if (compare < 0)
+ {
+ /* It is not in the list. */
+ binding = NULL;
+ break;
+ }
+ }
+
+ if (dirname == NULL)
+ /* The current binding has be to returned. */
+ return binding == NULL ? (char *) _nl_default_dirname : binding->dirname;
+
+ if (binding != NULL)
+ {
+ /* The domain is already bound. If the new value and the old
+ one are equal we simply do nothing. Otherwise replace the
+ old binding. */
+ if (strcmp (dirname, binding->dirname) != 0)
+ {
+ char *new_dirname;
+
+ if (strcmp (dirname, _nl_default_dirname) == 0)
+ new_dirname = (char *) _nl_default_dirname;
+ else
+ {
+#if defined _LIBC || defined HAVE_STRDUP
+ new_dirname = strdup (dirname);
+ if (new_dirname == NULL)
+ return NULL;
+#else
+ size_t len = strlen (dirname) + 1;
+ new_dirname = (char *) malloc (len);
+ if (new_dirname == NULL)
+ return NULL;
+
+ memcpy (new_dirname, dirname, len);
+#endif
+ }
+
+ if (binding->dirname != _nl_default_dirname)
+ free (binding->dirname);
+
+ binding->dirname = new_dirname;
+ }
+ }
+ else
+ {
+ /* We have to create a new binding. */
+#if !defined _LIBC && !defined HAVE_STRDUP
+ size_t len;
+#endif
+ struct binding *new_binding =
+ (struct binding *) malloc (sizeof (*new_binding));
+
+ if (new_binding == NULL)
+ return NULL;
+
+#if defined _LIBC || defined HAVE_STRDUP
+ new_binding->domainname = strdup (domainname);
+ if (new_binding->domainname == NULL)
+ return NULL;
+#else
+ len = strlen (domainname) + 1;
+ new_binding->domainname = (char *) malloc (len);
+ if (new_binding->domainname == NULL)
+ return NULL;
+ memcpy (new_binding->domainname, domainname, len);
+#endif
+
+ if (strcmp (dirname, _nl_default_dirname) == 0)
+ new_binding->dirname = (char *) _nl_default_dirname;
+ else
+ {
+#if defined _LIBC || defined HAVE_STRDUP
+ new_binding->dirname = strdup (dirname);
+ if (new_binding->dirname == NULL)
+ return NULL;
+#else
+ len = strlen (dirname) + 1;
+ new_binding->dirname = (char *) malloc (len);
+ if (new_binding->dirname == NULL)
+ return NULL;
+ memcpy (new_binding->dirname, dirname, len);
+#endif
+ }
+
+ /* Now enqueue it. */
+ if (_nl_domain_bindings == NULL
+ || strcmp (domainname, _nl_domain_bindings->domainname) < 0)
+ {
+ new_binding->next = _nl_domain_bindings;
+ _nl_domain_bindings = new_binding;
+ }
+ else
+ {
+ binding = _nl_domain_bindings;
+ while (binding->next != NULL
+ && strcmp (domainname, binding->next->domainname) > 0)
+ binding = binding->next;
+
+ new_binding->next = binding->next;
+ binding->next = new_binding;
+ }
+
+ binding = new_binding;
+ }
+
+ return binding->dirname;
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__bindtextdomain, bindtextdomain);
+#endif
diff --git a/dldialog/intl/cat-compat.c b/dldialog/intl/cat-compat.c
new file mode 100644
index 0000000..867d901
--- /dev/null
+++ b/dldialog/intl/cat-compat.c
@@ -0,0 +1,262 @@
+/* Compatibility code for gettext-using-catgets interface.
+ Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+
+ 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#else
+char *getenv ();
+# ifdef HAVE_MALLOC_H
+# include <malloc.h>
+# endif
+#endif
+
+#ifdef HAVE_NL_TYPES_H
+# include <nl_types.h>
+#endif
+
+#include "libgettext.h"
+
+/* @@ end of prolog @@ */
+
+/* XPG3 defines the result of `setlocale (category, NULL)' as:
+ ``Directs `setlocale()' to query `category' and return the current
+ setting of `local'.''
+ However it does not specify the exact format. And even worse: POSIX
+ defines this not at all. So we can use this feature only on selected
+ system (e.g. those using GNU C Library). */
+#ifdef _LIBC
+# define HAVE_LOCALE_NULL
+#endif
+
+/* The catalog descriptor. */
+static nl_catd catalog = (nl_catd) -1;
+
+/* Name of the default catalog. */
+static const char default_catalog_name[] = "messages";
+
+/* Name of currently used catalog. */
+static const char *catalog_name = default_catalog_name;
+
+/* Get ID for given string. If not found return -1. */
+static int msg_to_cat_id PARAMS ((const char *msg));
+
+/* Substitution for systems lacking this function in their C library. */
+#if !_LIBC && !HAVE_STPCPY
+static char *stpcpy PARAMS ((char *dest, const char *src));
+#endif
+
+
+/* Set currently used domain/catalog. */
+char *
+textdomain (domainname)
+ const char *domainname;
+{
+ nl_catd new_catalog;
+ char *new_name;
+ size_t new_name_len;
+ char *lang;
+
+#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES \
+ && defined HAVE_LOCALE_NULL
+ lang = setlocale (LC_MESSAGES, NULL);
+#else
+ lang = getenv ("LC_ALL");
+ if (lang == NULL || lang[0] == '\0')
+ {
+ lang = getenv ("LC_MESSAGES");
+ if (lang == NULL || lang[0] == '\0')
+ lang = getenv ("LANG");
+ }
+#endif
+ if (lang == NULL || lang[0] == '\0')
+ lang = "C";
+
+ /* See whether name of currently used domain is asked. */
+ if (domainname == NULL)
+ return (char *) catalog_name;
+
+ if (domainname[0] == '\0')
+ domainname = default_catalog_name;
+
+ /* Compute length of added path element. */
+ new_name_len = sizeof (LOCALEDIR) - 1 + 1 + strlen (lang)
+ + sizeof ("/LC_MESSAGES/") - 1 + sizeof (PACKAGE) - 1
+ + sizeof (".cat");
+
+ new_name = (char *) malloc (new_name_len);
+ if (new_name == NULL)
+ return NULL;
+
+ strcpy (new_name, PACKAGE);
+ new_catalog = catopen (new_name, 0);
+
+ if (new_catalog == (nl_catd) -1)
+ {
+ /* NLSPATH search didn't work, try absolute path */
+ sprintf (new_name, "%s/%s/LC_MESSAGES/%s.cat", LOCALEDIR, lang,
+ PACKAGE);
+ new_catalog = catopen (new_name, 0);
+
+ if (new_catalog == (nl_catd) -1)
+ {
+ free (new_name);
+ return (char *) catalog_name;
+ }
+ }
+
+ /* Close old catalog. */
+ if (catalog != (nl_catd) -1)
+ catclose (catalog);
+ if (catalog_name != default_catalog_name)
+ free ((char *) catalog_name);
+
+ catalog = new_catalog;
+ catalog_name = new_name;
+
+ return (char *) catalog_name;
+}
+
+char *
+bindtextdomain (domainname, dirname)
+ const char *domainname;
+ const char *dirname;
+{
+#if HAVE_SETENV || HAVE_PUTENV
+ char *old_val, *new_val, *cp;
+ size_t new_val_len;
+
+ /* This does not make much sense here but to be compatible do it. */
+ if (domainname == NULL)
+ return NULL;
+
+ /* Compute length of added path element. If we use setenv we don't need
+ the first byts for NLSPATH=, but why complicate the code for this
+ peanuts. */
+ new_val_len = sizeof ("NLSPATH=") - 1 + strlen (dirname)
+ + sizeof ("/%L/LC_MESSAGES/%N.cat");
+
+ old_val = getenv ("NLSPATH");
+ if (old_val == NULL || old_val[0] == '\0')
+ {
+ old_val = NULL;
+ new_val_len += 1 + sizeof (LOCALEDIR) - 1
+ + sizeof ("/%L/LC_MESSAGES/%N.cat");
+ }
+ else
+ new_val_len += strlen (old_val);
+
+ new_val = (char *) malloc (new_val_len);
+ if (new_val == NULL)
+ return NULL;
+
+# if HAVE_SETENV
+ cp = new_val;
+# else
+ cp = stpcpy (new_val, "NLSPATH=");
+# endif
+
+ cp = stpcpy (cp, dirname);
+ cp = stpcpy (cp, "/%L/LC_MESSAGES/%N.cat:");
+
+ if (old_val == NULL)
+ {
+# if __STDC__
+ stpcpy (cp, LOCALEDIR "/%L/LC_MESSAGES/%N.cat");
+# else
+
+ cp = stpcpy (cp, LOCALEDIR);
+ stpcpy (cp, "/%L/LC_MESSAGES/%N.cat");
+# endif
+ }
+ else
+ stpcpy (cp, old_val);
+
+# if HAVE_SETENV
+ setenv ("NLSPATH", new_val, 1);
+ free (new_val);
+# else
+ putenv (new_val);
+ /* Do *not* free the environment entry we just entered. It is used
+ from now on. */
+# endif
+
+#endif
+
+ return (char *) domainname;
+}
+
+#undef gettext
+char *
+gettext (msg)
+ const char *msg;
+{
+ int msgid;
+
+ if (msg == NULL || catalog == (nl_catd) -1)
+ return (char *) msg;
+
+ /* Get the message from the catalog. We always use set number 1.
+ The message ID is computed by the function `msg_to_cat_id'
+ which works on the table generated by `po-to-tbl'. */
+ msgid = msg_to_cat_id (msg);
+ if (msgid == -1)
+ return (char *) msg;
+
+ return catgets (catalog, 1, msgid, (char *) msg);
+}
+
+/* Look through the table `_msg_tbl' which has `_msg_tbl_length' entries
+ for the one equal to msg. If it is found return the ID. In case when
+ the string is not found return -1. */
+static int
+msg_to_cat_id (msg)
+ const char *msg;
+{
+ int cnt;
+
+ for (cnt = 0; cnt < _msg_tbl_length; ++cnt)
+ if (strcmp (msg, _msg_tbl[cnt]._msg) == 0)
+ return _msg_tbl[cnt]._msg_number;
+
+ return -1;
+}
+
+
+/* @@ begin of epilog @@ */
+
+/* We don't want libintl.a to depend on any other library. So we
+ avoid the non-standard function stpcpy. In GNU C Library this
+ function is available, though. Also allow the symbol HAVE_STPCPY
+ to be defined. */
+#if !_LIBC && !HAVE_STPCPY
+static char *
+stpcpy (dest, src)
+ char *dest;
+ const char *src;
+{
+ while ((*dest++ = *src++) != '\0')
+ /* Do nothing. */ ;
+ return dest - 1;
+}
+#endif
diff --git a/dldialog/intl/dcgettext.c b/dldialog/intl/dcgettext.c
new file mode 100644
index 0000000..c4c7a2c
--- /dev/null
+++ b/dldialog/intl/dcgettext.c
@@ -0,0 +1,624 @@
+/* Implementation of the dcgettext(3) function.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+
+ 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# if defined HAVE_ALLOCA_H || defined _LIBC
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca
+char *alloca ();
+# endif
+# endif
+# endif
+#endif
+
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+#ifndef __set_errno
+# define __set_errno(val) errno = (val)
+#endif
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#else
+char *getenv ();
+# ifdef HAVE_MALLOC_H
+# include <malloc.h>
+# else
+void free ();
+# endif
+#endif
+
+#if defined HAVE_STRING_H || defined _LIBC
+# ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+# endif
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+#if !HAVE_STRCHR && !defined _LIBC
+# ifndef strchr
+# define strchr index
+# endif
+#endif
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#include "gettext.h"
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.h"
+#endif
+#include "hash-string.h"
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ANSI C functions. This is required by the standard
+ because some ANSI C functions will require linking with this object
+ file and the name space must not be polluted. */
+# define getcwd __getcwd
+# ifndef stpcpy
+# define stpcpy __stpcpy
+# endif
+#else
+# if !defined HAVE_GETCWD
+char *getwd ();
+# define getcwd(buf, max) getwd (buf)
+# else
+char *getcwd ();
+# endif
+# ifndef HAVE_STPCPY
+static char *stpcpy PARAMS ((char *dest, const char *src));
+# endif
+#endif
+
+/* Amount to increase buffer size by in each try. */
+#define PATH_INCR 32
+
+/* The following is from pathmax.h. */
+/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
+ PATH_MAX but might cause redefinition warnings when sys/param.h is
+ later included (as on MORE/BSD 4.3). */
+#if defined(_POSIX_VERSION) || (defined(HAVE_LIMITS_H) && !defined(__GNUC__))
+# include <limits.h>
+#endif
+
+#ifndef _POSIX_PATH_MAX
+# define _POSIX_PATH_MAX 255
+#endif
+
+#if !defined(PATH_MAX) && defined(_PC_PATH_MAX)
+# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
+#endif
+
+/* Don't include sys/param.h if it already has been. */
+#if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN)
+# include <sys/param.h>
+#endif
+
+#if !defined(PATH_MAX) && defined(MAXPATHLEN)
+# define PATH_MAX MAXPATHLEN
+#endif
+
+#ifndef PATH_MAX
+# define PATH_MAX _POSIX_PATH_MAX
+#endif
+
+/* XPG3 defines the result of `setlocale (category, NULL)' as:
+ ``Directs `setlocale()' to query `category' and return the current
+ setting of `local'.''
+ However it does not specify the exact format. And even worse: POSIX
+ defines this not at all. So we can use this feature only on selected
+ system (e.g. those using GNU C Library). */
+#ifdef _LIBC
+# define HAVE_LOCALE_NULL
+#endif
+
+/* Name of the default domain used for gettext(3) prior any call to
+ textdomain(3). The default value for this is "messages". */
+const char _nl_default_default_domain[] = "messages";
+
+/* Value used as the default domain for gettext(3). */
+const char *_nl_current_default_domain = _nl_default_default_domain;
+
+/* Contains the default location of the message catalogs. */
+const char _nl_default_dirname[] = GNULOCALEDIR;
+
+/* List with bindings of specific domains created by bindtextdomain()
+ calls. */
+struct binding *_nl_domain_bindings;
+
+/* Prototypes for local functions. */
+static char *find_msg PARAMS ((struct loaded_l10nfile *domain_file,
+ const char *msgid)) internal_function;
+static const char *category_to_name PARAMS ((int category)) internal_function;
+static const char *guess_category_value PARAMS ((int category,
+ const char *categoryname))
+ internal_function;
+
+
+/* For those loosing systems which don't have `alloca' we have to add
+ some additional code emulating it. */
+#ifdef HAVE_ALLOCA
+/* Nothing has to be done. */
+# define ADD_BLOCK(list, address) /* nothing */
+# define FREE_BLOCKS(list) /* nothing */
+#else
+struct block_list
+{
+ void *address;
+ struct block_list *next;
+};
+# define ADD_BLOCK(list, addr) \
+ do { \
+ struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
+ /* If we cannot get a free block we cannot add the new element to \
+ the list. */ \
+ if (newp != NULL) { \
+ newp->address = (addr); \
+ newp->next = (list); \
+ (list) = newp; \
+ } \
+ } while (0)
+# define FREE_BLOCKS(list) \
+ do { \
+ while (list != NULL) { \
+ struct block_list *old = list; \
+ list = list->next; \
+ free (old); \
+ } \
+ } while (0)
+# undef alloca
+# define alloca(size) (malloc (size))
+#endif /* have alloca */
+
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define DCGETTEXT __dcgettext
+#else
+# define DCGETTEXT dcgettext__
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+ locale. */
+char *
+DCGETTEXT (domainname, msgid, category)
+ const char *domainname;
+ const char *msgid;
+ int category;
+{
+#ifndef HAVE_ALLOCA
+ struct block_list *block_list = NULL;
+#endif
+ struct loaded_l10nfile *domain;
+ struct binding *binding;
+ const char *categoryname;
+ const char *categoryvalue;
+ char *dirname, *xdomainname;
+ char *single_locale;
+ char *retval;
+ int saved_errno = errno;
+
+ /* If no real MSGID is given return NULL. */
+ if (msgid == NULL)
+ return NULL;
+
+ /* If DOMAINNAME is NULL, we are interested in the default domain. If
+ CATEGORY is not LC_MESSAGES this might not make much sense but the
+ defintion left this undefined. */
+ if (domainname == NULL)
+ domainname = _nl_current_default_domain;
+
+ /* First find matching binding. */
+ for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
+ {
+ int compare = strcmp (domainname, binding->domainname);
+ if (compare == 0)
+ /* We found it! */
+ break;
+ if (compare < 0)
+ {
+ /* It is not in the list. */
+ binding = NULL;
+ break;
+ }
+ }
+
+ if (binding == NULL)
+ dirname = (char *) _nl_default_dirname;
+ else if (binding->dirname[0] == '/')
+ dirname = binding->dirname;
+ else
+ {
+ /* We have a relative path. Make it absolute now. */
+ size_t dirname_len = strlen (binding->dirname) + 1;
+ size_t path_max;
+ char *ret;
+
+ path_max = (unsigned) PATH_MAX;
+ path_max += 2; /* The getcwd docs say to do this. */
+
+ dirname = (char *) alloca (path_max + dirname_len);
+ ADD_BLOCK (block_list, dirname);
+
+ __set_errno (0);
+ while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE)
+ {
+ path_max += PATH_INCR;
+ dirname = (char *) alloca (path_max + dirname_len);
+ ADD_BLOCK (block_list, dirname);
+ __set_errno (0);
+ }
+
+ if (ret == NULL)
+ {
+ /* We cannot get the current working directory. Don't signal an
+ error but simply return the default string. */
+ FREE_BLOCKS (block_list);
+ __set_errno (saved_errno);
+ return (char *) msgid;
+ }
+
+ stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
+ }
+
+ /* Now determine the symbolic name of CATEGORY and its value. */
+ categoryname = category_to_name (category);
+ categoryvalue = guess_category_value (category, categoryname);
+
+ xdomainname = (char *) alloca (strlen (categoryname)
+ + strlen (domainname) + 5);
+ ADD_BLOCK (block_list, xdomainname);
+
+ stpcpy (stpcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
+ domainname),
+ ".mo");
+
+ /* Creating working area. */
+ single_locale = (char *) alloca (strlen (categoryvalue) + 1);
+ ADD_BLOCK (block_list, single_locale);
+
+
+ /* Search for the given string. This is a loop because we perhaps
+ got an ordered list of languages to consider for th translation. */
+ while (1)
+ {
+ /* Make CATEGORYVALUE point to the next element of the list. */
+ while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
+ ++categoryvalue;
+ if (categoryvalue[0] == '\0')
+ {
+ /* The whole contents of CATEGORYVALUE has been searched but
+ no valid entry has been found. We solve this situation
+ by implicitly appending a "C" entry, i.e. no translation
+ will take place. */
+ single_locale[0] = 'C';
+ single_locale[1] = '\0';
+ }
+ else
+ {
+ char *cp = single_locale;
+ while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
+ *cp++ = *categoryvalue++;
+ *cp = '\0';
+ }
+
+ /* If the current locale value is C (or POSIX) we don't load a
+ domain. Return the MSGID. */
+ if (strcmp (single_locale, "C") == 0
+ || strcmp (single_locale, "POSIX") == 0)
+ {
+ FREE_BLOCKS (block_list);
+ __set_errno (saved_errno);
+ return (char *) msgid;
+ }
+
+
+ /* Find structure describing the message catalog matching the
+ DOMAINNAME and CATEGORY. */
+ domain = _nl_find_domain (dirname, single_locale, xdomainname);
+
+ if (domain != NULL)
+ {
+ retval = find_msg (domain, msgid);
+
+ if (retval == NULL)
+ {
+ int cnt;
+
+ for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
+ {
+ retval = find_msg (domain->successor[cnt], msgid);
+
+ if (retval != NULL)
+ break;
+ }
+ }
+
+ if (retval != NULL)
+ {
+ FREE_BLOCKS (block_list);
+ __set_errno (saved_errno);
+ return retval;
+ }
+ }
+ }
+ /* NOTREACHED */
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__dcgettext, dcgettext);
+#endif
+
+
+static char *
+internal_function
+find_msg (domain_file, msgid)
+ struct loaded_l10nfile *domain_file;
+ const char *msgid;
+{
+ size_t top, act, bottom;
+ struct loaded_domain *domain;
+
+ if (domain_file->decided == 0)
+ _nl_load_domain (domain_file);
+
+ if (domain_file->data == NULL)
+ return NULL;
+
+ domain = (struct loaded_domain *) domain_file->data;
+
+ /* Locate the MSGID and its translation. */
+ if (domain->hash_size > 2 && domain->hash_tab != NULL)
+ {
+ /* Use the hashing table. */
+ nls_uint32 len = strlen (msgid);
+ nls_uint32 hash_val = hash_string (msgid);
+ nls_uint32 idx = hash_val % domain->hash_size;
+ nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
+ nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]);
+
+ if (nstr == 0)
+ /* Hash table entry is empty. */
+ return NULL;
+
+ if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
+ && strcmp (msgid,
+ domain->data + W (domain->must_swap,
+ domain->orig_tab[nstr - 1].offset)) == 0)
+ return (char *) domain->data + W (domain->must_swap,
+ domain->trans_tab[nstr - 1].offset);
+
+ while (1)
+ {
+ if (idx >= domain->hash_size - incr)
+ idx -= domain->hash_size - incr;
+ else
+ idx += incr;
+
+ nstr = W (domain->must_swap, domain->hash_tab[idx]);
+ if (nstr == 0)
+ /* Hash table entry is empty. */
+ return NULL;
+
+ if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
+ && strcmp (msgid,
+ domain->data + W (domain->must_swap,
+ domain->orig_tab[nstr - 1].offset))
+ == 0)
+ return (char *) domain->data
+ + W (domain->must_swap, domain->trans_tab[nstr - 1].offset);
+ }
+ /* NOTREACHED */
+ }
+
+ /* Now we try the default method: binary search in the sorted
+ array of messages. */
+ bottom = 0;
+ top = domain->nstrings;
+ while (bottom < top)
+ {
+ int cmp_val;
+
+ act = (bottom + top) / 2;
+ cmp_val = strcmp (msgid, domain->data
+ + W (domain->must_swap,
+ domain->orig_tab[act].offset));
+ if (cmp_val < 0)
+ top = act;
+ else if (cmp_val > 0)
+ bottom = act + 1;
+ else
+ break;
+ }
+
+ /* If an translation is found return this. */
+ return bottom >= top ? NULL : (char *) domain->data
+ + W (domain->must_swap,
+ domain->trans_tab[act].offset);
+}
+
+
+/* Return string representation of locale CATEGORY. */
+static const char *
+internal_function
+category_to_name (category)
+ int category;
+{
+ const char *retval;
+
+ switch (category)
+ {
+#ifdef LC_COLLATE
+ case LC_COLLATE:
+ retval = "LC_COLLATE";
+ break;
+#endif
+#ifdef LC_CTYPE
+ case LC_CTYPE:
+ retval = "LC_CTYPE";
+ break;
+#endif
+#ifdef LC_MONETARY
+ case LC_MONETARY:
+ retval = "LC_MONETARY";
+ break;
+#endif
+#ifdef LC_NUMERIC
+ case LC_NUMERIC:
+ retval = "LC_NUMERIC";
+ break;
+#endif
+#ifdef LC_TIME
+ case LC_TIME:
+ retval = "LC_TIME";
+ break;
+#endif
+#ifdef LC_MESSAGES
+ case LC_MESSAGES:
+ retval = "LC_MESSAGES";
+ break;
+#endif
+#ifdef LC_RESPONSE
+ case LC_RESPONSE:
+ retval = "LC_RESPONSE";
+ break;
+#endif
+#ifdef LC_ALL
+ case LC_ALL:
+ /* This might not make sense but is perhaps better than any other
+ value. */
+ retval = "LC_ALL";
+ break;
+#endif
+ default:
+ /* If you have a better idea for a default value let me know. */
+ retval = "LC_XXX";
+ }
+
+ return retval;
+}
+
+/* Guess value of current locale from value of the environment variables. */
+static const char *
+internal_function
+guess_category_value (category, categoryname)
+ int category;
+ const char *categoryname;
+{
+ const char *retval;
+
+ /* The highest priority value is the `LANGUAGE' environment
+ variable. This is a GNU extension. */
+ retval = getenv ("LANGUAGE");
+ if (retval != NULL && retval[0] != '\0')
+ return retval;
+
+ /* `LANGUAGE' is not set. So we have to proceed with the POSIX
+ methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some
+ systems this can be done by the `setlocale' function itself. */
+#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
+ return setlocale (category, NULL);
+#else
+ /* Setting of LC_ALL overwrites all other. */
+ retval = getenv ("LC_ALL");
+ if (retval != NULL && retval[0] != '\0')
+ return retval;
+
+ /* Next comes the name of the desired category. */
+ retval = getenv (categoryname);
+ if (retval != NULL && retval[0] != '\0')
+ return retval;
+
+ /* Last possibility is the LANG environment variable. */
+ retval = getenv ("LANG");
+ if (retval != NULL && retval[0] != '\0')
+ return retval;
+
+ /* We use C as the default domain. POSIX says this is implementation
+ defined. */
+ return "C";
+#endif
+}
+
+/* @@ begin of epilog @@ */
+
+/* We don't want libintl.a to depend on any other library. So we
+ avoid the non-standard function stpcpy. In GNU C Library this
+ function is available, though. Also allow the symbol HAVE_STPCPY
+ to be defined. */
+#if !_LIBC && !HAVE_STPCPY
+static char *
+stpcpy (dest, src)
+ char *dest;
+ const char *src;
+{
+ while ((*dest++ = *src++) != '\0')
+ /* Do nothing. */ ;
+ return dest - 1;
+}
+#endif
+
+
+#ifdef _LIBC
+/* If we want to free all resources we have to do some work at
+ program's end. */
+static void __attribute__ ((unused))
+free_mem (void)
+{
+ struct binding *runp;
+
+ for (runp = _nl_domain_bindings; runp != NULL; runp = runp->next)
+ {
+ free (runp->domainname);
+ if (runp->dirname != _nl_default_dirname)
+ /* Yes, this is a pointer comparison. */
+ free (runp->dirname);
+ }
+
+ if (_nl_current_default_domain != _nl_default_default_domain)
+ /* Yes, again a pointer comparison. */
+ free ((char *) _nl_current_default_domain);
+}
+
+text_set_element (__libc_subfreeres, free_mem);
+#endif
diff --git a/dldialog/intl/dgettext.c b/dldialog/intl/dgettext.c
new file mode 100644
index 0000000..0510c2b
--- /dev/null
+++ b/dldialog/intl/dgettext.c
@@ -0,0 +1,59 @@
+/* Implementation of the dgettext(3) function
+ Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+
+ 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined HAVE_LOCALE_H || defined _LIBC
+# include <locale.h>
+#endif
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define DGETTEXT __dgettext
+# define DCGETTEXT __dcgettext
+#else
+# define DGETTEXT dgettext__
+# define DCGETTEXT dcgettext__
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog of the current
+ LC_MESSAGES locale. */
+char *
+DGETTEXT (domainname, msgid)
+ const char *domainname;
+ const char *msgid;
+{
+ return DCGETTEXT (domainname, msgid, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__dgettext, dgettext);
+#endif
diff --git a/dldialog/intl/explodename.c b/dldialog/intl/explodename.c
new file mode 100644
index 0000000..8066dc2
--- /dev/null
+++ b/dldialog/intl/explodename.c
@@ -0,0 +1,188 @@
+/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+
+ 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#endif
+
+#if defined HAVE_STRING_H || defined _LIBC
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+#include <sys/types.h>
+
+#include "loadinfo.h"
+
+/* On some strange systems still no definition of NULL is found. Sigh! */
+#ifndef NULL
+# if defined __STDC__ && __STDC__
+# define NULL ((void *) 0)
+# else
+# define NULL 0
+# endif
+#endif
+
+/* @@ end of prolog @@ */
+
+int
+_nl_explode_name (name, language, modifier, territory, codeset,
+ normalized_codeset, special, sponsor, revision)
+ char *name;
+ const char **language;
+ const char **modifier;
+ const char **territory;
+ const char **codeset;
+ const char **normalized_codeset;
+ const char **special;
+ const char **sponsor;
+ const char **revision;
+{
+ enum { undecided, xpg, cen } syntax;
+ char *cp;
+ int mask;
+
+ *modifier = NULL;
+ *territory = NULL;
+ *codeset = NULL;
+ *normalized_codeset = NULL;
+ *special = NULL;
+ *sponsor = NULL;
+ *revision = NULL;
+
+ /* Now we determine the single parts of the locale name. First
+ look for the language. Termination symbols are `_' and `@' if
+ we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
+ mask = 0;
+ syntax = undecided;
+ *language = cp = name;
+ while (cp[0] != '\0' && cp[0] != '_' && cp[0] != '@'
+ && cp[0] != '+' && cp[0] != ',')
+ ++cp;
+
+ if (*language == cp)
+ /* This does not make sense: language has to be specified. Use
+ this entry as it is without exploding. Perhaps it is an alias. */
+ cp = strchr (*language, '\0');
+ else if (cp[0] == '_')
+ {
+ /* Next is the territory. */
+ cp[0] = '\0';
+ *territory = ++cp;
+
+ while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@'
+ && cp[0] != '+' && cp[0] != ',' && cp[0] != '_')
+ ++cp;
+
+ mask |= TERRITORY;
+
+ if (cp[0] == '.')
+ {
+ /* Next is the codeset. */
+ syntax = xpg;
+ cp[0] = '\0';
+ *codeset = ++cp;
+
+ while (cp[0] != '\0' && cp[0] != '@')
+ ++cp;
+
+ mask |= XPG_CODESET;
+
+ if (*codeset != cp && (*codeset)[0] != '\0')
+ {
+ *normalized_codeset = _nl_normalize_codeset (*codeset,
+ cp - *codeset);
+ if (strcmp (*codeset, *normalized_codeset) == 0)
+ free ((char *) *normalized_codeset);
+ else
+ mask |= XPG_NORM_CODESET;
+ }
+ }
+ }
+
+ if (cp[0] == '@' || (syntax != xpg && cp[0] == '+'))
+ {
+ /* Next is the modifier. */
+ syntax = cp[0] == '@' ? xpg : cen;
+ cp[0] = '\0';
+ *modifier = ++cp;
+
+ while (syntax == cen && cp[0] != '\0' && cp[0] != '+'
+ && cp[0] != ',' && cp[0] != '_')
+ ++cp;
+
+ mask |= XPG_MODIFIER | CEN_AUDIENCE;
+ }
+
+ if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_'))
+ {
+ syntax = cen;
+
+ if (cp[0] == '+')
+ {
+ /* Next is special application (CEN syntax). */
+ cp[0] = '\0';
+ *special = ++cp;
+
+ while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_')
+ ++cp;
+
+ mask |= CEN_SPECIAL;
+ }
+
+ if (cp[0] == ',')
+ {
+ /* Next is sponsor (CEN syntax). */
+ cp[0] = '\0';
+ *sponsor = ++cp;
+
+ while (cp[0] != '\0' && cp[0] != '_')
+ ++cp;
+
+ mask |= CEN_SPONSOR;
+ }
+
+ if (cp[0] == '_')
+ {
+ /* Next is revision (CEN syntax). */
+ cp[0] = '\0';
+ *revision = ++cp;
+
+ mask |= CEN_REVISION;
+ }
+ }
+
+ /* For CEN syntax values it might be important to have the
+ separator character in the file name, not for XPG syntax. */
+ if (syntax == xpg)
+ {
+ if (*territory != NULL && (*territory)[0] == '\0')
+ mask &= ~TERRITORY;
+
+ if (*codeset != NULL && (*codeset)[0] == '\0')
+ mask &= ~XPG_CODESET;
+
+ if (*modifier != NULL && (*modifier)[0] == '\0')
+ mask &= ~XPG_MODIFIER;
+ }
+
+ return mask;
+}
diff --git a/dldialog/intl/finddomain.c b/dldialog/intl/finddomain.c
new file mode 100644
index 0000000..81ea29b
--- /dev/null
+++ b/dldialog/intl/finddomain.c
@@ -0,0 +1,216 @@
+/* Handle list of needed message catalogs
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+
+ 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <errno.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#else
+# ifdef HAVE_MALLOC_H
+# include <malloc.h>
+# else
+void free ();
+# endif
+#endif
+
+#if defined HAVE_STRING_H || defined _LIBC
+# include <string.h>
+#else
+# include <strings.h>
+# ifndef memcpy
+# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+# endif
+#endif
+#if !HAVE_STRCHR && !defined _LIBC
+# ifndef strchr
+# define strchr index
+# endif
+#endif
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#include "gettext.h"
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.h"
+#endif
+
+/* @@ end of prolog @@ */
+/* List of already loaded domains. */
+static struct loaded_l10nfile *_nl_loaded_domains;
+
+
+/* Return a data structure describing the message catalog described by
+ the DOMAINNAME and CATEGORY parameters with respect to the currently
+ established bindings. */
+struct loaded_l10nfile *
+internal_function
+_nl_find_domain (dirname, locale, domainname)
+ const char *dirname;
+ char *locale;
+ const char *domainname;
+{
+ struct loaded_l10nfile *retval;
+ const char *language;
+ const char *modifier;
+ const char *territory;
+ const char *codeset;
+ const char *normalized_codeset;
+ const char *special;
+ const char *sponsor;
+ const char *revision;
+ const char *alias_value;
+ int mask;
+
+ /* LOCALE can consist of up to four recognized parts for the XPG syntax:
+
+ language[_territory[.codeset]][@modifier]
+
+ and six parts for the CEN syntax:
+
+ language[_territory][+audience][+special][,[sponsor][_revision]]
+
+ Beside the first part all of them are allowed to be missing. If
+ the full specified locale is not found, the less specific one are
+ looked for. The various parts will be stripped off according to
+ the following order:
+ (1) revision
+ (2) sponsor
+ (3) special
+ (4) codeset
+ (5) normalized codeset
+ (6) territory
+ (7) audience/modifier
+ */
+
+ /* If we have already tested for this locale entry there has to
+ be one data set in the list of loaded domains. */
+ retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
+ strlen (dirname) + 1, 0, locale, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, domainname, 0);
+ if (retval != NULL)
+ {
+ /* We know something about this locale. */
+ int cnt;
+
+ if (retval->decided == 0)
+ _nl_load_domain (retval);
+
+ if (retval->data != NULL)
+ return retval;
+
+ for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
+ {
+ if (retval->successor[cnt]->decided == 0)
+ _nl_load_domain (retval->successor[cnt]);
+
+ if (retval->successor[cnt]->data != NULL)
+ break;
+ }
+ return cnt >= 0 ? retval : NULL;
+ /* NOTREACHED */
+ }
+
+ /* See whether the locale value is an alias. If yes its value
+ *overwrites* the alias name. No test for the original value is
+ done. */
+ alias_value = _nl_expand_alias (locale);
+ if (alias_value != NULL)
+ {
+#if defined _LIBC || defined HAVE_STRDUP
+ locale = strdup (alias_value);
+ if (locale == NULL)
+ return NULL;
+#else
+ size_t len = strlen (alias_value) + 1;
+ locale = (char *) malloc (len);
+ if (locale == NULL)
+ return NULL;
+
+ memcpy (locale, alias_value, len);
+#endif
+ }
+
+ /* Now we determine the single parts of the locale name. First
+ look for the language. Termination symbols are `_' and `@' if
+ we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
+ mask = _nl_explode_name (locale, &language, &modifier, &territory,
+ &codeset, &normalized_codeset, &special,
+ &sponsor, &revision);
+
+ /* Create all possible locale entries which might be interested in
+ generalization. */
+ retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
+ strlen (dirname) + 1, mask, language, territory,
+ codeset, normalized_codeset, modifier, special,
+ sponsor, revision, domainname, 1);
+ if (retval == NULL)
+ /* This means we are out of core. */
+ return NULL;
+
+ if (retval->decided == 0)
+ _nl_load_domain (retval);
+ if (retval->data == NULL)
+ {
+ int cnt;
+ for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
+ {
+ if (retval->successor[cnt]->decided == 0)
+ _nl_load_domain (retval->successor[cnt]);
+ if (retval->successor[cnt]->data != NULL)
+ break;
+ }
+ }
+
+ /* The room for an alias was dynamically allocated. Free it now. */
+ if (alias_value != NULL)
+ free (locale);
+
+ return retval;
+}
+
+
+#ifdef _LIBC
+static void __attribute__ ((unused))
+free_mem (void)
+{
+ struct loaded_l10nfile *runp = _nl_loaded_domains;
+
+ while (runp != NULL)
+ {
+ struct loaded_l10nfile *here = runp;
+ if (runp->data != NULL)
+ _nl_unload_domain ((struct loaded_domain *) runp->data);
+ runp = runp->next;
+ free (here);
+ }
+}
+
+text_set_element (__libc_subfreeres, free_mem);
+#endif
diff --git a/dldialog/intl/gettext.c b/dldialog/intl/gettext.c
new file mode 100644
index 0000000..d929f98
--- /dev/null
+++ b/dldialog/intl/gettext.c
@@ -0,0 +1,70 @@
+/* Implementation of gettext(3) function.
+ Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+
+ 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef _LIBC
+# define __need_NULL
+# include <stddef.h>
+#else
+# ifdef STDC_HEADERS
+# include <stdlib.h> /* Just for NULL. */
+# else
+# ifdef HAVE_STRING_H
+# include <string.h>
+# else
+# define NULL ((void *) 0)
+# endif
+# endif
+#endif
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define GETTEXT __gettext
+# define DGETTEXT __dgettext
+#else
+# define GETTEXT gettext__
+# define DGETTEXT dgettext__
+#endif
+
+/* Look up MSGID in the current default message catalog for the current
+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
+ text). */
+char *
+GETTEXT (msgid)
+ const char *msgid;
+{
+ return DGETTEXT (NULL, msgid);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__gettext, gettext);
+#endif
diff --git a/dldialog/intl/gettext.h b/dldialog/intl/gettext.h
new file mode 100644
index 0000000..3cd23d7
--- /dev/null
+++ b/dldialog/intl/gettext.h
@@ -0,0 +1,105 @@
+/* Internal header for GNU gettext internationalization functions.
+ Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+
+ 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, 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 Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _GETTEXT_H
+#define _GETTEXT_H 1
+
+#include <stdio.h>
+
+#if HAVE_LIMITS_H || _LIBC
+# include <limits.h>
+#endif
+
+/* @@ end of prolog @@ */
+
+/* The magic number of the GNU message catalog format. */
+#define _MAGIC 0x950412de
+#define _MAGIC_SWAPPED 0xde120495
+
+/* Revision number of the currently used .mo (binary) file format. */
+#define MO_REVISION_NUMBER 0
+
+/* The following contortions are an attempt to use the C preprocessor
+ to determine an unsigned integral type that is 32 bits wide. An
+ alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
+ doing that would require that the configure script compile and *run*
+ the resulting executable. Locally running cross-compiled executables
+ is usually not possible. */
+
+#if __STDC__
+# define UINT_MAX_32_BITS 4294967295U
+#else
+# define UINT_MAX_32_BITS 0xFFFFFFFF
+#endif
+
+/* If UINT_MAX isn't defined, assume it's a 32-bit type.
+ This should be valid for all systems GNU cares about because
+ that doesn't include 16-bit systems, and only modern systems
+ (that certainly have <limits.h>) have 64+-bit integral types. */
+
+#ifndef UINT_MAX
+# define UINT_MAX UINT_MAX_32_BITS
+#endif
+
+#if UINT_MAX == UINT_MAX_32_BITS
+typedef unsigned nls_uint32;
+#else
+# if USHRT_MAX == UINT_MAX_32_BITS
+typedef unsigned short nls_uint32;
+# else
+# if ULONG_MAX == UINT_MAX_32_BITS
+typedef unsigned long nls_uint32;
+# else
+ /* The following line is intended to throw an error. Using #error is
+ not portable enough. */
+ "Cannot determine unsigned 32-bit data type."
+# endif
+# endif
+#endif
+
+
+/* Header for binary .mo file format. */
+struct mo_file_header
+{
+ /* The magic number. */
+ nls_uint32 magic;
+ /* The revision number of the file format. */
+ nls_uint32 revision;
+ /* The number of strings pairs. */
+ nls_uint32 nstrings;
+ /* Offset of table with start offsets of original strings. */
+ nls_uint32 orig_tab_offset;
+ /* Offset of table with start offsets of translation strings. */
+ nls_uint32 trans_tab_offset;
+ /* Size of hashing table. */
+ nls_uint32 hash_tab_size;
+ /* Offset of first hashing entry. */
+ nls_uint32 hash_tab_offset;
+};
+
+struct string_desc
+{
+ /* Length of addressed string. */
+ nls_uint32 length;
+ /* Offset of string in file. */
+ nls_uint32 offset;
+};
+
+/* @@ begin of epilog @@ */
+
+#endif /* gettext.h */
diff --git a/dldialog/intl/gettextP.h b/dldialog/intl/gettextP.h
new file mode 100644
index 0000000..00c5203
--- /dev/null
+++ b/dldialog/intl/gettextP.h
@@ -0,0 +1,89 @@
+/* Header describing internals of gettext library
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+
+ 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _GETTEXTP_H
+#define _GETTEXTP_H
+
+#include "loadinfo.h"
+
+/* @@ end of prolog @@ */
+
+#ifndef PARAMS
+# if __STDC__
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif
+#endif
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+#ifndef W
+# define W(flag, data) ((flag) ? SWAP (data) : (data))
+#endif
+
+
+#ifdef _LIBC
+# include <byteswap.h>
+# define SWAP(i) bswap_32 (i)
+#else
+static nls_uint32 SWAP PARAMS ((nls_uint32 i));
+
+static inline nls_uint32
+SWAP (i)
+ nls_uint32 i;
+{
+ return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
+}
+#endif
+
+
+struct loaded_domain
+{
+ const char *data;
+ int use_mmap;
+ size_t mmap_size;
+ int must_swap;
+ nls_uint32 nstrings;
+ struct string_desc *orig_tab;
+ struct string_desc *trans_tab;
+ nls_uint32 hash_size;
+ nls_uint32 *hash_tab;
+};
+
+struct binding
+{
+ struct binding *next;
+ char *domainname;
+ char *dirname;
+};
+
+struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
+ char *__locale,
+ const char *__domainname))
+ internal_function;
+void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain))
+ internal_function;
+void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
+ internal_function;
+
+/* @@ begin of epilog @@ */
+
+#endif /* gettextP.h */
diff --git a/dldialog/intl/hash-string.h b/dldialog/intl/hash-string.h
new file mode 100644
index 0000000..cacb38e
--- /dev/null
+++ b/dldialog/intl/hash-string.h
@@ -0,0 +1,59 @@
+/* Implements a string hashing function.
+ Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+
+ 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, 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 Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* @@ end of prolog @@ */
+
+#ifndef PARAMS
+# if __STDC__
+# define PARAMS(Args) Args
+# else
+# define PARAMS(Args) ()
+# endif
+#endif
+
+/* We assume to have `unsigned long int' value with at least 32 bits. */
+#define HASHWORDBITS 32
+
+
+/* Defines the so called `hashpjw' function by P.J. Weinberger
+ [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
+ 1986, 1987 Bell Telephone Laboratories, Inc.] */
+static unsigned long hash_string PARAMS ((const char *__str_param));
+
+static inline unsigned long
+hash_string (str_param)
+ const char *str_param;
+{
+ unsigned long int hval, g;
+ const char *str = str_param;
+
+ /* Compute the hash value for the given string. */
+ hval = 0;
+ while (*str != '\0')
+ {
+ hval <<= 4;
+ hval += (unsigned long) *str++;
+ g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4));
+ if (g != 0)
+ {
+ hval ^= g >> (HASHWORDBITS - 8);
+ hval ^= g;
+ }
+ }
+ return hval;
+}
diff --git a/dldialog/intl/intl-compat.c b/dldialog/intl/intl-compat.c
new file mode 100644
index 0000000..503efa0
--- /dev/null
+++ b/dldialog/intl/intl-compat.c
@@ -0,0 +1,76 @@
+/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
+ Library.
+ Copyright (C) 1995 Software Foundation, Inc.
+
+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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "libgettext.h"
+
+/* @@ end of prolog @@ */
+
+
+#undef gettext
+#undef dgettext
+#undef dcgettext
+#undef textdomain
+#undef bindtextdomain
+
+
+char *
+bindtextdomain (domainname, dirname)
+ const char *domainname;
+ const char *dirname;
+{
+ return bindtextdomain__ (domainname, dirname);
+}
+
+
+char *
+dcgettext (domainname, msgid, category)
+ const char *domainname;
+ const char *msgid;
+ int category;
+{
+ return dcgettext__ (domainname, msgid, category);
+}
+
+
+char *
+dgettext (domainname, msgid)
+ const char *domainname;
+ const char *msgid;
+{
+ return dgettext__ (domainname, msgid);
+}
+
+
+char *
+gettext (msgid)
+ const char *msgid;
+{
+ return gettext__ (msgid);
+}
+
+
+char *
+textdomain (domainname)
+ const char *domainname;
+{
+ return textdomain__ (domainname);
+}
diff --git a/dldialog/intl/l10nflist.c b/dldialog/intl/l10nflist.c
new file mode 100644
index 0000000..9c7dc18
--- /dev/null
+++ b/dldialog/intl/l10nflist.c
@@ -0,0 +1,411 @@
+/* Handle list of needed message catalogs
+ Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+
+ 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#if defined HAVE_STRING_H || defined _LIBC
+# ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+# endif
+# include <string.h>
+#else
+# include <strings.h>
+# ifndef memcpy
+# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+# endif
+#endif
+#if !HAVE_STRCHR && !defined _LIBC
+# ifndef strchr
+# define strchr index
+# endif
+#endif
+
+#if defined _LIBC || defined HAVE_ARGZ_H
+# include <argz.h>
+#endif
+#include <ctype.h>
+#include <sys/types.h>
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#endif
+
+#include "loadinfo.h"
+
+/* On some strange systems still no definition of NULL is found. Sigh! */
+#ifndef NULL
+# if defined __STDC__ && __STDC__
+# define NULL ((void *) 0)
+# else
+# define NULL 0
+# endif
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ANSI C functions. This is required by the standard
+ because some ANSI C functions will require linking with this object
+ file and the name space must not be polluted. */
+# ifndef stpcpy
+# define stpcpy(dest, src) __stpcpy(dest, src)
+# endif
+#else
+# ifndef HAVE_STPCPY
+static char *stpcpy PARAMS ((char *dest, const char *src));
+# endif
+#endif
+
+/* Define function which are usually not available. */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_COUNT
+/* Returns the number of strings in ARGZ. */
+static size_t argz_count__ PARAMS ((const char *argz, size_t len));
+
+static size_t
+argz_count__ (argz, len)
+ const char *argz;
+ size_t len;
+{
+ size_t count = 0;
+ while (len > 0)
+ {
+ size_t part_len = strlen (argz);
+ argz += part_len + 1;
+ len -= part_len + 1;
+ count++;
+ }
+ return count;
+}
+# undef __argz_count
+# define __argz_count(argz, len) argz_count__ (argz, len)
+#endif /* !_LIBC && !HAVE___ARGZ_COUNT */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
+/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
+ except the last into the character SEP. */
+static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
+
+static void
+argz_stringify__ (argz, len, sep)
+ char *argz;
+ size_t len;
+ int sep;
+{
+ while (len > 0)
+ {
+ size_t part_len = strlen (argz);
+ argz += part_len;
+ len -= part_len + 1;
+ if (len > 0)
+ *argz++ = sep;
+ }
+}
+# undef __argz_stringify
+# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
+#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_NEXT
+static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
+ const char *entry));
+
+static char *
+argz_next__ (argz, argz_len, entry)
+ char *argz;
+ size_t argz_len;
+ const char *entry;
+{
+ if (entry)
+ {
+ if (entry < argz + argz_len)
+ entry = strchr (entry, '\0') + 1;
+
+ return entry >= argz + argz_len ? NULL : (char *) entry;
+ }
+ else
+ if (argz_len > 0)
+ return argz;
+ else
+ return 0;
+}
+# undef __argz_next
+# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry)
+#endif /* !_LIBC && !HAVE___ARGZ_NEXT */
+
+
+/* Return number of bits set in X. */
+static int pop PARAMS ((int x));
+
+static inline int
+pop (x)
+ int x;
+{
+ /* We assume that no more than 16 bits are used. */
+ x = ((x & ~0x5555) >> 1) + (x & 0x5555);
+ x = ((x & ~0x3333) >> 2) + (x & 0x3333);
+ x = ((x >> 4) + x) & 0x0f0f;
+ x = ((x >> 8) + x) & 0xff;
+
+ return x;
+}
+
+
+struct loaded_l10nfile *
+_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
+ territory, codeset, normalized_codeset, modifier, special,
+ sponsor, revision, filename, do_allocate)
+ struct loaded_l10nfile **l10nfile_list;
+ const char *dirlist;
+ size_t dirlist_len;
+ int mask;
+ const char *language;
+ const char *territory;
+ const char *codeset;
+ const char *normalized_codeset;
+ const char *modifier;
+ const char *special;
+ const char *sponsor;
+ const char *revision;
+ const char *filename;
+ int do_allocate;
+{
+ char *abs_filename;
+ struct loaded_l10nfile *last = NULL;
+ struct loaded_l10nfile *retval;
+ char *cp;
+ size_t entries;
+ int cnt;
+
+ /* Allocate room for the full file name. */
+ abs_filename = (char *) malloc (dirlist_len
+ + strlen (language)
+ + ((mask & TERRITORY) != 0
+ ? strlen (territory) + 1 : 0)
+ + ((mask & XPG_CODESET) != 0
+ ? strlen (codeset) + 1 : 0)
+ + ((mask & XPG_NORM_CODESET) != 0
+ ? strlen (normalized_codeset) + 1 : 0)
+ + (((mask & XPG_MODIFIER) != 0
+ || (mask & CEN_AUDIENCE) != 0)
+ ? strlen (modifier) + 1 : 0)
+ + ((mask & CEN_SPECIAL) != 0
+ ? strlen (special) + 1 : 0)
+ + (((mask & CEN_SPONSOR) != 0
+ || (mask & CEN_REVISION) != 0)
+ ? (1 + ((mask & CEN_SPONSOR) != 0
+ ? strlen (sponsor) + 1 : 0)
+ + ((mask & CEN_REVISION) != 0
+ ? strlen (revision) + 1 : 0)) : 0)
+ + 1 + strlen (filename) + 1);
+
+ if (abs_filename == NULL)
+ return NULL;
+
+ retval = NULL;
+ last = NULL;
+
+ /* Construct file name. */
+ memcpy (abs_filename, dirlist, dirlist_len);
+ __argz_stringify (abs_filename, dirlist_len, ':');
+ cp = abs_filename + (dirlist_len - 1);
+ *cp++ = '/';
+ cp = stpcpy (cp, language);
+
+ if ((mask & TERRITORY) != 0)
+ {
+ *cp++ = '_';
+ cp = stpcpy (cp, territory);
+ }
+ if ((mask & XPG_CODESET) != 0)
+ {
+ *cp++ = '.';
+ cp = stpcpy (cp, codeset);
+ }
+ if ((mask & XPG_NORM_CODESET) != 0)
+ {
+ *cp++ = '.';
+ cp = stpcpy (cp, normalized_codeset);
+ }
+ if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
+ {
+ /* This component can be part of both syntaces but has different
+ leading characters. For CEN we use `+', else `@'. */
+ *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@';
+ cp = stpcpy (cp, modifier);
+ }
+ if ((mask & CEN_SPECIAL) != 0)
+ {
+ *cp++ = '+';
+ cp = stpcpy (cp, special);
+ }
+ if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0)
+ {
+ *cp++ = ',';
+ if ((mask & CEN_SPONSOR) != 0)
+ cp = stpcpy (cp, sponsor);
+ if ((mask & CEN_REVISION) != 0)
+ {
+ *cp++ = '_';
+ cp = stpcpy (cp, revision);
+ }
+ }
+
+ *cp++ = '/';
+ stpcpy (cp, filename);
+
+ /* Look in list of already loaded domains whether it is already
+ available. */
+ last = NULL;
+ for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
+ if (retval->filename != NULL)
+ {
+ int compare = strcmp (retval->filename, abs_filename);
+ if (compare == 0)
+ /* We found it! */
+ break;
+ if (compare < 0)
+ {
+ /* It's not in the list. */
+ retval = NULL;
+ break;
+ }
+
+ last = retval;
+ }
+
+ if (retval != NULL || do_allocate == 0)
+ {
+ free (abs_filename);
+ return retval;
+ }
+
+ retval = (struct loaded_l10nfile *)
+ malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len)
+ * (1 << pop (mask))
+ * sizeof (struct loaded_l10nfile *)));
+ if (retval == NULL)
+ return NULL;
+
+ retval->filename = abs_filename;
+ retval->decided = (__argz_count (dirlist, dirlist_len) != 1
+ || ((mask & XPG_CODESET) != 0
+ && (mask & XPG_NORM_CODESET) != 0));
+ retval->data = NULL;
+
+ if (last == NULL)
+ {
+ retval->next = *l10nfile_list;
+ *l10nfile_list = retval;
+ }
+ else
+ {
+ retval->next = last->next;
+ last->next = retval;
+ }
+
+ entries = 0;
+ /* If the DIRLIST is a real list the RETVAL entry corresponds not to
+ a real file. So we have to use the DIRLIST separation mechanism
+ of the inner loop. */
+ cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask;
+ for (; cnt >= 0; --cnt)
+ if ((cnt & ~mask) == 0
+ && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
+ && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
+ {
+ /* Iterate over all elements of the DIRLIST. */
+ char *dir = NULL;
+
+ while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
+ != NULL)
+ retval->successor[entries++]
+ = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt,
+ language, territory, codeset,
+ normalized_codeset, modifier, special,
+ sponsor, revision, filename, 1);
+ }
+ retval->successor[entries] = NULL;
+
+ return retval;
+}
+
+/* Normalize codeset name. There is no standard for the codeset
+ names. Normalization allows the user to use any of the common
+ names. */
+const char *
+_nl_normalize_codeset (codeset, name_len)
+ const unsigned char *codeset;
+ size_t name_len;
+{
+ int len = 0;
+ int only_digit = 1;
+ char *retval;
+ char *wp;
+ size_t cnt;
+
+ for (cnt = 0; cnt < name_len; ++cnt)
+ if (isalnum (codeset[cnt]))
+ {
+ ++len;
+
+ if (isalpha (codeset[cnt]))
+ only_digit = 0;
+ }
+
+ retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
+
+ if (retval != NULL)
+ {
+ if (only_digit)
+ wp = stpcpy (retval, "iso");
+ else
+ wp = retval;
+
+ for (cnt = 0; cnt < name_len; ++cnt)
+ if (isalpha (codeset[cnt]))
+ *wp++ = tolower (codeset[cnt]);
+ else if (isdigit (codeset[cnt]))
+ *wp++ = codeset[cnt];
+
+ *wp = '\0';
+ }
+
+ return (const char *) retval;
+}
+
+
+/* @@ begin of epilog @@ */
+
+/* We don't want libintl.a to depend on any other library. So we
+ avoid the non-standard function stpcpy. In GNU C Library this
+ function is available, though. Also allow the symbol HAVE_STPCPY
+ to be defined. */
+#if !_LIBC && !HAVE_STPCPY
+static char *
+stpcpy (dest, src)
+ char *dest;
+ const char *src;
+{
+ while ((*dest++ = *src++) != '\0')
+ /* Do nothing. */ ;
+ return dest - 1;
+}
+#endif
diff --git a/dldialog/intl/libgettext.h b/dldialog/intl/libgettext.h
new file mode 100644
index 0000000..3a92960
--- /dev/null
+++ b/dldialog/intl/libgettext.h
@@ -0,0 +1,182 @@
+/* Message catalogs for internationalization.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+
+ 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* Because on some systems (e.g. Solaris) we sometimes have to include
+ the systems libintl.h as well as this file we have more complex
+ include protection above. But the systems header might perhaps also
+ define _LIBINTL_H and therefore we have to protect the definition here. */
+
+#if !defined _LIBINTL_H || !defined _LIBGETTEXT_H
+#ifndef _LIBINTL_H
+# define _LIBINTL_H 1
+#endif
+#define _LIBGETTEXT_H 1
+
+/* We define an additional symbol to signal that we use the GNU
+ implementation of gettext. */
+#define __USE_GNU_GETTEXT 1
+
+#include <sys/types.h>
+
+#if HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifndef PARAMS
+# if __STDC__ || defined __cplusplus
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif
+#endif
+
+#ifndef NULL
+# if !defined __cplusplus || defined __GNUC__
+# define NULL ((void *) 0)
+# else
+# define NULL (0)
+# endif
+#endif
+
+#if !HAVE_LC_MESSAGES
+/* This value determines the behaviour of the gettext() and dgettext()
+ function. But some system does not have this defined. Define it
+ to a default value. */
+# define LC_MESSAGES (-1)
+#endif
+
+
+/* Declarations for gettext-using-catgets interface. Derived from
+ Jim Meyering's libintl.h. */
+struct _msg_ent
+{
+ const char *_msg;
+ int _msg_number;
+};
+
+
+#if HAVE_CATGETS
+/* These two variables are defined in the automatically by po-to-tbl.sed
+ generated file `cat-id-tbl.c'. */
+extern const struct _msg_ent _msg_tbl[];
+extern int _msg_tbl_length;
+#endif
+
+
+/* For automatical extraction of messages sometimes no real
+ translation is needed. Instead the string itself is the result. */
+#define gettext_noop(Str) (Str)
+
+/* Look up MSGID in the current default message catalog for the current
+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
+ text). */
+extern char *gettext PARAMS ((const char *__msgid));
+extern char *gettext__ PARAMS ((const char *__msgid));
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current
+ LC_MESSAGES locale. */
+extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
+extern char *dgettext__ PARAMS ((const char *__domainname,
+ const char *__msgid));
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+ locale. */
+extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
+ int __category));
+extern char *dcgettext__ PARAMS ((const char *__domainname,
+ const char *__msgid, int __category));
+
+
+/* Set the current default message catalog to DOMAINNAME.
+ If DOMAINNAME is null, return the current default.
+ If DOMAINNAME is "", reset to the default of "messages". */
+extern char *textdomain PARAMS ((const char *__domainname));
+extern char *textdomain__ PARAMS ((const char *__domainname));
+
+/* Specify that the DOMAINNAME message catalog will be found
+ in DIRNAME rather than in the system locale data base. */
+extern char *bindtextdomain PARAMS ((const char *__domainname,
+ const char *__dirname));
+extern char *bindtextdomain__ PARAMS ((const char *__domainname,
+ const char *__dirname));
+
+#if ENABLE_NLS
+
+/* Solaris 2.3 has the gettext function but dcgettext is missing.
+ So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4
+ has dcgettext. */
+# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT)
+
+# define gettext(Msgid) \
+ dgettext (NULL, Msgid)
+
+# define dgettext(Domainname, Msgid) \
+ dcgettext (Domainname, Msgid, LC_MESSAGES)
+
+# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7
+/* This global variable is defined in loadmsgcat.c. We need a sign,
+ whether a new catalog was loaded, which can be associated with all
+ translations. */
+extern int _nl_msg_cat_cntr;
+
+# define dcgettext(Domainname, Msgid, Category) \
+ (__extension__ \
+ ({ \
+ char *__result; \
+ if (__builtin_constant_p (Msgid)) \
+ { \
+ static char *__translation__; \
+ static int __catalog_counter__; \
+ if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \
+ { \
+ __translation__ = \
+ dcgettext__ (Domainname, Msgid, Category); \
+ __catalog_counter__ = _nl_msg_cat_cntr; \
+ } \
+ __result = __translation__; \
+ } \
+ else \
+ __result = dcgettext__ (Domainname, Msgid, Category); \
+ __result; \
+ }))
+# endif
+# endif
+
+#else
+
+# define gettext(Msgid) (Msgid)
+# define dgettext(Domainname, Msgid) (Msgid)
+# define dcgettext(Domainname, Msgid, Category) (Msgid)
+# define textdomain(Domainname) ((char *) Domainname)
+# define bindtextdomain(Domainname, Dirname) ((char *) Dirname)
+
+#endif
+
+/* @@ begin of epilog @@ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/dldialog/intl/linux-msg.sed b/dldialog/intl/linux-msg.sed
new file mode 100644
index 0000000..5918e72
--- /dev/null
+++ b/dldialog/intl/linux-msg.sed
@@ -0,0 +1,100 @@
+# po2msg.sed - Convert Uniforum style .po file to Linux style .msg file
+# Copyright (C) 1995 Free Software Foundation, Inc.
+# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+#
+# 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+#
+# The first directive in the .msg should be the definition of the
+# message set number. We use always set number 1.
+#
+1 {
+ i\
+$set 1 # Automatically created by po2msg.sed
+ h
+ s/.*/0/
+ x
+}
+#
+# Mitch's old catalog format does not allow comments.
+#
+# We copy the original message as a comment into the .msg file.
+#
+/^msgid/ {
+ s/msgid[ ]*"//
+#
+# This does not work now with the new format.
+# /"$/! {
+# s/\\$//
+# s/$/ ... (more lines following)"/
+# }
+ x
+# The following nice solution is by
+# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
+ td
+# Increment a decimal number in pattern space.
+# First hide trailing `9' digits.
+ :d
+ s/9\(_*\)$/_\1/
+ td
+# Assure at least one digit is available.
+ s/^\(_*\)$/0\1/
+# Increment the last digit.
+ s/8\(_*\)$/9\1/
+ s/7\(_*\)$/8\1/
+ s/6\(_*\)$/7\1/
+ s/5\(_*\)$/6\1/
+ s/4\(_*\)$/5\1/
+ s/3\(_*\)$/4\1/
+ s/2\(_*\)$/3\1/
+ s/1\(_*\)$/2\1/
+ s/0\(_*\)$/1\1/
+# Convert the hidden `9' digits to `0's.
+ s/_/0/g
+ x
+ G
+ s/\(.*\)"\n\([0-9]*\)/$ #\2 Original Message:(\1)/p
+}
+#
+# The .msg file contains, other then the .po file, only the translations
+# but each given a unique ID. Starting from 1 and incrementing by 1 for
+# each message we assign them to the messages.
+# It is important that the .po file used to generate the cat-id-tbl.c file
+# (with po-to-tbl) is the same as the one used here. (At least the order
+# of declarations must not be changed.)
+#
+/^msgstr/ {
+ s/msgstr[ ]*"\(.*\)"/# \1/
+# Clear substitution flag.
+ tb
+# Append the next line.
+ :b
+ N
+# Look whether second part is continuation line.
+ s/\(.*\n\)"\(.*\)"/\1\2/
+# Yes, then branch.
+ ta
+ P
+ D
+# Note that D includes a jump to the start!!
+# We found a continuation line. But before printing insert '\'.
+ :a
+ s/\(.*\)\(\n.*\)/\1\\\2/
+ P
+# We cannot use D here.
+ s/.*\n\(.*\)/\1/
+ tb
+}
+d
diff --git a/dldialog/intl/loadinfo.h b/dldialog/intl/loadinfo.h
new file mode 100644
index 0000000..f4ebf6d
--- /dev/null
+++ b/dldialog/intl/loadinfo.h
@@ -0,0 +1,76 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+ 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef PARAMS
+# if __STDC__
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif
+#endif
+
+/* Encoding of locale name parts. */
+#define CEN_REVISION 1
+#define CEN_SPONSOR 2
+#define CEN_SPECIAL 4
+#define XPG_NORM_CODESET 8
+#define XPG_CODESET 16
+#define TERRITORY 32
+#define CEN_AUDIENCE 64
+#define XPG_MODIFIER 128
+
+#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
+#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
+
+
+struct loaded_l10nfile
+{
+ const char *filename;
+ int decided;
+
+ const void *data;
+
+ struct loaded_l10nfile *next;
+ struct loaded_l10nfile *successor[1];
+};
+
+
+extern const char *_nl_normalize_codeset PARAMS ((const unsigned char *codeset,
+ size_t name_len));
+
+extern struct loaded_l10nfile *
+_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
+ const char *dirlist, size_t dirlist_len, int mask,
+ const char *language, const char *territory,
+ const char *codeset,
+ const char *normalized_codeset,
+ const char *modifier, const char *special,
+ const char *sponsor, const char *revision,
+ const char *filename, int do_allocate));
+
+
+extern const char *_nl_expand_alias PARAMS ((const char *name));
+
+extern int _nl_explode_name PARAMS ((char *name, const char **language,
+ const char **modifier,
+ const char **territory,
+ const char **codeset,
+ const char **normalized_codeset,
+ const char **special,
+ const char **sponsor,
+ const char **revision));
diff --git a/dldialog/intl/loadmsgcat.c b/dldialog/intl/loadmsgcat.c
new file mode 100644
index 0000000..515892d
--- /dev/null
+++ b/dldialog/intl/loadmsgcat.c
@@ -0,0 +1,222 @@
+/* Load needed message catalogs.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+
+ 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#endif
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#if (defined HAVE_MMAP && defined HAVE_MUNMAP) || defined _LIBC
+# include <sys/mman.h>
+#endif
+
+#include "gettext.h"
+#include "gettextP.h"
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ISO C functions. This is required by the standard
+ because some ISO C functions will require linking with this object
+ file and the name space must not be polluted. */
+# define open __open
+# define close __close
+# define read __read
+# define mmap __mmap
+# define munmap __munmap
+#endif
+
+/* We need a sign, whether a new catalog was loaded, which can be associated
+ with all translations. This is important if the translations are
+ cached by one of GCC's features. */
+int _nl_msg_cat_cntr = 0;
+
+
+/* Load the message catalogs specified by FILENAME. If it is no valid
+ message catalog do nothing. */
+void
+internal_function
+_nl_load_domain (domain_file)
+ struct loaded_l10nfile *domain_file;
+{
+ int fd;
+ size_t size;
+ struct stat st;
+ struct mo_file_header *data = (struct mo_file_header *) -1;
+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+ || defined _LIBC
+ int use_mmap = 0;
+#endif
+ struct loaded_domain *domain;
+
+ domain_file->decided = 1;
+ domain_file->data = NULL;
+
+ /* If the record does not represent a valid locale the FILENAME
+ might be NULL. This can happen when according to the given
+ specification the locale file name is different for XPG and CEN
+ syntax. */
+ if (domain_file->filename == NULL)
+ return;
+
+ /* Try to open the addressed file. */
+ fd = open (domain_file->filename, O_RDONLY);
+ if (fd == -1)
+ return;
+
+ /* We must know about the size of the file. */
+ if (fstat (fd, &st) != 0
+ || (size = (size_t) st.st_size) != st.st_size
+ || size < sizeof (struct mo_file_header))
+ {
+ /* Something went wrong. */
+ close (fd);
+ return;
+ }
+
+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+ || defined _LIBC
+ /* Now we are ready to load the file. If mmap() is available we try
+ this first. If not available or it failed we try to load it. */
+ data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
+ MAP_PRIVATE, fd, 0);
+
+ if (data != (struct mo_file_header *) -1)
+ {
+ /* mmap() call was successful. */
+ close (fd);
+ use_mmap = 1;
+ }
+#endif
+
+ /* If the data is not yet available (i.e. mmap'ed) we try to load
+ it manually. */
+ if (data == (struct mo_file_header *) -1)
+ {
+ size_t to_read;
+ char *read_ptr;
+
+ data = (struct mo_file_header *) malloc (size);
+ if (data == NULL)
+ return;
+
+ to_read = size;
+ read_ptr = (char *) data;
+ do
+ {
+ long int nb = (long int) read (fd, read_ptr, to_read);
+ if (nb == -1)
+ {
+ close (fd);
+ return;
+ }
+
+ read_ptr += nb;
+ to_read -= nb;
+ }
+ while (to_read > 0);
+
+ close (fd);
+ }
+
+ /* Using the magic number we can test whether it really is a message
+ catalog file. */
+ if (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED)
+ {
+ /* The magic number is wrong: not a message catalog file. */
+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+ || defined _LIBC
+ if (use_mmap)
+ munmap ((caddr_t) data, size);
+ else
+#endif
+ free (data);
+ return;
+ }
+
+ domain_file->data
+ = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
+ if (domain_file->data == NULL)
+ return;
+
+ domain = (struct loaded_domain *) domain_file->data;
+ domain->data = (char *) data;
+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+ || defined _LIBC
+ domain->use_mmap = use_mmap;
+#endif
+ domain->mmap_size = size;
+ domain->must_swap = data->magic != _MAGIC;
+
+ /* Fill in the information about the available tables. */
+ switch (W (domain->must_swap, data->revision))
+ {
+ case 0:
+ domain->nstrings = W (domain->must_swap, data->nstrings);
+ domain->orig_tab = (struct string_desc *)
+ ((char *) data + W (domain->must_swap, data->orig_tab_offset));
+ domain->trans_tab = (struct string_desc *)
+ ((char *) data + W (domain->must_swap, data->trans_tab_offset));
+ domain->hash_size = W (domain->must_swap, data->hash_tab_size);
+ domain->hash_tab = (nls_uint32 *)
+ ((char *) data + W (domain->must_swap, data->hash_tab_offset));
+ break;
+ default:
+ /* This is an illegal revision. */
+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+ || defined _LIBC
+ if (use_mmap)
+ munmap ((caddr_t) data, size);
+ else
+#endif
+ free (data);
+ free (domain);
+ domain_file->data = NULL;
+ return;
+ }
+
+ /* Show that one domain is changed. This might make some cached
+ translations invalid. */
+ ++_nl_msg_cat_cntr;
+}
+
+
+#ifdef _LIBC
+void
+internal_function
+_nl_unload_domain (domain)
+ struct loaded_domain *domain;
+{
+ if (domain->use_mmap)
+ munmap ((caddr_t) domain->data, domain->mmap_size);
+ else
+ free ((void *) domain->data);
+
+ free (domain);
+}
+#endif
diff --git a/dldialog/intl/localealias.c b/dldialog/intl/localealias.c
new file mode 100644
index 0000000..bca555a
--- /dev/null
+++ b/dldialog/intl/localealias.c
@@ -0,0 +1,424 @@
+/* Handle aliases for locale names.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+
+ 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# if defined HAVE_ALLOCA_H || defined _LIBC
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca
+char *alloca ();
+# endif
+# endif
+# endif
+#endif
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#else
+char *getenv ();
+# ifdef HAVE_MALLOC_H
+# include <malloc.h>
+# else
+void free ();
+# endif
+#endif
+
+#if defined HAVE_STRING_H || defined _LIBC
+# ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+# endif
+# include <string.h>
+#else
+# include <strings.h>
+# ifndef memcpy
+# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+# endif
+#endif
+#if !HAVE_STRCHR && !defined _LIBC
+# ifndef strchr
+# define strchr index
+# endif
+#endif
+
+#include "gettext.h"
+#include "gettextP.h"
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ANSI C functions. This is required by the standard
+ because some ANSI C functions will require linking with this object
+ file and the name space must not be polluted. */
+# define strcasecmp __strcasecmp
+
+# define mempcpy __mempcpy
+# define HAVE_MEMPCPY 1
+
+/* We need locking here since we can be called from different places. */
+# include <bits/libc-lock.h>
+
+__libc_lock_define_initialized (static, lock);
+#endif
+
+
+/* For those loosing systems which don't have `alloca' we have to add
+ some additional code emulating it. */
+#ifdef HAVE_ALLOCA
+/* Nothing has to be done. */
+# define ADD_BLOCK(list, address) /* nothing */
+# define FREE_BLOCKS(list) /* nothing */
+#else
+struct block_list
+{
+ void *address;
+ struct block_list *next;
+};
+# define ADD_BLOCK(list, addr) \
+ do { \
+ struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
+ /* If we cannot get a free block we cannot add the new element to \
+ the list. */ \
+ if (newp != NULL) { \
+ newp->address = (addr); \
+ newp->next = (list); \
+ (list) = newp; \
+ } \
+ } while (0)
+# define FREE_BLOCKS(list) \
+ do { \
+ while (list != NULL) { \
+ struct block_list *old = list; \
+ list = list->next; \
+ free (old); \
+ } \
+ } while (0)
+# undef alloca
+# define alloca(size) (malloc (size))
+#endif /* have alloca */
+
+
+struct alias_map
+{
+ const char *alias;
+ const char *value;
+};
+
+
+static char *string_space = NULL;
+static size_t string_space_act = 0;
+static size_t string_space_max = 0;
+static struct alias_map *map;
+static size_t nmap = 0;
+static size_t maxmap = 0;
+
+
+/* Prototypes for local functions. */
+static size_t read_alias_file PARAMS ((const char *fname, int fname_len))
+ internal_function;
+static void extend_alias_table PARAMS ((void));
+static int alias_compare PARAMS ((const struct alias_map *map1,
+ const struct alias_map *map2));
+
+
+const char *
+_nl_expand_alias (name)
+ const char *name;
+{
+ static const char *locale_alias_path = LOCALE_ALIAS_PATH;
+ struct alias_map *retval;
+ const char *result = NULL;
+ size_t added;
+
+#ifdef _LIBC
+ __libc_lock_lock (lock);
+#endif
+
+ do
+ {
+ struct alias_map item;
+
+ item.alias = name;
+
+ if (nmap > 0)
+ retval = (struct alias_map *) bsearch (&item, map, nmap,
+ sizeof (struct alias_map),
+ (int (*) PARAMS ((const void *,
+ const void *))
+ ) alias_compare);
+ else
+ retval = NULL;
+
+ /* We really found an alias. Return the value. */
+ if (retval != NULL)
+ {
+ result = retval->value;
+ break;
+ }
+
+ /* Perhaps we can find another alias file. */
+ added = 0;
+ while (added == 0 && locale_alias_path[0] != '\0')
+ {
+ const char *start;
+
+ while (locale_alias_path[0] == ':')
+ ++locale_alias_path;
+ start = locale_alias_path;
+
+ while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ':')
+ ++locale_alias_path;
+
+ if (start < locale_alias_path)
+ added = read_alias_file (start, locale_alias_path - start);
+ }
+ }
+ while (added != 0);
+
+#ifdef _LIBC
+ __libc_lock_unlock (lock);
+#endif
+
+ return result;
+}
+
+
+static size_t
+internal_function
+read_alias_file (fname, fname_len)
+ const char *fname;
+ int fname_len;
+{
+#ifndef HAVE_ALLOCA
+ struct block_list *block_list = NULL;
+#endif
+ FILE *fp;
+ char *full_fname;
+ size_t added;
+ static const char aliasfile[] = "/locale.alias";
+
+ full_fname = (char *) alloca (fname_len + sizeof aliasfile);
+ ADD_BLOCK (block_list, full_fname);
+#ifdef HAVE_MEMPCPY
+ mempcpy (mempcpy (full_fname, fname, fname_len),
+ aliasfile, sizeof aliasfile);
+#else
+ memcpy (full_fname, fname, fname_len);
+ memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
+#endif
+
+ fp = fopen (full_fname, "r");
+ if (fp == NULL)
+ {
+ FREE_BLOCKS (block_list);
+ return 0;
+ }
+
+ added = 0;
+ while (!feof (fp))
+ {
+ /* It is a reasonable approach to use a fix buffer here because
+ a) we are only interested in the first two fields
+ b) these fields must be usable as file names and so must not
+ be that long
+ */
+ unsigned char buf[BUFSIZ];
+ unsigned char *alias;
+ unsigned char *value;
+ unsigned char *cp;
+
+ if (fgets (buf, sizeof buf, fp) == NULL)
+ /* EOF reached. */
+ break;
+
+ /* Possibly not the whole line fits into the buffer. Ignore
+ the rest of the line. */
+ if (strchr (buf, '\n') == NULL)
+ {
+ char altbuf[BUFSIZ];
+ do
+ if (fgets (altbuf, sizeof altbuf, fp) == NULL)
+ /* Make sure the inner loop will be left. The outer loop
+ will exit at the `feof' test. */
+ break;
+ while (strchr (altbuf, '\n') == NULL);
+ }
+
+ cp = buf;
+ /* Ignore leading white space. */
+ while (isspace (cp[0]))
+ ++cp;
+
+ /* A leading '#' signals a comment line. */
+ if (cp[0] != '\0' && cp[0] != '#')
+ {
+ alias = cp++;
+ while (cp[0] != '\0' && !isspace (cp[0]))
+ ++cp;
+ /* Terminate alias name. */
+ if (cp[0] != '\0')
+ *cp++ = '\0';
+
+ /* Now look for the beginning of the value. */
+ while (isspace (cp[0]))
+ ++cp;
+
+ if (cp[0] != '\0')
+ {
+ size_t alias_len;
+ size_t value_len;
+
+ value = cp++;
+ while (cp[0] != '\0' && !isspace (cp[0]))
+ ++cp;
+ /* Terminate value. */
+ if (cp[0] == '\n')
+ {
+ /* This has to be done to make the following test
+ for the end of line possible. We are looking for
+ the terminating '\n' which do not overwrite here. */
+ *cp++ = '\0';
+ *cp = '\n';
+ }
+ else if (cp[0] != '\0')
+ *cp++ = '\0';
+
+ if (nmap >= maxmap)
+ extend_alias_table ();
+
+ alias_len = strlen (alias) + 1;
+ value_len = strlen (value) + 1;
+
+ if (string_space_act + alias_len + value_len > string_space_max)
+ {
+ /* Increase size of memory pool. */
+ size_t new_size = (string_space_max
+ + (alias_len + value_len > 1024
+ ? alias_len + value_len : 1024));
+ char *new_pool = (char *) realloc (string_space, new_size);
+ if (new_pool == NULL)
+ {
+ FREE_BLOCKS (block_list);
+ return added;
+ }
+ string_space = new_pool;
+ string_space_max = new_size;
+ }
+
+ map[nmap].alias = memcpy (&string_space[string_space_act],
+ alias, alias_len);
+ string_space_act += alias_len;
+
+ map[nmap].value = memcpy (&string_space[string_space_act],
+ value, value_len);
+ string_space_act += value_len;
+
+ ++nmap;
+ ++added;
+ }
+ }
+ }
+
+ /* Should we test for ferror()? I think we have to silently ignore
+ errors. --drepper */
+ fclose (fp);
+
+ if (added > 0)
+ qsort (map, nmap, sizeof (struct alias_map),
+ (int (*) PARAMS ((const void *, const void *))) alias_compare);
+
+ FREE_BLOCKS (block_list);
+ return added;
+}
+
+
+static void
+extend_alias_table ()
+{
+ size_t new_size;
+ struct alias_map *new_map;
+
+ new_size = maxmap == 0 ? 100 : 2 * maxmap;
+ new_map = (struct alias_map *) realloc (map, (new_size
+ * sizeof (struct alias_map)));
+ if (new_map == NULL)
+ /* Simply don't extend: we don't have any more core. */
+ return;
+
+ map = new_map;
+ maxmap = new_size;
+}
+
+
+#ifdef _LIBC
+static void __attribute__ ((unused))
+free_mem (void)
+{
+ if (string_space != NULL)
+ free (string_space);
+ if (map != NULL)
+ free (map);
+}
+text_set_element (__libc_subfreeres, free_mem);
+#endif
+
+
+static int
+alias_compare (map1, map2)
+ const struct alias_map *map1;
+ const struct alias_map *map2;
+{
+#if defined _LIBC || defined HAVE_STRCASECMP
+ return strcasecmp (map1->alias, map2->alias);
+#else
+ const unsigned char *p1 = (const unsigned char *) map1->alias;
+ const unsigned char *p2 = (const unsigned char *) map2->alias;
+ unsigned char c1, c2;
+
+ if (p1 == p2)
+ return 0;
+
+ do
+ {
+ /* I know this seems to be odd but the tolower() function in
+ some systems libc cannot handle nonalpha characters. */
+ c1 = isupper (*p1) ? tolower (*p1) : *p1;
+ c2 = isupper (*p2) ? tolower (*p2) : *p2;
+ if (c1 == '\0')
+ break;
+ ++p1;
+ ++p2;
+ }
+ while (c1 == c2);
+
+ return c1 - c2;
+#endif
+}
diff --git a/dldialog/intl/po2tbl.sed.in b/dldialog/intl/po2tbl.sed.in
new file mode 100644
index 0000000..b3bcca4
--- /dev/null
+++ b/dldialog/intl/po2tbl.sed.in
@@ -0,0 +1,102 @@
+# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets
+# Copyright (C) 1995 Free Software Foundation, Inc.
+# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+#
+# 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+1 {
+ i\
+/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot. */\
+\
+#if HAVE_CONFIG_H\
+# include <config.h>\
+#endif\
+\
+#include "libgettext.h"\
+\
+const struct _msg_ent _msg_tbl[] = {
+ h
+ s/.*/0/
+ x
+}
+#
+# Write msgid entries in C array form.
+#
+/^msgid/ {
+ s/msgid[ ]*\(".*"\)/ {\1/
+ tb
+# Append the next line
+ :b
+ N
+# Look whether second part is continuation line.
+ s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/
+# Yes, then branch.
+ ta
+# Because we assume that the input file correctly formed the line
+# just read cannot be again be a msgid line. So it's safe to ignore
+# it.
+ s/\(.*\)\n.*/\1/
+ bc
+# We found a continuation line. But before printing insert '\'.
+ :a
+ s/\(.*\)\(\n.*\)/\1\\\2/
+ P
+# We cannot use D here.
+ s/.*\n\(.*\)/\1/
+# Some buggy seds do not clear the `successful substitution since last ``t'''
+# flag on `N', so we do a `t' here to clear it.
+ tb
+# Not reached
+ :c
+ x
+# The following nice solution is by
+# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
+ td
+# Increment a decimal number in pattern space.
+# First hide trailing `9' digits.
+ :d
+ s/9\(_*\)$/_\1/
+ td
+# Assure at least one digit is available.
+ s/^\(_*\)$/0\1/
+# Increment the last digit.
+ s/8\(_*\)$/9\1/
+ s/7\(_*\)$/8\1/
+ s/6\(_*\)$/7\1/
+ s/5\(_*\)$/6\1/
+ s/4\(_*\)$/5\1/
+ s/3\(_*\)$/4\1/
+ s/2\(_*\)$/3\1/
+ s/1\(_*\)$/2\1/
+ s/0\(_*\)$/1\1/
+# Convert the hidden `9' digits to `0's.
+ s/_/0/g
+ x
+ G
+ s/\(.*\)\n\([0-9]*\)/\1, \2},/
+ s/\(.*\)"$/\1/
+ p
+}
+#
+# Last line.
+#
+$ {
+ i\
+};\
+
+ g
+ s/0*\(.*\)/int _msg_tbl_length = \1;/p
+}
+d
diff --git a/dldialog/intl/textdomain.c b/dldialog/intl/textdomain.c
new file mode 100644
index 0000000..8855746
--- /dev/null
+++ b/dldialog/intl/textdomain.c
@@ -0,0 +1,108 @@
+/* Implementation of the textdomain(3) function.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+
+ 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+#endif
+
+#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC
+# include <string.h>
+#else
+# include <strings.h>
+# ifndef memcpy
+# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+# endif
+#endif
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgettext.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Name of the default text domain. */
+extern const char _nl_default_default_domain[];
+
+/* Default text domain in which entries for gettext(3) are to be found. */
+extern const char *_nl_current_default_domain;
+
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define TEXTDOMAIN __textdomain
+# ifndef strdup
+# define strdup(str) __strdup (str)
+# endif
+#else
+# define TEXTDOMAIN textdomain__
+#endif
+
+/* Set the current default message catalog to DOMAINNAME.
+ If DOMAINNAME is null, return the current default.
+ If DOMAINNAME is "", reset to the default of "messages". */
+char *
+TEXTDOMAIN (domainname)
+ const char *domainname;
+{
+ char *old;
+
+ /* A NULL pointer requests the current setting. */
+ if (domainname == NULL)
+ return (char *) _nl_current_default_domain;
+
+ old = (char *) _nl_current_default_domain;
+
+ /* If domain name is the null string set to default domain "messages". */
+ if (domainname[0] == '\0'
+ || strcmp (domainname, _nl_default_default_domain) == 0)
+ _nl_current_default_domain = _nl_default_default_domain;
+ else
+ {
+ /* If the following malloc fails `_nl_current_default_domain'
+ will be NULL. This value will be returned and so signals we
+ are out of core. */
+#if defined _LIBC || defined HAVE_STRDUP
+ _nl_current_default_domain = strdup (domainname);
+#else
+ size_t len = strlen (domainname) + 1;
+ char *cp = (char *) malloc (len);
+ if (cp != NULL)
+ memcpy (cp, domainname, len);
+ _nl_current_default_domain = cp;
+#endif
+ }
+
+ if (old != _nl_default_default_domain)
+ free (old);
+
+ return (char *) _nl_current_default_domain;
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__textdomain, textdomain);
+#endif
diff --git a/dldialog/intl/xopen-msg.sed b/dldialog/intl/xopen-msg.sed
new file mode 100644
index 0000000..b19c0bb
--- /dev/null
+++ b/dldialog/intl/xopen-msg.sed
@@ -0,0 +1,104 @@
+# po2msg.sed - Convert Uniforum style .po file to X/Open style .msg file
+# Copyright (C) 1995 Free Software Foundation, Inc.
+# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+#
+# 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+#
+# The first directive in the .msg should be the definition of the
+# message set number. We use always set number 1.
+#
+1 {
+ i\
+$set 1 # Automatically created by po2msg.sed
+ h
+ s/.*/0/
+ x
+}
+#
+# We copy all comments into the .msg file. Perhaps they can help.
+#
+/^#/ s/^#[ ]*/$ /p
+#
+# We copy the original message as a comment into the .msg file.
+#
+/^msgid/ {
+# Does not work now
+# /"$/! {
+# s/\\$//
+# s/$/ ... (more lines following)"/
+# }
+ s/^msgid[ ]*"\(.*\)"$/$ Original Message: \1/
+ p
+}
+#
+# The .msg file contains, other then the .po file, only the translations
+# but each given a unique ID. Starting from 1 and incrementing by 1 for
+# each message we assign them to the messages.
+# It is important that the .po file used to generate the cat-id-tbl.c file
+# (with po-to-tbl) is the same as the one used here. (At least the order
+# of declarations must not be changed.)
+#
+/^msgstr/ {
+ s/msgstr[ ]*"\(.*\)"/\1/
+ x
+# The following nice solution is by
+# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
+ td
+# Increment a decimal number in pattern space.
+# First hide trailing `9' digits.
+ :d
+ s/9\(_*\)$/_\1/
+ td
+# Assure at least one digit is available.
+ s/^\(_*\)$/0\1/
+# Increment the last digit.
+ s/8\(_*\)$/9\1/
+ s/7\(_*\)$/8\1/
+ s/6\(_*\)$/7\1/
+ s/5\(_*\)$/6\1/
+ s/4\(_*\)$/5\1/
+ s/3\(_*\)$/4\1/
+ s/2\(_*\)$/3\1/
+ s/1\(_*\)$/2\1/
+ s/0\(_*\)$/1\1/
+# Convert the hidden `9' digits to `0's.
+ s/_/0/g
+ x
+# Bring the line in the format `<number> <message>'
+ G
+ s/^[^\n]*$/& /
+ s/\(.*\)\n\([0-9]*\)/\2 \1/
+# Clear flag from last substitution.
+ tb
+# Append the next line.
+ :b
+ N
+# Look whether second part is a continuation line.
+ s/\(.*\n\)"\(.*\)"/\1\2/
+# Yes, then branch.
+ ta
+ P
+ D
+# Note that `D' includes a jump to the start!!
+# We found a continuation line. But before printing insert '\'.
+ :a
+ s/\(.*\)\(\n.*\)/\1\\\2/
+ P
+# We cannot use the sed command `D' here
+ s/.*\n\(.*\)/\1/
+ tb
+}
+d
diff --git a/dldialog/ltconfig b/dldialog/ltconfig
new file mode 100755
index 0000000..11e1ae1
--- /dev/null
+++ b/dldialog/ltconfig
@@ -0,0 +1,2101 @@
+#! /bin/sh
+
+# ltconfig - Create a system-specific libtool.
+# Copyright (C) 1996-1998 Free Software Foundation, Inc.
+# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# A lot of this script is taken from autoconf-2.10.
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+echo=echo
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit 0
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+ # Yippee, $echo works!
+ :
+else
+ # Restart under the correct shell.
+ exec "$SHELL" "$0" --no-reexec ${1+"$@"}
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
+
+if test "X${echo_test_string+set}" != "Xset"; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if (echo_test_string="`eval $cmd`") 2>/dev/null &&
+ echo_test_string="`eval $cmd`" &&
+ (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
+ break
+ fi
+ done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" != 'X\t' ||
+ test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ for dir in $PATH /usr/ucb; do
+ if test -f $dir/echo &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ echo="$dir/echo"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ if test "X$echo" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ echo='print -r'
+ elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running ltconfig again with it.
+ ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
+ else
+ # Try using printf.
+ echo='printf %s\n'
+ if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ echo="$CONFIG_SHELL $0 --fallback-echo"
+ elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
+ test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+ echo="$CONFIG_SHELL $0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+ if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "$0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ echo=echo
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e s/^X//'
+sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
+
+# The name of this program.
+progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
+
+# Constants:
+PROGRAM=ltconfig
+PACKAGE=libtool
+VERSION=1.2e
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
+rm="rm -f"
+
+help="Try \`$progname --help' for more information."
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+enable_shared=yes
+# All known linkers require a `.a' archive for static linking.
+enable_static=yes
+ltmain=
+silent=
+srcdir=
+ac_config_guess=
+ac_config_sub=
+host=
+nonopt=
+ofile="$default_ofile"
+verify_host=yes
+with_gcc=no
+with_gnu_ld=no
+need_locks=yes
+objext=o
+libext=a
+
+old_AR="$AR"
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+old_CPPFLAGS="$CPPFLAGS"
+old_LD="$LD"
+old_LN_S="$LN_S"
+old_NM="$NM"
+old_RANLIB="$RANLIB"
+old_DLLTOOL="$DLLTOOL"
+old_AS="$AS"
+
+# Parse the command line options.
+args=
+prev=
+for option
+do
+ case "$option" in
+ -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ eval "$prev=\$option"
+ prev=
+ continue
+ fi
+
+ case "$option" in
+ --help) cat <<EOM
+Usage: $progname [OPTION]... [HOST [LTMAIN]]
+
+Generate a system-specific libtool script.
+
+ --debug enable verbose shell tracing
+ --disable-shared do not build shared libraries
+ --disable-static do not build static libraries
+ --help display this help and exit
+ --no-verify do not verify that HOST is a valid host type
+-o, --output=FILE specify the output file [default=$default_ofile]
+ --quiet same as \`--silent'
+ --silent do not print informational messages
+ --srcdir=DIR find \`config.guess' in DIR
+ --version output version information and exit
+ --with-gcc assume that the GNU C compiler will be used
+ --with-gnu-ld assume that the C compiler uses the GNU linker
+ --disable-lock disable file locking
+
+LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
+that provides basic libtool functionality.
+
+HOST is the canonical host system name [default=guessed].
+EOM
+ exit 0
+ ;;
+
+ --debug)
+ echo "$progname: enabling shell trace mode"
+ set -x
+ ;;
+
+ --disable-shared) enable_shared=no ;;
+
+ --disable-static) enable_static=no ;;
+
+ --quiet | --silent) silent=yes ;;
+
+ --srcdir) prev=srcdir ;;
+ --srcdir=*) srcdir="$optarg" ;;
+
+ --no-verify) verify_host=no ;;
+
+ --output | -o) prev=ofile ;;
+ --output=*) ofile="$optarg" ;;
+
+ --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION"; exit 0 ;;
+
+ --with-gcc) with_gcc=yes ;;
+ --with-gnu-ld) with_gnu_ld=yes ;;
+
+ --disable-lock) need_locks=no ;;
+
+ -*)
+ echo "$progname: unrecognized option \`$option'" 1>&2
+ echo "$help" 1>&2
+ exit 1
+ ;;
+
+ *)
+ if test -z "$ltmain"; then
+ ltmain="$option"
+ elif test -z "$host"; then
+# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
+# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
+# echo "$progname: warning \`$option' is not a valid host type" 1>&2
+# fi
+ host="$option"
+ else
+ echo "$progname: too many arguments" 1>&2
+ echo "$help" 1>&2
+ exit 1
+ fi ;;
+ esac
+done
+
+if test -z "$ltmain"; then
+ echo "$progname: you must specify a LTMAIN file" 1>&2
+ echo "$help" 1>&2
+ exit 1
+fi
+
+if test ! -f "$ltmain"; then
+ echo "$progname: \`$ltmain' does not exist" 1>&2
+ echo "$help" 1>&2
+ exit 1
+fi
+
+# Quote any args containing shell metacharacters.
+ltconfig_args=
+for arg
+do
+ case "$arg" in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ltconfig_args="$ltconfig_args '$arg'" ;;
+ *) ltconfig_args="$ltconfig_args $arg" ;;
+ esac
+done
+
+# A relevant subset of AC_INIT.
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 5 compiler messages saved in config.log
+# 6 checking for... messages and results
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>>./config.log
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+if test -z "$srcdir"; then
+ # Assume the source directory is the same one as the path to LTMAIN.
+ srcdir=`$echo "$ltmain" | $Xsed -e 's%/[^/]*$%%'`
+ test "$srcdir" = "$ltmain" && srcdir=.
+fi
+
+trap "$rm conftest*; exit 1" 1 2 15
+if test "$verify_host" = yes; then
+ # Check for config.guess and config.sub.
+ ac_aux_dir=
+ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/config.guess; then
+ ac_aux_dir=$ac_dir
+ break
+ fi
+ done
+ if test -z "$ac_aux_dir"; then
+ echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
+ echo "$help" 1>&2
+ exit 1
+ fi
+ ac_config_guess=$ac_aux_dir/config.guess
+ ac_config_sub=$ac_aux_dir/config.sub
+
+ # Make sure we can run config.sub.
+ if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
+ else
+ echo "$progname: cannot run $ac_config_sub" 1>&2
+ echo "$help" 1>&2
+ exit 1
+ fi
+
+ echo $ac_n "checking host system type""... $ac_c" 1>&6
+
+ host_alias=$host
+ case "$host_alias" in
+ "")
+ if host_alias=`$SHELL $ac_config_guess`; then :
+ else
+ echo "$progname: cannot guess host type; you must specify one" 1>&2
+ echo "$help" 1>&2
+ exit 1
+ fi ;;
+ esac
+ host=`$SHELL $ac_config_sub $host_alias`
+ echo "$ac_t$host" 1>&6
+
+ # Make sure the host verified.
+ test -z "$host" && exit 1
+
+elif test -z "$host"; then
+ echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
+ echo "$help" 1>&2
+ exit 1
+else
+ host_alias=$host
+fi
+
+# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+case "$host_os" in
+linux-gnu*) ;;
+linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+esac
+
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+case "$host_os" in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "${COLLECT_NAMES+set}" != set; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR cru $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+# Set a sane default for `AR'.
+test -z "$AR" && AR=ar
+
+# If RANLIB is not set, then run the test.
+if test "${RANLIB+set}" != "set"; then
+ result=no
+
+ echo $ac_n "checking for ranlib... $ac_c" 1>&6
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/ranlib; then
+ RANLIB="ranlib"
+ result="ranlib"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ echo "$ac_t$result" 1>&6
+fi
+
+if test -n "$RANLIB"; then
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+ old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+fi
+
+# Set sane defaults for `DLLTOOL' and `AS', used on cygwin32.
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$AS" && AS=as
+
+# Check to see if we are using GCC.
+if test "$with_gcc" != yes || test -z "$CC"; then
+ # If CC is not set, then try to find GCC or a usable CC.
+ if test -z "$CC"; then
+ echo $ac_n "checking for gcc... $ac_c" 1>&6
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ for dir in $PATH; do
+ IFS="$save_ifs"
+ test -z "$dir" && dir=.
+ if test -f $dir/gcc; then
+ CC="gcc"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ if test -n "$CC"; then
+ echo "$ac_t$CC" 1>&6
+ else
+ echo "$ac_t"no 1>&6
+ fi
+ fi
+
+ # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
+ if test -z "$CC"; then
+ echo $ac_n "checking for cc... $ac_c" 1>&6
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ cc_rejected=no
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/cc; then
+ if test "$dir/cc" = "/usr/ucb/cc"; then
+ cc_rejected=yes
+ continue
+ fi
+ CC="cc"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ if test $cc_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same name, so the bogon will be chosen
+ # first if we set CC to just the name; use the full file name.
+ shift
+ set dummy "$dir/cc" "$@"
+ shift
+ CC="$@"
+ fi
+ fi
+
+ if test -n "$CC"; then
+ echo "$ac_t$CC" 1>&6
+ else
+ echo "$ac_t"no 1>&6
+ fi
+
+ if test -z "$CC"; then
+ echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
+ exit 1
+ fi
+ fi
+
+ # Now see if the compiler is really GCC.
+ with_gcc=no
+ echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
+ echo "$progname:530: checking whether we are using GNU C" >&5
+
+ $rm conftest.c
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+ if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ with_gcc=yes
+ fi
+ $rm conftest.c
+ echo "$ac_t$with_gcc" 1>&6
+fi
+
+# Allow CC to be a program name with arguments.
+set dummy $CC
+compiler="$2"
+
+echo $ac_n "checking for object suffix... $ac_c" 1>&6
+$rm conftest*
+echo 'int i = 1;' > conftest.c
+echo "$progname:552: checking for object suffix" >& 5
+if { (eval echo $progname:553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
+ # Append any warnings to the config.log.
+ cat conftest.err 1>&5
+
+ for ac_file in conftest.*; do
+ case $ac_file in
+ *.c) ;;
+ *) objext=`echo $ac_file | sed -e s/conftest.//` ;;
+ esac
+ done
+else
+ cat conftest.err 1>&5
+ echo "$progname: failed program was:" >&5
+ cat conftest.c >&5
+fi
+$rm conftest*
+echo "$ac_t$objext" 1>&6
+
+echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
+pic_flag=
+special_shlib_compile_flags=
+wl=
+link_static_flag=
+no_builtin_flag=
+
+if test "$with_gcc" = yes; then
+ wl='-Wl,'
+ link_static_flag='-static'
+
+ case "$host_os" in
+ aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
+ # PIC is the default for these OSes.
+ ;;
+ cygwin32* | mingw32* | os2*)
+ # We can build DLLs from non-PIC.
+ ;;
+ amigaos*)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ pic_flag='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ *)
+ pic_flag='-fPIC'
+ ;;
+ esac
+else
+ # PORTME Check for PIC flags for the system compiler.
+ case "$host_os" in
+ aix3* | aix4*)
+ # All AIX code is PIC.
+ link_static_flag='-bnso -bI:/lib/syscalls.exp'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ # Is there a better link_static_flag that works with the bundled CC?
+ wl='-Wl,'
+ link_static_flag="${wl}-a ${wl}archive"
+ pic_flag='+Z'
+ ;;
+
+ irix5* | irix6*)
+ wl='-Wl,'
+ link_static_flag='-non_shared'
+ # PIC (with -KPIC) is the default.
+ ;;
+
+ cygwin32* | mingw32* | os2*)
+ # We can build DLLs from non-PIC.
+ ;;
+
+ osf3* | osf4*)
+ # All OSF/1 code is PIC.
+ wl='-Wl,'
+ link_static_flag='-non_shared'
+ ;;
+
+ sco3.2v5*)
+ pic_flag='-Kpic'
+ link_static_flag='-dn'
+ special_shlib_compile_flags='-belf'
+ ;;
+
+ solaris*)
+ pic_flag='-KPIC'
+ link_static_flag='-Bstatic'
+ wl='-Wl,'
+ ;;
+
+ sunos4*)
+ pic_flag='-PIC'
+ link_static_flag='-Bstatic'
+ wl='-Qoption ld '
+ ;;
+
+ sysv4.2uw2* | sysv5*)
+ pic_flag='-KPIC'
+ link_static_flag='-Bstatic'
+ wl='-Wl,'
+ ;;
+
+ uts4*)
+ pic_flag='-pic'
+ link_static_flag='-Bstatic'
+ ;;
+
+ *)
+ can_build_shared=no
+ ;;
+ esac
+fi
+
+if test -n "$pic_flag"; then
+ echo "$ac_t$pic_flag" 1>&6
+
+ # Check to make sure the pic_flag actually works.
+ echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
+ $rm conftest*
+ echo "int some_variable = 0;" > conftest.c
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $pic_flag -DPIC"
+ echo "$progname:674: checking if $compiler PIC flag $pic_flag works" >&5
+ if { (eval echo $progname:675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
+ # Append any warnings to the config.log.
+ cat conftest.err 1>&5
+
+ # On HP-UX, both CC and GCC only warn that PIC is supported... then they
+ # create non-PIC objects. So, if there were any warnings, we assume that
+ # PIC is not supported.
+ if test -s conftest.err; then
+ echo "$ac_t"no 1>&6
+ can_build_shared=no
+ pic_flag=
+ else
+ echo "$ac_t"yes 1>&6
+ pic_flag=" $pic_flag"
+ fi
+ else
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ can_build_shared=no
+ pic_flag=
+ echo "$ac_t"no 1>&6
+ fi
+ CFLAGS="$save_CFLAGS"
+ $rm conftest*
+else
+ echo "$ac_t"none 1>&6
+fi
+
+# Check to see if options -o and -c are simultaneously supported by compiler
+echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
+$rm conftest*
+echo "int some_variable = 0;" > conftest.c
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -c -o conftest2.o"
+echo "$progname:709: checking if $compiler supports -c -o file.o" >&5
+if { (eval echo $progname:710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest2.o; then
+
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ echo "$ac_t"no 1>&6
+ compiler_c_o=no
+ else
+ echo "$ac_t"yes 1>&6
+ compiler_c_o=yes
+ fi
+else
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ compiler_c_o=no
+ echo "$ac_t"no 1>&6
+fi
+CFLAGS="$save_CFLAGS"
+$rm conftest*
+
+if test x"$compiler_c_o" = x"yes"; then
+ # Check to see if we can write to a .lo
+ echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6
+ $rm conftest*
+ echo "int some_variable = 0;" > conftest.c
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -c -o conftest.lo"
+ echo "$progname:737: checking if $compiler supports -c -o file.lo" >&5
+if { (eval echo $progname:738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
+
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ echo "$ac_t"no 1>&6
+ compiler_o_lo=no
+ else
+ echo "$ac_t"yes 1>&6
+ compiler_o_lo=yes
+ fi
+ else
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ compiler_o_lo=no
+ echo "$ac_t"no 1>&6
+ fi
+ CFLAGS="$save_CFLAGS"
+ $rm conftest*
+else
+ compiler_o_lo=no
+fi
+
+# Check to see if we can do hard links to lock some files if needed
+hard_links="nottested"
+if test "$compiler_c_o" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
+ hard_links=yes
+ $rm conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ echo "$ac_t$hard_links" 1>&6
+ $rm conftest*
+ if test "$hard_links" = no; then
+ echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+if test "$with_gcc" = yes; then
+ # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
+ echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
+ $rm conftest*
+ echo "int some_variable = 0;" > conftest.c
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
+ echo "$progname:789: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+ if { (eval echo $progname:790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
+
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ echo "$ac_t"no 1>&6
+ compiler_rtti_exceptions=no
+ else
+ echo "$ac_t"yes 1>&6
+ compiler_rtti_exceptions=yes
+ fi
+ else
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ compiler_rtti_exceptions=no
+ echo "$ac_t"no 1>&6
+ fi
+ CFLAGS="$save_CFLAGS"
+ $rm conftest*
+
+ if test "$compiler_rtti_exceptions" = "yes"; then
+ no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
+ else
+ no_builtin_flag=' -fno-builtin'
+ fi
+
+fi
+
+# Check for any special shared library compilation flags.
+if test -n "$special_shlib_compile_flags"; then
+ echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
+ if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then :
+ else
+ echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
+ can_build_shared=no
+ fi
+fi
+
+echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
+$rm conftest*
+echo 'main(){return(0);}' > conftest.c
+save_LDFLAGS="$LDFLAGS"
+LDFLAGS="$LDFLAGS $link_static_flag"
+echo "$progname:833: checking if $compiler static flag $link_static_flag works" >&5
+if { (eval echo $progname:834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ echo "$ac_t$link_static_flag" 1>&6
+else
+ echo "$ac_t"none 1>&6
+ link_static_flag=
+fi
+LDFLAGS="$save_LDFLAGS"
+$rm conftest*
+
+if test -z "$LN_S"; then
+ # Check to see if we can use ln -s, or we need hard links.
+ echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
+ $rm conftestdata
+ if ln -s X conftestdata 2>/dev/null; then
+ $rm conftestdata
+ LN_S="ln -s"
+ else
+ LN_S=ln
+ fi
+ if test "$LN_S" = "ln -s"; then
+ echo "$ac_t"yes 1>&6
+ else
+ echo "$ac_t"no 1>&6
+ fi
+fi
+
+# Make sure LD is an absolute path.
+if test -z "$LD"; then
+ ac_prog=ld
+ if test "$with_gcc" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
+ echo "$progname:866: checking for ld used by GCC" >&5
+ ac_prog=`($CC -print-prog-name=ld) 2>&5`
+ case "$ac_prog" in
+ # Accept absolute paths.
+ /* | [A-Za-z]:/*)
+ re_direlt='/[^/][^/]*/\.\./'
+ sub_uncdrive='s%^\([A-Za-z]\):/%//\1/%'
+ # Canonicalize the path of ld
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ case "$host_os" in
+ cygwin*)
+ # Convert to a UNC path for cygwin
+ test -z "$LD" && LD=`echo X$ac_prog | $Xsed -e "$sub_uncdrive"`
+ ;;
+ *)
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ esac
+ ;;
+ ##
+ ## FIXME: The code fails later on if we try to use an $LD with
+ ## '\\' path separators.
+ ##
+ [A-Za-z]:[\\]*)
+ re_direlt='\\[^\\][^\\]*\\\.\.\(\\\)'
+ sub_uncdrive='s%^\([A-Za-z]\):\\%//\1/%'
+ sub_uncdir='s%\\%/%g'
+ # Canonicalize the path of ld
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%\1%"`
+ done
+ case "$host_os" in
+ cygwin*)
+ # Convert to a UNC path for cygwin
+ test -z "$LD" && LD=`echo X$ac_prog | $Xsed -e "$sub_uncdrive" -e "$sub_uncdir"`
+ ;;
+ *)
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ esac
+ ;;
+ "")
+ # If it fails, then pretend we are not using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+ elif test "$with_gnu_ld" = yes; then
+ echo $ac_n "checking for GNU ld... $ac_c" 1>&6
+ echo "$progname:920: checking for GNU ld" >&5
+ else
+ echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
+ echo "$progname:923: checking for non-GNU ld" >&5
+ fi
+
+ if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog"; then
+ LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ fi
+
+ if test -n "$LD"; then
+ echo "$ac_t$LD" 1>&6
+ else
+ echo "$ac_t"no 1>&6
+ fi
+
+ if test -z "$LD"; then
+ echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
+ exit 1
+ fi
+fi
+
+# Check to see if it really is or is not GNU ld.
+echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
+# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+echo "$ac_t$with_gnu_ld" 1>&6
+
+# See if the linker supports building shared libraries.
+echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
+
+allow_undefined_flag=
+no_undefined_flag=
+archive_cmds=
+archive_sym_cmds=
+old_archive_from_new_cmds=
+export_dynamic_flag_spec=
+whole_archive_flag_spec=
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+hardcode_shlibpath_var=unsupported
+runpath_var=
+
+case "$host_os" in
+aix3* | aix4*)
+ # On AIX, the GNU linker works like the native linker.
+ with_gnu_ld=no
+ ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+
+ # See if GNU ld supports shared libraries.
+ case "$host_os" in
+ amigaos*)
+ archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib$libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs$deplibs'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ cygwin32* | mingw32*)
+ if test "$with_gcc" = yes; then
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ allow_undefined_flag=unsupported
+ # Very, very bogus.
+ echo '
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+#include <stdio.h>
+
+BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+
+#include <cygwin/cygwin_dll.h>
+DECLARE_CYGWIN_DLL( DllMain );
+HINSTANCE __hDllInstance_base;
+
+BOOL APIENTRY
+DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+{
+ __hDllInstance_base = hInst;
+ return TRUE;
+}
+' > ltdll.c
+ archive_cmds='$CC -c '"`pwd`"'/ltdll.c~echo EXPORTS > $lib-def~
+ $DLLTOOL --export-all --output-def $lib-def $libobjs ltdll.$objext~
+ $CC -Wl,--base-file,$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 $libobjs ltdll.$objext~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
+ $CC -Wl,--base-file,$soname-base $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
+ $CC $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
+ $rm ltdll.$objext $soname-base $soname-exp'
+ archive_sym_cmds='$CC -c '"`pwd`"'/ltdll.c~echo EXPORTS > $lib-def~
+ cat "$export_symbols" >> $lib-def~
+ $CC -Wl,--base-file,$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 $libobjs ltdll.$objext~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
+ $CC -Wl,--base-file,$soname-base $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
+ $CC $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
+ $rm ltdll.$objext $soname-base $soname-exp'
+ old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $lib-def --output-lib $objdir/$libname.a~$rm $lib.exp'
+ else
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ with_gnu_ld=no
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib$libobjs`echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib /OUT:$oldlib$oldobjs'
+ fix_srcfile_path='`cygpath -w $srcfile`'
+ fi
+ ;;
+
+ *)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs$deplibs'
+ archive_sym_cmds='$CC -shared ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib$libobjs$deplibs'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs" = yes && test "$with_gnu_ld" = yes; then
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
+ export_dynamic_flag_spec='${wl}--export-dynamic'
+ whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ fi
+else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case "$host_os" in
+ aix3*)
+ allow_undefined_flag=unsupported
+ archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\' | sort | uniq' > $lib.exp~
+ $LD -o $objdir/$soname$libobjs$deplibs -bE:$lib.exp -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
+ archive_sym_cmds='$LD -o $objdir/$soname$libobjs$deplibs -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$with_gcc" = yes && test -z "$link_static_flag"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix4*)
+ allow_undefined_flag=unsupported
+ archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\' | sort | uniq' > $lib.exp else cat $export_symbols > $lib.exp~
+ $CC -o $objdir/$soname$libobjs$deplibs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry~$AR cru $lib $objdir/$soname'
+ archive_sym_cmds='$CC -o $objdir/$soname$libobjs$deplibs ${wl}-bE:$export_symbols ${wl}-bM:SRE ${wl}-bnoentry~$AR cru $lib $objdir/$soname'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+
+ amigaos*)
+ archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib$libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+
+ cygwin32* | mingw32*)
+ if test "$with_gcc" = yes; then
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ allow_undefined_flag=unsupported
+ # Very, very bogus.
+ echo '
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+#include <stdio.h>
+
+BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+
+#include <cygwin/cygwin_dll.h>
+DECLARE_CYGWIN_DLL( DllMain );
+HINSTANCE __hDllInstance_base;
+
+BOOL APIENTRY
+DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+{
+ __hDllInstance_base = hInst;
+ return TRUE;
+}
+' > ltdll.c
+ archive_cmds='$CC -c '"`pwd`"'/ltdll.c~echo EXPORTS > $lib-def~
+ $DLLTOOL --export-all --output-def $lib-def $libobjs ltdll.$objext~
+ $CC -Wl,--base-file,$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 $libobjs ltdll.$objext~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
+ $CC -Wl,--base-file,$soname-base $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
+ $CC $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
+ $rm ltdll.$objext $soname-base $soname-exp'
+ archive_sym_cmds='$CC -c '"`pwd`"'/ltdll.c~echo EXPORTS > $lib-def~
+ cat "$export_symbols" >> $lib-def~
+ $CC -Wl,--base-file,$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 $libobjs ltdll.$objext~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
+ $CC -Wl,--base-file,$soname-base $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
+ $CC $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
+ $rm ltdll.$objext $soname-base $soname-exp'
+ old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $lib-def --output-lib $objdir/$libname.a~$rm $lib.exp'
+ else
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib$libobjs`echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib /OUT:$oldlib$oldobjs'
+ fix_srcfile_path='`cygpath -w $srcfile`'
+ fi
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
+ freebsd3*)
+ archive_cmds='$CC -shared -o $lib$libobjs$deplibs'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ archive_cmds='$rm $objdir/$soname~$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs$deplibs~test $objdir/$soname = $lib || mv $objdir/$soname $lib'
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
+
+ hpux10* | hpux11*)
+ archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs$deplibs'
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
+
+ irix5* | irix6*)
+ if test "$with_gcc" = yes; then
+ archive_cmds='$CC -shared -o $lib ${wl}-soname ${wl}$soname ${wl}-set_version ${wl}$verstring$libobjs$deplibs'
+ else
+ archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs$deplibs'
+ fi
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ ;;
+
+ netbsd*)
+ # Tested with NetBSD 1.2 ld
+ archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ openbsd*)
+ archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp$libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib$libobjs$deplibs $objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
+ ;;
+
+ osf3* | osf4*)
+ if test "$with_gcc" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} -o $lib ${wl}-soname ${wl}$soname ${wl}-set_version ${wl}$verstring$libobjs$deplibs'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs'
+ fi
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ sco3.2v5*)
+ archive_cmds='$LD -G -o $lib$libobjs$deplibs'
+ hardcode_direct=yes
+ ;;
+
+ solaris*)
+ no_undefined_flag=' -z text'
+ # $CC -shared without GNU ld will not create a library from C++
+ # object files and a static libstdc++, better avoid it by now
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib$libobjs$deplibs'
+ archive_sym_cmds='$echo "{ global:" > $lib.exp~sed $export_symbols -e "s/.*/\1;/" >> $lib.exp~$echo "local: * }" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $export_symbols -h $soname -o $lib$libobjs$deplibs~$rm $lib.exp'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+
+ # Solaris 2 before 2.5 hardcodes -L paths.
+ case "$host_os" in
+ solaris2.[0-4]*)
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ # Why do we need -Bstatic? To avoid inter-library dependencies, maybe...
+ if test "$with_gcc" = yes; then
+ archive_cmds='$CC -shared ${wl}-Bstatic -o $lib$libobjs$deplibs'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs$deplibs'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib$libobjs$deplibs'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=no
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=no
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib$libobjs$deplibs'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=no
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ can_build_shared=no
+ ;;
+ esac
+fi
+echo "$ac_t$ld_shlibs" 1>&6
+
+if test -z "$NM"; then
+ echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
+ case "$NM" in
+ /* | [A-Za-z]:[/\\]*) ;; # Let the user override the test with a path.
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/nm; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ NM="$ac_dir/nm -B"
+ elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ NM="$ac_dir/nm -p"
+ else
+ NM="$ac_dir/nm"
+ fi
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$NM" && NM=nm
+ ;;
+ esac
+ echo "$ac_t$NM" 1>&6
+fi
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRSTU]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Transform the above into a raw symbol and a C symbol.
+symxfrm='\1 \1'
+
+# Define system-specific variables.
+case "$host_os" in
+aix*)
+ symcode='[BCDTU]'
+ ;;
+sunos* | cygwin32* | mingw32*)
+ sympat='_\([_A-Za-z][_A-Za-z0-9]*\)'
+ symxfrm='_\1 \1'
+ ;;
+irix*)
+ # Cannot use undefined symbols on IRIX because inlined functions mess us up.
+ symcode='[BCDEGRST]'
+ ;;
+solaris*)
+ symcode='[BDTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
+ symcode='[ABCDGISTUW]'
+fi
+
+case "$host_os" in
+cygwin32* | mingw32*)
+ # We do not want undefined symbols on cygwin32. The user must
+ # arrange to define them via -l arguments.
+ symcode='[ABCDGISTW]'
+ ;;
+esac
+
+# Write the raw and C identifiers.
+global_symbol_pipe="sed -n -e 's/^.* $symcode $sympat$/$symxfrm/p'"
+
+# Check to see that the pipe works correctly.
+pipe_works=no
+$rm conftest*
+cat > conftest.c <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+echo "$progname:1425: checking if global_symbol_pipe works" >&5
+if { (eval echo $progname:1426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { echo "$progname:1429: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
+
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ wcout=`wc "$nlist" 2>/dev/null`
+ count=`$echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
+ (test "$count" -ge 0) 2>/dev/null || count=-1
+ else
+ rm -f "$nlist"T
+ count=-1
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if egrep ' nm_test_var$' "$nlist" >/dev/null; then
+ if egrep ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<EOF > conftest.c
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+ # Now generate the symbol file.
+ sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> conftest.c
+
+ cat <<EOF >> conftest.c
+#if defined (__STDC__) && __STDC__
+# define __ptr_t void *
+#else
+# define __ptr_t char *
+#endif
+
+/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
+int dld_preloaded_symbol_count = $count;
+
+/* The mapping between symbol names and symbols. */
+struct {
+ char *name;
+ __ptr_t address;
+}
+dld_preloaded_symbols[] =
+{
+EOF
+ sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> conftest.c
+ cat <<\EOF >> conftest.c
+ {0, (__ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+ # Now try linking the two files.
+ mv conftest.$objext conftestm.$objext
+ save_LIBS="$LIBS"
+ save_CFLAGS="$CFLAGS"
+ LIBS="conftestm.$objext"
+ CFLAGS="$CFLAGS$no_builtin_flag"
+ if { (eval echo $progname:1487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ pipe_works=yes
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.c >&5
+ fi
+ LIBS="$save_LIBS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $global_symbol_pipe" >&5
+ fi
+else
+ echo "$progname: failed program was:" >&5
+ cat conftest.c >&5
+fi
+$rm conftest*
+
+# Do not use the global_symbol_pipe unless it works.
+echo "$ac_t$pipe_works" 1>&6
+test "$pipe_works" = yes || global_symbol_pipe=
+
+# Check hardcoding attributes.
+echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" || \
+ test -n "$runpath_var"; then
+
+ # We can hardcode non-existant directories.
+ if test "$hardcode_direct" != no && \
+ test "$hardcode_minus_L" != no && \
+ test "$hardcode_shlibpath_var" != no; then
+
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
+fi
+echo "$ac_t$hardcode_action" 1>&6
+
+
+reload_flag=
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
+# PORTME Some linkers may need a different reload flag.
+reload_flag='-r'
+echo "$ac_t$reload_flag" 1>&6
+test -n "$reload_flag" && reload_flag=" $reload_flag"
+
+# PORTME Fill in your ld.so characteristics
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_search_path="/lib /usr/lib /usr/local/lib"
+check_shared_deplibs_method='none'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_regex' -- check by looking for filenames that look like the shared
+# library in the library path.
+# 'file_magic [regex]' -- check by looking for files in library path which
+# responds to the "file" command with a given regex. This is actually a
+# superset of the file_regex command. If you have file on your system, you'll
+# want to use this instead.
+# Notes: regexes are run through expr.
+
+echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
+case "$host_os" in
+aix3* | aix4*)
+ version_type=linux
+ library_names_spec='${libname}${release}.so$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}.so$major'
+ ;;
+
+amigaos*)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
+ ;;
+
+bsdi4*)
+ version_type=linux
+ library_names_spec='${libname}.so.$major ${libname}.so'
+ soname_spec='${libname}.so'
+ finish_cmds='PATH="$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+cygwin32* | mingw32*)
+ version_type=windows
+ if test "$with_gcc" = yes; then
+ library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
+ else
+ library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
+ fi
+ dynamic_linker='Win32 ld.exe'
+ libname_spec='$name'
+ shlibpath_var=PATH
+ ;;
+
+freebsd2* | freebsd3*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+ version_type=freebsd-$objformat
+ library_names_spec='${libname}${release}.so$versuffix $libname.so'
+ finish_cmds='PATH="$PATH:/sbin" OBJFORMAT="$objformat" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+gnu*)
+ version_type=linux
+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ dynamic_linker="$host_os dld.sl"
+ version_type=sunos
+ shlibpath_var=SHLIB_PATH
+ library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
+ soname_spec='${libname}${release}.sl$major'
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+irix5*)
+ version_type=osf
+ soname_spec='${libname}${release}.so'
+ library_names_spec='${libname}${release}.so$versuffix $libname.so'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+irix6*)
+ version_type=osf
+ soname_spec='${libname}${release}.so'
+ library_names_spec='${libname}${release}.so$versuffix $libname.so'
+ shlibpath_var=LD_LIBRARYN32_PATH
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux-gnu*)
+ version_type=linux
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ check_shared_deplibs_method='file_magic ELF 32-bit LSB shared object'
+ sys_lib_search_path="/lib /usr/lib /usr/local/lib `echo $LD_LIBRARY_PATH | sed -e 's/:/ /g'`"
+
+ if test -f /lib/ld.so.1; then
+ dynamic_linker='GNU ld.so'
+ else
+ # Only the GNU ld.so supports shared libraries on MkLinux.
+ case "$host_cpu" in
+ powerpc*) dynamic_linker=no ;;
+ *) dynamic_linker='Linux ld.so' ;;
+ esac
+ fi
+ ;;
+
+netbsd* | openbsd*)
+ version_type=sunos
+ library_names_spec='${libname}${release}.so$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+os2*)
+ libname_spec='$name'
+ library_names_spec='$libname.dll $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4*)
+ version_type=osf
+ soname_spec='${libname}${release}.so'
+ library_names_spec='${libname}${release}.so$versuffix $libname.so'
+ shlibpath_var=LD_LIBRARY_PATH
+ check_shared_deplibs_method='pass_all'
+ ;;
+
+sco3.2v5*)
+ version_type=osf
+ soname_spec='${libname}${release}.so$major'
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+solaris*)
+ version_type=linux
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+sysv4.2uw2*)
+ version_type=linux
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
+ soname_spec='${libname}${release}.so.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+dgux*)
+ version_type=linux
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+echo "$ac_t$dynamic_linker" 1>&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+# Report the final consequences.
+echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
+
+echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+esac
+
+echo "$ac_t$enable_shared" 1>&6
+
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+
+echo "checking whether to build static libraries... $enable_static" 1>&6
+
+echo $ac_n "checking for objdir... $ac_c" 1>&6
+rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+echo "$ac_t$objdir" 1>&6
+
+# Copy echo and quote the copy, instead of the original, because it is
+# used later.
+ltecho="$echo"
+if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+ ltecho="$CONFIG_SHELL \$0 --fallback-echo"
+fi
+LTSHELL="$SHELL"
+
+# Only quote variables if we're using ltmain.sh.
+case "$ltmain" in
+*.sh)
+ # Now quote all the things that may contain metacharacters.
+ for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
+ old_LN_S old_DLLTOOL old_AS AR CC LD LN_S NM LTSHELL VERSION \
+ reload_flag reload_cmds wl \
+ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
+ whole_archive_flag_spec libname_spec library_names_spec soname_spec \
+ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
+ old_postuninstall_cmds archive_cmds archive_sym_cmds postinstall_cmds postuninstall_cmds \
+ check_shared_deplibs_method allow_undefined_flag no_undefined_flag \
+ finish_cmds finish_eval global_symbol_pipe \
+ hardcode_libdir_flag_spec hardcode_libdir_separator sys_lib_search_path \
+ compiler_c_o compiler_o_lo need_locks; do
+
+ case "$var" in
+ reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
+ old_postinstall_cmds | old_postuninstall_cmds | \
+ archive_cmds | archive_sym_cmds | \
+ postinstall_cmds | postuninstall_cmds | \
+ finish_cmds | sys_lib_search_path)
+ # Double-quote double-evaled strings.
+ eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`\\\""
+ ;;
+ *)
+ eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+ ;;
+ esac
+ done
+
+ case "$ltecho" in
+ *'\$0 --fallback-echo"')
+ ltecho=`$echo "X$ltecho" |
+ $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+ ;;
+ esac
+
+ trap "$rm \"$ofile\"; exit 1" 1 2 15
+ echo "creating $ofile"
+ $rm "$ofile"
+ cat <<EOF > "$ofile"
+#! $SHELL
+
+# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION)
+# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
+#
+# Copyright (C) 1996-1998 Free Software Foundation, Inc.
+# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="sed -e s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
+
+### BEGIN LIBTOOL CONFIG
+EOF
+ cfgfile="$ofile"
+ ;;
+
+*)
+ # Double-quote the variables that need it (for aesthetics).
+ for var in old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
+ old_LN_S old_DLLTOOL old_AS; do
+ eval "$var=\\\"\$var\\\""
+ done
+
+ # Just create a config file.
+ cfgfile="$ofile.cfg"
+ trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+ echo "creating $cfgfile"
+ $rm "$cfgfile"
+ cat <<EOF > "$cfgfile"
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION)
+EOF
+ ;;
+esac
+
+cat <<EOF >> "$cfgfile"
+# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
+# LD=$old_LD NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
+# DLLTOOL="$old_DLLTOOL" AS="$old_AS" \\
+# $0$ltconfig_args
+#
+# Compiler and other test output produced by $progname, useful for
+# debugging $progname, is in ./config.log if it exists.
+
+# The version of $progname that generated this script.
+LTCONFIG_VERSION=$VERSION
+
+# Shell to use when invoking shell scripts.
+SHELL=$LTSHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# The host system.
+host_alias=$host_alias
+host=$host
+
+# An echo program that does not interpret backslashes.
+echo=$ltecho
+
+# The archiver.
+AR=$AR
+
+# The default C compiler.
+CC=$CC
+
+# The linker used to build libraries.
+LD=$LD
+
+# Whether we need hard or soft links.
+LN_S=$LN_S
+
+# A BSD-compatible nm program.
+NM=$NM
+
+# Used on cygwin32: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin32: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$reload_flag
+reload_cmds=$reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$wl
+
+# Object file suffix (normally "o").
+objext="$objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$pic_flag
+
+# Does compiler simultaneously support -c and -o options
+compiler_c_o=$compiler_c_o
+
+# Can we write directly to a .lo ?
+compiler_o_lo=$compiler_o_lo
+
+# Must we lock files when doing compilation ?
+need_locks=$need_locks
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$link_static_flag
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$no_builtin_flag
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$whole_archive_flag_spec
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$RANLIB
+old_archive_cmds=$old_archive_cmds
+old_postinstall_cmds=$old_postinstall_cmds
+old_postuninstall_cmds=$old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$old_archive_from_new_cmds
+
+# Commands used to build and install a shared archive.
+archive_cmds=$archive_cmds
+archive_sym_cmds=$archive_sym_cmds
+postinstall_cmds=$postinstall_cmds
+postuninstall_cmds=$postuninstall_cmds
+
+# Method to check whether dependent libraries are shared objects.
+check_shared_deplibs_method=$check_shared_deplibs_method
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$allow_undefined_flag
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$no_undefined_flag
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$global_symbol_pipe
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$hardcode_libdir_separator
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# System search path for libraries
+sys_lib_search_path=$sys_lib_search_path
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path"
+EOF
+
+case "$ltmain" in
+*.sh)
+ echo '### END LIBTOOL CONFIG' >> "$ofile"
+ echo >> "$ofile"
+ case "$host_os" in
+ aix3*)
+ cat <<\EOF >> "$ofile"
+
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "${COLLECT_NAMES+set}" != set; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+EOF
+ ;;
+ esac
+
+ # Append the ltmain.sh script.
+ cat "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
+
+ chmod +x "$ofile"
+ ;;
+
+*)
+ # Compile the libtool program.
+ echo "FIXME: would compile $ltmain"
+ ;;
+esac
+exit 0
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/dldialog/ltmain.sh b/dldialog/ltmain.sh
new file mode 100644
index 0000000..f12c6d1
--- /dev/null
+++ b/dldialog/ltmain.sh
@@ -0,0 +1,3079 @@
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun ltconfig.
+#
+# Copyright (C) 1996-1998 Free Software Foundation, Inc.
+# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit 0
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+ # Yippee, $echo works!
+ :
+else
+ # Restart under the correct shell, and then maybe $echo will work.
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+# The name of this program.
+progname=`$echo "$0" | sed 's%^.*/%%'`
+modename="$progname"
+
+# Constants.
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.2e
+
+default_mode=
+help="Try \`$progname --help' for more information."
+magic="%%%MAGIC variable%%%"
+mkdir="mkdir"
+mv="mv -f"
+rm="rm -f"
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e s/^X//'
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+# We save the old values to restore during execute mode.
+if test "${LC_ALL+set}" = set; then
+ save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+fi
+if test "${LANG+set}" = set; then
+ save_LANG="$LANG"; LANG=C; export LANG
+fi
+
+if test "$LTCONFIG_VERSION" != "$VERSION"; then
+ echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
+ echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+ exit 1
+fi
+
+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ echo "$modename: not configured to build any kind of library" 1>&2
+ echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+ exit 1
+fi
+
+# Global variables.
+mode=$default_mode
+nonopt=
+prev=
+prevopt=
+run=
+show="$echo"
+show_help=
+execute_dlfiles=
+lo2o="s/\\.lo\$/.${objext}/"
+los2o="s/\\.lo /.${objext} /g"
+
+# Parse our command line options once, thoroughly.
+while test $# -gt 0
+do
+ arg="$1"
+ shift
+
+ case "$arg" in
+ -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case "$prev" in
+ execute_dlfiles)
+ eval "$prev=\"\$$prev \$arg\""
+ ;;
+ *)
+ eval "$prev=\$arg"
+ ;;
+ esac
+
+ prev=
+ prevopt=
+ continue
+ fi
+
+ # Have we seen a non-optional argument yet?
+ case "$arg" in
+ --help)
+ show_help=yes
+ ;;
+
+ --version)
+ echo "$PROGRAM (GNU $PACKAGE) $VERSION"
+ exit 0
+ ;;
+
+ --config)
+ sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0
+ exit 0
+ ;;
+
+ --debug)
+ echo "$progname: enabling shell trace mode"
+ set -x
+ ;;
+
+ --dry-run | -n)
+ run=:
+ ;;
+
+ --features)
+ echo "host: $host"
+ if test "$build_libtool_libs" = yes; then
+ echo "enable shared libraries"
+ else
+ echo "disable shared libraries"
+ fi
+ if test "$build_old_libs" = yes; then
+ echo "enable static libraries"
+ else
+ echo "disable static libraries"
+ fi
+ exit 0
+ ;;
+
+ --finish) mode="finish" ;;
+
+ --mode) prevopt="--mode" prev=mode ;;
+ --mode=*) mode="$optarg" ;;
+
+ --quiet | --silent)
+ show=:
+ ;;
+
+ -dlopen)
+ prevopt="-dlopen"
+ prev=execute_dlfiles
+ ;;
+
+ -*)
+ $echo "$modename: unrecognized option \`$arg'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+
+ *)
+ nonopt="$arg"
+ break
+ ;;
+ esac
+done
+
+if test -n "$prevopt"; then
+ $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+fi
+
+if test -z "$show_help"; then
+
+ # Infer the operation mode.
+ if test -z "$mode"; then
+ case "$nonopt" in
+ *cc | *++ | gcc* | *-gcc*)
+ mode=link
+ for arg
+ do
+ case "$arg" in
+ -c)
+ mode=compile
+ break
+ ;;
+ esac
+ done
+ ;;
+ *db | *dbx | *strace | *truss)
+ mode=execute
+ ;;
+ *install*|cp|mv)
+ mode=install
+ ;;
+ *rm)
+ mode=uninstall
+ ;;
+ *)
+ # If we have no mode, but dlfiles were specified, then do execute mode.
+ test -n "$execute_dlfiles" && mode=execute
+
+ # Just use the default operation mode.
+ if test -z "$mode"; then
+ if test -n "$nonopt"; then
+ $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+ else
+ $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+ fi
+ fi
+ ;;
+ esac
+ fi
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$execute_dlfiles" && test "$mode" != execute; then
+ $echo "$modename: unrecognized option \`-dlopen'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$modename --help --mode=$mode' for more information."
+
+ # These modes are in order of execution frequency so that they run quickly.
+ case "$mode" in
+ # libtool compile mode
+ compile)
+ modename="$modename: compile"
+ # Get the compilation command and the source file.
+ base_compile=
+ lastarg=
+ srcfile="$nonopt"
+ suppress_output=
+ force_static=no
+
+ user_target=no
+ for arg
+ do
+ # Accept any command-line options.
+ case "$arg" in
+ -o)
+ if test "$user_target" != "no"; then
+ $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+ exit 1
+ fi
+ user_target=next
+ ;;
+
+ -force-static)
+ force_static=yes
+ continue
+ ;;
+
+ -static)
+ build_old_libs=yes
+ continue
+ ;;
+ esac
+
+ case "$user_target" in
+ next)
+ # The next one is the -o target name
+ user_target=yes
+ continue
+ ;;
+ yes)
+ # We got the output file
+ user_target=set
+ libobj="$arg"
+ continue
+ ;;
+ esac
+
+ # Accept the current argument as the source file.
+ lastarg="$srcfile"
+ srcfile="$arg"
+
+ # Aesthetically quote the previous argument.
+
+ # Backslashify any backslashes, double quotes, and dollar signs.
+ # These are the only characters that are still specially
+ # interpreted inside of double-quoted scrings.
+ lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+
+ # Double-quote args containing other shell metacharacters.
+ # Many Bourne shells cannot handle close brackets correctly in scan
+ # sets, so we specify it separately.
+ case "$lastarg" in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ lastarg="\"$lastarg\""
+ ;;
+ esac
+
+ # Add the previous argument to base_compile.
+ if test -z "$base_compile"; then
+ base_compile="$lastarg"
+ else
+ base_compile="$base_compile $lastarg"
+ fi
+ done
+
+ case "$user_target" in
+ set)
+ ;;
+ no)
+ # Get the name of the library object.
+ libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+ ;;
+ *)
+ $echo "$modename: you must specify a target with \`-o'" 1>&2
+ exit 1
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ xform='[cCFSfmso]'
+ case "$libobj" in
+ *.ada) xform=ada ;;
+ *.adb) xform=adb ;;
+ *.ads) xform=ads ;;
+ *.asm) xform=asm ;;
+ *.c++) xform=c++ ;;
+ *.cc) xform=cc ;;
+ *.cpp) xform=cpp ;;
+ *.cxx) xform=cxx ;;
+ *.f90) xform=f90 ;;
+ *.for) xform=for ;;
+ esac
+
+ libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+ case "$libobj" in
+ *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+ *)
+ $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+ exit 1
+ ;;
+ esac
+
+ if test -z "$base_compile"; then
+ $echo "$modename: you must specify a compilation command" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Delete any leftover library objects.
+ if test "$build_old_libs" = yes; then
+ removelist="$obj $libobj $lockfile"
+ else
+ removelist="$libobj $lockfile"
+ fi
+
+ $run $rm $removelist
+ trap "$run $rm $removelist; exit 1" 1 2 15
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" = no; then
+ output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext}
+ lockfile="$output_obj.lock"
+ removelist="$removelist $output_obj $lockfile"
+ trap "$run $rm $removelist; exit 1" 1 2 15
+ else
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test "$need_locks" = yes; then
+ until ln "$0" "$lockfile" 2>/dev/null; do
+ $show "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" = warn; then
+ if test -f "$lockfile"; then
+ echo "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit 1
+ fi
+ echo $srcfile > "$lockfile"
+ fi
+
+ if test -n "$fix_srcfile_path"; then
+ eval srcfile=\"$fix_srcfile_path\"
+ fi
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test "$build_libtool_libs" = yes; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ # All platforms use -DPIC, to notify preprocessed assembler code.
+ command="$base_compile$pic_flag -DPIC $srcfile"
+ if test "$compiler_o_lo" = yes; then
+ command="$command -o $libobj"
+ output_obj="$libobj"
+ elif test "$compiler_c_o" = yes; then
+ command="$command -o $obj"
+ output_obj="$obj"
+ fi
+
+ $show "$command"
+ if $run eval "$command"; then :
+ else
+ test -n "$output_obj" && $run $rm $removelist
+ exit 1
+ fi
+
+ if test "$need_locks" = warn &&
+ test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+ echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit 1
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test "$compiler_o_lo" = no && test x"$output_obj" != x"$libobj"; then
+ $show "$mv $output_obj $libobj"
+ if $run $mv $output_obj $libobj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # If we have no pic_flag and do not have -force-static,
+ # then copy the object into place and finish.
+ if test -z "$pic_flag" && test "$force_static" = no; then
+ $show "$LN_S $libobj $obj"
+ if $run $LN_S $libobj $obj; then
+ exit 0
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # Allow error messages only from the first compilation.
+ suppress_output=' >/dev/null 2>&1'
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test "$build_old_libs" = yes; then
+ command="$base_compile $srcfile"
+ if test "$force_static" = yes; then
+ command="$command -DLIBTOOL_STATIC"
+ fi
+ if test "$compiler_c_o" = yes; then
+ command="$command -o $obj"
+ output_obj="$obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ command="$command$suppress_output"
+ $show "$command"
+ if $run eval "$command"; then :
+ else
+ $run $rm $removelist
+ exit 1
+ fi
+
+ if test "$need_locks" = warn &&
+ test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+ echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit 1
+ fi
+
+ # Just move the object if needed
+ if test "$compiler_c_o" = no && test x"$output_obj" != x"$obj"; then
+ $show "$mv $output_obj $obj"
+ if $run $mv $output_obj $obj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+ fi
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ $rm "$lockfile"
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we do not
+ # accidentally link it into a program.
+ if test "$build_libtool_libs" != yes; then
+ $show "echo timestamp > $libobj"
+ $run eval "echo timestamp > \$libobj" || exit $?
+ fi
+
+ exit 0
+ ;;
+
+ # libtool link mode
+ link)
+ modename="$modename: link"
+ C_compiler="$CC" # save it, to compile generated C sources
+ CC="$nonopt"
+ allow_undefined=yes
+ compile_command="$CC"
+ finalize_command="$CC"
+
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ eval lib_search_path=\"$sys_lib_search_path\"
+
+ dlfiles=
+ dlprefiles=
+ export_dynamic=no
+ export_symbols=
+ generated=
+ hardcode_libdirs=
+ libobjs=
+ link_against_libtool_libs=
+ ltlibs=
+ module=no
+ objs=
+ prev=
+ prevarg=
+ release=
+ rpath=
+ perm_rpath=
+ temp_rpath=
+ vinfo=
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case "$arg" in
+ -all-static | -static)
+ if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+ $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+ fi
+ build_libtool_libs=no
+ build_old_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test $# -gt 0; do
+ arg="$1"
+ shift
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case "$prev" in
+ output)
+ compile_command="$compile_command @OUTPUT@"
+ finalize_command="$finalize_command @OUTPUT@"
+ ;;
+ esac
+
+ case "$prev" in
+ dlfiles|dlprefiles)
+ case "$arg" in
+ *.la | *.lo) ;; # We handle these cases below.
+ *)
+ dlprefiles="$dlprefiles $arg"
+ test "$prev" = dlfiles && dlfiles="$dlfiles $arg"
+ prev=
+ ;;
+ esac
+ ;;
+ exportsyms)
+ export_symbols="$arg"
+ if test ! -f "$arg"; then
+ $echo "$modename: symbol file \`$arg' does not exist"
+ exit 1
+ fi
+ prev=
+ ;;
+ release)
+ release="-$arg"
+ prev=
+ continue
+ ;;
+ rpath)
+ rpath="$rpath $arg"
+ prev=
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi
+
+ prevarg="$arg"
+
+ case "$arg" in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ compile_command="$compile_command $link_static_flag"
+ finalize_command="$finalize_command $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ if test "$export_dynamic" != yes; then
+ export_dynamic=yes
+ if test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ else
+ arg=
+ fi
+
+ # Add the symbol object into the linking commands.
+ compile_command="$compile_command @SYMFILE@"
+ finalize_command="$finalize_command @SYMFILE@"
+ fi
+ ;;
+
+ -export-symbols)
+ if test -n "$export_symbols"; then
+ $echo "$modename: cannot have more than one -exported-symbols"
+ exit 1
+ fi
+ prev=exportsyms
+ continue
+ ;;
+
+ -L*)
+ dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'`
+ case "$dir" in
+ /* | [A-Za-z]:[/\\]*)
+ # Add the corresponding hardcode_libdir_flag, if it is not identical.
+ ;;
+ *)
+ $echo "$modename: \`-L$dir' cannot specify a relative directory" 1>&2
+ exit 1
+ ;;
+ esac
+ deplibs="$deplibs $arg"
+ lib_search_path="$lib_search_path `expr $arg : '-L\(.*\)'`"
+ ;;
+
+ -l*) deplibs="$deplibs $arg" ;;
+
+ -module)
+ if test "$module" != yes; then
+ module=yes
+ if test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ else
+ arg=
+ fi
+ fi
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -static)
+ # If we have no pic_flag, then this is the same as -all-static.
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ compile_command="$compile_command $link_static_flag"
+ finalize_command="$finalize_command $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case "$arg" in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ ;;
+
+ *.o | *.obj | *.a | *.lib)
+ # A standard object.
+ objs="$objs $arg"
+ ;;
+
+ *.lo)
+ # A library object.
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ if test "$build_libtool_libs" = yes; then
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
+ prev=
+ fi
+ libobjs="$libobjs $arg"
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ dlname=
+ libdir=
+ library_names=
+ old_library=
+
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variable installed.
+ installed=yes
+
+ # If there is no directory component, then add one.
+ case "$arg" in
+ */* | *\\*) . $arg ;;
+ *) . ./$arg ;;
+ esac
+
+ # Get the name of the library we link against.
+ linklib=
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+
+ if test -z "$linklib"; then
+ $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
+ exit 1
+ fi
+
+ # Find the relevant object directory and library name.
+ name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
+
+ if test "X$installed" = Xyes; then
+ dir="$libdir"
+ else
+ dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$dir" = "X$arg"; then
+ dir="$objdir"
+ else
+ dir="$dir/$objdir"
+ fi
+ fi
+
+ if test -z "$libdir"; then
+ # It is a libtool convenience library, so add in its objects.
+ convenience="$convenience $dir/$old_library"
+ old_convenience="$old_convenience $dir/$old_library"
+ deplibs="$deplibs$dependency_libs"
+ compile_command="$compile_command $dir/$old_library$dependency_libs"
+ finalize_command="$finalize_command $dir/$old_library$dependency_libs"
+ continue
+ fi
+
+ # This library was specified with -dlopen.
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ if test -z "$dlname" || test "$build_libtool_libs" = no; then
+ # If there is no dlname or we're linking statically,
+ # we need to preload.
+ prev=dlprefiles
+ else
+ # We should not create a dependency on this library, but we
+ # may need any libraries it requires.
+ compile_command="$compile_command$dependency_libs"
+ finalize_command="$finalize_command$dependency_libs"
+ prev=
+ continue
+ fi
+ fi
+
+ # The library was specified with -dlpreopen.
+ if test "$prev" = dlprefiles; then
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ dlprefiles="$dlprefiles $dir/$old_library"
+ else
+ dlprefiles="$dlprefiles $dir/$linklib"
+ fi
+ prev=
+ fi
+
+ if test "$build_libtool_libs" = yes && test -n "$library_names"; then
+ link_against_libtool_libs="$link_against_libtool_libs $arg"
+ if test -n "$shlibpath_var"; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath " in
+ *" $dir "*) ;;
+ *) temp_rpath="$temp_rpath $dir" ;;
+ esac
+ fi
+
+ # This is the magic to use -rpath.
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ # Put the magic libdir with the hardcode flag.
+ hardcode_libdirs="$libdir"
+ libdir="@HARDCODE_LIBDIRS@"
+ else
+ # Just accumulate the unique libdirs.
+ case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ libdir=
+ fi
+ fi
+
+ if test -n "$libdir"; then
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ compile_command="$compile_command $flag"
+ finalize_command="$finalize_command $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ # Do the same for the permanent run path.
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+
+
+ lib_linked=yes
+ case "$hardcode_action" in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ compile_command="$compile_command $dir/$linklib"
+ elif test "$hardcode_minus_L" = no; then
+ case "$host" in
+ *-*-sunos*)
+ compile_shlibpath="$compile_shlibpath$dir:"
+ ;;
+ esac
+ compile_command="$compile_command -L$dir -l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ compile_shlibpath="$compile_shlibpath$dir:"
+ compile_command="$compile_command -l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+
+ relink)
+ # We need an absolute path.
+ case "$dir" in
+ /* | [A-Za-z]:[/\\]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
+ exit 1
+ fi
+ dir="$absdir"
+ ;;
+ esac
+
+ if test "$hardcode_direct" = yes; then
+ compile_command="$compile_command $dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ compile_command="$compile_command -L$dir -l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ compile_shlibpath="$compile_shlibpath$dir:"
+ compile_command="$compile_command -l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+
+ *)
+ lib_linked=no
+ ;;
+ esac
+
+ if test "$lib_linked" != yes; then
+ $echo "$modename: configuration error: unsupported hardcode properties"
+ exit 1
+ fi
+
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes; then
+ finalize_command="$finalize_command $libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ finalize_command="$finalize_command -L$libdir -l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ finalize_shlibpath="$finalize_shlibpath$libdir:"
+ finalize_command="$finalize_command -l$name"
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ finalize_command="$finalize_command -L$libdir -l$name"
+ fi
+ else
+ # Transform directly to old archives if we don't build new libraries.
+ if test -n "$pic_flag" && test -z "$old_library"; then
+ $echo "$modename: cannot find static library for \`$arg'" 1>&2
+ exit 1
+ fi
+
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test "$hardcode_direct" != unsupported; then
+ test -n "$old_library" && linklib="$old_library"
+ compile_command="$compile_command $dir/$linklib"
+ finalize_command="$finalize_command $dir/$linklib"
+ else
+ compile_command="$compile_command -L$dir -l$name"
+ finalize_command="$finalize_command -L$dir -l$name"
+ fi
+ fi
+
+ # Add in any libraries that this one depends upon.
+ compile_command="$compile_command$dependency_libs"
+ finalize_command="$finalize_command$dependency_libs"
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case "$arg" in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ ;;
+ esac
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
+ fi
+ done
+
+ if test -n "$prev"; then
+ $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ if test -n "$export_symbols" && test "$module" = yes; then
+ $echo "$modename: \`-export-symbols' is not supported for modules"
+ exit 1
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+
+ case "$output" in
+ "")
+ $echo "$modename: you must specify an output file" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+
+ *.a | *.lib)
+ if test -n "$link_against_libtool_libs"; then
+ $echo "$modename: error: cannot link libtool libraries into archives" 1>&2
+ exit 1
+ fi
+
+ if test -n "$deplibs"; then
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
+ fi
+
+ if test -n "$dlfiles$dlprefiles"; then
+ $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$rpath"; then
+ $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$export_symbols"; then
+ $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
+ fi
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs="$output"
+ ;;
+
+ *.la)
+ # Make sure we only generate libraries of the form `libNAME.la'.
+ case "$outputname" in
+ lib*) ;;
+ *)
+ $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+ esac
+
+ name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+ eval libname=\"$libname_spec\"
+
+ output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$output_objdir" = "X$output"; then
+ output_objdir="$objdir"
+ else
+ output_objdir="$output_objdir/$objdir"
+ fi
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ if test -n "$objs"; then
+ $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
+ exit 1
+ fi
+
+ # How the heck are we supposed to write a wrapper for a shared library?
+ if test -n "$link_against_libtool_libs"; then
+ $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2
+ exit 1
+ fi
+
+ if test -n "$dlfiles$dlprefiles"; then
+ $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
+ fi
+
+ set dummy $rpath
+ if test $# -gt 2; then
+ $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
+ fi
+ install_libdir="$2"
+
+ oldlibs=
+ if test -z "$rpath"; then
+ # Building a libtool convenience library.
+ libext=al
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ dependency_libs="$deplibs"
+
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
+ fi
+ else
+
+ # Parse the version information argument.
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
+ set dummy $vinfo 0 0 0
+ IFS="$save_ifs"
+
+ if test -n "$8"; then
+ $echo "$modename: too many parameters to \`-version-info'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ current="$2"
+ revision="$3"
+ age="$4"
+
+ # Check that each of the things are valid numbers.
+ case "$current" in
+ 0 | [1-9] | [1-9][0-9]*) ;;
+ *)
+ $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ case "$revision" in
+ 0 | [1-9] | [1-9][0-9]*) ;;
+ *)
+ $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ case "$age" in
+ 0 | [1-9] | [1-9][0-9]*) ;;
+ *)
+ $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ if test $age -gt $current; then
+ $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case "$version_type" in
+ none) ;;
+
+ linux)
+ major=.`expr $current - $age`
+ versuffix="$major.$age.$revision"
+ ;;
+
+ osf)
+ major=`expr $current - $age`
+ versuffix=".$current.$age.$revision"
+ verstring="$current.$age.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test $loop != 0; do
+ iface=`expr $current - $loop`
+ loop=`expr $loop - 1`
+ verstring="$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ verstring="$verstring:${current}.0"
+ ;;
+
+ sunos)
+ major=".$current"
+ versuffix=".$current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current";
+ ;;
+
+ windows)
+ # Like Linux, but with '-' rather than '.', since we only
+ # want one extension on Windows 95.
+ major=`expr $current - $age`
+ versuffix="-$major-$age-$revision"
+ ;;
+
+ *)
+ $echo "$modename: unknown library version type \`$version_type'" 1>&2
+ echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+ exit 1
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ versuffix=
+ verstring="0.0"
+ case "$host" in
+ *-*-sunos*)
+ versuffix=".0.0"
+ ;;
+ esac
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" = yes; then
+ if test "$allow_undefined_flag" = unsupported; then
+ $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+ build_libtool_libs=no
+ build_old_libs=yes
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+
+ # Add libc to deplibs on all systems.
+ dependency_libs="$deplibs"
+ deplibs="$deplibs -lc"
+ fi
+
+ # Create the output directory, or remove our outputs if we need to.
+ if test -d $output_objdir; then
+ $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
+ $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
+ else
+ $show "$mkdir $output_objdir"
+ $run $mkdir $output_objdir
+ status=$?
+ if test $status -ne 0 && test ! -d $output_objdir; then
+ exit $status
+ fi
+ fi
+
+ # Now set the variables for building old libraries.
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+ oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.'${libext}' //g' -e "$los2o" -e 's/ $//g'`
+ fi
+
+ if test "$build_libtool_libs" = yes; then
+ # Transform deplibs into only deplibs that can be linked in shared.
+ ## Gordon: Do you check for the existence of the libraries in deplibs
+ ## on the system? That should maybe be merged in here someplace....
+ ## Actually: I think test_compile and file_magic do this... file_regex
+ ## sorta does this. Only pas_all needs to be changed. -Toshio
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=""
+ versuffix=""
+ major=""
+ newdeplibs=
+ case "$check_shared_deplibs_method" in
+ pass_all)
+ newdeplibs=$deplibs
+ ;; # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behaviour.
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $rm conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $rm a.out
+ $C_compiler conftest.c $deplibs
+ if test $? -eq 0 ; then
+ ldd_output=`ldd a.out`
+ for i in $deplibs; do
+ name="`expr $i : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ echo
+ echo "*** Warning: This library needs some functionality provided by $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ newdeplibs="$newdeplibs $i"
+ fi
+ done
+ else
+ # Error occured in the first compile. Let's try to salvage the situation:
+ # Compile a seperate program for each library.
+ for i in $deplibs; do
+ name="`expr $i : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" ; then
+ $rm a.out
+ $C_compiler conftest.c $i
+ # Did it work?
+ if test $? -eq 0 ; then
+ ldd_output=`ldd a.out`
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ echo
+ echo "*** Warning: This library needs some functionality provided by $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ echo
+ echo "*** Warning! Library $i is needed by this library but I was not able to"
+ echo "*** make it link in! You will probably need to install it or some"
+ echo "*** library that it depends on before this library will be fully"
+ echo "*** functional. Installing it before continuing would be even better."
+ fi
+ else
+ newdeplibs="$newdeplibs $i"
+ fi
+ done
+ fi
+ deplibs=$newdeplibs
+ ;;
+ file_magic* | file_regex)
+ set dummy $check_shared_deplibs_method
+ file_magic_regex="`expr \"$check_shared_deplibs_method\" : \"$2\(.*\)\"`"
+ for a_deplib in $deplibs; do
+ name="`expr $a_deplib : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ case "$check_shared_deplibs_method" in
+ file_magic*)
+ for i in $lib_search_path; do
+ # This needs to be more general than file_regex in order to
+ # catch things like glibc on linux. Maybe file_regex
+ # should be more general as well, but maybe not. Since
+ # library names are supposed to conform to
+ # library_name_spec, I think file_regex should remain
+ # strict. What do you think Gordon?
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ file_output=`file $potent_lib`
+ if test `expr "$file_output" : ".*$file_magic_regex"` -ne 0 ; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ ;;
+ file_regex)
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ for i in $lib_search_path; do
+ potential_libs=`ls $i/$deplib_match* 2>/dev/null`
+ if test "$potential_libs" != "" ; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break
+ fi
+ done
+ ;;
+ esac
+ if test "$a_deplib" != "" ; then
+ echo
+ echo "*** Warning: This library needs some functionality provided by $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ fi
+ done # Gone through all deplibs.
+ ;;
+ none | *) deplibs="" ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+ deplibs=$newdeplibs
+ # Done checking deplibs!
+
+ # Get the real and link names of the library.
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ realname="$2"
+ shift; shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+
+ lib="$output_objdir/$realname"
+ for link
+ do
+ linknames="$linknames $link"
+ done
+
+ # Use standard objects if they are PIC.
+ test -z "$pic_flag" && libobjs=`$echo "X$libobjs " | $Xsed -e "$los2o" -e 's/ $//g'`
+
+ if test -n "$whole_archive_flag_spec"; then
+ if test -n "$convenience"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ fi
+ else
+ for xlib in $convenience; do
+ # Extract the objects.
+ xdir="$xlib"x
+ generated="$generated $xdir"
+ xlib=`echo "$xlib" | $Xsed -e 's%^.*/%%'`
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=$?
+ if test $status -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x ../$xlib)"
+ $run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $?
+
+ libobjs="$libobjs `echo $xdir/*`"
+ done
+ fi
+
+ # Do each of the archive commands.
+ if test -n "$export_symbols" && test -n "$archive_sym_cmds"; then
+ eval cmds=\"$archive_sym_cmds\"
+ else
+ eval cmds=\"$archive_cmds\"
+ fi
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ $show "(cd $output_objdir && $LN_S $realname $linkname)"
+ $run eval '(cd $output_objdir && $LN_S $realname $linkname)' || exit $?
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+ fi
+ ;;
+
+ *.lo | *.o | *.obj)
+ if test -n "$link_against_libtool_libs"; then
+ $echo "$modename: error: cannot link libtool libraries into objects" 1>&2
+ exit 1
+ fi
+
+ if test -n "$deplibs"; then
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
+ fi
+
+ if test -n "$dlfiles$dlprefiles"; then
+ $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$rpath"; then
+ $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+ fi
+
+ case "$output" in
+ *.lo)
+ if test -n "$objs"; then
+ $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+ exit 1
+ fi
+ libobj="$output"
+ obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+ ;;
+ *)
+ libobj=
+ obj="$output"
+ ;;
+ esac
+
+ # Delete the old objects.
+ $run $rm $obj $libobj
+
+ # Create the old-style object.
+ reload_objs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.'${libext}' //g' -e 's/[^ ]*\.lib //g' -e "$los2o" -e 's/ $//g'`
+
+ output="$obj"
+ eval cmds=\"$reload_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+
+ # Exit if we aren't doing a library object file.
+ test -z "$libobj" && exit 0
+
+ if test "$build_libtool_libs" != yes; then
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ $show "echo timestamp > $libobj"
+ $run eval "echo timestamp > $libobj" || exit $?
+ exit 0
+ fi
+
+ if test -n "$pic_flag"; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs"
+ output="$libobj"
+ eval cmds=\"$reload_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ else
+ # Just create a symlink.
+ $show "$LN_S $obj $libobj"
+ $run $LN_S $obj $libobj || exit $?
+ fi
+
+ exit 0
+ ;;
+
+ # Anything else should be a program.
+ *)
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
+ fi
+
+ if test -n "$rpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ # Put the magic libdir with the hardcode flag.
+ hardcode_libdirs="$libdir"
+ libdir="@HARDCODE_LIBDIRS@"
+ else
+ # Just accumulate the unique libdirs.
+ case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ libdir=
+ fi
+ fi
+
+ if test -n "$libdir"; then
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ compile_command="$compile_command $flag"
+ finalize_command="$finalize_command $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ fi
+
+ # Substitute the hardcoded libdirs into the compile commands.
+ if test -n "$hardcode_libdir_separator"; then
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
+ fi
+
+ output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$output_objdir" = "X$output"; then
+ output_objdir="$objdir"
+ else
+ output_objdir="$output_objdir/$objdir"
+ fi
+
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$echo "X$compile_command " | $Xsed -e "$los2o" -e 's/ $//'`
+ finalize_command=`$echo "X$finalize_command " | $Xsed -e "$los2o" -e 's/ $//'`
+ fi
+
+ if test "$export_dynamic" = yes && test -n "$NM" && test -n "$global_symbol_pipe"; then
+ dlsyms="${outputname}S.c"
+ else
+ dlsyms=
+ fi
+
+ if test -n "$dlsyms"; then
+ case "$dlsyms" in
+ "") ;;
+ *.c)
+ if test -z "$export_symbols"; then
+ # Add our own program objects to the preloaded list.
+ dlprefiles=`$echo "X$objs$dlprefiles " | $Xsed -e "$los2o" -e 's/ $//'`
+ fi
+
+ # Discover the nlist of each of the dlfiles.
+ nlist="$objdir/${output}.nm"
+
+ if test -d $objdir; then
+ $show "$rm $nlist ${nlist}T"
+ $run $rm "$nlist" "${nlist}T"
+ else
+ $show "$mkdir $objdir"
+ $run $mkdir $objdir
+ status=$?
+ if test $status -ne 0 && test ! -d $objdir; then
+ exit $status
+ fi
+ fi
+
+ # Parse the name list into a source file.
+ $show "creating $objdir/$dlsyms"
+
+ $echo > "$objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* Prevent the only kind of declaration conflicts we can make. */
+#define dld_preloaded_symbols some_other_symbol
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test -n "$export_symbols"; then
+ sed -e 's/^\(.*\)/\1 \1/' < "$export_symbols" > "$nlist"
+ fi
+
+ for arg in $dlprefiles; do
+ $show "extracting global C symbols from \`$arg'"
+ $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -z "$run"; then
+ # Make sure we at least have an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ $rm "$nlist"T
+ fi
+
+ if test -f "$nlist"; then
+ sed -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$output_objdir/$dlsyms"
+ else
+ echo '/* NONE */' >> "$output_objdir/$dlsyms"
+ fi
+
+ $echo >> "$output_objdir/$dlsyms" "\
+
+#undef dld_preloaded_symbols
+
+#if defined (__STDC__) && __STDC__
+# define __ptr_t void *
+#else
+# define __ptr_t char *
+#endif
+
+/* The mapping between symbol names and symbols. */
+struct {
+ char *name;
+ __ptr_t address;
+}
+dld_preloaded_symbols[] =
+{\
+"
+
+ if test -n "$export_symbols"; then
+ echo >> "$objdir/$dlsyms" "\
+ {\"${output}\", (__ptr_t) 0},"
+ sed 's/^\(.*\)/ {"\1", (__ptr_t) \&\1},/' < "$export_symbols" >> "$objdir/$dlsyms"
+ fi
+
+ for arg in $dlprefiles; do
+ name=`echo "$arg" | sed -e 's%^.*/%%'`
+ echo >> "$objdir/$dlsyms" "\
+ {\"$name\", (__ptr_t) 0},"
+ eval "$NM $arg | $global_symbol_pipe > '$nlist'"
+
+ if test -f "$nlist"; then
+ sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> "$objdir/$dlsyms"
+ else
+ echo '/* NONE */' >> "$output_objdir/$dlsyms"
+ fi
+
+ done
+
+ if test -f "$nlist"; then
+ sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> "$output_objdir/$dlsyms"
+ fi
+
+ $echo >> "$output_objdir/$dlsyms" "\
+ {0, (__ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ fi
+
+ # Now compile the dynamic symbol file.
+ $show "(cd $objdir && $C_compiler -c$no_builtin_flag \"$dlsyms\")"
+ $run eval '(cd $objdir && $C_compiler -c$no_builtin_flag "$dlsyms")' || exit $?
+
+ # Transform the symbol file into the correct name.
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`
+ ;;
+ *)
+ $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+ exit 1
+ ;;
+ esac
+ elif test "$export_dynamic" != yes; then
+ test -n "$dlfiles$dlprefiles" && $echo "$modename: warning: \`-dlopen' and \`-dlpreopen' are ignored without \`-export-dynamic'" 1>&2
+ else
+ # We keep going just in case the user didn't refer to
+ # dld_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+ $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+
+ # Nullify the symbol file.
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ fi
+
+ if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
+ # Replace the output file specification.
+ compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ $show "$compile_command"
+ $run eval "$compile_command"
+ exit $?
+ fi
+
+ # Replace the output file specification.
+ compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'T%g'`
+
+ # Create the binary in the object directory, then wrap it.
+ if test ! -d $output_objdir; then
+ $show "$mkdir $output_objdir"
+ $run $mkdir $output_objdir
+ status=$?
+ if test $status -ne 0 && test ! -d $objdir; then
+ exit $status
+ fi
+ fi
+
+ if test -n "$shlibpath_var"; then
+ # We should set the shlibpath_var
+ rpath=
+ for dir in $temp_rpath; do
+ case "$dir" in
+ /* | [A-Za-z]:[/\\]*)
+ # Absolute path.
+ rpath="$rpath$dir:"
+ ;;
+ *)
+ # Relative path: add a thisdir entry.
+ rpath="$rpath\$thisdir/$dir:"
+ ;;
+ esac
+ done
+ temp_rpath="$rpath"
+ fi
+
+ # Delete the old output file.
+ $run $rm $output
+
+ if test -n "$compile_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ compile_command="$runpath_var=\"$rpath\$$runpath_var\" $compile_command"
+ finalize_command="$runpath_var=\"$rpath\$$runpath_var\" $finalize_command"
+ fi
+
+ if test "$hardcode_action" = relink; then
+ # AGH! Flame the AIX and HP-UX people for me, will ya?
+ $echo "$modename: warning: this platform doesn\'t like uninstalled shared libraries" 1>&2
+ $echo "$modename: \`$output' will be relinked during installation" 1>&2
+ fi
+
+ $show "$compile_command"
+ $run eval "$compile_command" || exit $?
+
+ # Now create the wrapper script.
+ $show "creating $output"
+
+ # Quote the finalize command for shipping.
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "$sed_quote_subst"`
+
+ # Quote $echo for shipping.
+ if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
+ case "$0" in
+ /* | [A-Za-z]:[/\\]*) qecho="$SHELL $0 --fallback-echo";;
+ *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
+ esac
+ qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+ else
+ qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if our run command is non-null.
+ if test -z "$run"; then
+ $rm $output
+ trap "$rm $output; exit 1" 1 2 15
+
+ $echo > $output "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variables:
+ link_against_libtool_libs='$link_against_libtool_libs'
+ finalize_command=\"cd `pwd | sed -e $sed_quote_subst`; $finalize_command\"
+else
+ # When we are sourced in execute mode, \$file and \$echo are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ echo=\"$qecho\"
+ file=\"\$0\"
+ # Make sure echo works.
+ if test \"X\$1\" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+ elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
+ # Yippee, \$echo works!
+ :
+ else
+ # Restart under the correct shell, and then maybe \$echo will work.
+ exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+ fi
+ fi\
+"
+ $echo >> $output "\
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ /* | [A-Za-z]:[/\\]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
+ done
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+
+ progdir=\"\$thisdir/$objdir\"
+ program='$outputname'
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # Export our shlibpath_var if we have one.
+ if test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $echo >> $output "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/:*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ $echo >> $output "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+
+ # Export the path to the program.
+ PATH=\"\$progdir:\$PATH\"
+ export PATH
+
+ exec \$program \${1+\"\$@\"}
+
+ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+ exit 1
+ fi
+ else
+ # The program doesn't exist.
+ \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
+ \$echo \"This script is just a wrapper for \$program.\" 1>&2
+ echo \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+ chmod +x $output
+ fi
+ exit 0
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ if test "$build_libtool_libs" = convenience; then
+ oldobjs="$libobjs"
+ addlibs="$convenience"
+ build_libtool_libs=no
+ else
+ oldobjs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.'${libext}' //g' -e 's/[^ ]*\.lib //g' -e "$los2o" -e 's/ $//g'`
+ addlibs="$old_convenience"
+ fi
+
+ # Add in members from convenience archives.
+ for xlib in $addlibs; do
+ # Extract the objects.
+ xdir="$xlib"x
+ generated="$generated $xdir"
+ xlib=`echo "$xlib" | $Xsed -e 's%^.*/%%'`
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=$?
+ if test $status -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x ../$xlib)"
+ $run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $?
+
+ oldobjs="$oldobjs `echo $xdir/*`"
+ done
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+ eval cmds=\"$old_archive_from_new_cmds\"
+ else
+ eval cmds=\"$old_archive_cmds\"
+ fi
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ done
+
+ if test -n "$generated"; then
+ $show "${rm}r$generated"
+ $run ${rm}r$generated
+ fi
+
+ # Now create the libtool archive.
+ case "$output" in
+ *.la)
+ old_library=
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
+ $show "creating $output"
+
+ # Only create the output if not a dry run.
+ if test -z "$run"; then
+ $echo > $output "\
+# $output - a libtool library file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION
+
+# The name that we can dlopen(3).
+dlname='$dlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=no
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'\
+"
+ fi
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ $show "(cd $output_objdir && $LN_S ../$outputname $outputname)"
+ $run eval "(cd $output_objdir && $LN_S ../$outputname $outputname)" || exit $?
+ ;;
+ esac
+ exit 0
+ ;;
+
+ # libtool install mode
+ install)
+ modename="$modename: install"
+
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
+ # Aesthetically quote it.
+ arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
+ case "$arg" in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ install_prog="$arg "
+ arg="$1"
+ shift
+ else
+ install_prog=
+ arg="$nonopt"
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case "$arg" in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ install_prog="$install_prog$arg"
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ for arg
+ do
+ if test -n "$dest"; then
+ files="$files $dest"
+ dest="$arg"
+ continue
+ fi
+
+ case "$arg" in
+ -d) isdir=yes ;;
+ -f) prev="-f" ;;
+ -g) prev="-g" ;;
+ -m) prev="-m" ;;
+ -o) prev="-o" ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*) ;;
+
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ prev=
+ else
+ dest="$arg"
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case "$arg" in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ install_prog="$install_prog $arg"
+ done
+
+ if test -z "$install_prog"; then
+ $echo "$modename: you must specify an install program" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ if test -n "$prev"; then
+ $echo "$modename: the \`$prev' option requires an argument" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ $echo "$modename: no file or destination specified" 1>&2
+ else
+ $echo "$modename: you must specify a destination" 1>&2
+ fi
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Strip any trailing slash from the destination.
+ dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=yes
+ if test "$isdir" = yes; then
+ destdir="$dest"
+ destname=
+ else
+ destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$destdir" = "X$dest" && destdir=.
+ destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files
+ if test $# -gt 2; then
+ $echo "$modename: \`$dest' is not a directory" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+ fi
+ case "$destdir" in
+ /* | [A-Za-z]:[/\\]*) ;;
+ *)
+ for file in $files; do
+ case "$file" in
+ *.lo) ;;
+ *)
+ $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case "$file" in
+ *.a | *.lib)
+ # Do the static libraries later.
+ staticlibs="$staticlibs $file"
+ ;;
+
+ *.la)
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ library_names=
+ old_library=
+ # If there is no directory component, then add one.
+ case "$file" in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) current_libdirs="$current_libdirs $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) future_libdirs="$future_libdirs $libdir" ;;
+ esac
+ fi
+
+ dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
+ test "X$dir" = "X$file/" && dir=
+ dir="$dir$objdir"
+
+ # See the names of the shared library.
+ set dummy $library_names
+ if test -n "$2"; then
+ realname="$2"
+ shift
+ shift
+
+ # Install the shared library and build the symlinks.
+ $show "$install_prog $dir/$realname $destdir/$realname"
+ $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
+ test "X$dlname" = "X$realname" && dlname=
+
+ if test $# -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ for linkname
+ do
+ test "X$dlname" = "X$linkname" && dlname=
+ if test "$linkname" != "$realname"; then
+ $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+ $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+ fi
+ done
+ fi
+
+ if test -n "$dlname"; then
+ # Install the dynamically-loadable library.
+ $show "$install_prog $dir/$dlname $destdir/$dlname"
+ $run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $?
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ eval cmds=\"$postinstall_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ fi
+
+ # Install the pseudo-library for information purposes.
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ instname="$dir/$name"i
+ $show "Creating $instname"
+ $rm "$instname"
+ sed 's/^installed=no$/installed=yes/' "$file" > "$instname"
+ $show "$install_prog $instname $destdir/$name"
+ $run eval "$install_prog $instname $destdir/$name" || exit $?
+ $show "$rm $instname"
+ $rm "$instname"
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case "$destfile" in
+ *.lo)
+ staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+ ;;
+ *.o | *.obj)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ if test -n "$destfile"; then
+ $show "$install_prog $file $destfile"
+ $run eval "$install_prog $file $destfile" || exit $?
+ fi
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
+
+ $show "$install_prog $staticobj $staticdest"
+ $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+ fi
+ exit 0
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ destfile="$destdir/$destfile"
+ fi
+
+ # Do a test to see if this is really a libtool program.
+ if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ link_against_libtool_libs=
+ finalize_command=
+
+ # If there is no directory component, then add one.
+ case "$file" in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Check the variables that should have been set.
+ if test -z "$link_against_libtool_libs" || test -z "$finalize_command"; then
+ $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
+ exit 1
+ fi
+
+ finalize=yes
+ for lib in $link_against_libtool_libs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ # If there is no directory component, then add one.
+ case "$lib" in
+ */* | *\\*) . $lib ;;
+ *) . ./$lib ;;
+ esac
+ fi
+ libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+ finalize=no
+ fi
+ done
+
+ if test "$hardcode_action" = relink; then
+ if test "$finalize" = yes; then
+ $echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2
+ $show "$finalize_command"
+ if $run eval "$finalize_command"; then :
+ else
+ $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+ continue
+ fi
+ file="$objdir/$file"T
+ else
+ $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
+ fi
+ else
+ # Install the binary that we compiled earlier.
+ file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ $show "$install_prog$stripme $file $destfile"
+ $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+ # Set up the ranlib parameters.
+ oldlib="$destdir/$name"
+
+ $show "$install_prog $file $oldlib"
+ $run eval "$install_prog \$file \$oldlib" || exit $?
+
+ # Do each command in the postinstall commands.
+ eval cmds=\"$old_postinstall_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ done
+
+ if test -n "$future_libdirs"; then
+ $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
+ fi
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ test -n "$run" && current_libdirs=" -n$current_libdirs"
+ exec $SHELL $0 --finish$current_libdirs
+ exit 1
+ fi
+
+ exit 0
+ ;;
+
+ # libtool finish mode
+ finish)
+ modename="$modename: finish"
+ libdirs="$nonopt"
+ admincmds=
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for dir
+ do
+ libdirs="$libdirs $dir"
+ done
+
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ eval cmds=\"$finish_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || admincmds="$admincmds
+ $cmd"
+ done
+ IFS="$save_ifs"
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $run eval "$cmds" || admincmds="$admincmds
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ test "$show" = : && exit 0
+
+ echo "----------------------------------------------------------------------"
+ echo "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ echo " $libdir"
+ done
+ echo
+ echo "To link against installed libraries in a given directory, LIBDIR,"
+ echo "you must use the \`-LLIBDIR' flag during linking."
+ echo
+ echo " You will also need to do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ echo " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ echo " - add LIBDIR to the \`$runpath_var' environment variable"
+ echo " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ echo " - use the \`$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ echo " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ fi
+ echo
+ echo "See any operating system documentation about shared libraries for"
+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
+ echo "----------------------------------------------------------------------"
+ exit 0
+ ;;
+
+ # libtool execute mode
+ execute)
+ modename="$modename: execute"
+
+ # The first argument is the command name.
+ cmd="$nonopt"
+ if test -z "$cmd"; then
+ $echo "$modename: you must specify a COMMAND" 1>&2
+ $echo "$help"
+ exit 1
+ fi
+
+ # Handle -dlopen flags immediately.
+ for file in $execute_dlfiles; do
+ if test ! -f "$file"; then
+ $echo "$modename: \`$file' is not a file" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ dir=
+ case "$file" in
+ *.la)
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+
+ # If there is no directory component, then add one.
+ case "$file" in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
+ continue
+ fi
+
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$dir" = "X$file" && dir=.
+
+ if test -f "$dir/$objdir/$dlname"; then
+ dir="$dir/$objdir"
+ else
+ $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+ exit 1
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$dir" = "X$file" && dir=.
+ ;;
+
+ *)
+ $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir="$absdir"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic="$magic"
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case "$file" in
+ -*) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ # If there is no directory component, then add one.
+ case "$file" in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
+ args="$args \"$file\""
+ done
+
+ if test -z "$run"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+
+ # Restore saved enviroment variables
+ if test "${save_LC_ALL+set}" = set; then
+ LC_ALL="$save_LC_ALL"; export LC_ALL
+ fi
+ if test "${save_LANG+set}" = set; then
+ LANG="$save_LANG"; export LANG
+ fi
+
+ # Now actually exec the command.
+ eval "exec \$cmd$args"
+
+ $echo "$modename: cannot exec \$cmd$args"
+ exit 1
+ else
+ # Display what would be done.
+ eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
+ $echo "export $shlibpath_var"
+ $echo "$cmd$args"
+ exit 0
+ fi
+ ;;
+
+ # libtool uninstall mode
+ uninstall)
+ modename="$modename: uninstall"
+ rm="$nonopt"
+ files=
+
+ for arg
+ do
+ case "$arg" in
+ -*) rm="$rm $arg" ;;
+ *) files="$files $arg" ;;
+ esac
+ done
+
+ if test -z "$rm"; then
+ $echo "$modename: you must specify an RM program" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ for file in $files; do
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$dir" = "X$file" && dir=.
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+ rmfiles="$file"
+
+ case "$name" in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ . $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ rmfiles="$rmfiles $dir/$n"
+ test "X$n" = "X$dlname" && dlname=
+ done
+ test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname"
+ test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
+
+ $show "$rm $rmfiles"
+ $run $rm $rmfiles
+
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ eval cmds=\"$postuninstall_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd"
+ done
+ IFS="$save_ifs"
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ eval cmds=\"$old_postuninstall_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd"
+ done
+ IFS="$save_ifs"
+ fi
+
+ # FIXME: should reinstall the best remaining shared library.
+ fi
+ ;;
+
+ *.lo)
+ if test "$build_old_libs" = yes; then
+ oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
+ rmfiles="$rmfiles $dir/$oldobj"
+ fi
+ $show "$rm $rmfiles"
+ $run $rm $rmfiles
+ ;;
+
+ *)
+ $show "$rm $rmfiles"
+ $run $rm $rmfiles
+ ;;
+ esac
+ done
+ exit 0
+ ;;
+
+ "")
+ $echo "$modename: you must specify a MODE" 1>&2
+ $echo "$generic_help" 1>&2
+ exit 1
+ ;;
+ esac
+
+ $echo "$modename: invalid operation mode \`$mode'" 1>&2
+ $echo "$generic_help" 1>&2
+ exit 1
+fi # test -z "$show_help"
+
+# We need to display help for each of the modes.
+case "$mode" in
+"") $echo \
+"Usage: $modename [OPTION]... [MODE-ARG]...
+
+Provide generalized library-building support services.
+
+ --config show all configuration variables
+ --debug enable verbose shell tracing
+-n, --dry-run display commands without modifying any files
+ --features display basic configuration information and exit
+ --finish same as \`--mode=finish'
+ --help display this help message and exit
+ --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
+ --quiet same as \`--silent'
+ --silent don't print informational messages
+ --version print version information
+
+MODE must be one of the following:
+
+ compile compile a source file into a libtool object
+ execute automatically set library path, then run a program
+ finish complete the installation of libtool libraries
+ install install libraries or executables
+ link create a library or an executable
+ uninstall remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
+a more detailed description of MODE."
+ exit 0
+ ;;
+
+compile)
+ $echo \
+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -static always build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+ ;;
+
+execute)
+ $echo \
+"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+finish)
+ $echo \
+"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the \`--dry-run' option if you just want to see what would be executed."
+ ;;
+
+install)
+ $echo \
+"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the \`install' or \`cp' program.
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+link)
+ $echo \
+"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to dld_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -static do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename. Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only
+library objects (\`.lo' files) may be specified, and \`-rpath' is required.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+uninstall)
+ $echo
+"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+*)
+ $echo "$modename: invalid operation mode \`$mode'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+esac
+
+echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit 0
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/dldialog/missing b/dldialog/missing
new file mode 100755
index 0000000..cbe2b0e
--- /dev/null
+++ b/dldialog/missing
@@ -0,0 +1,188 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# 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, 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+case "$1" in
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing - GNU libit 0.0"
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+ aclocal)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acinclude.m4' or \`configure.in'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`configure.in'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acconfig.h' or \`configure.in'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER([^):]*:\([^)]*\)).*/\1/p' configure.in`
+ if test -z "$files"; then
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in`
+ test -z "$files" || files="$files.in"
+ else
+ files=`echo "$files" | sed -e 's/:/ /g'`
+ fi
+ test -z "$files" && files="config.h.in"
+ touch $files
+ ;;
+
+ automake)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print \
+ | sed 's/^\(.*\).am$/touch \1.in/' \
+ | sh
+ ;;
+
+ bison|yacc)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f y.tab.h ]; then
+ echo >y.tab.h
+ fi
+ if [ ! -f y.tab.c ]; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f lex.yy.c ]; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ makeinfo)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+ fi
+ touch $file
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequirements for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/dldialog/mkinstalldirs b/dldialog/mkinstalldirs
new file mode 100755
index 0000000..f2703ba
--- /dev/null
+++ b/dldialog/mkinstalldirs
@@ -0,0 +1,40 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+# $Id: mkinstalldirs,v 1.1 1998/06/26 12:28:32 saturn Exp $
+
+errstatus=0
+
+for file
+do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
+
+ pathcomp=
+ for d
+ do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp" 1>&2
+
+ mkdir "$pathcomp" || lasterr=$?
+
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ fi
+ fi
+
+ pathcomp="$pathcomp/"
+ done
+done
+
+exit $errstatus
+
+# mkinstalldirs ends here
diff --git a/dldialog/perl/DlButton.pm b/dldialog/perl/DlButton.pm
new file mode 100644
index 0000000..92014e4
--- /dev/null
+++ b/dldialog/perl/DlButton.pm
@@ -0,0 +1,51 @@
+#!/usr/bin/perl
+####################################################
+# #
+# File: DlButton.pm #
+#
+
+package DlButton;
+
+####################################################
+#
+# Konstruktor new: legt einen neue DlButton an und gibt
+# die Referenz darauf zurück.
+
+sub new {
+ my $base = shift;
+ my $class = ref($base) || $base;
+ my $self = {};
+ my ($package, $file, $line) = caller();
+
+ # Uebergebene Attribute merken
+ $self->{_title} = shift;
+ $self->{_var} = shift;
+ $self->{_font} = shift;
+ $self->{_fsize} = shift;
+ $self->{_fcolor} = shift,
+
+ bless($self, $class);
+ return $self;
+}
+
+sub getCode {
+ my $self = shift;
+ my $code="";
+ $code.="button \"$self->{_title}\" ";
+ if ($self->{_var}) { $code.=" -var $self->{_var} -set \"1\"" };
+ if ($self->{_font}) {
+ $code.=" -font $self->{_font}";
+ if ($self->{_fsize}) {
+ $code.=" -size $self->{_fsize}";
+ }
+ if ($self->{_fcolor}) {
+ $code.=" -fg $self->{_fcolor}";
+ }
+ }
+ $code.=" -exit; ";
+ return $code;
+}
+
+
+
+1; # Keep require happy
diff --git a/dldialog/perl/DlButtonGroup.pm b/dldialog/perl/DlButtonGroup.pm
new file mode 100644
index 0000000..c66730e
--- /dev/null
+++ b/dldialog/perl/DlButtonGroup.pm
@@ -0,0 +1,127 @@
+#!/usr/bin/perl
+####################################################
+# #
+# File: DlButtonGroup.pm #
+#
+
+package DlButtonGroup;
+
+####################################################
+#
+# Konstruktor new: legt eine neue DlButtonGroup an und gibt
+# die Referenz darauf zurück.
+# Übergabeparameter (optional, aber in fester Reihenfolge):
+# Orientierung ( r|row|c|col|f|form): default 'form'
+# Titel: Titel der WidgetGruppe
+# Titelposition: ( t|top|b|bottom|l|left|r|right)
+# Var: Name der Variablen, die den gedrückten Button zurückgibt.
+# Höhe, Breite: Geometrie der Box (tut in dldialog noch net)
+
+sub new {
+ my $base = shift;
+ my $class = ref($base) || $base;
+ my $self = {};
+ my ($package, $file, $line) = caller();
+
+ # Uebergebene Attribute merken
+ my ($orient, $title, $titlepos, $var, $height, $width) = @_;
+ if ($orient) {
+ if ($orient =~ /(row|r)/i) { $self->{_orientation} = "row" }
+ elsif ($orient =~ /(col|c)/i) { $self->{_orientation} = "col" }
+ elsif ($orient =~ /(form|f)/i) { $self->{_orientation} = "form" }
+ else { $self->{_orientation} = "form" }
+ }
+ if ($title) { $self->{_title} = $title;}
+ if ($titlepos) {
+ if ($titlepos=~/^t/i) { $self->{_titlepos} = "top";}
+ elsif ($titlepos=~/^b/i) { $self->{_titlepos} = "bottom";}
+ elsif ($titlepos=~/^l/i) { $self->{_titlepos} = "left";}
+ elsif ($titlepos=~/^r/i) { $self->{_titlepos} = "right";}
+ }
+ if ($var) { $self->{_var} = $var;}
+ if ($height) { $self->{_height} =$height}
+ if ($width) { $self->{_width} =$width}
+
+ bless($self, $class);
+ return $self;
+}
+
+
+sub insertButton {
+ my $self = shift;
+ push @{$self->{_buttons}} , @_;
+ return $#{$self->{_buttons}}+1;
+}
+
+sub setImage {
+ my $self = shift;
+ my $nr = shift;
+ my $image =shift;
+ return if (($nr <= 0) || !$image);
+ $self->{_images}[$nr-1] = $image;
+}
+
+sub getTitle {
+ my $self = shift;
+ my $title = $self->{_title};
+ return $title;
+}
+
+sub setTitle {
+ my ($self, $title) = @_;
+ my $oldtitle = $self->getTitle();
+ $self->{_title} = $title;
+ return $oldtitle;
+}
+
+sub setText {
+ my ($self, $text, $pos) = @_;
+ if ($pos=~/^b/i) {$self->{_btext}=$text}
+ else {$self->{_text}=$text}
+}
+
+
+sub removeButton {
+ my $self = shift;
+ my $buttonnr = shift;
+ if ($buttonnr <= 0) {return}
+ $buttonnr--;
+ my $i = 0;
+ my @WStack=();
+ my @IStack=();
+ foreach $button (@{$self->{_buttons}}) {
+ unless ($i eq $buttonnr) {
+ push @WStack, $button;
+ push @IStack, $self->{_images}[$i];
+ }
+ $i++;
+ }
+ @{$self->{_buttons}}=@WStack;
+ @{$self->{_images}}=@IStack;
+ return $#{$self->{_buttons}}+1;
+}
+
+sub getCode {
+ my $self = shift;
+ my $code="";
+ if($self->{_text}) { $code.=" text \"$self->{_text}\" "}
+ if($self->{_orientation}) { $code.=" $self->{_orientation} "}
+ if ($self->{_height}) { $code.=" -height $self->{_height} " }
+ if ($self->{_width}) { $code.=" -width $self->{_width} " }
+ if($self->{_orientation}) { $code.=" { "}
+ if ($self->{_title}) { $code.=" text \"$self->{_title}\"; "}
+ my $i=1;
+ foreach $button (@{$self->{_buttons}}) {
+ $code.="button \"$button\" ";
+ if ($self->{_var}) { $code.=" -var $self->{_var} -set \"$i\"" }
+ if ($self->{_images}[$i-1]) { $code.=" -image \"$self->{_images}[$i-1]\"" }
+ $i++;
+ $code.=" -exit;"
+ }
+ if($self->{_orientation}) { $code.=" } "}
+ if($self->{_btext}) { $code.=" text \"$self->{_btext}\"; "}
+ # print "code is:\n$code\n";
+ return $code;
+}
+
+1; # Keep require happy
diff --git a/dldialog/perl/DlCheckList.pm b/dldialog/perl/DlCheckList.pm
new file mode 100644
index 0000000..25707d7
--- /dev/null
+++ b/dldialog/perl/DlCheckList.pm
@@ -0,0 +1,106 @@
+#!/usr/bin/perl
+####################################################
+# #
+# File: DlCheckList.pm #
+#
+
+package DlCheckList;
+
+####################################################
+#
+# Konstruktor new: legt ein neues DlCheckList-Objekt an und gibt
+# die Referenz darauf zurück.
+# Übergabeparameter (optional, aber in fester Reihenfolge):
+# Titel: Titel der CheckList
+# Var: Name der Variablen, die die gewählten CheckButton zurückgibt.
+# Höhe, Breite: Geometrie der Box (tut in dldialog noch net)
+
+sub new {
+ my $base = shift;
+ my $class = ref($base) || $base;
+ my $self = {};
+ my ($package, $file, $line) = caller();
+
+ # Uebergebene Attribute merken
+ my ( $title, $var, $height, $width) = @_;
+
+ if ($title) { $self->{_title} = $title;}
+ if ($var) {
+ if ($var=~/=/) { # '=' im Variablennamen führt zu ParseError
+ ($var, $value) = split /=/ , $var; # trennen
+ if ($value) { $self->{_value} =$value} #und Wert merken
+ }
+ $self->{_var} = $var;}
+ if ($height) { $self->{_height} =$height}
+ if ($width) { $self->{_width} =$width}
+
+ # und Referenz zurückgeben
+ bless($self, $class);
+ return $self;
+}
+
+sub getTitle {
+ my $self = shift;
+ my $title = $self->{_title};
+ return $title;
+}
+
+sub setTitle {
+ my ($self, $title) = @_;
+ my $oldtitle = $self->getTitle();
+ $self->{_title} = $title;
+ return $oldtitle;
+}
+
+sub setText {
+ my ($self, $text, $pos) = @_;
+ if ($pos=~/^b/i) {$self->{_btext}=$text}
+ else {$self->{_text}=$text}
+}
+
+
+sub insertButton {
+ my $self = shift;
+ push @{$self->{_buttons}} , @_;
+ return $#{$self->{_buttons}}+1;
+}
+
+
+sub removeButton {
+ my $self = shift;
+ my $buttonnr = shift;
+ if ($buttonnr <= 0) {return}
+ $buttonnr--;
+ my $i = 0;
+ my @WStack=();
+ foreach $button (@{$self->{_buttons}}) {
+ unless ($i eq $buttonnr) {push @WStack, $button}
+ $i++;
+ }
+ @{$self->{_buttons}}=@WStack;
+ return $#{$self->{_buttons}}+1;
+}
+
+
+
+sub getCode {
+ my $self = shift;
+ my $code="";
+ if($self->{_text}) { $code.=" text \"$self->{_text}\" "}
+ if ($self->{_value}) { $code .=" $self->{_var}=\"$self->{_value}\"; "}
+ $code.=" checklist \"$self->{_title}\" ";
+ if ($self->{_var}) { $code.=" -var $self->{_var} " }
+ if ($self->{_height}) { $code.=" -height $self->{_height} " }
+ if ($self->{_width}) { $code.=" -width $self->{_width} " }
+ $code.=" { ";
+
+ foreach $button (@{$self->{_buttons}}) { $code.="checkbutton \"$button\"; " }
+
+ $code .=" }";
+ if($self->{_btext}) { $code.=" text \"$self->{_btext}\"; "}
+ return $code;
+}
+
+
+1; # Keep require happy
+
diff --git a/dldialog/perl/DlComboBox.pm b/dldialog/perl/DlComboBox.pm
new file mode 100644
index 0000000..c56a40c
--- /dev/null
+++ b/dldialog/perl/DlComboBox.pm
@@ -0,0 +1,117 @@
+#!/usr/bin/perl
+####################################################
+# #
+# File: DlComboBox.pm #
+#
+
+package DlComboBox;
+
+####################################################
+#
+# Konstruktor new: legt ein neues DlComboBox-Objekt an und gibt
+# die Referenz darauf zurück.
+# Übergabeparameter (optional, aber in fester Reihenfolge):
+# Titel: Titel der ComboBox
+# Var: Name der Variablen, die den/die gewählten Items zurückgibt.
+# Höhe, Breite: Geometrie der Box (tut in dldialog noch net)
+
+sub new {
+ my $base = shift;
+ my $class = ref($base) || $base;
+ my $self = {};
+ my ($package, $file, $line) = caller();
+
+ # Uebergebene Attribute merken
+ my ( $title, $var, $height, $width) = @_;
+
+ if ($title) { $self->{_title} = $title;}
+ if ($var) {
+ if ($var=~/=/) { # '=' im Variablennamen führt zu ParseError
+ ($var, $value) = split /=/ , $var; # trennen
+ if ($value) { $self->{_value} =$value} #und Wert merken
+ }
+ $self->{_var} = $var;}
+ if ($height) { $self->{_height} =$height}
+ if ($width) { $self->{_width} =$width}
+
+ # und Referenz zurückgeben
+ bless($self, $class);
+ return $self;
+}
+
+sub getTitle {
+ my $self = shift;
+ my $title = $self->{_title};
+ return $title;
+}
+
+sub setTitle {
+ my ($self, $title) = @_;
+ my $oldtitle = $self->getTitle();
+ $self->{_title} = $title;
+ return $oldtitle;
+}
+
+sub setText {
+ my ($self, $text, $pos) = @_;
+ if ($pos=~/^[br]/i) {$self->{_btext}=$text}
+ else {$self->{_text}=$text};
+ $self->{_textpos}=$pos;
+}
+
+sub insertItem {
+ my $self = shift;
+# print "DlC:@_\n";
+ push @{$self->{_items}} , @_;
+ return $#{$self->{_items}}+1;
+}
+
+sub getItem {
+ my $self = shift;
+ my $itemnr = shift;
+ return ${$self->{_items}}[$itemnr-1];
+}
+
+sub clearItems {
+ my $self = shift;
+ @{$self->{_items}}=();
+ return}
+
+sub removeItem {
+ my $self = shift;
+ my $itemnr = shift;
+ if ($itemnr <= 0) {return}
+ $itemnr--;
+ my $i = 0;
+ my @WStack=();
+ foreach $item (@{$self->{_items}}) {
+ unless ($i eq $itemnr) {push @WStack, $item}
+ $i++;
+ }
+ @{$self->{_items}}=@WStack;
+ return $#{$self->{_items}}+1;
+}
+
+
+sub getCode {
+ my $self = shift;
+ if ($self->{_textpos} =~ /^[lr]/i) { $code = "row ";}
+ else { $code = "col ";}
+ $code.=" \"$self->{_title}\" {";
+ if ($self->{_text}) { $code.=" text \"$self->{_text}\"; "}
+ if ($self->{_value}) { $code .=" $self->{_var}=\"$self->{_value}\"; "}
+ $code.=" combobox ";
+ if ($self->{_var}) { $code.=" -var $self->{_var} " }
+ if ($self->{_height}) { $code.=" -height $self->{_height} " }
+ if ($self->{_width}) { $code.=" -width $self->{_width} " }
+ $code.=" { ";
+ foreach $item (@{$self->{_items}}) { $code.="comboitem \"$item\" ; " }
+ $code .=" }";
+ if($self->{_btext}) { $code.=" text \"$self->{_btext}\"; "}
+ $code .=" }";
+ return $code;
+}
+
+
+1; # Keep require happy
+
diff --git a/dldialog/perl/DlDialog.pm b/dldialog/perl/DlDialog.pm
new file mode 100644
index 0000000..e76500a
--- /dev/null
+++ b/dldialog/perl/DlDialog.pm
@@ -0,0 +1,406 @@
+#!/usr/bin/perl
+####################################################
+# #
+# File: DlDialog.pm #
+# Authors: Thomas Hagedorn #
+# #
+# Last change: Mon 3 . 5. 1999 #
+# #
+# DLD - German Linux Distribution - #
+# #
+# Copyright (c) 1993-1999 delix Computer GmbH #
+# Schloßstraße 98 #
+# D-70176 Stuttgart #
+# All rights reserved. #
+# #
+####################################################
+# #
+# 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. #
+# #
+####################################################
+
+
+package DlDialog;
+use IPC::Open2;
+use DlWidgetGroup;
+use DlList;
+use DlButtonGroup;
+use DlButton;
+use DlRadioList;
+use DlCheckList;
+use DlComboBox;
+use DlFileSelect;
+use DlInputField;
+use DlMessage;
+use DlHelp;
+##############################################################################
+# looks for dldialog
+
+###############################################################################
+
+
+
+
+##############################################################################
+# Konstruktor new. Erzeugt ein neues DLDialog-Objekt. Dem Konstruktor kann
+# ein Titel für das Objekt übergeben werden.
+# Das Objekt wird mit addGroup() mit DlWidgetGroup-Objekten gefüllt.
+#
+# -> 0: Referenzobjekt oder Klasse (immer dldialog)
+# 1: Titel der Dialogbox (optional)
+# <- 0: Neues Objekt
+#
+sub new {
+ my $base = shift;
+ my $class = ref($base) || $base;
+ my $self = {};
+ my ($package, $file, $line) = caller();
+ # Uebergebene oder ermittelte Attribute merken
+ my $title = shift;
+ $title = "TurboDialog" unless $title;
+ $self->{_dialogtitle} = $title;
+ my $orient = shift;
+ if ($orient =~ /^r/i) {$orient = 'row'}
+ if ($orient =~ /^c/i) {$orient = 'col'}
+ if ($orient =~ /^f/i) {$orient = 'form'}
+ $self->{_orient} = $orient || 'col';
+ # DLDialog-Versin prüfen
+ my $version = `rpm -q dldialog`;
+ unless ($version =~ /0\.8/) {$self->{_dialogprefix}='dialog'}
+
+ $self->{_caller_package} = $package;
+ bless($self, $class);
+ # set the default image
+ $self->{_imagedir} = "../icons";
+ $self->{_image} = "DLD.xpm";
+ return $self;
+}
+
+##############################################################################
+# Setzt den Titel der Dialogbox neu.
+#
+# -> 0: Referenzobjekt oder Klasse
+# 1: Titel der Dialogbox
+# <- : alter Titel der Dialogbox | ""
+#
+sub setTitle {
+ my ($self,$text) = @_; # OO: zugehoeriges Objekt holen
+ my $oldtitle = $self->getTitle();
+ $self->{_dialogtitle} = $text;
+ return $oldtitle;
+}
+
+##############################################################################
+# Gibt den Titel der Dialogbox zurück.
+#
+# -> 0: Referenzobjekt oder Klasse
+# <- : Titel der Dialogbox
+#
+sub getTitle {
+ my $self = shift;
+ my $title = $self->{_dialogtitle};
+ return $title;
+}
+
+##############################################################################
+# Setzt eine Callbackfunktion
+#
+# -> 0: Referenzobjekt oder Klasse
+# -> 1: Name der Funktion
+#
+sub setCallback {
+ my $self = shift;
+ my $callback = shift;
+ $self->{_callback} = $self->{_caller_package}."::".$callback;
+}
+
+##############################################################################
+# Setzt den Text der Dialogbox .
+#
+# -> 0: Referenzobjekt oder Klasse
+# 1: Text der Dialogbox
+
+sub setText {
+ my $self = shift;
+ $self->{_text} = shift,
+}
+
+##############################################################################
+# Fügt der Dialogbox eine neue DlWidgetGroup hinzu.
+#
+# -> 0: Referenzobjekt oder Klasse
+# 1: DlWidgetGroup
+# 2: Position im WidgetStack
+# <- : Anzahl der DlWidgetGroup-Objekte
+#
+
+sub addGroup {
+ my $self = shift;
+ my $widget = shift;
+ my $pos = shift;
+ if ($pos > 0) {
+ if ($self->{_Reftable}[$pos-1] eq 1) {
+ return 0
+ }
+ else {
+ $self->{_Widgets}[$pos-1] = $widget;
+ }
+ }
+ else {
+ push @{$self->{_Widgets}}, $widget;
+ $pos = $#{$self->{_Widgets}}+1;
+ }
+ $self->{_Reftable}[$pos-1] = 1;
+ foreach $element (@{$widget->{_elements}}) {
+ if ($element->{_var}) { push @{$self->{_vars}}, $element->{_var} }
+ }
+ if ($widget->{_var}) { push @{$self->{_vars}}, $widget->{_var} }
+ if (@{$widget->{_vars}}) {
+ push @{$self->{_vars}}, @{$widget->{_vars}}
+ }
+
+ return $pos;
+}
+
+##############################################################################
+# Entfernt eine DlWidgetGroup der Dialogbox.#
+# -> 0: Referenzobjekt oder Klasse
+# 1: Nummer der DlWidgetGroup, die entfernt wird
+# <- : Nummer der DlWidgetGroup, die entfernt wurde
+#
+
+sub removeGroup {
+ my $self = shift;
+ my $widgetnr = shift;
+ if ($widgetnr <= 0) {return 0}
+ $widgetnr--;
+ unless ($self->{_Reftable}[$widgetnr]) { return 0}
+ if ($widgetnr eq $#{$self->{_Widgets}}) { # ist hinterstes Widget
+ pop @{$self->{_Widgets}};
+ pop @{$self->{_Reftable}};
+ }
+ else {
+ $self->{_Reftable}[$widgetnr] = 0;
+ undef $self->{_Widgets}[$widgetnr];
+ }
+ return $widgetnr+1;
+}
+
+
+##############################################################################
+# sets the image of the dialog which is displayed at the left side of
+# the dialog, substitutes the defaultimage.
+# returns the substituted image or 1 if the image could be set
+
+sub setImage {
+ my $self =shift;
+ my $image = shift;
+ if ( -f $image ) {
+ my $oldimage = $self->{_image} || 1;
+ $self->{_image} =$image;
+ return $oldimage;
+ }
+ else { return 0};
+}
+
+##############################################################################
+# returns the current image af the dialog
+
+sub getImage {
+ my $self =shift;
+ return $self->{_image};
+}
+
+
+##############################################################################
+# Fügt der Dialogbox einen Hilfetext hinzu
+# Wenn ein Hilfetext gesetzt wird, wird automatisch der
+# 'Hilfe'-Button angezeigt
+# Übergeben wird entweder ein Textstring, der dan zur Anzeige kommt,
+# oder der Pfad einer Datei, die den Hilfetext enthält
+#
+sub setHelp {
+ my $self = shift;
+ my $helpfile = shift;
+ $helpfile =~ s/^~/$ENV{HOME}/;
+ $rundir = `pwd`;
+ chomp $rundir;
+ $helpfile =~ s/^\./$rundir/;
+ $self->{_help} = new DlHelp($helpfile);
+}
+
+##############################################################################
+# Fügt der Dialogbox ein bereits exixtierendes Hilfe-Widget hinzu
+# wird nur intern verwendet von DlWizzard
+
+sub setHelpWidget {
+ my $self = shift;
+ $self->{_help} = shift;
+}
+
+
+##############################################################################
+# Bringt den Dialog zur Anzeige. Dazu werden alle eingetragenen
+# Eingabevariablen in Umgebungsvariablen ueberfuehrt , der Dialog
+# aus den einzelnen Objekten zusammengebaut und danach DLDialog
+# aufgerufen. Dann wird der Rueckgabestring geparst und in die entsprechenden
+# Perl-Variablen ueberfuehrt.
+#
+# -> 0: Referenzobjekt
+# <- : void
+#
+
+sub show {
+ my ($self) = shift; # OO: zugehoeriges Objekt holen
+ my $param = shift;
+ my $caller_package = $self->{_caller_package};
+ # Confirm-Buttons hinzufügen
+ my $spacer = new DlWidgetGroup('col', '');
+ my $spacer2 = new DlWidgetGroup('row', '', 100, 100);
+ my $confirm = new DlButtonGroup('row',"","","_confirm", 10, 100);
+ $spacer->insertElement($spacer2, $confirm);
+ $self->{help} = '';
+ $self->{back} = '';
+ $self->{next} = '';
+ $self->{cancel} = '';
+ $self->{ok} = '';
+ if ($self->{_help}) {
+ $self->{help} = $confirm->insertButton("&Hilfe");
+ $confirm->setImage($self->{help}, "$self->{_imagedir}/hilfe.xpm");
+ }
+ unless ($param eq 'start') {
+ $self->{back} = $confirm->insertButton("&Zurück");
+ $confirm->setImage($self->{back}, "$self->{_imagedir}/zurueck.xpm");
+ }
+ if (($param eq 'wizzard') || ($param eq 'start')) {
+ $self->{next} = $confirm->insertButton("&Weiter");
+ $confirm->setImage($self->{next}, "$self->{_imagedir}/weiter.xpm");
+ }
+ if ( ($param eq 'end')) {
+ $self->{ok} = $confirm->insertButton("&Ok");
+ $confirm->setImage($self->{ok}, "$self->{_imagedir}/exit.xpm");
+ }
+ if (($param eq 'wizzard') || ($param eq 'start') || ($param eq 'end')) {
+ $self->{cancel} = $confirm->insertButton("&Abbrechen");
+ $confirm->setImage($self->{cancel}, "$self->{_imagedir}/delete.xpm");
+ }
+ unless (($param eq 'wizzard') || ($param eq 'start') || ($param eq 'end')) {
+ $self->{ok} = $confirm->insertButton("&Ok");
+ $confirm->setImage($self->{ok}, "$self->{_imagedir}/exit.xpm");
+ }
+# $confirmButtons = addGroup($self, $spacer);
+ # Alle Eingabevariablen in Umgebungsvariablen schreiben:
+ foreach $var (@{$self->{_vars}}) {
+ next unless $var;
+ $ENV{$var} = $ {$caller_package . "::" . $var};
+ $val = $ {$caller_package . "::" . $var};
+# print "Var $var is $val\n";
+ }
+ # Den Dialog zusammensetzen:
+ my $dialog = " { col { ";
+ $dialog .= "row -width 100 -height 100 {
+ col -height 100 { col -height 100 {}
+ image \"$self->{_imagedir}/$self->{_image}\"; }";
+ $dialog .= " $self->{_orient} {";
+ if ($self->{_text}) {$dialog .="text \"$self->{_text}\";"}
+ my $size = $#{$self->{_Widgets}};
+ for ($i=0;$i<=$size;$i++) {
+ if ($self->{_Reftable}[$i] eq 0) {next};
+ $widget = $self->{_Widgets}[$i];
+ # foreach $widget (@{$self->{_Widgets}}) {
+ # next unless $widget->getCode();
+# print "get code for widget Nr. $i: $widget, refstate is $self->{_Reftable}[$i]\n";
+ $dialog .= $widget->getCode()."\n";
+ }
+ $dialog .="}}". $spacer->getCode()."\n";
+
+
+ $dialog .= "}}";
+ # Dialogbox zusammensetzen
+ my $dialogtext = "$self->{_dialogprefix} \"$self->{_dialogtitle}\"\n$dialog";
+# print "Wir haben: $dialogtext\n"; #debug
+ # DLDialog-Prozess starten...
+ for (;;) {
+ $ENV{_confirm}="";
+ open2('RDR', 'WTR', "/usr/bin/dldialog -$dialogoption");
+ print WTR $dialogtext;
+ close (WTR);
+
+ # Rueckgabe lesen und auswerten
+ @lines=<RDR>;
+ close (RDR);
+ removeGroup($self, $confirmButtons);
+ $self->eval_result(@lines);
+ $self->{result} = $_confirm;
+ last unless ($self->{help} && ($_confirm eq $self->{help}))
+ }
+ if ($_confirm) {
+# print "DlDialog: confirm is $_confirm\n";
+ if ($_confirm eq $self->{back}) {return 'back'}
+ elsif ($_confirm eq $self->{next}) {return 'next'}
+ elsif ($_confirm eq $self->{cancel}) {return 'cancel'}
+ elsif ($_confirm eq $self->{ok}) {return 'ok'}
+ }
+ else {return 'signal'}
+ }
+
+
+##############################################################################
+# Auswerten der Ausgaben von DLDialog. Dabei handelt es sich um eine Reihe von
+# Variablenzuweisungen in Shellnotation (z.B. name="till"), die in
+# gleichnamige Perl-Variablen ueberfuehrt werden muessen. Nach dem Aufruf
+# dieser Funktion mit dem obigen String ist eine Perl-Variable $name definiert,
+# die den Inhalt "till" traegt. Diese Variable muss im Scope des Aufrufers
+# angelegt werden.
+#
+# -> 0-n: mehrzeilige Strings, die maximal eine Zuweisung pro Zeile
+# enthalten duerfen.
+#
+sub eval_result
+{
+ my $self = shift; # OO: zugehoeriges Objekt holen
+ my $i;
+ my @lines;
+ my $tmp;
+ my %var;
+ my $caller_package = $self->{_caller_package};
+# print "Caller is $caller_package\n";
+
+ # Setzt alle uebergebenen Parameter zu einem langen Gesamtstring zusammen
+ # und trennt diesen in einzelne Zeilen auf.
+ @lines = split("\n", join("\n",@_) );
+ chomp(@lines);
+
+ # ... dann alle Variablenzuweisungen raussuchen und umsetzen
+ foreach (@lines) {
+ /^\s*([^=]*)=(.*)/s;
+ $vname = $1;
+ $value = $2;
+ eval "\$$vname = '';";
+ eval "\$" . $caller_package . "::$vname = '';";
+ # setzt ungesetzte Variablen auf '' (wichtig für Checkboxen)
+ if ( $value =~ /'([^';]+)/ ) { # wenn Variable nicht leer
+ $var{$vname}=$1;
+ $tmp .= "\$" . $caller_package . "::$vname = $value;";}
+ shift @lines; # sonst wird der Wert zu Variablen
+ }
+
+ # ... und auswerten...
+ foreach $vname (sort keys %var) {
+ $$vname = $var{$vname}; # lokale Perl-Variable erzeugen
+ }
+ eval $tmp;
+ if (($self->{_help}) && ($_confirm eq $self->{help})) {
+ # Hilfe anzeigen und zurück zum Dialog
+ $self->{_help}->show();
+ }
+
+}
+
+1;
+
diff --git a/dldialog/perl/DlFileSelect.pm b/dldialog/perl/DlFileSelect.pm
new file mode 100644
index 0000000..ec95f7c
--- /dev/null
+++ b/dldialog/perl/DlFileSelect.pm
@@ -0,0 +1,309 @@
+#!/usr/bin/perl
+####################################################
+# #
+# File: DlFileSelect.pm #
+#
+
+package DlFileSelect;
+use DlDialog;
+####################################################
+#
+#
+# set my port for the dialog to defaults
+# Schnittstellen
+$fs_to_mount = '/dev/cdrom'; # filesystem to mount
+$file_filter = ''; # files to show (regex)
+$show_select = '2 3'; # which files to show (1-3)
+$sort_select = '1'; # sorting rule
+# Signals
+$_mount_fs;
+$_change_cd; # starts a wizzard, to change Disk
+$_act_select; # refresh lists
+# privat
+$dir_select = ''; # number of current entrance in dirlist
+$start_dir = ''; # text of the dirname-inputline
+$file_select = ''; # same for filelist
+$file_text = ''; # text of the filename-inputline
+#%month = {Jan=>01,Feb=>02,Mär=>03,Apr=>04,Mai=>05,Jun=>06,Jul=>07,Aug=>08,Sep=>09,Okt=>10,Nov=>11,Dez=>12};
+
+sub new {
+ my $base = shift;
+ my $class = ref($base) || $base;
+ my $self = {};
+ my ($package, $file, $line) = caller();
+ if ($file =~ /(.*\/)*([^\/]+)/) { $file = $2}
+ $self->{file} = $file;
+# first building the Widget
+
+ $dialog = new DlDialog("$file : Datei-Auswahl");
+ $maingroup = new DlWidgetGroup('row');
+ $leftgroup = new DlWidgetGroup('col');
+ $rightgroup = new DlWidgetGroup('col');
+ $topgroup = new DlWidgetGroup('row');
+ $showgroup = new DlWidgetGroup('row');
+ $dirgroup = new DlWidgetGroup('col');
+ $dirlistgroup = new DlWidgetGroup('row');
+ $confgroup = new DlWidgetGroup('row');
+ $mountgroup = new DlWidgetGroup('row');
+ $spacer = new DlWidgetGroup('row','',100,100);
+
+ #leftgroup
+ $dirline = new DlInputField('Verzeichniss','top','start_dir','true');
+# $actbutton = new DlButton('aktualisieren','_act_select');
+# $topgroup->insertElement($actbutton,$dirline),
+
+ $dirlist = new DlList('Verzeichnisse','dir_select','','true');
+ $dirlistgroup->insertElement($dirlist);
+ $dirlistgroup->setImage('top.gif','b');
+ $filterline = new DlInputField('Filter','t','file_filter');
+ $dirgroup->insertElement($filterline,$dirlistgroup);
+ $filelist = new DlList('Dateien','file_select','','true',100,100);
+ $showgroup->insertElement($dirgroup,$filelist);
+
+ $fileselectline = new DlInputField('Dateiname','t','file_text');
+
+ $leftgroup->insertElement($dirline,$showgroup,$fileselectline);
+
+ #rightgroup
+ $selectlist = new DlCheckList('anzeigen','show_select');
+ $sortlist = new DlRadioList('sortiert nach','sort_select');
+ $confgroup->insertElement($selectlist,$sortlist);
+
+ $fscombo = new DlComboBox('Nicht montierte Dateisysteme','fs_to_mount');
+ $mountbutton = new DlButton('montieren','_mount_fs');
+ $mountgroup->insertElement($mountbutton);
+ $mountgroup->setImage('mount.xpm');
+ $rightgroup->insertElement($selectlist,$sortlist,$fscombo,$mountgroup);
+
+ $maingroup->insertElement($leftgroup,$rightgroup);
+
+ $dialog->addGroup($maingroup);
+
+ $show_hidden = $selectlist->insertButton('Versteckte Dateien');
+ $show_backup = $selectlist->insertButton('Backups (~)');
+ $show_empty = $selectlist->insertButton('leere Dateien');
+
+ $sort_date = $sortlist->insertButton('Name');
+ $sort_date = $sortlist->insertButton('Datum');
+ $sort_size = $sortlist->insertButton('Größe');
+
+ # und Referenz zurückgeben
+ bless($self, $class);
+ return $self;
+}
+
+
+sub get_dirlist {
+ my $dir = shift || "/";
+ my $select = shift || $show_select;
+ my @dirs;
+ my $dircommand = "ls -l";
+ if ($select =~ /$show_hidden/) {
+ $dircommand .= "a"}
+ my @list = `$dircommand $dir | grep "^d"`;
+ foreach (@list) {
+ /\s+(\S+)$/;
+ push @dirs, $1;
+ }
+ unless ($dirs[1] =~ /\.\./) { unshift @dirs,".",".."}
+ print "Dir hat : @dirs\n";
+ return @dirs;
+ undef $dir_select;
+}
+
+sub get_filelist {
+ my $self = shift;
+ %{$self->{file}}=();
+ my $d = `date`;
+ $d =~ /\s(\d+)$/;
+ my $year = $1;
+ my $dir = shift || "/";
+ my $filter = shift || $file_filter;
+ my $select = shift || $show_select;
+ my $sort = shift || $sort_select;
+# my %file;
+ my @files;
+ my $dircommand = "ls -l";
+ if ($select =~ /$show_hidden/) {
+ $dircommand .= "a"}
+ my @list = `$dircommand $dir | grep -v "^d"`;
+ foreach (@list) {
+# print;
+ /(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.+)/;
+ # filter all
+# next unless $9 =~ /$filter/;
+ # store informations
+ ($filename,$temp,$dest) = split ' ', $9;
+ $self->{file}{$filename}{dest} = $dest;
+ $self->{file}{$filename}{perms}=$1;
+ $self->{file}{$filename}{owner}=$3;
+ $self->{file}{$filename}{group}=$4;
+ $self->{file}{$filename}{size}=$5;
+ $self->{file}{$filename}{month}=$6;
+ $self->{file}{$filename}{day}=$7;
+ $time = $8;
+ $self->{file}{$filename}{year} = $time;
+ if ($time =~ /:/) {
+ $self->{file}{$filename}{year} = $year;
+ $self->{file}{$filename}{time} = $time;
+ }
+ }
+ # build an array
+ my $size;
+ foreach $file (sort keys %{$self->{file}}) {
+ if ($file) {
+ $size += $self->{file}{$file}{size};
+ if ($self->{file}{$file}{perms} =~ /^l/) {
+ $filemark = "\$";
+ } else {$filemark = "!"}
+# $line = "$self->{file}{$file}{day}.$self->{file}{$file}{month}.$self->{file}{$file}{year} * $self->{file}{$file}{size} $filemark $file";
+# $line = "$file";
+ push @files, $file }
+ }
+ unshift @files, $size;
+ return @files;
+}
+
+sub get_unmounted_dev {
+ my %devices;
+ my @fstab = `cat /tmp/fstab 2>/dev/null`;
+ # get fstab entries
+ foreach $dev (@fstab) {
+ next if $dev =~ m/^#[^\/]/;
+ if ($dev =~ m/^\/proc /) {$proc='true';next;}
+ ($device, $mountp) = split " ", $dev;
+ chomp $device;
+ chomp $mountp;
+ if ($device) {
+ unless ($mountp eq 'swap') { $devices{$device}=$mountp}
+ }
+ }
+ # delete mounted systems
+ my @mounted = `mount`;
+ foreach $mount (@mounted) {
+ ($fs) = split " ", $mount;
+ chomp $fs;
+ delete $devices{$fs}
+ }
+ return %devices;
+}
+
+# fill the Widget with live
+
+sub build {
+ my $self = shift;
+# print "self->{basedir} is ".$self->{basedir}."\n";
+ $start_dir = shift || $self->{basedir};
+# print "startdir set to $start_dir\n";
+ $fs_to_mount = shift || $fs_to_mount;
+ $file_filter = shift || $file_filter;
+ my $sel = shift;
+ if ($sel) {
+ $show_select = "1 " if $sel=~/h/;
+ $show_select .= "2 " if $sel=~/b/;
+ $show_select .= "3 " if $sel=~/e/;
+ }
+ my $sort = shift;
+ if ($sort) {
+ $sort_select = "1" if $sort=~/n/;
+ $sort_select = "2" if $sort=~/d/;
+ $sort_select = "3" if $sort=~/s/;
+ }
+ # get the directories
+ $self->{basedir} = $start_dir;
+ my @dirs = get_dirlist($start_dir,$show_select);
+ $dir_text = $start_dir;
+ $dirlist->clear();
+ $anz = @dirs;
+ $dirlist->setTitle("$start_dir: $anz Verzeichnisse");
+ $dirlist->insertItem(@dirs);
+ # now get the files
+ my ($size, @files) = get_filelist($self,$start_dir,$file_filter,$show_select,$sort_select);
+ $filelist->clear();
+ $filelist->insertItem('');
+ foreach $file (@files) {
+ if ($self->{file}{$file}{perms} =~ /^l/) {
+ $filelist->setColor($filelist->insertItem($file),'green')
+ }
+ elsif ($self->{file}{$file}{perms} =~ /x/) {
+ $filelist->setColor($filelist->insertItem($file),'red')
+ }
+ else {
+ $filelist->setColor($filelist->insertItem($file),'blue')
+ }
+ }
+
+
+# $filelist->insertItem(@files);
+ $anz = @files;
+ $filelist->setTitle("$anz Dateien: $size Bytes");
+ # now fill some widgets
+ $fscombo->clearItems;
+ my %devices = get_unmounted_dev;
+ foreach $dev (sort keys %devices) {
+ $dev = $dev." an ".$devices{$dev}."\n";
+ $fscombo->insertItem($dev);
+ }
+
+}
+
+sub get_it {
+ my $self = shift;
+ my $mode = shift;
+ unshift @_,$self;
+ build(@_);
+################Main-loop
+ for (;;) {
+ $status = $dialog->show;
+# print "status is $status:\ndir_select is $dir_select\n";
+# print "show_select is $show_select: sort_select is $sort_select\nfile_filter is $file_filter:\nmount_fs is $_mount_fs\n";
+ $file_text = $filelist->getItem($file_select);
+ if ($status eq 'ok') { # ok
+ if ($mode eq 'dir') { return $self->{basedir} }
+ elsif ($mode eq 'file') { return $self->{basedir}.$file_text }
+ }
+ elsif ($status eq 'back') { return undef } # cancel
+ $cur_dir = $dirlist->getItem($dir_select);
+ if ($cur_dir eq '.') { $cur_dir = $start_dir."/" }
+ elsif ($cur_dir eq '..') {
+ $start_dir =~ s/((\/[^\/]+)*)\/[^\/]+/\1/;
+ $cur_dir = $start_dir."/";
+ $file_text = '';
+ }
+ else {
+ $cur_dir = $start_dir."/".$cur_dir;
+ $file_text = '';
+ }
+ $cur_dir =~ s/\/\//\//; # eleminate doubleslashes
+ $self->{basedir} = $cur_dir;
+ # next loop
+ if ($_mount_fs) {
+ my $fs = $fscombo->getItem($fs_to_mount);
+ $fs =~ /^(\S+).*/;
+ system("mount", $1);
+ }
+ $dir_select='';
+ $file_select='';
+ $_mount_fs='';
+# print "self->{basedir} is ".$self->{basedir}."\n";
+ build($self);
+ }
+}
+
+sub getdir {
+ my $self = shift;
+ unshift @_,'dir';
+ unshift @_,$self;
+ get_it(@_);
+}
+
+sub getfile {
+ my $self = shift;
+ unshift @_,'file';
+ unshift @_,$self;
+ get_it(@_);
+}
+
+
+1;
+
diff --git a/dldialog/perl/DlHelp.pm b/dldialog/perl/DlHelp.pm
new file mode 100644
index 0000000..a7c4403
--- /dev/null
+++ b/dldialog/perl/DlHelp.pm
@@ -0,0 +1,99 @@
+#!/usr/bin/perl
+####################################################
+# #
+# File: DlHelp.pm #
+#
+
+package DlHelp;
+use IPC::Open2;
+####################################################
+#
+# Konstruktor new: legt einen neue DlHelp Dialog an und gibt
+# die Referenz darauf zurück.
+# Übergabeparameter:
+# Helpfile: Datei, die den Hilfetext enthält.
+# DlHelp wird von tdialog verwendet und dort indirekt über
+# tdialog->sethelp() initialisiert und über
+# tdialog->{_help}->show() dargestellt
+
+sub new {
+ my $base = shift;
+ my $class = ref($base) || $base;
+ my $self = {};
+ my ($package, $file, $line) = caller();
+
+ # Uebergebene Attribute merken
+ my $helpfile = shift;
+ $self->{_helpfile} = $helpfile;
+ # DLDialog-Versin prüfen
+ my $version = `rpm -q dldialog`;
+ unless ($version =~ /0\.8/) {$self->{_dialogprefix}='dialog'}
+
+ $self->{_caller_package} = $package;
+ bless($self, $class);
+ $self->parse_helpfile();
+ return $self;
+
+ }
+
+sub parse_helpfile {
+ my $self = shift;
+ my @tmp = `cat $self->{_helpfile}`;
+ foreach (@tmp) {
+ next if (/^#/);
+ if (/^<title>\s*(.+)/) {
+ $self->{_title} = $1;
+ next; }
+ if (/^<\s*(.+)>/) {
+ $top=$1;
+ push @topics, $top;
+ next; }
+ push @{$text->{$top}}, $_;
+ }
+}
+
+
+sub show {
+ my ($self) = shift;
+ my $top = shift;
+ unless ($_topic) { $_topic = $top || $topics[0] }
+ my $dialogoption = $ENV{DLDIALOG} || 'q';
+ $_help="";
+ $chooseit = "Wählen Sie ein Hilfekapitel";
+ $content = "Inhalt";
+ $showit = "anzeigen";
+ $back = "&Zurück";
+ if (@topics) {
+ $combo = "text \"$chooseit\";
+ row {
+ combobox \"content\" { ";
+ foreach $item (@topics) { $combo.="comboitem \"$item\" -var _topic -set \"$item\"; " }
+ $combo .=" } button \"$showit\" -var _help -set \"show\" -exit; }";
+ }
+ until ($_help eq 'back') {
+ $ENV{_topic}=$_topic;
+ my $dialogtext = "$self->{_dialogprefix} \"$self->{_title}\"\n { $combo
+ textbox \"@{$text->{$_topic}}\";
+ button \"$back\" -var _help -set \"back\" -exit; }";
+# print "HELP:Wir haben: $dialogtext\n";
+ open2('RDR', 'WTR', "/usr/bin/dldialog -$dialogoption");
+ print WTR $dialogtext;
+ close (WTR);
+ @lines=<RDR>;
+ close (RDR);
+ foreach $line (@lines) {
+ $line =~ /^\s*([^=]*)=(.*)/s;
+ $vname = $1;
+ $value = $2;
+ if ( $value =~ /'([^';]+)/ ){ # wenn Variable nicht leer
+ $$vname = $1;
+ }
+ }
+ }
+return $top;
+}
+
+
+
+
+1; # Keep require happy
diff --git a/dldialog/perl/DlInputField.pm b/dldialog/perl/DlInputField.pm
new file mode 100644
index 0000000..2913e7d
--- /dev/null
+++ b/dldialog/perl/DlInputField.pm
@@ -0,0 +1,88 @@
+#!/usr/bin/perl
+####################################################
+# #
+# File: DlInputField.pm #
+#
+
+package DlInputField;
+
+####################################################
+#
+# Konstruktor new: legt ein neues DlInputField-Objekt an und gibt
+# die Referenz darauf zurück.
+# Übergabeparameter (optional, aber in fester Reihenfolge):
+# Titel: Titel des InputFields
+# Pos (t[op]|b[ottom]|l[eft]|r[ight]): Position des Titels (default links)
+# Var: Name der Variablen, die die Eingabe zurückgibt.
+# Typ (n[umeric]|p[asswd]|i[p-like]|pn|pi): Typ des Eingabewertes
+# Höhe, Breite: Geometrie der Box (tut in dldialog noch net)
+
+
+sub new {
+ my $base = shift;
+ my $class = ref($base) || $base;
+ my $self = {};
+ my ($package, $file, $line) = caller();
+
+ # Uebergebene Attribute merken
+ my ( $title, $titlepos, $var, $exit, $typ, $height, $width) = @_;
+ if ($title) { $self->{_title} = $title;}
+ if ($titlepos) {
+ if ($titlepos=~/^t/i) { $self->{_pos} = "before"; $self->{_orient}="col"}
+ elsif ($titlepos=~/^b/i) { $self->{_pos} = "behind"; $self->{_orient}="col"}
+ elsif ($titlepos=~/^l/i) { $self->{_pos} = "before"; $self->{_orient}="row"}
+ elsif ($titlepos=~/^r/i) { $self->{_pos} = "behind"; $self->{_orient}="row"}
+ else { $self->{_pos} = "before"; $self->{_orient}="row"}
+ }
+ if ($exit) { $self->{_exit} = 'true'}
+ if ($var) {
+ if ($var=~/=/) { # '=' im Variablennamen führt zu ParseError
+ ($var, $value) = split /=/ , $var; # trennen
+ if ($value) { $self->{_value} =$value} #und Wert merken
+ }
+ $self->{_var} = $var;}
+ if ($typ) {
+ if ($typ=~/^p/i) {
+ if ($typ=~/\sn/i) { $self->{_typ}="-passwd -numeric"}
+ elsif ($typ=~/\si/i) { $self->{_typ}="-passwd -ip"}
+ else { $self->{_typ}="-passwd"}
+ }
+ elsif ($typ=~/^n/i) { $self->{_typ}="-numeric"}
+ elsif ($typ=~/^i/i) { $self->{_typ}="-ip"}
+ }
+ if ($height) { $self->{_height} =$height}
+ if ($width) { $self->{_width} =$width}
+
+ bless($self, $class);
+ return $self;
+}
+
+sub getCode {
+ my $self = shift;
+ my $code=" $self->{_orient} ";
+ if ($self->{_height}) { $code.=" -height $self->{_height} " }
+ if ($self->{_width}) { $code.=" -width $self->{_width} " }
+ $code .= " { ";
+ if ($self->{_title} && ($self->{_pos} eq "before")) { $code.=" text \"$self->{_title}\"; "}
+ if ($self->{_value}) { $code .=" $self->{_var}=\"$self->{_value}\"; "}
+ $code .= " input ";
+ if ($self->{_var}) { $code.=" -var $self->{_var} " }
+ if ($self->{_typ}) { $code.=" $self->{_typ} "}
+ if ($self->{_exit}) {$code .= "-exit "}
+ $code .= " ; ";
+ if ($self->{_title} && ($self->{_pos} eq "behind")) { $code.=" text \"$self->{_title}\"; "}
+ $code .= " } ";
+
+ return $code;
+}
+
+
+
+
+
+
+
+
+
+
+1; # Keep require happy
diff --git a/dldialog/perl/DlList.pm b/dldialog/perl/DlList.pm
new file mode 100644
index 0000000..783d6a6
--- /dev/null
+++ b/dldialog/perl/DlList.pm
@@ -0,0 +1,196 @@
+#!/usr/bin/perl
+####################################################
+# #
+# File: DlList.pm #
+#
+
+package DlList;
+
+####################################################
+#
+# Konstruktor new: legt ein neues DlList-Objekt an und gibt
+# die Referenz darauf zurück.
+# Übergabeparameter (optional, aber in fester Reihenfolge):
+# Titel: Titel der Liste
+# Var: Name der Variablen, die den/die gewählten Items zurückgibt.
+# Multi (m|multi|mehrere): Multiple Choice möglich
+# Exit (t|true|y|yes|j|ja): Listitem reagiert auf Doppelclick
+# Breite, Höhe: Geometrie der Box in Prozent des Serverwindows
+
+sub new {
+ my $base = shift;
+ my $class = ref($base) || $base;
+ my $self = {};
+ my ($package, $file, $line) = caller();
+
+ # Uebergebene Attribute merken
+ my ( $title, $var, $multi, $exit, $width, $height) = @_;
+
+ if ($title) { $self->{_title} = $title;}
+ if ($var) {
+ if ($var=~/=/) { # '=' im Variablennamen führt zu ParseError
+ ($var, $value) = split /=/ , $var; # trennen
+ if ($value) { $self->{_value} =$value} #und Wert merken
+ }
+ $self->{_var} = $var;}
+ if ($multi) { $self->{_multi} = 'true'}
+ if ($exit=~/^[tjy]/i) {$self->{_exit} = $exit}
+ if ($height) { $self->{_height} =$height}
+ if ($width) { $self->{_width} =$width}
+
+ # und Referenz zurückgeben
+ bless($self, $class);
+ return $self;
+}
+
+sub setFont {
+ my $self = shift;
+ my ($index, $font) = @_;
+ unless ($font) {
+ $self->{_font} = $index;
+ return
+ }
+ return if $index <= 0;
+ $self->{_ifont}[$index-1] = $font;
+}
+
+sub setFontSize {
+ my $self = shift;
+ my ($index, $size) = @_;
+ unless ($size) {
+ $self->{_fsize} = $index;
+ $self->{_font} = 'normal' unless $self->{_font};
+ return
+ }
+ return if $index <= 0;
+ $self->{_ifsize}[$index-1] = $size;
+ $self->{_ifont}[$index-1] = 'normal' unless $self->{_ifont}[$index-1];
+}
+
+sub setColor {
+ my $self = shift;
+ my ($index, $color) = @_;
+ unless ($color) {
+ $self->{_fcolor} = $index;
+ $self->{_font} = 'normal' unless $self->{_font};
+ return
+ }
+ return if $index <= 0;
+ $self->{_ifcolor}[$index-1] = $color;
+ $self->{_ifont}[$index-1] = 'normal' unless $self->{_ifont}[$index-1];
+}
+
+sub setImage {
+ my $self = shift;
+ my ($index, $image) = @_;
+ return if $index <= 0;
+ $self->{_images}[$index-1] = $image;
+}
+
+sub getTitle {
+ my $self = shift;
+ my $title = $self->{_title};
+ return $title;
+}
+
+sub setTitle {
+ my ($self, $title) = @_;
+ my $oldtitle = $self->getTitle();
+ $self->{_title} = $title;
+ return $oldtitle;
+}
+
+sub getList {
+ # gibt eine Referenz auf ein Array zurück
+ my $self = shift;
+ return $self->{_items};
+}
+
+sub setText {
+ my ($self, $text, $pos) = @_;
+ if ($pos=~/^b/i) {$self->{_btext}=$text}
+ else {$self->{_text}=$text}
+}
+
+sub insertItem {
+ my $self = shift;
+ push @{$self->{_items}} , @_;
+ return $#{$self->{_items}}+1;
+}
+
+sub getItem {
+ my $self = shift;
+ my $itemnr = shift;
+ return ${$self->{_items}}[$itemnr-1];
+}
+
+sub removeItem {
+ my $self = shift;
+ my $itemnr = shift;
+ if ($itemnr <= 0) {return}
+ $itemnr--;
+ my $i = 0;
+ my @WStack=();
+ my $giveback = ${$self->{_items}}[$itemnr];
+ foreach $item (@{$self->{_items}}) {
+ unless ($i eq $itemnr) {push @WStack, $item}
+ $i++;
+ }
+ @{$self->{_items}}=@WStack;
+# gib den entfernten Eintrag zurück
+ return $giveback;
+}
+
+sub clear {
+ my $self = shift;
+ @{$self->{_items}} = ();
+}
+
+
+sub getCode {
+ my $self = shift;
+ my $count = 0;
+ my $code="col \"$self->{_title}\" {";
+ if($self->{_text}) { $code.=" text \"$self->{_text}\" ;"}
+ if ($self->{_value}) { $code .=" $self->{_var}=\"$self->{_value}\"; "}
+ $code.=" list ";
+ if ($self->{_var}) { $code.=" -var $self->{_var} " }
+ if ($self->{_height}) { $code.=" -height $self->{_height} " }
+ if ($self->{_width}) { $code.=" -width $self->{_width} " }
+ if ($self->{_multi}) { $code.=" -multi " }
+ if ($self->{_font}) {
+ $code.=" -font $self->{_font}";
+ if ($self->{_fsize}) { $code.=" -size $self->{_fsize}"}
+ if ($self->{_fcolor}) { $code.=" -fg \"$self->{_fcolor}\""}
+ }
+ $code.=" { ";
+
+ foreach $item (@{$self->{_items}}) {
+ $code.="listitem \"$item\" ";
+ $self->{_ifont}[$count] = $self->{_ifont}[$count] || $self->{_font};
+ $self->{_ifsize}[$count] = $self->{_ifsize}[$count] || $self->{_fsize};
+ $self->{_ifcolor}[$count] = $self->{_ifcolor}[$count] || $self->{_fcolor};
+
+ if ($self->{_ifont}[$count]) {
+ $code.=" -font $self->{_ifont}[$count]";
+ if ($self->{_ifsize}[$count]) { $code.=" -size $self->{_ifsize}[$count]"}
+ if ($self->{_ifcolor}[$count]) { $code.=" -fg $self->{_ifcolor}[$count]"}
+ }
+ if ($self->{_images}[$count]) {
+ $code .= " -image \"$self->{_images}[$count]\"";
+ }
+ if ($self->{_exit}) {$code.=" -exit "}
+ $code .=";";
+ $count++;
+ }
+ $code .=" }";
+
+ if($self->{_btext}) { $code.=" text \"$self->{_btext}\"; "}
+ $code.=" }";
+# print "DlList.code is $code\n";
+ return $code;
+}
+
+
+1; # Keep require happy
+
diff --git a/dldialog/perl/DlMessage.pm b/dldialog/perl/DlMessage.pm
new file mode 100644
index 0000000..0458e5a
--- /dev/null
+++ b/dldialog/perl/DlMessage.pm
@@ -0,0 +1,65 @@
+#!/usr/bin/perl
+####################################################
+# #
+# File: DlMessage.pm #
+#
+
+package DlMessage;
+use IPC::Open2;
+####################################################
+#
+# Gibt eine Nachricht aus und bietet je nach Aufruf
+# verschiedene Möglichkeiten an
+#
+
+sub show {
+ my $self = shift;
+ my $title = shift;
+ my $text = shift;
+ my $type = shift;
+ my $hsize = shift;
+ my $vsize = shift;
+ my $yes = "&Ja";
+ my $no = "&Nein";
+ my $break = "&Abbruch";
+ my $continue = "&Weiter";
+ my $back = "&Zurück";
+ # DLDialog-Versin prüfen
+ my $version = `rpm -q dldialog`;
+ unless ($version =~ /0\.8/) {$self->{_dialogprefix}='dialog'}
+# if ($hsize) {$dialogsize=" WIDTH '$hsize'"}
+# if ($vsize) {$dialogsize.=" height '$vsize'"}
+ my $dialogoption = $ENV{DLDIALOG} || 'q';
+ if ($type =~ /^[jy]/i) { $type = 'yesno'}
+ elsif ($type =~ /^b/i) { $type = 'break'}
+ my $dialogtext = "$self->{_dialogprefix} \"$title\" $dialogsize\n {
+ text \"$text\";
+ row { ";
+ if ($type eq 'yesno') {
+ $dialogtext .= "button \"$yes\" -var _msg -set \"yes\" -exit;
+ button \"$no\" -var _msg -set \"no\" -exit; }"}
+ elsif ($type eq 'break') {
+ $dialogtext .= "button \"$break\" -var _msg -set \"break\" -exit;
+ button \"$continue\" -var _msg -set \"continue\" -exit; }"}
+ else {
+ $dialogtext .= "button \"$back\" -var _msg -set \"back\" -exit; }"}
+ $dialogtext .= "}";
+
+ open2('RDR', 'WTR', "/usr/bin/dldialog -$dialogoption");
+ print WTR $dialogtext;
+ close (WTR);
+ @lines=<RDR>;
+ close (RDR);
+ foreach $line (@lines) {
+ $line =~ /^\s*([^=]*)=(.*)/s;
+ $vname = $1;
+ $value = $2;
+ if ( $value =~ /'([^';]+)/ ){ # wenn Variable nicht leer
+ $$vname = $1;
+ }
+
+ }
+return $_msg;
+}
+
+1;
diff --git a/dldialog/perl/DlRadioList.pm b/dldialog/perl/DlRadioList.pm
new file mode 100644
index 0000000..bd4271a
--- /dev/null
+++ b/dldialog/perl/DlRadioList.pm
@@ -0,0 +1,106 @@
+#!/usr/bin/perl
+####################################################
+# #
+# File: DlRadioList.pm #
+#
+
+package DlRadioList;
+
+####################################################
+#
+# Konstruktor new: legt ein neues DlRadioList-Objekt an und gibt
+# die Referenz darauf zurück.
+# Übergabeparameter (optional, aber in fester Reihenfolge):
+# Titel: Titel der RadioList
+# Var: Name der Variablen, die den gewählten RadioButton zurückgibt.
+# Höhe, Breite: Geometrie der Box (tut in dldialog noch net)
+
+sub new {
+ my $base = shift;
+ my $class = ref($base) || $base;
+ my $self = {};
+ my ($package, $file, $line) = caller();
+
+ # Uebergebene Attribute merken
+ my ( $title, $var, $height, $width) = @_;
+
+ if ($title) { $self->{_title} = $title;}
+ if ($var) {
+ if ($var=~/=/) { # '=' im Variablennamen führt zu ParseError
+ ($var, $value) = split /=/ , $var; # trennen
+ if ($value) { $self->{_value} =$value} #und Wert merken
+ }
+ $self->{_var} = $var;}
+ if ($height) { $self->{_height} =$height}
+ if ($width) { $self->{_width} =$width}
+
+ # und Referenz zurückgeben
+ bless($self, $class);
+ return $self;
+}
+
+sub getTitle {
+ my $self = shift;
+ my $title = $self->{_title};
+ return $title;
+}
+
+sub setTitle {
+ my ($self, $title) = @_;
+ my $oldtitle = $self->getTitle();
+ $self->{_title} = $title;
+ return $oldtitle;
+}
+
+sub setText {
+ my ($self, $text, $pos) = @_;
+ if ($pos=~/^b/i) {$self->{_btext}=$text}
+ else {$self->{_text}=$text}
+}
+
+sub insertButton {
+ my $self = shift;
+ push @{$self->{_buttons}} , @_;
+ return $#{$self->{_buttons}}+1;
+}
+
+
+sub removeButton {
+ my $self = shift;
+ my $buttonnr = shift;
+ if ($buttonnr <= 0) {return}
+ $buttonnr--;
+ my $i = 0;
+ my @WStack=();
+ foreach $button (@{$self->{_buttons}}) {
+ unless ($i eq $buttonnr) {push @WStack, $button}
+ $i++;
+ }
+ @{$self->{_buttons}}=@WStack;
+ return $#{$self->{_buttons}}+1;
+}
+
+
+
+sub getCode {
+ my $self = shift;
+ my $code="";
+ if($self->{_text}) { $code.=" text \"$self->{_text}\" "}
+ if ($self->{_value}) { $code.=" $self->{_var}=\"$self->{_value}\"; "}
+ $code.=" radiolist \"$self->{_title}\" ";
+ if ($self->{_var}) { $code.=" -var $self->{_var} " }
+ if ($self->{_height}) { $code.=" -height $self->{_height} " }
+ if ($self->{_width}) { $code.=" -width $self->{_width} " }
+ $code.=" { ";
+
+
+ foreach $button (@{$self->{_buttons}}) { $code.="radiobutton \"$button\"; " }
+
+ $code .=" }";
+ if($self->{_btext}) { $code.=" text \"$self->{_btext}\"; "}
+ return $code;
+}
+
+
+1; # Keep require happy
+
diff --git a/dldialog/perl/DlWidgetGroup.pm b/dldialog/perl/DlWidgetGroup.pm
new file mode 100644
index 0000000..a7fa842
--- /dev/null
+++ b/dldialog/perl/DlWidgetGroup.pm
@@ -0,0 +1,107 @@
+#!/usr/bin/perl
+####################################################
+# #
+# File: DlWidgetGroup.pm #
+#
+
+package DlWidgetGroup;
+
+####################################################
+#
+# Konstruktor new: legt ein neues DlWidgetGroup-Objekt an und gibt
+# die Referenz darauf zurück.
+# Übergabeparameter (optional, aber in fester Reihenfolge):
+# Orientierung ( r|row|c|col|f|form): default 'col'
+# Titel: Titel der WidgetGruppe
+# Höhe, Breite: Geometrie der Box (tut in dldialog noch net)
+
+
+
+
+sub new {
+ my $base = shift;
+ my $class = ref($base) || $base;
+ my $self = {};
+ my ($package, $file, $line) = caller();
+
+ # Uebergebene Attribute merken
+ my ($orient, $title, $height, $width) = @_;
+ if ($orient) {
+ if ($orient =~ /(row|r)/i) { $self->{_orienation} = "row" }
+ elsif ($orient =~ /(col|c)/i) { $self->{_orienation} = "col" }
+ elsif ($orient =~ /(form|f)/i) { $self->{_orienation} = "form" }
+ else { $self->{_orienation} = "col" }
+ }
+# my $title = shift;
+ if ($title) { $self->{_title} = $title;}
+ if ($height) { $self->{_height} =$height}
+ if ($width) { $self->{_width} =$width}
+
+ bless($self, $class);
+ return $self;
+}
+
+
+sub getTitle {
+ my $self = shift;
+ my $title = $self->{_title};
+ return $title;
+}
+
+sub setTitle {
+ my ($self, $title) = @_;
+ my $oldtitle = $self->getTitle();
+ $self->{_title} = $title;
+ return $oldtitle;
+}
+
+sub setText {
+ my ($self, $text, $pos) = @_;
+ if ($pos=~/^b/i) {$self->{_btext}=$text}
+ else {$self->{_text}=$text}
+}
+
+sub setImage {
+ my ($self, $image, $pos) = @_;
+ if ($pos=~/^b/i) {$self->{_bimage}=$image}
+ else {$self->{_image}=$image}
+}
+
+
+sub insertElement {
+ my $self = shift;
+ my @elements = @_;
+ push @{$self->{_elements}} ,@elements;
+ my ($element,$elem);
+ foreach $element (@elements) {
+ if ($element->{_var}) {
+ push @{$self->{_vars}}, $element->{_var}
+ }
+ if (@{$element->{_vars}}) {
+ push @{$self->{_vars}}, @{$element->{_vars}}
+ }
+ }
+ return $#{$self->{_elements}};
+}
+
+
+sub getCode {
+ my $self = shift;
+ my $element;
+ my $code="text \"$self->{_title}\"; $self->{_orienation} ";
+ if ($self->{_height}) { $code.=" -height $self->{_height} " }
+ if ($self->{_width}) { $code.=" -width $self->{_width} " }
+ $code.=" { ";
+ if($self->{_text}) { $code.=" text \"$self->{_text}\"; "}
+ if($self->{_image}) { $code.=" image \"$self->{_image}\"; "}
+ foreach $element (@{$self->{_elements}}) {
+ $code .= $element->getCode();
+ }
+ if($self->{_bimage}) { $code.=" image \"$self->{_bimage}\"; "}
+ if($self->{_btext}) { $code.=" text \"$self->{_btext}\"; "}
+ $code .=" }";
+ return $code;
+}
+
+
+1; # Keep require happy
diff --git a/dldialog/perl/DlWizzard.pm b/dldialog/perl/DlWizzard.pm
new file mode 100644
index 0000000..0ed4968
--- /dev/null
+++ b/dldialog/perl/DlWizzard.pm
@@ -0,0 +1,156 @@
+#!/usr/bin/perl -w
+####################################################
+# #
+# File: DlWizzard.pm #
+# Authors: Thomas Hagedorn #
+# #
+package DlWizzard;
+use strict;
+use Cwd;
+use DlDialog;
+
+
+sub new {
+ my $base = shift;
+ my $class = ref($base) || $base;
+ my $self = {};
+ @{$self->{stack}} = ();
+ @{$self->{hidelist}} = ();
+ @{$self->{callback}} = ();
+ $self->{_islast} = 0;
+ $self->{isfirst} = 0;
+ my ($package, $file, $line) = caller();
+ # Uebergebene oder ermittelte Attribute merken
+ my $title = shift;
+ $title = "TurboDialog" unless $title;
+ $self->{_dialogtitle} = $title;
+ $self->{_caller_package} = $package;
+ bless($self, $class);
+ return $self;
+}
+
+sub store {
+ my $self = shift;
+ my $dialog = shift;
+ my $title = $dialog->getTitle();
+ my @stack = @{$self->{stack}};
+ my $stacksize = @stack;
+ push @stack, $dialog;
+ $self->{callback}[$stacksize] = shift;
+ $self->{_islast} = @stack;
+ @{$self->{stack}} = @stack;
+ return $self->{_islast};
+}
+
+sub setHelp {
+ my $self = shift;
+ my $helpfile = shift;
+ $helpfile =~ s/^~/$ENV{HOME}/;
+ my $rundir = `pwd`;
+ chomp $rundir;
+ $helpfile =~ s/^\./$rundir/;
+ $self->{helpfile} = new DlHelp($helpfile);
+}
+
+sub skip {
+ my $self = shift;
+ my $number = shift;
+ my $stacksize = $self->{stack};
+ my $pos = $self->{stackpos} + $number;
+# print "Old position is $self->{stackpos}: Now we should have Pos $pos from $stacksize, scipped $number\n";
+ if ($pos < 0) {$pos = 0}
+ if ($pos > $stacksize) {$pos = $stacksize}
+ $self->{stackpos} = $pos;
+ return $pos;
+}
+
+sub hide {
+ my $self = shift;
+ my @numbers = @_;
+ my $number;
+ my $islast = $self->{_islast};
+ my $stacksize = $self->{stack};
+ foreach $number (@numbers) {
+ $number--;
+ if ($number > $stacksize) { next }
+ if ($number < $self->{isfirst}) { next }
+ $self->{hidelist}[$number] = 1;
+ if ($islast-1 eq $number) {
+ while ($self->{hidelist}[$islast-1] eq 1) { $islast-- }
+ }
+ elsif ($self->{isfirst} eq $number) {
+ while ($self->{hidelist}[$self->{isfirst}] eq 1) { $self->{isfirst}++ }
+ }
+ }
+ $self->{_islast} = $islast;
+}
+
+sub unhide {
+ my $self = shift;
+ my $islast = $self->{_islast};
+ my @numbers = @_;
+ my $number;
+ my $stacksize = $self->{stack};
+ foreach $number (@numbers) {
+ $number--;
+ next if $number > $stacksize;
+ next if $number < 0;
+ $self->{hidelist}[$number] = 0;
+ if ($number < $self->{isfirst}) {$self->{isfirst} = $number}
+ $number++;
+ if ($number > $islast) {$islast = $number}
+ }
+ $self->{_islast} = $islast;
+}
+
+
+sub proceed {
+ my $self = shift;
+ my $islast;
+ $self->{stackpos} = 0;
+ my ($result,$dialog,$callback);
+ my $final = $self->{stack};
+ $final--;
+
+###################################################################
+# Main loop
+#
+ for (;;) {
+ $result = "";
+ $islast = $self->{_islast};
+# auf verborgene Dialoge achten
+ if ($self->{hidelist}[$self->{stackpos}]) {
+ if ($dialog->{result} eq $dialog->{back}) {
+# print "went back with stackpos $self->{stackpos}, isfirst $self->{isfirst}\n";
+ if ($self->{stackpos} < $self->{isfirst}) {$self->{stackpos}=+2}
+ unless ($self->{stackpos}<0) {$self->{stackpos}--}
+ }
+ else {
+ unless ($self->{stackpos} eq $final) {$self->{stackpos}++}
+ }
+ next
+ }
+# Dialog initiieren
+ $dialog = $self->{stack}[$self->{stackpos}];
+ $callback = $self->{callback}[$self->{stackpos}];
+ $dialog->setHelpWidget($self->{helpfile});
+# Buttons inteligent aufbauen
+ if ($self->{stackpos} eq $self->{isfirst}) {$result=$dialog->show('start')}
+ elsif ($self->{stackpos} eq $islast-1) {$result=$dialog->show('end')}
+ else {$result=$dialog->show('wizzard')}
+# Rückgabezustand prüfen
+ if ($result) {
+ if ($result eq 'next') {$self->{stackpos}++; $result = 'next'}
+ if ($result eq 'back') {$self->{stackpos}--; $result = 'back'}
+ if ($result eq 'cancel') {$result = 'cancel'}
+ if ($result eq 'ok') {$self->{stackpos}++; $result = 'ok'}
+# print "Result is $result\n";
+ }
+# Callback aufrufen
+ &$callback;
+ if (($result eq 'cancel') || ($result eq 'ok')) { return $result } #Ende
+ }
+}
+
+1;
+
diff --git a/dldialog/perl/I18n.pm b/dldialog/perl/I18n.pm
new file mode 100644
index 0000000..f6ee921
--- /dev/null
+++ b/dldialog/perl/I18n.pm
@@ -0,0 +1,96 @@
+#!/usr/bin/perl
+#
+# Modul I18n
+
+
+package I18n;
+use Cwd;
+
+sub new {
+ my $thisdir = cwd();
+ my $base = shift;
+ my $class = ref($base) || $base;
+ my $self = {};
+ my ($package, $file, $line) = caller();
+ $file =~ s/^.\//$thisdir\//;
+ $file =~ s/^~\//$ENV{HOME}\//;
+# print "Caller gibt zurück:$package\n$file\n$line\n:\n";
+ # Uebergebene oder ermittelte Attribute merken
+ my $tfile = shift || $file;
+ my $lang = shift || $ENV{LANG} || 'de'; # only for debugging purpose
+ $tfile = "$tfile.$lang";
+# print "tfile ist $tfile\n";
+ if (-r "$tfile") {$self->{_translation_file} = $tfile}
+ open TRANS, "<$self->{_translation_file}" or warn "Cannot open translationfile $self->{_translation_file}\n";
+ while (<TRANS>) {
+ chomp;
+ next if /^#/;
+ if ((/^\s*$/) && $msgid) {
+ $ismsgstr = '';
+ chomp $msgstr;
+ chomp $msgid;
+ $self->{text}{$msgid} = $msgstr || $msgid;
+ $msgstr = '';
+ $msgid = '';
+ next;
+ }
+ next if /^\s*$/;
+ if (($msgid) && (/^msgstr\s+("[^"]*")/)) {
+ $ismsgid = '';
+ $ismsgstr = 'true';
+ $msgstr = $1;
+ $msgstr =~ s/^"//;
+ $msgstr =~ s/"$//;
+ next
+ }
+ if (/^msgid\s+("[^"]*")/) {
+ $ismsgid = 'true';
+ $msgid = $1;
+ $msgid =~ s/^"//;
+ $msgid =~ s/"$//;
+ next
+ }
+ if ($ismsgid) {
+ s/^"//;
+ s/"$//;
+ $msgid .= "\n".$_;
+ next
+ }
+ if ($ismsgstr) {
+ s/^"//;
+ s/"$//;
+ $msgstr .= "\n".$_;
+ next
+ }
+ else {
+ print "Undefinierte Zeile gefunden:";
+ print;
+ }
+ }
+ close TRANS;
+ $self->{_caller_package} = $package;
+ bless($self, $class);
+ return $self;
+}
+
+
+sub t {
+ my $self = shift;
+ $text = shift;
+ my $newline = chomp $text;
+# print "Text ist :$text:\n";
+ $trans = $self->{text}{$text} || $text ;
+ if ($newline) { $trans .= "\n"}
+ return $trans;
+}
+
+
+sub all {
+ my $self = shift;
+ foreach $text (sort keys %{$self->{text}}) {
+ print "Original:$text:\n";
+ print "Übersetzung:$self->{text}{$text}:\n";
+ }
+}
+
+1;
diff --git a/dldialog/perl/Makefile.am b/dldialog/perl/Makefile.am
new file mode 100644
index 0000000..df6120b
--- /dev/null
+++ b/dldialog/perl/Makefile.am
@@ -0,0 +1,27 @@
+#/***********************************************************************
+#**
+#** $Id: Makefile.am,v 1.10 1999/05/18 06:49:13 harald Exp $
+#**
+#** 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.
+#**
+#** by Harald Hoyer (HarryH@Royal.Net)
+#** for delix Computer GmbH (http://www.delix.de)
+#**
+#***********************************************************************/
+
+SUBDIRS = doc
+
+EXTRA_DIST = DlButton.pm DlButtonGroup.pm DlCheckList.pm DlComboBox.pm \
+ DlDialog.pm DlFileSelect.pm DlHelp.pm DlInputField.pm \
+ DlList.pm DlMessage.pm DlRadioList.pm DlWizzard.pm \
+ DlWidgetGroup.pm dldialog.pm I18n.pm test.dl test.hlp
+
+perl_DATA = DlButton.pm DlButtonGroup.pm DlCheckList.pm DlComboBox.pm \
+ DlDialog.pm DlFileSelect.pm DlHelp.pm DlInputField.pm \
+ DlList.pm DlMessage.pm DlRadioList.pm DlWizzard.pm \
+ DlWidgetGroup.pm dldialog.pm I18n.pm
+
+perldir = $(prefix)/lib/perl5/site_perl
diff --git a/dldialog/perl/Makefile.in b/dldialog/perl/Makefile.in
new file mode 100644
index 0000000..19f1c11
--- /dev/null
+++ b/dldialog/perl/Makefile.in
@@ -0,0 +1,365 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+#/***********************************************************************
+#**
+#** $Id: Makefile.am,v 1.10 1999/05/18 06:49:13 harald Exp $
+#**
+#** 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.
+#**
+#** by Harald Hoyer (HarryH@Royal.Net)
+#** for delix Computer GmbH (http://www.delix.de)
+#**
+#***********************************************************************/
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AS = @AS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CXX = @CXX@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
+GENCAT = @GENCAT@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+GUI_VERSION_INFO = @GUI_VERSION_INFO@
+HAVE_FINAL = @HAVE_FINAL@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+KDOC = @KDOC@
+LATEX = @LATEX@
+LEX = @LEX@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIBS = @QT_LIBS@
+RANLIB = @RANLIB@
+SGML2HTML = @SGML2HTML@
+TV_INCLUDES = @TV_INCLUDES@
+TV_LDFLAGS = @TV_LDFLAGS@
+TV_LIBS = @TV_LIBS@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+YACC = @YACC@
+l = @l@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+tv_includes = @tv_includes@
+tv_libraries = @tv_libraries@
+
+SUBDIRS = doc
+
+EXTRA_DIST = DlButton.pm DlButtonGroup.pm DlCheckList.pm DlComboBox.pm DlDialog.pm DlFileSelect.pm DlHelp.pm DlInputField.pm DlList.pm DlMessage.pm DlRadioList.pm DlWizzard.pm DlWidgetGroup.pm dldialog.pm I18n.pm test.dl test.hlp
+
+
+perl_DATA = DlButton.pm DlButtonGroup.pm DlCheckList.pm DlComboBox.pm DlDialog.pm DlFileSelect.pm DlHelp.pm DlInputField.pm DlList.pm DlMessage.pm DlRadioList.pm DlWizzard.pm DlWidgetGroup.pm dldialog.pm I18n.pm
+
+
+perldir = $(prefix)/lib/perl5/site_perl
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+DATA = $(perl_DATA)
+
+DIST_COMMON = Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps perl/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+install-perlDATA: $(perl_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(perldir)
+ @list='$(perl_DATA)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(perldir)/$$p"; \
+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(perldir)/$$p; \
+ else if test -f $$p; then \
+ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(perldir)/$$p"; \
+ $(INSTALL_DATA) $$p $(DESTDIR)$(perldir)/$$p; \
+ fi; fi; \
+ done
+
+uninstall-perlDATA:
+ @$(NORMAL_UNINSTALL)
+ list='$(perl_DATA)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(perldir)/$$p; \
+ done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+
+@SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+ rev="$$subdir $$rev"; \
+ test "$$subdir" = "." && dot_seen=yes; \
+ done; \
+ test "$$dot_seen" = "no" && rev=". $$rev"; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = perl
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+ for subdir in $(SUBDIRS); do \
+ if test "$$subdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ chmod 777 $(distdir)/$$subdir; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \
+ || exit 1; \
+ fi; \
+ done
+info-am:
+info: info-recursive
+dvi-am:
+dvi: dvi-recursive
+check-am: all-am
+check: check-recursive
+installcheck-am:
+installcheck: installcheck-recursive
+install-exec-am:
+install-exec: install-exec-recursive
+
+install-data-am: install-perlDATA
+install-data: install-data-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-recursive
+uninstall-am: uninstall-perlDATA
+uninstall: uninstall-recursive
+all-am: Makefile $(DATA)
+all-redirect: all-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs: installdirs-recursive
+installdirs-am:
+ $(mkinstalldirs) $(DESTDIR)$(perldir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-recursive
+
+clean-am: clean-tags clean-generic mostlyclean-am
+
+clean: clean-recursive
+
+distclean-am: distclean-tags distclean-generic clean-am
+ -rm -f libtool
+
+distclean: distclean-recursive
+
+maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
+ distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-recursive
+
+.PHONY: uninstall-perlDATA install-perlDATA install-data-recursive \
+uninstall-data-recursive install-exec-recursive \
+uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
+all-recursive check-recursive installcheck-recursive info-recursive \
+dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-am uninstall all-redirect all-am all installdirs-am \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/dldialog/perl/dldialog.pm b/dldialog/perl/dldialog.pm
new file mode 100644
index 0000000..bf4d147
--- /dev/null
+++ b/dldialog/perl/dldialog.pm
@@ -0,0 +1,177 @@
+#!/usr/bin/perl
+####################################################
+# #
+# File: dldialog.pm #
+# Authors: Till Bubeck #
+# #
+# Last change: Sun Jan 3 23:06:43 CET 1999 #
+# #
+# DLD - German Linux Distribution - #
+# #
+# Copyright (c) 1993-1999 delix Computer GmbH #
+# Schloßstraße 98 #
+# D-70176 Stuttgart #
+# All rights reserved. #
+# #
+####################################################
+# #
+# 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. #
+# #
+####################################################
+
+
+##############################################################################
+# In diesem Modul wird eine objektorientierte Kapsel fuer DLDialog angeboten.
+# Dazu wird fuer jeden gewuenschten DLDialog ein eigenes Perl-Objekt angelegt,
+# dass alle Informationen fuer den jeweiligen Dialog mit sich traegt. Durch
+# Aufruf der Methode "show()" kann der gewuenschte Dialog zur Anzeige gebracht
+# werden.
+#
+# Beispiel fuer die Verwendung von DLDialog in Perl:
+#
+# require "dldialog.pm";
+#
+# $d = new dldialog(<<EOF, "namen");
+# {
+# text "Bitte geben Sie Ihren Namen ein:";
+# input -var "namen";
+# }
+# EOF
+#
+# $namen = "bubeck"; # Default setzen
+# $d->show(); # Dialog anzeigen
+# print "Hello world, $namen\n"; # Ergebnis auswerten
+#
+
+package dldialog;
+use IPC::Open2;
+
+##############################################################################
+# Konstruktor new. Erzeugt ein neues DLDialog-Objekt. Neben dem Text der
+# Dialogbox muss dem Konstruktor eine Liste von Ein/Ausgabe-Variablen
+# uebergeben werden. Das DLDialog-Objekt merkt sich die Namen der Variablen
+# als "Eingabewerte" fuer den eigentlichen DLDialog. Zu diesem werden die
+# Variableninhalte ueber Umgebungsvariablen transportiert. DLDialog traegt
+# einen Default in Eingabefelder ein, oder selektiert bestimmte Buttons, wenn
+# Umgebungsvariablen den gewuenschten Wert tragen.
+#
+# Damit eine Verbindung zwischen den Perl-Variablen und den gleichnamigen
+# Umgebungsvariablen hergestellt wird, muessen die Perl-Variablen an DLDdialog
+# "gebunden" werden. Dazu dient diese Funktion.
+#
+# Es muss eine Liste von Variablennamen uebergeben werden, die
+# Eingabeparameter an den gewuenschten DLDialog-Prozess transportieren sollen.
+#
+# -> 0: Referenzobjekt oder Klasse (immer dldialog)
+# 1: Text der Dialogbox
+# 2-n: Namen von Ein/Ausgabe-Variablen
+# <- 0: Neues Objekt
+#
+sub new {
+ my $base = shift;
+ my $class = ref($base) || $base;
+ my $self = {};
+ my ($package, $file, $line) = caller();
+
+ # Uebergebene oder ermittelte Attribute merken
+ $self->{_dialogtext} = shift;
+ $self->{_vars} = [@_]; # Referenz auf Parameter merken
+ $self->{_caller_package} = $package;
+
+ bless($self, $class);
+ return $self;
+}
+
+##############################################################################
+# Setzt den Text der Dialogbox neu.
+#
+# -> 0: Referenzobjekt oder Klasse
+# 1: Text der Dialogbox
+# <- : void
+#
+sub setText
+{
+ my ($self,$text) = @_; # OO: zugehoeriges Objekt holen
+
+ $self->{_dialogtext} = $text;
+}
+
+##############################################################################
+# Bringt den Dialog zur Anzeige. Dazu werden alle eingetragenen
+# Eingabevariablen in Umgebungsvariablen ueberfuehrt und danach der DLDialog
+# aufgerufen. Dann wird der Rueckgabestring geparst und in die entsprechenden
+# Perl-Variablen ueberfuehrt.
+#
+# -> 0: Referenzobjekt
+# <- : void
+#
+sub show
+{
+ my ($self) = shift; # OO: zugehoeriges Objekt holen
+ my $caller_package = $self->{_caller_package};
+
+ # Alle Eingabevariablen in Umgebungsvariablen schreiben:
+ # print "Setze Umgebungsvariablen:\n";
+ foreach $var (@{$self->{_vars}}) {
+ $ENV{$var} = $ {$caller_package . "::" . $var};
+ # printf "%20s = %s\n", "\$" . $var,$ {$caller_package . "::" . $var};
+ }
+
+ # DLDialog-Prozess starten...
+ # print "Rufe jetzt auf: " , $self->{_dialogtext}, "\n";
+ open2('RDR', 'WTR', '/usr/bin/dldialog -q');
+ print WTR $self->{_dialogtext};
+ close (WTR);
+
+ # Rueckgabe lesen und auswerten
+ @lines=<RDR>;
+ close (RDR);
+ $self->eval_result(@lines);
+}
+
+
+##############################################################################
+# Auswerten der Ausgaben von DLDialog. Dabei handelt es sich um eine Reihe von
+# Variablenzuweisungen in Shellnotation (z.B. name="till"), die in
+# gleichnamige Perl-Variablen ueberfuehrt werden muessen. Nach dem Aufruf
+# dieser Funktion mit dem obigen String ist eine Perl-Variable $name definiert,
+# die den Inhalt "till" traegt. Diese Variable muss im Scope des Aufrufers
+# angelegt werden.
+#
+# -> 0-n: mehrzeilige Strings, die maximal eine Zuweisung pro Zeile
+# enthalten duerfen.
+#
+sub eval_result
+{
+ my ($self) = shift; # OO: zugehoeriges Objekt holen
+ local ($i);
+ local (@lines);
+ local ($tmp);
+ my $caller_package = $self->{_caller_package};
+
+ # Setzt alle uebergebenen Parameter zu einem langen Gesamtstring zusammen
+ # und trennt diesen in einzelne Zeilen auf.
+ @lines = split("\n", join("\n",@_) );
+ chomp(@lines);
+
+ # ... dann alle Variablenzuweisungen raussuchen und umsetzen
+ for ( $i = 0; $i < @lines; $i++) {
+ $lines[$i] =~ /^\s*([^=]*)=(.*)/s;
+ if ( uc($1) eq "PATH" ) {
+ print STDERR "forbidden assignment catched.";
+ }
+ $tmp .= "\$" . $caller_package . "::$1 = $2;";
+ }
+
+ # ... und auswerten...
+ # print "Werte aus: $tmp\n";
+ eval $tmp;
+}
+
+1; # Keep require happy
+
diff --git a/dldialog/perl/doc/DlDialog.html b/dldialog/perl/doc/DlDialog.html
new file mode 100644
index 0000000..c1e2bed
--- /dev/null
+++ b/dldialog/perl/doc/DlDialog.html
@@ -0,0 +1,1293 @@
+ <HTML>
+ <HEAD>
+ <TITLE>DlDialog.pm - Eine Wrapper-Suite für dldialog in Perl
+
+</TITLE>
+ </HEAD>
+
+ <BODY>
+
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#NAME">NAME</A>
+ <LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
+ <UL>
+
+ <LI><A HREF="#Basisklassen">Basisklassen</A>
+ <LI><A HREF="#Widgetklassen">Widgetklassen</A>
+ <LI><A HREF="#Hilfsklassen">Hilfsklassen</A>
+ </UL>
+
+ <LI><A HREF="#Gebrauch">Gebrauch</A>
+ <LI><A HREF="#Die_Basisklassen_im_einzelnen">Die Basisklassen im einzelnen</A>
+ <UL>
+
+ <LI><A HREF="#DlDialog">DlDialog</A>
+ <UL>
+
+ <LI><A HREF="#new_title_orientation_">new($title, $orientation)</A>
+ <LI><A HREF="#setTitle_newtitle_">setTitle($newtitle)</A>
+ <LI><A HREF="#getTitle_">getTitle()</A>
+ <LI><A HREF="#setText_text_">setText($text)</A>
+ <LI><A HREF="#setImage_imagefile_">setImage($imagefile)</A>
+ <LI><A HREF="#getImage_">getImage()</A>
+ <LI><A HREF="#addGroup_a_widget_pos_">addGroup($a_widget, $pos)</A>
+ <LI><A HREF="#removeGroup_ref_nr_">removeGroup($ref_nr)</A>
+ <LI><A HREF="#setHelp_helpfile_">setHelp($helpfile)</A>
+ </UL>
+
+ <LI><A HREF="#DlWizzard">DlWizzard</A>
+ <UL>
+
+ <LI><A HREF="#Die_einzelnen_Funktionen_von_DlW">Die einzelnen Funktionen von DlWizzard</A>
+ <UL>
+
+ <LI><A HREF="#DlWizzard_new_">DlWizzard->new()</A>
+ <LI><A HREF="#DlWizzard_store_dialoglist_">DlWizzard->store(@dialoglist)</A>
+ <LI><A HREF="#DlWizzard_setHelp_helpfile_">DlWizzard->setHelp($helpfile)</A>
+ <LI><A HREF="#DlWizzard_hide_refnrs_">DlWizzard->hide(@refnrs)</A>
+ <LI><A HREF="#DlWizzard_unhide_refnrs_">DlWizzard->unhide(@refnrs)</A>
+ <LI><A HREF="#DlWizzard_proceed_">DlWizzard->proceed()</A>
+ </UL>
+
+ <LI><A HREF="#Callback">Callback</A>
+ <LI><A HREF="#Variablen">Variablen</A>
+ <LI><A HREF="#Hilfe">Hilfe</A>
+ </UL>
+
+ <LI><A HREF="#Die_Widgetklassen">Die Widgetklassen</A>
+ <UL>
+
+ <LI><A HREF="#DlButton_text_varname_font_">DlButton($text, $varname, $font, $fontsize, $fontcolor)</A>
+ <LI><A HREF="#DlButtonGroup">DlButtonGroup</A>
+ <UL>
+
+ <LI><A HREF="#new_orient_title_titlepos_">new($orient, $title, $titlepos, $varname, $height, $width)</A>
+ <LI><A HREF="#insertButton_buttonlist_">insertButton(@buttonlist)</A>
+ <LI><A HREF="#removeButton_refnr_">removeButton($refnr) </A>
+ <LI><A HREF="#setTitle_newtitle_">setTitle($newtitle)</A>
+ <LI><A HREF="#getTitle_">getTitle()</A>
+ <LI><A HREF="#setText_text_pos_">setText($text, $pos)</A>
+ <LI><A HREF="#setImage_ref_image_">setImage($ref, $image)</A>
+ </UL>
+
+ <LI><A HREF="#DlChecklist">DlChecklist</A>
+ <UL>
+
+ <LI><A HREF="#new_title_varname_height_">new($title, $varname, $height, $width)</A>
+ <LI><A HREF="#setTitle_newtitle_">setTitle($newtitle)</A>
+ <LI><A HREF="#getTitle_">getTitle()</A>
+ <LI><A HREF="#setText_text_pos_">setText($text, $pos)</A>
+ <LI><A HREF="#insertButton_buttonlist_">insertButton(@buttonlist)</A>
+ <LI><A HREF="#removeButton_refnr_">removeButton($refnr) </A>
+ </UL>
+
+ <LI><A HREF="#DlComboBox">DlComboBox</A>
+ <UL>
+
+ <LI><A HREF="#new_title_varname_height_">new($title, $varname, $height, $width)</A>
+ <LI><A HREF="#setTitle_newtitle_">setTitle($newtitle)</A>
+ <LI><A HREF="#getTitle_">getTitle()</A>
+ <LI><A HREF="#setText_text_pos_">setText($text, $pos)</A>
+ <LI><A HREF="#insertItem_items_">insertItem{@items}</A>
+ <LI><A HREF="#removeItem_refnr_">removeItem($refnr)</A>
+ <LI><A HREF="#getItem_refnr_">getItem($refnr)</A>
+ <LI><A HREF="#clearItems_">clearItems()</A>
+ </UL>
+
+ <LI><A HREF="#DlInputField">DlInputField</A>
+ <UL>
+
+ <LI><A HREF="#new_title_titlepos_varname_">new($title, $titlepos, $varname, $exit, $typ, $height, $width)</A>
+ </UL>
+
+ <LI><A HREF="#DlList">DlList</A>
+ <UL>
+
+ <LI><A HREF="#new_title_varname_multi_e">new($title, $varname, $multi, $exit, $height, $width)</A>
+ <LI><A HREF="#setTitle_newtitle_">setTitle($newtitle)</A>
+ <LI><A HREF="#getTitle_">getTitle()</A>
+ <LI><A HREF="#setText_text_pos_">setText($text, $pos)</A>
+ <LI><A HREF="#setFont_index_font_">setFont($index, $font)</A>
+ <LI><A HREF="#setFontSize_index_fontsize_">setFontSize($index, $fontsize)</A>
+ <LI><A HREF="#setColor_index_color_">setColor($index, $color)</A>
+ <LI><A HREF="#insertItem_items_">insertItem{@items}</A>
+ <LI><A HREF="#removeItem_refnr_">removeItem($refnr)</A>
+ <LI><A HREF="#getItem_refnr_">getItem($refnr)</A>
+ <LI><A HREF="#getList_">getList()</A>
+ <LI><A HREF="#clear_">clear()</A>
+ </UL>
+
+ <LI><A HREF="#DlRadioList">DlRadioList</A>
+ <UL>
+
+ <LI><A HREF="#new_title_varname_height_">new($title, $varname, $height, $width)</A>
+ <LI><A HREF="#setTitle_newtitle_">setTitle($newtitle)</A>
+ <LI><A HREF="#getTitle_">getTitle()</A>
+ <LI><A HREF="#setText_text_pos_">setText($text, $pos)</A>
+ <LI><A HREF="#insertButton_buttonlist_">insertButton(@buttonlist)</A>
+ <LI><A HREF="#removeButton_refnr_">removeButton($refnr) </A>
+ </UL>
+
+ <LI><A HREF="#DlWidgetGroup">DlWidgetGroup</A>
+ <UL>
+
+ <LI><A HREF="#new_orient_title_height_w">new($orient, $title, $height, $width)</A>
+ <LI><A HREF="#setTitle_newtitle_">setTitle($newtitle)</A>
+ <LI><A HREF="#getTitle_">getTitle()</A>
+ <LI><A HREF="#setText_text_pos_">setText($text, $pos)</A>
+ <LI><A HREF="#setImage_image_pos_">setImage($image, $pos)</A>
+ <LI><A HREF="#insertElement_widgets_">insertElement(@widgets)</A>
+ </UL>
+
+ <LI><A HREF="#DlMessage">DlMessage</A>
+ <UL>
+
+ <LI><A HREF="#DlMessage_show_title_text_ty">DlMessage->show($title,$text,$typ,$height,$width)</A>
+ </UL>
+
+ <LI><A HREF="#Beispielscript_">Beispielscript:</A>
+ <LI><A HREF="#AUTHORS">AUTHORS </A>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="NAME">NAME
+
+</A></H1>
+<PRE> DlDialog.pm - Eine Wrapper-Suite für dldialog in Perl
+</PRE>
+
+<P>
+
+<P>
+<HR>
+<H1><A NAME="SYNOPSIS">SYNOPSIS
+
+</A></H1>
+DlDialog ist eine Wrapper-Suite für den objektorienierten Aufbau von
+DlDialog-Widgets in Perl und stellt dazu verschiedene Objekte bereit, die
+den Umgang und die Ablaufsteuerung weitgehend vereinfachen. Die Suite teilt
+sich dabei in 3 Beriche :
+
+
+<P>
+
+<P>
+<HR>
+<H2><A NAME="Basisklassen">Basisklassen
+
+</A></H2>
+Für den Grundlegenden Dialogaufbau stehen 3 Klassen zur Verfügung
+
+
+<P>
+
+<PRE> DlDialog
+</PRE>
+
+<P>
+
+gibt die Referenz auf ein <A HREF="#DlDialog">DlDialog</A>-Objekt zurück, das automatisch mit den erforderlichen &lt;Hilfe, Zurück, Weiter, Ok, Abbrechen&gt;-Buttons versehen wird. Das <A HREF="#DlDialog">DlDialog</A>-Objekt selbst verwaltet nur verschiedene Widgets und WidgetGruppen.
+
+
+<P>
+
+<PRE> DlWizzard
+</PRE>
+
+<P>
+
+gibt die Referenz auf einen <A HREF="#DlWizzard">DlWizzard</A>-Objekt zurück, das einen <A HREF="#DlDialog">DlDialog</A>-Stack verwaltet, der die Abwicklung von Konfigurations- oder
+Abfragedialogen im Wizzard-Stil steuert. Auf dem Stapel werden <A HREF="#DlDialog">DlDialog</A>-Objekte gesammelt, die in einer Kette abgearbeitet werden, eine
+einheitliche <A HREF="#Hilfe">Hilfe</A>datei verwalten und mit den jeweils sinnvollen Steuerbuttons ausgestatet
+sind. Eingegebene Variablen bleiben beim Vor- und Zurückblättern erhalten
+und jeder einzelne Dialog kann eine <A HREF="#Callback">Callback</A>routine zugeordnet bekommen, die aufgerufen wird, wenn der Dialog verlassen
+wird.
+
+
+<P>
+
+<P>
+<HR>
+<H2><A NAME="Widgetklassen">Widgetklassen
+
+</A></H2>
+Um die Dialoge mit Inhalt zu füllen, stehen verschiedene Widgetklassen zur
+Verfügung. Dies sind in alphabetischer Reihenfolge
+
+
+<P>
+
+<PRE> DlButton
+ DlButtonGroup
+ DlCheckList
+ DlComboBox
+ DlInputField
+ DlList
+ DlRadioList
+ DlWidgetGroup
+</PRE>
+
+<P>
+
+<P>
+<HR>
+<H2><A NAME="Hilfsklassen">Hilfsklassen
+
+</A></H2>
+Dies sind Klassen, die von DlDialog-Objekten direkt verwaltet werden oder
+auch ohne Erstellung einer Instanz direkt aufgerufen werden können.
+
+
+<P>
+
+<PRE> DlHelp
+</PRE>
+
+<P>
+
+verwaltet eine <A HREF="#Hilfe">Hilfe</A>datei mit Kapiteln und Inhaltsverzeichniss.
+
+
+<P>
+
+<PRE> DlMessage
+</PRE>
+
+<P>
+
+gibt einen einfachen Dialog aus für Mitteilungen oder Bestätigungen.
+
+
+<P>
+
+<P>
+<HR>
+<H1><A NAME="Gebrauch">Gebrauch
+
+</A></H1>
+Mit der Anweisung
+
+
+<P>
+
+<PRE> use DlDialog; oder
+ use DlWizzard;
+</PRE>
+
+<P>
+
+werden im Perlscript alle Klassen zur Verfügung gestellt.
+
+
+<P>
+
+<P>
+<HR>
+<H1><A NAME="Die_Basisklassen_im_einzelnen">Die Basisklassen im einzelnen
+
+</A></H1>
+<P>
+<HR>
+<H2><A NAME="DlDialog">DlDialog
+
+</A></H2>
+Ein DlDialog-Objekt wird mit <EM>show()</EM> zur Anzeige gebracht und ist standardmäßig mit einem &lt;Ok&gt; und einem
+&lt;Zurück&gt;-Button ausgestattet. Wird der Dialog mit einer Hilfedatei
+verfnüpft, kommt noch ein &lt;Hilfe&gt;-Button dazu.
+
+
+<P>
+
+Das Handling der Hilfedatei wird komplett innerhalb der Funktion
+abgewickelt, der Programmierer braucht also nur mit <EM>setHelp(<EM>helpfile</EM>)</EM> die Hilfe initiieren und vergessen.
+
+
+<P>
+
+Der Aufruf von DlDialog-&gt;show gibt den Zustand des Dialogs als
+&lt;SCALAR&gt; zurück. Mögliche Zustande sind:
+
+
+<P>
+
+<PRE> 'ok', 'back', 'cancel'
+</PRE>
+
+<P>
+
+<A HREF="#Variablen">Variablen</A>, die den einzelnen Widgets zugewiesen werden, sind nach der Beenigung des
+Dialogs in Scope des Aufrufers gültige Perlvarialblen.
+
+
+<P>
+
+<P>
+<HR>
+<H4><A NAME="new_title_orientation_">new($title, $orientation)
+
+</A></H4>
+Der Konstruktor legt eine neues DlDialogobjekt an, das den Titel <EM>$title</EM> enthält und eine Referenz auf das erzeugte Objekt zurückgibt. <EM>$orientation</EM> gibt die Ausrichtung des Dialogs an. Gültige Parameter sind
+'r|row','c|col','f|form', Gross- und Kleinschreibung wird ignoriert,
+default ist 'col'.
+
+
+<P>
+
+<STRONG>Rückgabewert:</STRONG> Referenz auf das Objekt.
+
+
+<P>
+
+<P>
+<HR>
+<H4><A NAME="setTitle_newtitle_">setTitle($newtitle)
+
+</A></H4>
+Setzt den Titel des Dialogs auf <EM>$newtitle</EM>.
+<STRONG>Rückgabewert:</STRONG> Der alte Titel des Dialogs.
+
+
+<P>
+
+<P>
+<HR>
+<H4><A NAME="getTitle_">getTitle()
+
+</A></H4>
+<STRONG>Rückgabewert:</STRONG> Der Titel des Dialogs.
+
+
+<P>
+
+<P>
+<HR>
+<H4><A NAME="setText_text_">setText($text)
+
+</A></H4>
+Setzt den einleitenden Text des Dialogs auf <EM>$text</EM>.
+
+
+<P>
+
+<P>
+<HR>
+<H4><A NAME="setImage_imagefile_">setImage($imagefile)
+
+</A></H4>
+Setzt das Bild auf der linken Seite des Dialogs auf <EM>$imagefile</EM> und gibt das zuvor gesetzte Bild zurück. Default ist ``DLD.xpm''.
+
+
+<P>
+
+<P>
+<HR>
+<H4><A NAME="getImage_">getImage()
+
+</A></H4>
+Gibt das aktuell gesetzte Bild zurück.
+
+
+<P>
+
+<P>
+<HR>
+<H4><A NAME="addGroup_a_widget_pos_">addGroup($a_widget, $pos)
+
+</A></H4>
+fügt dem Dialog das Widget <EM>$a_widget</EM> als Nummer <EM>$pos</EM> hinzu. Dies können DlWidgetGroup oder jedes andere Widget sein, die über
+eine Funktion <STRONG>getCode</STRONG> verfügen, die einen gültigen dldialog-code zurückgibt. Ist <EM>$pos</EM> nicht angegeben, wird das Widget hinten angefügt.
+
+
+<P>
+
+<STRONG>Rückgabewert:</STRONG> Referenznummer auf die hinzugefügte Gruppe.
+
+
+<P>
+
+<P>
+<HR>
+<H4><A NAME="removeGroup_ref_nr_">removeGroup($ref_nr)
+
+</A></H4>
+entfernt das Widget mit der Referenznummer (<EM>$ref_nr</EM> aus dem Dialog.
+
+
+<P>
+
+<STRONG>Rückgabewert:</STRONG> Referenznummer der entfernten Gruppe oder 0 bei Fehlschlag.
+
+
+<P>
+
+<P>
+<HR>
+<H4><A NAME="setHelp_helpfile_">setHelp($helpfile)
+
+</A></H4>
+verknüpft den Dialog mit einer Hilfedatei. './' und '~/' werden expandiert.
+
+
+<P>
+
+<P>
+<HR>
+<H2><A NAME="DlWizzard">DlWizzard
+
+</A></H2>
+Das Konzept des DlWizzards wurde entwickelt, um die Abwicklung von Dialogen
+im Wizzard-Stil zu automatisieren und den Entwickler freizusetzen, sich auf
+den Inhalt der Dialoge zu konzentrieren. Ein weiterer Vortiel ist, dass die
+Gestaltung der Steuerbuttons und der Grundaufbau der Dialoge zentral
+verwaltet und dadurch einheitlich gestaltet ist.
+
+
+<P>
+
+Der DlWizzard verwaltet einen Stack mit 'finite machines'
+DlDialog-Objekten.
+<STRONG>Hilfe</STRONG> <STRONG>Zurück</STRONG> <STRONG>Weiter</STRONG> <STRONG>Ok</STRONG> <STRONG>Abbrechen</STRONG> sind intelligent angebracht wie Till vorgeschlagen hat.
+
+
+<P>
+
+Der DlWizzard kann mit einer einfach aufgebauten <A HREF="#Hilfe">Hilfe</A>datei verknüpft werden, die für alle Dialoge zentral verwaltet wird.
+
+
+<P>
+
+Über <A HREF="#Callback">Callback</A>routinen können die gesetzten Werte nach jedem '-exit' verarbeitet werden.
+
+
+<P>
+
+Einzelne Dialoge können beliebig ein- und ausgeblendet werden.
+
+
+<P>
+
+Der Aufbau einzelner Dialoge kann dynamisch gestaltet werden.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="Die_einzelnen_Funktionen_von_DlW">Die einzelnen Funktionen von DlWizzard
+
+</A></H3>
+<P>
+<HR>
+<H4><A NAME="DlWizzard_new_">DlWizzard->new()
+
+</A></H4>
+gibt die Referenz auf einen neuen Wizard zurück
+
+
+<P>
+
+<P>
+<HR>
+<H4><A NAME="DlWizzard_store_dialoglist_">DlWizzard->store(@dialoglist)
+
+</A></H4>
+Fügt dem Wizzard einen oder mehrere Dialoge hinzu. Werden die Dialoge
+einzeln hinzugefügt, gibt die Funktion eine Referenznummer zurück, die für
+die Funktionen <STRONG>hide</STRONG> und <STRONG>unhide</STRONG> benötigt werden.
+
+
+<P>
+
+<P>
+<HR>
+<H4><A NAME="DlWizzard_setHelp_helpfile_">DlWizzard->setHelp($helpfile)
+
+</A></H4>
+bindet eine zentrale Hilfedatei <EM>$helpfile</EM> ein. in die einzelnen Dialoge sollte dann keine separate Hilfe eingebunden
+werden. (siehe <A HREF="#Hilfe">Hilfe</A>)
+
+
+<P>
+
+<P>
+<HR>
+<H4><A NAME="DlWizzard_hide_refnrs_">DlWizzard->hide(@refnrs)
+
+</A></H4>
+schaltet einzelne oder mehrere Dialoge im Wizzard aus (z.B. um bei
+speziellen Eingaben sinnlose Seiten zu überspringen).
+
+
+<P>
+
+<P>
+<HR>
+<H4><A NAME="DlWizzard_unhide_refnrs_">DlWizzard->unhide(@refnrs)
+
+</A></H4>
+schaltet einen oder mehrere Dialoge wieder ein.
+
+
+<P>
+
+<P>
+<HR>
+<H4><A NAME="DlWizzard_proceed_">DlWizzard->proceed()
+
+</A></H4>
+startet den Wizzard. Der Rückgabewert entspricht dem Beendigungszustand des
+letzten Dialoges und hat den Wert 'cancel' oder 'ok'.
+
+
+<P>
+
+<P>
+<HR>
+<H2><A NAME="Callback">Callback
+
+</A></H2>
+<PRE> B&lt;setCallback($callbackref)&gt;
+</PRE>
+
+<P>
+
+Setzt die Callbackfunktion des Dialogs, die von DlWizzard beim Verlassen
+des DlDialogobjektes aufgerufen wird.
+<EM>$callbackref</EM> ist dabei eine Referenz auf eine Funktion, die im Hauptprogramm (dort , wo
+der DlWizzard aufgerufen wird, als anonyme Subroutine deklariert ist.
+
+
+<P>
+
+<PRE> $callbackref = sub {
+ do_this($widgetvar1);
+ do_that...}
+</PRE>
+
+<P>
+
+Innerhalb des Blocks kann auf alle <A HREF="#Variablen">Variablen</A> des Dialogs zugegriffen werden
+
+
+<P>
+
+<P>
+<HR>
+<H2><A NAME="Variablen">Variablen
+
+</A></H2>
+Den einzelnen Widgets können beim Einrichten Variablen zugeordnet werden
+indem der Variablenname als String übergeben wird. Ist im Scope des
+Aufrufers die Variable mit einem Wert versehen, so ist dieser Wert auch im
+Dialog bekannt. Umgekehrt sind die im Dialog zugeordneten Werte nach
+Beendigung des Dialogs im Scope des Aufrufers gesetzt. Zum Vergleich der
+Werte sollten die Referenzwerte verwendetwerden, die beim Einrichten eines
+Widgets zurückgegeben werden. <STRONG>Beispiel:</STRONG>
+
+
+
+
+<P>
+
+<PRE> $myradiolist = new DlRadioList('Titel','radiovar');
+ $choice1 = $myradiolist-&gt;insertButton('1. Wahl');
+ $choice2 = $myradiolist-&gt;insertButton('2. Wahl');
+ ...
+</PRE>
+
+<P>
+
+Nach Abarbeitung des Dialogs lässt sich der Zustand mit
+
+
+<P>
+
+<PRE> if ($radiovar eq $choice1) {print &quot;Sie haben die 1. Wahl getroffen\n&quot;}
+</PRE>
+
+<P>
+
+verarbeiten. Mit der Syntax 'radiovar=3' lässt sich ein Defaultwert setzen,
+der jedoch bei jedem neuen Aufruf des Dialogs den gewählten Wert wieder
+überschreibt. Normalerweise sollten defaultwerte über die zugehörige
+Perl-variable gesetzt werden.(z.B. $radiavar=$choice2).
+
+
+<P>
+
+<STRONG>Wichtig:</STRONG> Da die Variablen beim Beenden eines Dialoges nur dann modifiziert werden,
+wenn ein Wert gesetzt wurde, sollten Variablen, die keine Werte in den
+Dialog transportieren, vor dem Aufruf mit undef oder einer
+Leerstringzuweisung entladen werden. (liegt an dldialog :-( )
+
+
+<P>
+
+<P>
+<HR>
+<H2><A NAME="Hilfe">Hilfe
+
+</A></H2>
+Der Aufbau der Hilfedatei ist entsprechend Tills Vorschlag mit einfachen
+Tags gesteuert. <STRONG>Beispiel:</STRONG>
+
+
+
+
+<P>
+
+<PRE> &lt;Title&gt; Titel des Hilfedialogs bis zum Ende der Zeile
+ &lt;Einführung&gt;
+ Dies ist der Einführungstext bis zum nächsten Tag.
+ &lt;Details&gt;
+ Der Tag wird jedoch nur zum Beginn einer Zeile erkannt,
+ dieser &lt;Tag&gt; wird im Text normal wiedergegeben
+ &lt;about&gt; die Zeile hinter einem gültigen Tag wird ignoriert
+ ...
+</PRE>
+
+<P>
+
+erzeugt einen Hilfedialog mit dem gewünschten Titel, einer Combobox, in der
+die Kapitel 'Einführung', 'Details' und 'about' zur Auswahl angeboten
+werden. Im darunterliegenden Fenster wird der Text des gewählten Kapitels,
+defaultmässig das erste Kapitel, angezeigt. Die Auswahl wird beim <A HREF="#DlWizzard">DlWizzard</A> über alle Dialoge hinweg gespeichert. Eingebunden wird die Hilfe mit
+
+
+<P>
+
+<PRE> DlDialog-&gt;setHelp($helpfile)
+</PRE>
+
+<P>
+
+bzw.
+
+
+<P>
+
+<PRE> DlWizzard-&gt;setHelp($helpfile)
+</PRE>
+
+<P>
+
+<P>
+<HR>
+<H1><A NAME="Die_Widgetklassen">Die Widgetklassen
+
+</A></H1>
+<P>
+<HR>
+<H2><A NAME="DlButton_text_varname_font_">DlButton($text, $varname, $font, $fontsize, $fontcolor)
+
+</A></H2>
+gibt die Referenz auf einen Button zurück, der mit <EM>$text</EM> beschriftet wird und bei Betätigung die Variable <EM>$$varname</EM> auf '1' setzt. Mit <EM>$font, $fontsize, $fontcolor</EM> können Schriftart, Schriftgrösse und Schriftfarbe des Buttons festgelegt
+werden.
+
+
+<P>
+
+<P>
+<HR>
+<H2><A NAME="DlButtonGroup">DlButtonGroup
+
+</A></H2>
+<P>
+<HR>
+<H3><A NAME="new_orient_title_titlepos_">new($orient, $title, $titlepos, $varname, $height, $width)
+
+</A></H3>
+erstellt eine ButtonGruppe mit dem Titel I$&lt;title&gt;. <EM>$orient</EM> setzt die Ausrichtung der ButtonGruppe, gültige Werte sind 'r|row|c|col'. <EM>$titlepos</EM> bestimmt die Anordnung des Titels, gültige Werte sind
+'t|top|b|bottom|l|left|r|right'. <EM>$varname</EM> setzt den Namen der Rückgabe<A HREF="#Variablen">Variablen</A>. <EM>$height</EM> und <EM>$width</EM> setzen die Geometrie der ButtonGruppe.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="insertButton_buttonlist_">insertButton(@buttonlist)
+
+</A></H3>
+installiert einen oder mehrere Buttons mit den übergebenen Namen. Werden
+die Buttons einzeln installiert, ist der Rückgabewert eine Referenznummer
+auf den Button, die auch dem Rückgabewert der Variablen <EM>$$varname</EM> entspricht. z.B:
+
+
+<P>
+
+<PRE> $bgroup = new DlButtonGroup('Titel','pressed');
+ $chaos_pressed = $bgroup-&gt;insertButton('Chaos');
+ ...
+ if ($pressed eq $chaos_pressed) {print &quot;Sie lieben das Chaos?\n&quot;}
+</PRE>
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="removeButton_refnr_">removeButton($refnr)
+
+</A></H3>
+entfernt den Button mit der Referenznummer <EM>$refnr</EM>.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="setTitle_newtitle_">setTitle($newtitle)
+
+</A></H3>
+macht <EM>$newtitle</EM> zum neuen Titel der ButtonGruppe und gibt den alten Titel zurück.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="getTitle_">getTitle()
+
+</A></H3>
+gibt den aktuellen Titel zurück
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="setText_text_pos_">setText($text, $pos)
+
+</A></H3>
+setzt einen Text in der ButtonGruppe auf <EM>$text</EM>, defaultmässig vor den Buttons. Ist <EM>$pos</EM> auf 'b|bottom|back' gesetzt, erscheint der Text nach den Buttons.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="setImage_ref_image_">setImage($ref, $image)
+
+</A></H3>
+setzt das Bild <EM>$image</EM> für den mit <EM>$ref</EM> referenzierten Button.
+
+
+<P>
+
+<P>
+<HR>
+<H2><A NAME="DlChecklist">DlChecklist
+
+</A></H2>
+<P>
+<HR>
+<H3><A NAME="new_title_varname_height_">new($title, $varname, $height, $width)
+
+</A></H3>
+erstellt eine Checkliste mit dem Titel <EM>$title</EM>. <EM>$varname</EM> setzt den Namen der Rückgabe<A HREF="#Variablen">Variablen</A>. <EM>$height</EM> und <EM>$width</EM> setzen die Geometrie der Checkliste.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="setTitle_newtitle_">setTitle($newtitle)
+
+</A></H3>
+macht <EM>$newtitle</EM> zum neuen Titel der Checkliste und gibt den alten Titel zurück.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="getTitle_">getTitle()
+
+</A></H3>
+gibt den aktuellen Titel zurück
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="setText_text_pos_">setText($text, $pos)
+
+</A></H3>
+setzt einen Text in der Checkliste auf <EM>$text</EM>, defaultmässig oben. Ist <EM>$pos</EM> auf 'b|bottom' gesetzt, erscheint der Text nach den CheckButtons.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="insertButton_buttonlist_">insertButton(@buttonlist)
+
+</A></H3>
+installiert einen oder mehrere CheckButtons mit den übergebenen Namen.
+Werden die Buttons einzeln installiert, ist der Rückgabewert eine
+Referenznummer auf den Button, die auch dem Rückgabewert der Variablen <EM>$$varname</EM> entspricht.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="removeButton_refnr_">removeButton($refnr)
+
+</A></H3>
+entfernt den CheckButton mit der Referenznummer <EM>$refnr</EM>.
+
+
+<P>
+
+<P>
+<HR>
+<H2><A NAME="DlComboBox">DlComboBox
+
+</A></H2>
+<P>
+<HR>
+<H3><A NAME="new_title_varname_height_">new($title, $varname, $height, $width)
+
+</A></H3>
+erstellt eine Combobox mit dem Titel <EM>$title</EM>. <EM>$varname</EM> setzt den Namen der Rückgabe<A HREF="#Variablen">Variablen</A>. <EM>$height</EM> und <EM>$width</EM> setzen die Geometrie der Checkliste.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="setTitle_newtitle_">setTitle($newtitle)
+
+</A></H3>
+macht <EM>$newtitle</EM> zum neuen Titel der Combobox und gibt den alten Titel zurück.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="getTitle_">getTitle()
+
+</A></H3>
+gibt den aktuellen Titel zurück
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="setText_text_pos_">setText($text, $pos)
+
+</A></H3>
+setzt einen Text in der Combobox auf <EM>$text</EM>, defaultmässig oben. Ist <EM>$pos</EM> auf 'b|bottom' gesetzt, erscheint der Text unten.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="insertItem_items_">insertItem{@items}
+
+</A></H3>
+fügt der Combobox einen oder mehrere Einträge hinzu. werden die Einträge
+einzeln hinzugefügt, ist der Rückgabewert eine Referenznummer auf den
+Eintrag.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="removeItem_refnr_">removeItem($refnr)
+
+</A></H3>
+entfernt den Eintrag mit der Referenznummer <EM>$refnr</EM> aus der Combobox.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="getItem_refnr_">getItem($refnr)
+
+</A></H3>
+gibt den Text des Eintrags mit der Referenznummer <EM>$refnr</EM> zurück.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="clearItems_">clearItems()
+
+</A></H3>
+leert die Combobox.
+
+
+<P>
+
+<P>
+<HR>
+<H2><A NAME="DlInputField">DlInputField
+
+</A></H2>
+<P>
+<HR>
+<H3><A NAME="new_title_titlepos_varname_">new($title, $titlepos, $varname, $exit, $typ, $height, $width)
+
+</A></H3>
+erstellt ein Eingabefeld mit dem Titel <EM>$title</EM>, <EM>$titlepos</EM> gibt die Positiondes Titels an, gültige Werte sind
+'t|top|b|bottom|l|left|r|right'.
+<EM>$varname</EM> setzt den Namen der Rückgabe<A HREF="#Variablen">Variablen</A>. Ist <EM>$exit</EM> gesetzt (nicht_null), beendet ein &lt;Enter&gt; nach der Eingabe den Dialog. Im LDlWizzard&gt; wird der Dialog
+jedoch nicht weitergeschaltet, so dass die Eingabe in der <A HREF="#Callback">Callback</A>funktion verarbeitet werden und ggf. der Dialog entsprechend verändert
+werden kann.
+<EM>$typ</EM> gibt den Typ des Eingabefeldes an, gültige Werte sind hier
+'p|passwd|n|numeric|i|ip'. Diese Angaben können auch kombiniert werden und
+sollten dann mit Leerstellen getrennt in <EM>$typ</EM> übergeben werden (z.B. <CODE>$typ</CODE> = 'numeric passwd'). <EM>$height</EM> und <EM>$width</EM> setzen die Geometrie der Checkliste. Die Eingabe wird über die Variable <EM>$$varname</EM> zurückgegeben.
+
+
+<P>
+
+<P>
+<HR>
+<H2><A NAME="DlList">DlList
+
+</A></H2>
+<P>
+<HR>
+<H3><A NAME="new_title_varname_multi_e">new($title, $varname, $multi, $exit, $height, $width)
+
+</A></H3>
+erstellt eine Auswahlliste mit dem Titel <EM>$title</EM>. <EM>$varname</EM> setzt den Namen der Rückgabe<A HREF="#Variablen">Variablen</A>. Ist <EM>$multi</EM> gesetzt (nicht_null), ist eine mehrfachauswahl möglich. Ist <EM>$exit</EM> gesetzt (nicht_null), beendet ein Doppelclick auf einen Listeneintrag den
+Dialog. Im LDlWizzard&gt; wird der Dialog jedoch nicht weitergeschaltet, so
+dass die Eingabe in der <A HREF="#Callback">Callback</A>funktion verarbeitet werden und ggf. der Dialog entsprechend verändert
+werden kann. <EM>$height</EM> und <EM>$width</EM> setzen die Geometrie der Checkliste.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="setTitle_newtitle_">setTitle($newtitle)
+
+</A></H3>
+macht <EM>$newtitle</EM> zum neuen Titel der Liste und gibt den alten Titel zurück.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="getTitle_">getTitle()
+
+</A></H3>
+gibt den aktuellen Titel zurück
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="setText_text_pos_">setText($text, $pos)
+
+</A></H3>
+setzt einen Text in der Liste auf <EM>$text</EM>, defaultmässig oben. Ist <EM>$pos</EM> auf 'b|bottom' gesetzt, erscheint der Text unten.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="setFont_index_font_">setFont($index, $font)
+
+</A></H3>
+setzt den Zeichesatz des mit <EM>$index</EM> indizierten Listeneintrags, ist <EM>$index</EM> nicht angegeben, wird der Zeichensatz <EM>$font</EM> als Standardzeichensatz gesetzt.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="setFontSize_index_fontsize_">setFontSize($index, $fontsize)
+
+</A></H3>
+setzt den Zeichesatz des mit <EM>$index</EM> indizierten Listeneintrags auf die angegebene Größe, ist <EM>$index</EM> nicht angegeben, wird <EM>$fontsize</EM> als Standardgröße gesetzt.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="setColor_index_color_">setColor($index, $color)
+
+</A></H3>
+setzt die Schriftfarbe des mit <EM>$index</EM> indizierten Listeneintrags, ist <EM>$index</EM> nicht angegeben, wird <EM>$color</EM> als Standardfarbe verwenden. <EM>$color</EM> kann dabei mit den üblichen Farbbezeichnungen 'darkblue' , 'yellow'... oder
+als hexadezimal codierte Farbe wie in HTML, z.B. '#F0459F' angegeben
+werden.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="insertItem_items_">insertItem{@items}
+
+</A></H3>
+fügt der Auswahlliste einen oder mehrere Einträge hinzu. werden die
+Einträge einzeln hinzugefügt, ist der Rückgabewert eine Referenznummer auf
+den Eintrag.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="removeItem_refnr_">removeItem($refnr)
+
+</A></H3>
+entfernt den Eintrag mit der Referenznummer <EM>$refnr</EM> aus der Auswahlliste.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="getItem_refnr_">getItem($refnr)
+
+</A></H3>
+gibt den Eintrag selbst zurück.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="getList_">getList()
+
+</A></H3>
+gibt eine Referenz auf ein Array zurück, dass den aktuellen Inhalt der
+Auswahlliste enthält.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="clear_">clear()
+
+</A></H3>
+leert die Auswahlliste.
+
+
+<P>
+
+<P>
+<HR>
+<H2><A NAME="DlRadioList">DlRadioList
+
+</A></H2>
+<P>
+<HR>
+<H3><A NAME="new_title_varname_height_">new($title, $varname, $height, $width)
+
+</A></H3>
+erstellt eine Liste von Radiobuttons mit dem Titel <EM>$title</EM>. <EM>$varname</EM> setzt den Namen der Rückgabe<A HREF="#Variablen">Variablen</A>. <EM>$height</EM> und <EM>$width</EM> setzen die Geometrie der Radioliste.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="setTitle_newtitle_">setTitle($newtitle)
+
+</A></H3>
+macht <EM>$newtitle</EM> zum neuen Titel der Radioliste und gibt den alten Titel zurück.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="getTitle_">getTitle()
+
+</A></H3>
+gibt den aktuellen Titel zurück
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="setText_text_pos_">setText($text, $pos)
+
+</A></H3>
+setzt einen Text in der Liste auf <EM>$text</EM>, defaultmässig oben. Ist <EM>$pos</EM> auf 'b|bottom' gesetzt, erscheint der Text unten.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="insertButton_buttonlist_">insertButton(@buttonlist)
+
+</A></H3>
+installiert einen oder mehrere RadioButtons mit den übergebenen Namen.
+Werden die Buttons einzeln installiert, ist der Rückgabewert eine
+Referenznummer auf den Button, die auch dem Rückgabewert der Variablen <EM>$$varname</EM> entspricht.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="removeButton_refnr_">removeButton($refnr)
+
+</A></H3>
+entfernt den RadioButton mit der Referenznummer <EM>$refnr</EM>.
+
+
+<P>
+
+<P>
+<HR>
+<H2><A NAME="DlWidgetGroup">DlWidgetGroup
+
+</A></H2>
+DlWidgetGroup dient eigentlich nur der Gruppierung verschiedener Widgets,
+die damit zusammengefasst werden.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="new_orient_title_height_w">new($orient, $title, $height, $width)
+
+</A></H3>
+erzeugt eine neue Widgetgruppe mit dem Titel <EM>$title</EM> und der Ausrichtung <EM>$orient</EM>, gültige Werte für <EM>$orient</EM> sind 'r|row|c|col'. <EM>$height</EM> und <EM>$width</EM> setzen die Geometrie der Widgetgruppe.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="setTitle_newtitle_">setTitle($newtitle)
+
+</A></H3>
+macht <EM>$newtitle</EM> zum neuen Titel der Widgetgruppe und gibt den alten Titel zurück.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="getTitle_">getTitle()
+
+</A></H3>
+gibt den aktuellen Titel zurück
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="setText_text_pos_">setText($text, $pos)
+
+</A></H3>
+setzt einen Text in der Widgetgruppe auf <EM>$text</EM>, defaultmässig oben. Ist <EM>$pos</EM> auf 'b|bottom' gesetzt, erscheint der Text unten.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="setImage_image_pos_">setImage($image, $pos)
+
+</A></H3>
+fügt der WidgetGroup ein Bild hinzu. <EM>$pos</EM> ist dabei optional, gültige Werte für <EM>$pos</EM> sind 't|top|b|bottom', default 'top'.
+
+
+<P>
+
+<P>
+<HR>
+<H3><A NAME="insertElement_widgets_">insertElement(@widgets)
+
+</A></H3>
+fügt ein oder mehrere Widgets in die Widgetgruppe ein.
+
+
+<P>
+
+<P>
+<HR>
+<H2><A NAME="DlMessage">DlMessage
+
+</A></H2>
+<P>
+<HR>
+<H3><A NAME="DlMessage_show_title_text_ty">DlMessage->show($title,$text,$typ,$height,$width)
+
+</A></H3>
+zeigt eine MessageBox mit dem Titet <EM>$title</EM> und dem Text <EM>$text</EM>. <EM>$typ</EM> legt dabei die Art der MessageBox fest. Mögliche Typen sind:
+
+
+<P>
+
+'j|ja|y|yes' für yes|no-Boxen. Rückgabewert bei diesem Typ ist 'yes' oder
+'no'.
+
+
+<P>
+
+'b|break' für break|continue-Boxen. Rückgabewert bei diesem Typ ist 'break'
+oder 'continue'.
+
+
+<P>
+
+anderenfalls gibt es nur einen 'Zurück'-Button und den Rückgabewert 'back'.
+
+
+<P>
+
+Ein Verwendungsbeispiel aus der Shell
+
+
+<P>
+
+<PRE> /usr/bin/perl -e 'use DlDialog; DlMessage-&gt;show('Hallo Welt','Hier bin Ich')'
+</PRE>
+
+<P>
+
+<P>
+<HR>
+<H1><A NAME="Beispielscript_">Beispielscript:
+
+</A></H1>
+siehe beiliegendes 'test.dl'
+
+
+<P>
+
+<P>
+<HR>
+<H1><A NAME="AUTHORS">AUTHORS
+
+</A></H1>
+Thomas <A HREF="MAILTO:Hagedorn<tom@delix.de>.">Hagedorn<tom@delix.de>.</A>
+
+
+<P>
+
+</DL>
+ </BODY>
+
+ </HTML>
diff --git a/dldialog/perl/doc/DlDialog.pod b/dldialog/perl/doc/DlDialog.pod
new file mode 100644
index 0000000..69ae18f
--- /dev/null
+++ b/dldialog/perl/doc/DlDialog.pod
@@ -0,0 +1,451 @@
+=head1 NAME
+
+ DlDialog.pm - Eine Wrapper-Suite für dldialog in Perl
+
+=head1 SYNOPSIS
+
+DlDialog ist eine Wrapper-Suite für den objektorienierten Aufbau von DlDialog-Widgets in Perl und stellt dazu verschiedene Objekte bereit, die den Umgang und die Ablaufsteuerung weitgehend vereinfachen. Die Suite teilt sich dabei in 3 Beriche :
+
+=head2 Basisklassen
+
+Für den Grundlegenden Dialogaufbau stehen 3 Klassen zur Verfügung
+
+ DlDialog
+
+gibt die Referenz auf ein L<DlDialog>-Objekt zurück, das automatisch mit den erforderlichen <Hilfe, Zurück, Weiter, Ok, Abbrechen>-Buttons versehen wird.
+Das L<DlDialog>-Objekt selbst verwaltet nur verschiedene Widgets und WidgetGruppen.
+
+ DlWizzard
+
+gibt die Referenz auf einen L<DlWizzard>-Objekt zurück, das einen L<DlDialog>-Stack verwaltet, der die Abwicklung von Konfigurations- oder Abfragedialogen im Wizzard-Stil steuert. Auf dem Stapel werden L<DlDialog>-Objekte gesammelt, die in einer Kette abgearbeitet werden, eine einheitliche L<Hilfe>datei verwalten und mit den jeweils sinnvollen Steuerbuttons ausgestatet sind. Eingegebene Variablen bleiben beim Vor- und Zurückblättern erhalten und jeder einzelne Dialog kann eine L<Callback>routine zugeordnet bekommen, die aufgerufen wird, wenn der Dialog verlassen wird.
+
+=head2 Widgetklassen
+
+Um die Dialoge mit Inhalt zu füllen, stehen verschiedene Widgetklassen zur Verfügung. Dies sind in alphabetischer Reihenfolge
+
+ DlButton
+ DlButtonGroup
+ DlCheckList
+ DlComboBox
+ DlInputField
+ DlList
+ DlRadioList
+ DlWidgetGroup
+
+=head2 Hilfsklassen
+
+Dies sind Klassen, die von DlDialog-Objekten direkt verwaltet werden oder auch ohne Erstellung einer Instanz direkt aufgerufen werden können.
+
+ DlHelp
+
+verwaltet eine L<Hilfe>datei mit Kapiteln und Inhaltsverzeichniss.
+
+ DlMessage
+
+gibt einen einfachen Dialog aus für Mitteilungen oder Bestätigungen.
+
+=head1 Gebrauch
+
+Mit der Anweisung
+
+ use DlDialog; oder
+ use DlWizzard;
+
+werden im Perlscript alle Klassen zur Verfügung gestellt.
+
+=head1 Die Basisklassen im einzelnen
+
+=head2 DlDialog
+
+Ein DlDialog-Objekt wird mit I<show()> zur Anzeige gebracht und ist standardmäßig mit einem <Ok> und einem <Zurück>-Button ausgestattet. Wird der Dialog mit einer Hilfedatei verfnüpft, kommt noch ein <Hilfe>-Button dazu.
+
+Das Handling der Hilfedatei wird komplett innerhalb der Funktion abgewickelt, der Programmierer braucht also nur mit I<setHelp(F<helpfile>)> die Hilfe initiieren und vergessen.
+
+Der Aufruf von DlDialog->show gibt den Zustand des Dialogs als <SCALAR> zurück. Mögliche Zustande sind:
+
+ 'ok', 'back', 'cancel'
+
+L<Variablen>, die den einzelnen Widgets zugewiesen werden, sind nach der Beenigung des Dialogs in Scope des Aufrufers gültige Perlvarialblen.
+
+=head4 new($title, $orientation)
+
+Der Konstruktor legt eine neues DlDialogobjekt an, das den Titel I<$title> enthält und eine Referenz auf das erzeugte Objekt zurückgibt. I<$orientation> gibt die Ausrichtung des Dialogs an. Gültige Parameter sind 'r|row','c|col','f|form', Gross- und Kleinschreibung wird ignoriert, default ist 'col'.
+
+B<Rückgabewert:> Referenz auf das Objekt.
+
+=head4 setTitle($newtitle)
+
+Setzt den Titel des Dialogs auf I<$newtitle>.
+B<Rückgabewert:> Der alte Titel des Dialogs.
+
+=head4 getTitle()
+
+B<Rückgabewert:> Der Titel des Dialogs.
+
+=head4 setText($text)
+
+Setzt den einleitenden Text des Dialogs auf I<$text>.
+
+=head4 setImage($imagefile)
+
+Setzt das Bild auf der linken Seite des Dialogs auf I<$imagefile> und gibt das zuvor gesetzte Bild zurück. Default ist "DLD.xpm".
+
+=head4 getImage()
+
+Gibt das aktuell gesetzte Bild zurück.
+
+=head4 addGroup($a_widget, $pos)
+
+fügt dem Dialog das Widget I<$a_widget> als Nummer I<$pos> hinzu. Dies können DlWidgetGroup oder jedes andere Widget sein, die über eine Funktion B<getCode> verfügen, die einen gültigen dldialog-code zurückgibt. Ist I<$pos> nicht angegeben, wird das Widget hinten angefügt.
+
+B<Rückgabewert:> Referenznummer auf die hinzugefügte Gruppe.
+
+=head4 removeGroup($ref_nr)
+
+entfernt das Widget mit der Referenznummer (I<$ref_nr> aus dem Dialog.
+
+B<Rückgabewert:> Referenznummer der entfernten Gruppe oder 0 bei Fehlschlag.
+
+=head4 setHelp($helpfile)
+
+verknüpft den Dialog mit einer Hilfedatei. './' und '~/' werden expandiert.
+
+=head2 DlWizzard
+
+Das Konzept des DlWizzards wurde entwickelt, um die Abwicklung von Dialogen im Wizzard-Stil zu automatisieren und den Entwickler freizusetzen, sich auf den Inhalt der Dialoge zu konzentrieren. Ein weiterer Vortiel ist, dass die Gestaltung der Steuerbuttons und der Grundaufbau der Dialoge zentral verwaltet und dadurch einheitlich gestaltet ist.
+
+Der DlWizzard verwaltet einen Stack mit 'finite machines' DlDialog-Objekten.
+B<Hilfe> B<Zurück> B<Weiter> B<Ok> B<Abbrechen> sind intelligent angebracht wie Till vorgeschlagen hat.
+
+Der DlWizzard kann mit einer einfach aufgebauten L<Hilfe>datei verknüpft werden, die für alle Dialoge zentral verwaltet wird.
+
+Über L<Callback>routinen können die gesetzten Werte nach jedem '-exit' verarbeitet werden.
+
+Einzelne Dialoge können beliebig ein- und ausgeblendet werden.
+
+Der Aufbau einzelner Dialoge kann dynamisch gestaltet werden.
+
+
+
+=head3 Die einzelnen Funktionen von DlWizzard
+
+=head4 DlWizzard->new()
+
+gibt die Referenz auf einen neuen Wizard zurück
+
+=head4 DlWizzard->store(@dialoglist)
+
+Fügt dem Wizzard einen oder mehrere Dialoge hinzu. Werden die Dialoge einzeln hinzugefügt, gibt die Funktion eine Referenznummer zurück, die für die Funktionen B<hide> und B<unhide> benötigt werden.
+
+=head4 DlWizzard->setHelp($helpfile)
+
+bindet eine zentrale Hilfedatei I<$helpfile> ein. in die einzelnen Dialoge sollte dann keine separate Hilfe eingebunden werden. (siehe L<Hilfe>)
+
+=head4 DlWizzard->hide(@refnrs)
+
+schaltet einzelne oder mehrere Dialoge im Wizzard aus (z.B. um bei speziellen Eingaben sinnlose Seiten zu überspringen).
+
+=head4 DlWizzard->unhide(@refnrs)
+
+schaltet einen oder mehrere Dialoge wieder ein.
+
+=head4 DlWizzard->proceed()
+
+startet den Wizzard. Der Rückgabewert entspricht dem Beendigungszustand des letzten Dialoges und hat den Wert 'cancel' oder 'ok'.
+
+=head2 Callback
+
+ B<setCallback($callbackref)>
+
+Setzt die Callbackfunktion des Dialogs, die von DlWizzard beim Verlassen des DlDialogobjektes aufgerufen wird.
+I<$callbackref> ist dabei eine Referenz auf eine Funktion, die im Hauptprogramm (dort , wo der DlWizzard aufgerufen wird, als anonyme Subroutine deklariert ist.
+
+ $callbackref = sub {
+ do_this($widgetvar1);
+ do_that...}
+
+Innerhalb des Blocks kann auf alle L<Variablen> des Dialogs zugegriffen werden
+
+=head2 Variablen
+
+Den einzelnen Widgets können beim Einrichten Variablen zugeordnet werden indem der Variablenname als String übergeben wird. Ist im Scope des Aufrufers die Variable mit einem Wert versehen, so ist dieser Wert auch im Dialog bekannt. Umgekehrt sind die im Dialog zugeordneten Werte nach Beendigung des Dialogs im Scope des Aufrufers gesetzt. Zum Vergleich der Werte sollten die Referenzwerte verwendetwerden, die beim Einrichten eines Widgets zurückgegeben werden. B<Beispiel:>
+
+ $myradiolist = new DlRadioList('Titel','radiovar');
+ $choice1 = $myradiolist->insertButton('1. Wahl');
+ $choice2 = $myradiolist->insertButton('2. Wahl');
+ ...
+
+Nach Abarbeitung des Dialogs lässt sich der Zustand mit
+
+ if ($radiovar eq $choice1) {print "Sie haben die 1. Wahl getroffen\n"}
+
+verarbeiten. Mit der Syntax 'radiovar=3' lässt sich ein Defaultwert setzen, der jedoch bei jedem neuen Aufruf des Dialogs den gewählten Wert wieder überschreibt. Normalerweise sollten defaultwerte über die zugehörige Perl-variable gesetzt werden.(z.B. $radiavar=$choice2).
+
+B<Wichtig:> Da die Variablen beim Beenden eines Dialoges nur dann modifiziert werden, wenn ein Wert gesetzt wurde, sollten Variablen, die keine Werte in den Dialog transportieren, vor dem Aufruf mit undef oder einer Leerstringzuweisung entladen werden. (liegt an dldialog :-( )
+
+=head2 Hilfe
+
+Der Aufbau der Hilfedatei ist entsprechend Tills Vorschlag mit einfachen Tags gesteuert. B<Beispiel:>
+
+ <Title> Titel des Hilfedialogs bis zum Ende der Zeile
+ <Einführung>
+ Dies ist der Einführungstext bis zum nächsten Tag.
+ <Details>
+ Der Tag wird jedoch nur zum Beginn einer Zeile erkannt,
+ dieser <Tag> wird im Text normal wiedergegeben
+ <about> die Zeile hinter einem gültigen Tag wird ignoriert
+ ...
+
+erzeugt einen Hilfedialog mit dem gewünschten Titel, einer Combobox, in der die Kapitel 'Einführung', 'Details' und 'about' zur Auswahl angeboten werden.
+Im darunterliegenden Fenster wird der Text des gewählten Kapitels, defaultmässig das erste Kapitel, angezeigt. Die Auswahl wird beim L<DlWizzard> über alle Dialoge hinweg gespeichert.
+Eingebunden wird die Hilfe mit
+
+ DlDialog->setHelp($helpfile)
+
+bzw.
+
+ DlWizzard->setHelp($helpfile)
+
+=head1 Die Widgetklassen
+
+=head2 DlButton($text, $varname, $font, $fontsize, $fontcolor)
+
+gibt die Referenz auf einen Button zurück, der mit I<$text> beschriftet wird und bei Betätigung die Variable I<$$varname> auf '1' setzt. Mit I<$font, $fontsize, $fontcolor> können Schriftart, Schriftgrösse und Schriftfarbe des Buttons festgelegt werden.
+
+=head2 DlButtonGroup
+
+=head3 new($orient, $title, $titlepos, $varname, $height, $width)
+
+erstellt eine ButtonGruppe mit dem Titel I$<title>. I<$orient> setzt die Ausrichtung der ButtonGruppe, gültige Werte sind 'r|row|c|col'. I<$titlepos> bestimmt die Anordnung des Titels, gültige Werte sind 't|top|b|bottom|l|left|r|right'. I<$varname> setzt den Namen der RückgabeL<Variablen>. I<$height> und I<$width> setzen die Geometrie der ButtonGruppe.
+
+=head3 insertButton(@buttonlist)
+
+installiert einen oder mehrere Buttons mit den übergebenen Namen. Werden die Buttons einzeln installiert, ist der Rückgabewert eine Referenznummer auf den Button, die auch dem Rückgabewert der Variablen I<$$varname> entspricht. z.B:
+
+ $bgroup = new DlButtonGroup('Titel','pressed');
+ $chaos_pressed = $bgroup->insertButton('Chaos');
+ ...
+ if ($pressed eq $chaos_pressed) {print "Sie lieben das Chaos?\n"}
+
+=head3 removeButton($refnr)
+
+entfernt den Button mit der Referenznummer I<$refnr>.
+
+=head3 setTitle($newtitle)
+
+macht I<$newtitle> zum neuen Titel der ButtonGruppe und gibt den alten Titel zurück.
+
+=head3 getTitle()
+
+gibt den aktuellen Titel zurück
+
+=head3 setText($text, $pos)
+
+setzt einen Text in der ButtonGruppe auf I<$text>, defaultmässig vor den Buttons. Ist I<$pos> auf 'b|bottom|back' gesetzt, erscheint der Text nach den Buttons.
+
+=head3 setImage($ref, $image)
+
+setzt das Bild I<$image> für den mit I<$ref> referenzierten Button.
+
+=head2 DlChecklist
+
+=head3 new($title, $varname, $height, $width)
+
+erstellt eine Checkliste mit dem Titel I<$title>. I<$varname> setzt den Namen der RückgabeL<Variablen>. I<$height> und I<$width> setzen die Geometrie der Checkliste.
+
+=head3 setTitle($newtitle)
+
+macht I<$newtitle> zum neuen Titel der Checkliste und gibt den alten Titel zurück.
+
+=head3 getTitle()
+
+gibt den aktuellen Titel zurück
+
+=head3 setText($text, $pos)
+
+setzt einen Text in der Checkliste auf I<$text>, defaultmässig oben. Ist I<$pos> auf 'b|bottom' gesetzt, erscheint der Text nach den CheckButtons.
+
+=head3 insertButton(@buttonlist)
+
+installiert einen oder mehrere CheckButtons mit den übergebenen Namen. Werden die Buttons einzeln installiert, ist der Rückgabewert eine Referenznummer auf den Button, die auch dem Rückgabewert der Variablen I<$$varname> entspricht.
+
+=head3 removeButton($refnr)
+
+entfernt den CheckButton mit der Referenznummer I<$refnr>.
+
+=head2 DlComboBox
+
+=head3 new($title, $varname, $height, $width)
+
+erstellt eine Combobox mit dem Titel I<$title>. I<$varname> setzt den Namen der RückgabeL<Variablen>. I<$height> und I<$width> setzen die Geometrie der Checkliste.
+
+=head3 setTitle($newtitle)
+
+macht I<$newtitle> zum neuen Titel der Combobox und gibt den alten Titel zurück.
+
+=head3 getTitle()
+
+gibt den aktuellen Titel zurück
+
+=head3 setText($text, $pos)
+
+setzt einen Text in der Combobox auf I<$text>, defaultmässig oben. Ist I<$pos> auf 'b|bottom' gesetzt, erscheint der Text unten.
+
+=head3 insertItem{@items}
+
+fügt der Combobox einen oder mehrere Einträge hinzu. werden die Einträge einzeln hinzugefügt, ist der Rückgabewert eine Referenznummer auf den Eintrag.
+
+=head3 removeItem($refnr)
+
+entfernt den Eintrag mit der Referenznummer I<$refnr> aus der Combobox.
+
+=head3 getItem($refnr)
+
+gibt den Text des Eintrags mit der Referenznummer I<$refnr> zurück.
+
+=head3 clearItems()
+
+leert die Combobox.
+
+=head2 DlInputField
+
+=head3 new($title, $titlepos, $varname, $exit, $typ, $height, $width)
+
+erstellt ein Eingabefeld mit dem Titel I<$title>, I<$titlepos> gibt die Positiondes Titels an, gültige Werte sind 't|top|b|bottom|l|left|r|right'.
+I<$varname> setzt den Namen der RückgabeL<Variablen>. Ist I<$exit> gesetzt (nicht_null), beendet ein <Enter> nach der Eingabe den Dialog. Im LDlWizzard> wird der Dialog jedoch nicht weitergeschaltet, so dass die Eingabe in der L<Callback>funktion verarbeitet werden und ggf. der Dialog entsprechend verändert werden kann.
+I<$typ> gibt den Typ des Eingabefeldes an, gültige Werte sind hier 'p|passwd|n|numeric|i|ip'. Diese Angaben können auch kombiniert werden und sollten dann mit Leerstellen getrennt in I<$typ> übergeben werden (z.B. $typ = 'numeric passwd'). I<$height> und I<$width> setzen die Geometrie der Checkliste.
+Die Eingabe wird über die Variable I<$$varname> zurückgegeben.
+
+=head2 DlList
+
+=head3 new($title, $varname, $multi, $exit, $height, $width)
+
+erstellt eine Auswahlliste mit dem Titel I<$title>. I<$varname> setzt den Namen der RückgabeL<Variablen>. Ist I<$multi> gesetzt (nicht_null), ist eine mehrfachauswahl möglich. Ist I<$exit> gesetzt (nicht_null), beendet ein Doppelclick auf einen Listeneintrag den Dialog. Im LDlWizzard> wird der Dialog jedoch nicht weitergeschaltet, so dass die Eingabe in der L<Callback>funktion verarbeitet werden und ggf. der Dialog entsprechend verändert werden kann. I<$height> und I<$width> setzen die Geometrie der Checkliste.
+
+=head3 setTitle($newtitle)
+
+macht I<$newtitle> zum neuen Titel der Liste und gibt den alten Titel zurück.
+
+=head3 getTitle()
+
+gibt den aktuellen Titel zurück
+
+=head3 setText($text, $pos)
+
+setzt einen Text in der Liste auf I<$text>, defaultmässig oben. Ist I<$pos> auf 'b|bottom' gesetzt, erscheint der Text unten.
+
+=head3 setFont($index, $font)
+
+setzt den Zeichesatz des mit I<$index> indizierten Listeneintrags, ist I<$index> nicht angegeben, wird der Zeichensatz I<$font> als Standardzeichensatz gesetzt.
+
+=head3 setFontSize($index, $fontsize)
+
+setzt den Zeichesatz des mit I<$index> indizierten Listeneintrags auf die angegebene Größe, ist I<$index> nicht angegeben, wird I<$fontsize> als Standardgröße gesetzt.
+
+=head3 setColor($index, $color)
+
+setzt die Schriftfarbe des mit I<$index> indizierten Listeneintrags, ist I<$index> nicht angegeben, wird I<$color> als Standardfarbe verwenden. I<$color> kann dabei mit den üblichen Farbbezeichnungen 'darkblue' , 'yellow'... oder als hexadezimal codierte Farbe wie in HTML, z.B. '#F0459F' angegeben werden.
+
+=head3 setImage($index, $color)
+
+setzt ein Bild vor dem mit I<$index> indizierten Listeneintrag.
+
+=head3 insertItem{@items}
+
+fügt der Auswahlliste einen oder mehrere Einträge hinzu. werden die Einträge einzeln hinzugefügt, ist der Rückgabewert eine Referenznummer auf den Eintrag.
+
+=head3 removeItem($refnr)
+
+entfernt den Eintrag mit der Referenznummer I<$refnr> aus der Auswahlliste.
+
+=head3 getItem($refnr)
+
+gibt den Eintrag selbst zurück.
+
+=head3 getList()
+
+gibt eine Referenz auf ein Array zurück, dass den aktuellen Inhalt der Auswahlliste enthält.
+
+=head3 clear()
+
+leert die Auswahlliste.
+
+=head2 DlRadioList
+
+=head3 new($title, $varname, $height, $width)
+
+erstellt eine Liste von Radiobuttons mit dem Titel I<$title>. I<$varname> setzt den Namen der RückgabeL<Variablen>. I<$height> und I<$width> setzen die Geometrie der Radioliste.
+
+=head3 setTitle($newtitle)
+
+macht I<$newtitle> zum neuen Titel der Radioliste und gibt den alten Titel zurück.
+
+=head3 getTitle()
+
+gibt den aktuellen Titel zurück
+
+=head3 setText($text, $pos)
+
+setzt einen Text in der Liste auf I<$text>, defaultmässig oben. Ist I<$pos> auf 'b|bottom' gesetzt, erscheint der Text unten.
+
+=head3 insertButton(@buttonlist)
+
+installiert einen oder mehrere RadioButtons mit den übergebenen Namen. Werden die Buttons einzeln installiert, ist der Rückgabewert eine Referenznummer auf den Button, die auch dem Rückgabewert der Variablen I<$$varname> entspricht.
+
+=head3 removeButton($refnr)
+
+entfernt den RadioButton mit der Referenznummer I<$refnr>.
+
+
+=head2 DlWidgetGroup
+
+DlWidgetGroup dient eigentlich nur der Gruppierung verschiedener Widgets, die damit zusammengefasst werden.
+
+=head3 new($orient, $title, $height, $width)
+
+erzeugt eine neue Widgetgruppe mit dem Titel I<$title> und der Ausrichtung I<$orient>, gültige Werte für I<$orient> sind 'r|row|c|col'. I<$height> und I<$width> setzen die Geometrie der Widgetgruppe.
+
+=head3 setTitle($newtitle)
+
+macht I<$newtitle> zum neuen Titel der Widgetgruppe und gibt den alten Titel zurück.
+
+=head3 getTitle()
+
+gibt den aktuellen Titel zurück
+
+=head3 setText($text, $pos)
+
+setzt einen Text in der Widgetgruppe auf I<$text>, defaultmässig oben. Ist I<$pos> auf 'b|bottom' gesetzt, erscheint der Text unten.
+
+=head3 setImage($image, $pos)
+
+fügt der WidgetGroup ein Bild hinzu. I<$pos> ist dabei optional, gültige Werte für I<$pos> sind 't|top|b|bottom', default 'top'.
+
+=head3 insertElement(@widgets)
+
+fügt ein oder mehrere Widgets in die Widgetgruppe ein.
+
+=head2 DlMessage
+
+=head3 DlMessage->show($title,$text,$typ,$height,$width)
+
+zeigt eine MessageBox mit dem Titet I<$title> und dem Text I<$text>. I<$typ> legt dabei die Art der MessageBox fest. Mögliche Typen sind:
+
+'j|ja|y|yes' für yes|no-Boxen. Rückgabewert bei diesem Typ ist 'yes' oder 'no'.
+
+'b|break' für break|continue-Boxen. Rückgabewert bei diesem Typ ist 'break' oder 'continue'.
+
+anderenfalls gibt es nur einen 'Zurück'-Button und den Rückgabewert 'back'.
+
+Ein Verwendungsbeispiel aus der Shell
+
+ /usr/bin/perl -e 'use DlDialog; DlMessage->show('Hallo Welt','Hier bin Ich')'
+
+=head1 Beispielscript:
+
+siehe beiliegendes 'test.dl'
+
+=head1 AUTHORS
+
+Thomas Hagedorn<tom@delix.de>.
+
diff --git a/dldialog/perl/doc/DlDialog.tex b/dldialog/perl/doc/DlDialog.tex
new file mode 100644
index 0000000..08bc10f
--- /dev/null
+++ b/dldialog/perl/doc/DlDialog.tex
@@ -0,0 +1,360 @@
+% LaTeX document produced by pod2latex from "DlDialog.pod".
+% The followings need be defined in the preamble of this document:
+\def\C++{{\rm C\kern-.05em\raise.3ex\hbox{\footnotesize ++}}}
+\def\underscore{\leavevmode\kern.04em\vbox{\hrule width 0.4em height 0.3pt}}
+\setlength{\parindent}{0pt}
+\documentclass{article}
+\usepackage{a4,german}
+\usepackage[T1]{fontenc}
+\pagestyle{empty}
+\title{DlDialog.pm, Version 0.8}
+\author{Thomas Hagedorn}
+\date{\today}
+\begin{document}
+\maketitle
+\begin{abstract}
+Eine Wrapper-Suite für die Verwendung von dldialog unter Perl
+\end{abstract}
+\tableofcontents
+
+\section{DLDIALOG}
+
+\subsection{NAME}\begin{verbatim}
+ DlDialog.pm - Eine Wrapper-Suite für dldialog in Perl
+\end{verbatim}
+
+\subsection{SYNOPSIS}
+DlDialog ist eine Wrapper-Suite für den objektorienierten Aufbau von DlDialog-Widgets in Perl und stellt dazu vreschiedene Objekte bereit, die den Umgang und die Ablaufsteuerung weitgehend vereinfachen. Die Suite teilt sich dabei in 3 Beriche :
+
+\subsubsection{Basisklassen}%
+\index{Basisklassen}
+
+Für den Grundlegenden Dialogaufbau stehen 3 Klassen zur Verfügung
+\begin{verbatim}
+ DlDialog
+\end{verbatim}
+
+gibt die Referenz auf ein the {\em DlDialog\/} manpage-Objekt zurück, das automatisch mit den erforderlichen $<$Hilfe, Zurück, Weiter, Ok, Abbrechen$>$-Buttons versehen wird.
+Das the {\em DlDialog\/} manpage-Objekt selbst verwaltet nur verschiedene Widgets und WidgetGruppen.
+\begin{verbatim}
+ DlWizzard
+\end{verbatim}
+
+gibt die Referenz auf einen the {\em DlWizzard\/} manpage-Objekt zurück, das einen the {\em DlDialog\/} manpage-Stack verwaltet, der die Abwicklung von Konfigurations- oder Abfragedialogen im Wizzard-Stil steuert. Auf dem Stapel werden the {\em DlDialog\/} manpage-Objekte gesammelt, die in einer Kette abgearbeitet werden, eine einheitliche the {\em Hilfe\/} manpagedatei verwalten und mit den jeweils sinnvollen Steuerbuttons ausgestatet sind. Eingegebene Variablen bleiben beim Vor- und Zurückblättern erhalten und jeder einzelne Dialog kann eine the {\em Callback\/} manpageroutine zugeordnet bekommen, die aufgerufen wird, wenn der Dialog verlassen wird.
+
+\subsubsection{Widgetklassen}%
+\index{Widgetklassen}
+
+Um die Dialoge mit Inhalt zu füllen, stehen verschiedene Widgetklassen zur Verfügung. Dies sind in alphabetischer Reihenfolge
+\begin{verbatim}
+ DlButton
+ DlButtonGroup
+ DlCheckList
+ DlComboBox
+ DlInputField
+ DlList
+ DlRadioList
+ DlWidgetGroup
+\end{verbatim}
+
+\subsubsection{Hilfsklassen}%
+\index{Hilfsklassen}
+
+Dies sind Klassen, die von DlDialog-Objekten direkt verwaltet werden oder auch ohne Erstellung einer Instanz direkt aufgerufen werden können.
+\begin{verbatim}
+ DlHelp
+\end{verbatim}
+
+verwaltet eine the {\em Hilfe\/} manpagedatei mit Kapiteln und Inhaltsverzeichniss.
+\begin{verbatim}
+ DlMessage
+\end{verbatim}
+
+gibt einen einfachen Dialog aus für Mitteilungen oder Bestätigungen.
+
+\subsection{Gebrauch}%
+\index{Gebrauch}
+
+Mit der Anweisung
+\begin{verbatim}
+ use DlDialog;
+\end{verbatim}
+
+werden im Perlscript alle Klassen zur Verfügung gestellt.
+
+\subsection{Die Basisklassen im einzelnen}%
+\index{Die Basisklassen im einzelnen}
+
+\subsubsection{DlDialog}%
+\index{DlDialog}
+
+Ein DlDialog-Objekt wird mit {\em show()\/} zur Anzeige gebracht und ist standardmä"sig mit einem $<$Ok$>$ und einem $<$Zurück$>$-Button ausgestattet. Wird der Dialog mit einer Hilfedatei verfnüpft, kommt noch ein $<$Hilfe$>$-Button dazu.
+
+Das Handling der Hilfedatei wird komplett innerhalb der Funktion abgewickelt, der Programmierer braucht also nur mit I$<${\em setHelp\/}({\em helpfile\/})$>$ die Hilfe initiieren und vergessen.
+
+Den Rückkehrstatus eines DlDialogs wird über die Variable {\em \$\underscore{}confirm\/} ausgewertet. Sie kann mit DlDialog-$>$\{ok\} und DlDialog-$>$\{back\} verglichen werden.
+
+the {\em Variablen\/} manpage, die den einzelnen Widgets zugewiesen werden, sind nach der Beenigung des Dialogs in Scope des Aufrufers gültige Perlvarialblen.
+
+Der Konstruktor legt eine neues DlDialogobjekt an, das den Titel {\em \$title\/} enthält und eine Referenz auf das erzeugte Objekt zurückgibt. {\em \$orientation\/} gibt die Ausrichtung des Dialogs an. Gültige Parameter sind 'r$|$row','c$|$col','f$|$form', Gross- und Kleinschreibung wird ignoriert, default ist 'col'.
+
+{\bf Rückgabewert:} Referenz auf das Objekt.
+
+Setzt den Titel des Dialogs auf {\em \$newtitle\/}.
+{\bf Rückgabewert:} Der alte Titel des Dialogs.
+
+{\bf Rückgabewert:} Der Titel des Dialogs.
+
+Setzt den einleitenden Text des Dialogs auf {\em \$text\/}.
+
+fügt dem Dialog das Widget {\em \$a\underscore{}widget\/} als Nummer {\em \$pos\/} hinzu. Dies können DlWidgetGroup oder jedes andere Widget sein, die über eine Funktion {\bf getCode} verfügen, die einen gültigen dldialog-code zurückgibt. Ist {\em \$pos\/} nicht angegeben, wird das Widget hinten angefügt.
+
+{\bf Rückgabewert:} Referenznummer auf die hinzugefügte Gruppe.
+
+entfernt das Widget mit der Referenznummer ({\em \$ref\underscore{}nr\/} aus dem Dialog.
+
+{\bf Rückgabewert:} Referenznummer der entfernten Gruppe oder 0 bei Fehlschlag.
+
+verknüpft den Dialog mit einer Hilfedatei. './' und '$\tilde{\hspace{0.4em}}$/' werden expandiert.
+
+\subsubsection{DlWizzard}%
+\index{DlWizzard}
+
+Das Konzept des DlWizzards wurde entwickelt, um die Abwicklung von Dialogen im Wizzard-Stil zu automatisieren und den Entwickler freizusetzen, sich auf den Inhalt der Dialoge zu konzentrieren. Ein weiterer Vortiel ist, dass die Gestaltung der Steuerbuttons und der Grundaufbau der Dialoge zentral verwaltet und dadurch einheitlich gestaltet ist.
+
+Der DlWizzard verwaltet einen Stack mit 'finite machines' DlDialog-Objekten.
+{\bf Hilfe} {\bf Zurück} {\bf Weiter} {\bf Ok} {\bf Abbrechen} sind intelligent angebracht wie Till vorgeschlagen hat.
+
+Der DlWizzard kann mit einer einfach aufgebauten the {\em Hilfe\/} manpagedatei verknüpft werden, die für alle Dialoge zentral verwaltet wird.
+
+Über the {\em Callback\/} manpageroutinen können die gesetzten Werte nach jedem '$-$exit' verarbeitet werden.
+
+Einzelne Dialoge können beliebig ein- und ausgeblendet werden.
+
+Der Aufbau einzelner Dialoge kann dynamisch gestaltet werden.
+
+gibt die Referenz auf einen neuen Wizard zurück
+
+Fügt dem Wizzard einen oder mehrere Dialoge hinzu. Werden die Dialoge einzeln hinzugefügt, gibt die Funktion eine Referenznummer zurück, die für die Funktionen {\bf hide} und {\bf unhide} benötigt werden.
+
+bindet eine zentrale Hilfedatei {\em \$helpfile\/} ein. in die einzelnen Dialoge sollte dann keine separate Hilfe eingebunden werden. (siehe the {\em Hilfe\/} manpage)
+
+schaltet einzelne oder mehrere Dialoge im Wizzard aus (z.B. um bei speziellen Eingaben sinnlose Seiten zu überspringen).
+
+schaltet einen oder mehrere Dialoge wieder ein.
+
+startet den Wizzard. Der Rückgabewert entspricht dem Beendigungszustand des letzten Dialoges und hat den Wert 'cancel' oder 'ok'.
+
+\subsubsection{Callback}%
+\index{Callback}
+\begin{verbatim}
+ B<setCallback($callbackref)>
+\end{verbatim}
+
+Setzt die Callbackfunktion des Dialogs, die von DlWizzard beim Verlassen des DlDialogobjektes aufgerufen wird.
+{\em \$callbackref\/} ist dabei eine Referenz auf eine Funktion, die im Hauptprogramm (dort , wo der DlWizzard aufgerufen wird, als anonyme Subroutine deklariert ist.
+\begin{verbatim}
+ $callbackref = sub {
+ do_this($widgetvar1);
+ do_that...}
+\end{verbatim}
+
+Innerhalb des Blocks kann auf alle the {\em Variablen\/} manpage des Dialogs zugegriffen werden
+
+\subsubsection{Variablen}%
+\index{Variablen}
+
+Den einzelnen Widgets können beim Einrichten Variablen zugeordnet werden indem der Variablenname als String übergeben wird. Ist im Scope des Aufrufers die Variable mit einem Wert versehen, so ist dieser Wert auch im Dialog bekannt. Umgekehrt sind die im Dialog zugeordneten Werte nach Beendigung des Dialogs im Scope des Aufrufers gesetzt. Zum Vergleich der Werte sollten die Referenzwerte verwendetwerden, die beim Einrichten eines Widgets zurückgegeben werden. {\bf Beispiel:}
+\begin{verbatim}
+ $myradiolist = new DlRadioList('Titel','radiovar');
+ $choice1 = $myradiolist->insertButton('1. Wahl');
+ $choice2 = $myradiolist->insertButton('2. Wahl');
+ ...
+\end{verbatim}
+
+Nach Abarbeitung des Dialogs lässt sich der Zustand mit
+\begin{verbatim}
+ if ($radiovar eq $choice1) {
+ print "Sie haben die 1. Wahl getroffen\n"}
+\end{verbatim}
+
+verarbeiten. Mit der Syntax 'radiovar=3' lässt sich ein Defaultwert setzen, der jedoch bei jedem neuen Aufruf des Dialogs den gewählten Wert wieder überschreibt. Normalerweise sollten defaultwerte über die zugehörige Perl-variable gesetzt werden.(z.B. \$radiavar=\$choice2).
+
+{\bf Wichtig:} Da die Variablen beim Beenden eines Dialoges nur dann modifiziert werden, wenn ein Wert gesetzt wurde, sollten Variablen, die keine Werte in den Dialog transportieren, vor dem Aufruf mit undef oder einer Leerstringzuweisung entladen werden. (liegt an dldialog :-( )
+
+\subsubsection{Hilfe}%
+\index{Hilfe}
+
+Der Aufbau der Hilfedatei ist entsprechend Tills Vorschlag mit einfachen Tags gesteuert. {\bf Beispiel:}
+\begin{verbatim}
+ <Title> Titel des Hilfedialogs bis zum Ende der Zeile
+ <Einführung>
+ Dies ist der Einführungstext bis zum nächsten Tag.
+ <Details>
+ Der Tag wird jedoch nur zum Beginn einer Zeile erkannt,
+ dieser <Tag> wird im Text normal wiedergegeben
+ <about> die Zeile hinter einem gültigen Tag wird ignoriert
+ ...
+\end{verbatim}
+
+erzeugt einen Hilfedialog mit dem gewünschten Titel, einer Combobox, in der die Kapitel 'Einführung', 'Details' und 'about' zur Auswahl angeboten werden.
+Im darunterliegenden Fenster wird der Text des gewählten Kapitels, defaultmässig das erste Kapitel, angezeigt. Die Auswahl wird beim the {\em DlWizzard\/} manpage über alle Dialoge hinweg gespeichert.
+Eingebunden wird die Hilfe mit
+\begin{verbatim}
+ DlDialog->setHelp($helpfile)
+\end{verbatim}
+
+bzw.
+\begin{verbatim}
+ DlWizzard->setHelp($helpfile)
+\end{verbatim}
+
+\subsection{Die Widgetklassen}%
+\index{Die Widgetklassen}
+
+\subsubsection{DlButton(\$text, \$varname)}%
+\index{DlButton(\$text, \$varname)}
+
+gibt die Referenz auf einen Button zurück, der mit {\em \$text\/} beschriftet wird und bei Betätigung die Variable {\em \$\$varname\/} auf '1' setzt.
+
+\subsubsection{DlButtonGroup}%
+\index{DlButtonGroup}
+
+erstellt eine ButtonGruppe mit dem Titel I\$$<$title$>$. {\em \$orient\/} setzt die Ausrichtung der ButtonGruppe, gültige Werte sind 'r$|$row$|$c$|$col'. {\em \$titlepos\/} bestimmt die Anordnung des Titels, gültige Werte sind 't$|$top$|$b$|$bottom$|$l$|$left$|$r$|$right'. {\em \$varname\/} setzt den Namen der Rückgabethe {\em Variablen\/} manpage. {\em \$height\/} und {\em \$width\/} setzen die Geometrie der ButtonGruppe.
+
+installiert einen oder mehrere Buttons mit den übergebenen Namen. Werden die Buttons einzeln installiert, ist der Rückgabewert eine Referenznummer auf den Button, die auch dem Rückgabewert der Variablen {\em \$\$varname\/} entspricht. z.B:
+\begin{verbatim}
+ $bgroup = new DlButtonGroup('Titel','pressed');
+ $chaos_pressed = $bgroup->insertButton('Chaos');
+ ...
+ if ($pressed eq $chaos_pressed) {
+ print "Sie lieben das Chaos?\n"}
+\end{verbatim}
+
+entfernt den Button mit der Referenznummer {\em \$refnr\/}.
+
+macht {\em \$newtitle\/} zum neuen Titel der ButtonGruppe und gibt den alten Titel zurück.
+
+gibt den aktuellen Titel zurück
+
+setzt einen Text in der ButtonGruppe auf {\em \$text\/}, defaultmässig vor den Buttons. Ist {\em \$pos\/} auf 'b$|$bottom$|$back' gesetzt, erscheint der Text nach den Buttons.
+
+\subsubsection{DlChecklist}%
+\index{DlChecklist}
+
+erstellt eine Checkliste mit dem Titel {\em \$title\/}. {\em \$varname\/} setzt den Namen der Rückgabethe {\em Variablen\/} manpage. {\em \$height\/} und {\em \$width\/} setzen die Geometrie der Checkliste.
+
+macht {\em \$newtitle\/} zum neuen Titel der Checkliste und gibt den alten Titel zurück.
+
+gibt den aktuellen Titel zurück
+
+setzt einen Text in der Checkliste auf {\em \$text\/}, defaultmässig oben. Ist {\em \$pos\/} auf 'b$|$bottom' gesetzt, erscheint der Text nach den CheckButtons.
+
+installiert einen oder mehrere CheckButtons mit den übergebenen Namen. Werden die Buttons einzeln installiert, ist der Rückgabewert eine Referenznummer auf den Button, die auch dem Rückgabewert der Variablen {\em \$\$varname\/} entspricht.
+
+entfernt den CheckButton mit der Referenznummer {\em \$refnr\/}.
+
+\subsubsection{DlComboBox}%
+\index{DlComboBox}
+
+erstellt eine Combobox mit dem Titel {\em \$title\/}. {\em \$varname\/} setzt den Namen der Rückgabethe {\em Variablen\/} manpage. {\em \$height\/} und {\em \$width\/} setzen die Geometrie der Checkliste.
+
+macht {\em \$newtitle\/} zum neuen Titel der Combobox und gibt den alten Titel zurück.
+
+gibt den aktuellen Titel zurück
+
+setzt einen Text in der Combobox auf {\em \$text\/}, defaultmässig oben. Ist {\em \$pos\/} auf 'b$|$bottom' gesetzt, erscheint der Text unten.
+
+fügt der Combobox einen oder mehrere Einträge hinzu. werden die Einträge einzeln hinzugefügt, ist der Rückgabewert eine Referenznummer auf den Eintrag.
+
+entfernt den Eintrag mit der Referenznummer {\em \$refnr\/} aus der Combobox.
+
+gibt den Text des Eintrags mit der Referenznummer {\em \$refnr\/} zurück.
+
+leert die Combobox.
+
+\subsubsection{DlInputField}%
+\index{DlInputField}
+
+erstellt ein Eingabefeld mit dem Titel {\em \$title\/}, {\em \$titlepos\/} gibt die Positiondes Titels an, gültige Werte sind 't$|$top$|$b$|$bottom$|$l$|$left$|$r$|$right'.
+{\em \$varname\/} setzt den Namen der Rückgabethe {\em Variablen\/} manpage. Ist {\em \$exit\/} gesetzt (nicht\underscore{}null), beendet ein $<$Enter$>$ nach der Eingabe den Dialog. Im LDlWizzard$>$ wird der Dialog jedoch nicht weitergeschaltet, so dass die Eingabe in der the {\em Callback\/} manpagefunktion verarbeitet werden und ggf. der Dialog entsprechend verändert werden kann.
+{\em \$typ\/} gibt den Typ des Eingabefeldes an, gültige Werte sind hier 'p$|$passwd$|$n$|$numeric$|$i$|$ip'. Diese Angaben können auch kombiniert werden und sollten dann mit Leerstellen getrennt in {\em \$typ\/} übergeben werden (z.B. \$typ = 'numeric passwd'). {\em \$height\/} und {\em \$width\/} setzen die Geometrie der Checkliste.
+Die Eingabe wird über die Variable {\em \$\$varname\/} zurückgegeben.
+
+\subsubsection{DlList}%
+\index{DlList}
+
+erstellt eine Auswahlliste mit dem Titel {\em \$title\/}. {\em \$varname\/} setzt den Namen der Rückgabethe {\em Variablen\/} manpage. Ist {\em \$multi\/} gesetzt (nicht\underscore{}null), ist eine mehrfachauswahl möglich. Ist {\em \$exit\/} gesetzt (nicht\underscore{}null), beendet ein Doppelclick auf einen Listeneintrag den Dialog. Im LDlWizzard$>$ wird der Dialog jedoch nicht weitergeschaltet, so dass die Eingabe in der the {\em Callback\/} manpagefunktion verarbeitet werden und ggf. der Dialog entsprechend verändert werden kann. {\em \$height\/} und {\em \$width\/} setzen die Geometrie der Checkliste.
+
+macht {\em \$newtitle\/} zum neuen Titel der Liste und gibt den alten Titel zurück.
+
+gibt den aktuellen Titel zurück
+
+setzt einen Text in der Liste auf {\em \$text\/}, defaultmässig oben. Ist {\em \$pos\/} auf 'b$|$bottom' gesetzt, erscheint der Text unten.
+
+fügt der Auswahlliste einen oder mehrere Einträge hinzu. werden die Einträge einzeln hinzugefügt, ist der Rückgabewert eine Referenznummer auf den Eintrag.
+
+entfernt den Eintrag mit der Referenznummer {\em \$refnr\/} aus der Auswahlliste.
+
+gibt den Eintrag selbst zurück.
+
+gibt eine Referenz auf ein Array zurück, dass den aktuellen Inhalt der Auswahlliste enthält.
+
+leert die Auswahlliste.
+
+\subsubsection{DlRadioList}%
+\index{DlRadioList}
+
+erstellt eine Liste von Radiobuttons mit dem Titel {\em \$title\/}. {\em \$varname\/} setzt den Namen der Rückgabethe {\em Variablen\/} manpage. {\em \$height\/} und {\em \$width\/} setzen die Geometrie der Radioliste.
+
+macht {\em \$newtitle\/} zum neuen Titel der Radioliste und gibt den alten Titel zurück.
+
+gibt den aktuellen Titel zurück
+
+setzt einen Text in der Liste auf {\em \$text\/}, defaultmässig oben. Ist {\em \$pos\/} auf 'b$|$bottom' gesetzt, erscheint der Text unten.
+
+installiert einen oder mehrere RadioButtons mit den übergebenen Namen. Werden die Buttons einzeln installiert, ist der Rückgabewert eine Referenznummer auf den Button, die auch dem Rückgabewert der Variablen {\em \$\$varname\/} entspricht.
+
+entfernt den RadioButton mit der Referenznummer {\em \$refnr\/}.
+
+\subsubsection{DlWidgetGroup}%
+\index{DlWidgetGroup}
+
+DlWidgetGroup dient eigentlich nur der Gruppierung verschiedener Widgets, die damit zusammengefasst werden.
+
+erzeugt eine neue Widgetgruppe mit dem Titel {\em \$title\/} und der Ausrichtung {\em \$orient\/}, gültige Werte für {\em \$orient\/} sind 'r$|$row$|$c$|$col'. {\em \$height\/} und {\em \$width\/} setzen die Geometrie der Widgetgruppe.
+
+macht {\em \$newtitle\/} zum neuen Titel der Widgetgruppe und gibt den alten Titel zurück.
+
+gibt den aktuellen Titel zurück
+
+setzt einen Text in der Widgetgruppe auf {\em \$text\/}, defaultmässig oben. Ist {\em \$pos\/} auf 'b$|$bottom' gesetzt, erscheint der Text unten.
+
+fügt ein oder mehrere Widgets in die Widgetgruppe ein.
+
+\subsubsection{DlMessage}%
+\index{DlMessage}
+
+zeigt eine MessageBox mit dem Titet {\em \$title\/} und dem Text {\em \$text\/}. {\em \$typ\/} legt dabei die Art der MessageBox fest. Mögliche Typen sind:
+
+'j$|$ja$|$y$|$yes' für yes$|$no-Boxen. Rückgabewert bei diesem Typ ist 'yes' oder 'no'.
+
+'b$|$break' für break$|$continue-Boxen. Rückgabewert bei diesem Typ ist 'break' oder 'continue'.\\
+anderenfalls gibt es nur einen 'Zurück'-Button und den Rückgabewert 'back'.
+
+Ein Verwendungsbeispiel aus der Shell
+\begin{verbatim}
+ /usr/bin/perl -e 'use DlDialog;
+ DlMessage->show('Hallo Welt','Hier bin Ich')'
+\end{verbatim}
+
+\subsection{Beispielscript:}%
+\index{Beispielscript:}
+
+siehe beiliegendes 'test.dl'
+
+\subsection{AUTHORS}
+Thomas Hagedorn$<$tom@delix.de$>$.
+
+
+\end{document} \ No newline at end of file
diff --git a/dldialog/perl/doc/Makefile.am b/dldialog/perl/doc/Makefile.am
new file mode 100644
index 0000000..5ff81ab
--- /dev/null
+++ b/dldialog/perl/doc/Makefile.am
@@ -0,0 +1,25 @@
+#/*****************************************************************************
+#**
+#** $Id: Makefile.am,v 1.1 1999/05/28 09:36:59 harald Exp $
+#**
+#** 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.
+#**
+#** by Harald Hoyer (HarryH@Royal.Net)
+#** for delix Computer GmbH (http://www.delix.de)
+#**
+#*****************************************************************************/
+
+
+EXTRA_DIST = DlDialog.html DlDialog.pod DlDialog.tex
+
+perl_DATA = DlDialog.pod
+
+perldir = $(prefix)/lib/perl5/site_perl
+
+
+doc_DATA = DlDialog.html DlDialog.tex
+
+docdir = $(prefix)/doc/dldialog-@VERSION@/perlmodules
diff --git a/dldialog/perl/doc/Makefile.in b/dldialog/perl/doc/Makefile.in
new file mode 100644
index 0000000..ee5c4cd
--- /dev/null
+++ b/dldialog/perl/doc/Makefile.in
@@ -0,0 +1,281 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+#/*****************************************************************************
+#**
+#** $Id: Makefile.am,v 1.1 1999/05/28 09:36:59 harald Exp $
+#**
+#** 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.
+#**
+#** by Harald Hoyer (HarryH@Royal.Net)
+#** for delix Computer GmbH (http://www.delix.de)
+#**
+#*****************************************************************************/
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AS = @AS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CXX = @CXX@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
+GENCAT = @GENCAT@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+GUI_VERSION_INFO = @GUI_VERSION_INFO@
+HAVE_FINAL = @HAVE_FINAL@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+KDOC = @KDOC@
+LATEX = @LATEX@
+LEX = @LEX@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIBS = @QT_LIBS@
+RANLIB = @RANLIB@
+SGML2HTML = @SGML2HTML@
+TV_INCLUDES = @TV_INCLUDES@
+TV_LDFLAGS = @TV_LDFLAGS@
+TV_LIBS = @TV_LIBS@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+YACC = @YACC@
+l = @l@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+tv_includes = @tv_includes@
+tv_libraries = @tv_libraries@
+
+EXTRA_DIST = DlDialog.html DlDialog.pod DlDialog.tex
+
+perl_DATA = DlDialog.pod
+
+perldir = $(prefix)/lib/perl5/site_perl
+
+doc_DATA = DlDialog.html DlDialog.tex
+
+docdir = $(prefix)/doc/dldialog-@VERSION@/perlmodules
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES =
+DATA = $(doc_DATA) $(perl_DATA)
+
+DIST_COMMON = Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps perl/doc/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+install-docDATA: $(doc_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(docdir)
+ @list='$(doc_DATA)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(docdir)/$$p"; \
+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(docdir)/$$p; \
+ else if test -f $$p; then \
+ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(docdir)/$$p"; \
+ $(INSTALL_DATA) $$p $(DESTDIR)$(docdir)/$$p; \
+ fi; fi; \
+ done
+
+uninstall-docDATA:
+ @$(NORMAL_UNINSTALL)
+ list='$(doc_DATA)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(docdir)/$$p; \
+ done
+
+install-perlDATA: $(perl_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(perldir)
+ @list='$(perl_DATA)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(perldir)/$$p"; \
+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(perldir)/$$p; \
+ else if test -f $$p; then \
+ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(perldir)/$$p"; \
+ $(INSTALL_DATA) $$p $(DESTDIR)$(perldir)/$$p; \
+ fi; fi; \
+ done
+
+uninstall-perlDATA:
+ @$(NORMAL_UNINSTALL)
+ list='$(perl_DATA)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(perldir)/$$p; \
+ done
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = perl/doc
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-docDATA install-perlDATA
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-docDATA uninstall-perlDATA
+uninstall: uninstall-am
+all-am: Makefile $(DATA)
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(docdir) $(DESTDIR)$(perldir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-generic clean-am
+ -rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-generic distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: uninstall-docDATA install-docDATA uninstall-perlDATA \
+install-perlDATA tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/dldialog/perl/test.dl b/dldialog/perl/test.dl
new file mode 100755
index 0000000..dac169e
--- /dev/null
+++ b/dldialog/perl/test.dl
@@ -0,0 +1,113 @@
+#!/usr/bin/perl -I/home/tom/Delix-CVS/dld/delix/dldialog/perl
+####################################################
+#
+use DlWizzard;
+use Socket;
+use IPC::Open2;
+
+sub start_server { # starte dldialog-Server, falls erforderlich
+ unless ($ENV{DLDIALOG_INFIFO}) {
+ if ($ENV{XRUNS} eq 'yes') { $dialog_flag = '-q' }
+ else { $dialog_flag = '-t' }
+ $ret = `dldialog --start $dialog_flag -- -geometry 600x400`;
+ if ($ret =~ /=\"(.+)\"/) {
+ $ENV{DLDIALOG_INFIFO} = "$1";
+ print "started at $ENV{DLDIALOG_INFIFO}\n";
+ }
+ }
+}
+
+sub stop_server { ### stopt den dldialog-server
+ socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!";
+ connect(SOCK, sockaddr_un($ENV{DLDIALOG_INFIFO})) or die "connect $!";
+ $dialog = " dld_stop;\n";
+ print "Killing $ENV{DLDIALOG_INFIFO}\n";
+ print SOCK $dialog;
+ exit 0;
+}
+
+
+# Callback für Dialog 1
+$callme1 = sub {
+ if ($mybutton_pressed) {
+ undef $mybutton_pressed;
+ $dialog1->removeGroup($b1);
+ $dir = $fswidget->getdir('/home/tom','','rpm','he','d');
+ print "Ergebniss: $dir:\n";
+ print "show_select is $show_select: sort_select is $sort_select\nfile_filter is $file_filter:\n";
+ $wizzard->unhide($d4);
+ }
+ $dialog2->setTitle("Grunddaten für $prename $myname");
+}; # dieses Semicolon ist zwingend erforderlich
+
+# Callback für Dialog 2
+$callme2 = sub {
+ if (($mycat) && ($mycat =~ /$dld_buyer/)) {
+ $wizzard->unhide($d3);
+ $wizzard->hide($d4);
+ }
+ if (($mycat) && (($mycat =~ /$net_support/) || ($mycat =~ /$lin_support/))) {
+ $wizzard->unhide($d4);
+ unless ($mycat =~ /$dld_buyer/) { $wizzard->hide($d3) }
+ }
+};
+
+$callme3 = sub {
+ if ($button_restore) {
+ undef $button_restore;
+ $dialog1->addGroup($mybutton,$b1);
+ $dir = $fswidget->getfile();
+ print "Ergebniss: $dir:\n";
+ }
+};
+
+$callme4 = sub {
+ print "this is the last Callback function\n";
+};
+
+
+$wizzard = new DlWizzard();
+$wizzard->setHelp("./test.hlp");
+# Dialog 1 zusammensetzen
+$dialog1 = new DlDialog("Kundendatei");
+$mybutton = new DlButton('Dieser Button entfernt sich bei Betätigung\nund startet einen DateiAuswahlDialog','mybutton_pressed');
+my $inputgroup = new DlWidgetGroup('col', 'Anschrift',100,30);
+my $subgroup = new DlWidgetGroup('row');
+$inputgroup->setText('Bitte geben Sie die Anschrift\n des Kunden ein');
+my $namefield = new DlInputField('Name','links','myname');
+my $prenamefield = new DlInputField('Vorname','links','prename');
+my $plzfield = new DlInputField('Postleitzahl','links','myplz','','n');
+my $townfield = new DlInputField('Ortsname','links','mytown','n');
+my $streetfield = new DlInputField('Strasse und Hausnummer','l','mystreet','true');
+$subgroup->insertElement($plzfield,$townfield);
+$inputgroup->insertElement($namefield,$prenamefield,$subgroup,$streetfield);
+$b1 = $dialog1->addGroup($mybutton);
+$dialog1->addGroup($inputgroup);
+#Dialog 2 zusammensetzen
+$dialog2 = new DlDialog("der Zweite");
+my $secondgroup = new DlWidgetGroup('col','Kategorie');
+my $check_cat = new DlCheckList("Kundenkategorie",'mycat');
+$dld_buyer = $check_cat->insertButton('DLD-Käufer');
+$net_support = $check_cat->insertButton('Netzwerk-Kunde');
+$lin_support = $check_cat->insertButton('Linux Support');
+$secondgroup->insertElement($check_cat);
+$dialog2->addGroup($secondgroup);
+#Dialog 3 zusammensetzen
+$dialog3 = new DlDialog("Käufer");
+$dialog3->addGroup(DlButton->new('Wiederherstellung des Buttons von Seite 1\nund startet einen DateiAuswahlDialog','button_restore'));
+
+$dialog4 = new DlDialog("Support");
+#Wizzard zusammenbauen
+$d1 = $wizzard->store($dialog1,$callme1);
+$d2 = $wizzard->store($dialog2,$callme2);
+$d3 = $wizzard->store($dialog3,$callme3);
+$d4 = $wizzard->store($dialog4,$callme4);
+
+$fswidget = new DlFileSelect('Hallo Test');
+$showselect = '';
+$mycat = $net_support;
+start_server();
+my $result = $wizzard->proceed();
+print "Der Wizzard wurde beendet mit $result\nund showselect ist $showselect:\n";
+stop_server();
+
diff --git a/dldialog/perl/test.hlp b/dldialog/perl/test.hlp
new file mode 100644
index 0000000..2f97933
--- /dev/null
+++ b/dldialog/perl/test.hlp
@@ -0,0 +1,9 @@
+<title> Hilfetext zum Beispielprogramm
+<Einführung>
+Dieses Beispielprogramm ist nur dazu da, die Flexibilität
+des Widgetsets zu demonstrieren.
+<Todo>
+was noch zu tun ist, ist die Einbinding von Gauges, Bildern und ein Wrapper,
+um 'rohe' Dialoge in dldialog-Syntax einzugeben.
+<wie weiter>
+jetzt gibts dann bald einige dldadmin-Scripte mit DlWizzard.pm
diff --git a/dldialog/po/ChangeLog b/dldialog/po/ChangeLog
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/dldialog/po/ChangeLog
diff --git a/dldialog/po/Makefile.in.in b/dldialog/po/Makefile.in.in
new file mode 100644
index 0000000..0307392
--- /dev/null
+++ b/dldialog/po/Makefile.in.in
@@ -0,0 +1,248 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+#
+# This file file be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = $(prefix)/@DATADIRNAME@
+localedir = $(datadir)/locale
+gnulocaledir = $(prefix)/share/locale
+gettextsrcdir = $(prefix)/share/gettext/po
+subdir = po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
+
+CC = @CC@
+GENCAT = @GENCAT@
+GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
+MSGMERGE = PATH=../src:$$PATH msgmerge
+
+DEFS = @DEFS@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+
+INCLUDES = -I.. -I$(top_srcdir)/intl
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+SOURCES = cat-id-tbl.c
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
+stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+INSTOBJEXT = @INSTOBJEXT@
+
+.SUFFIXES:
+.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
+
+.c.o:
+ $(COMPILE) $<
+
+.po.pox:
+ $(MAKE) $(PACKAGE).pot
+ $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
+
+.po.mo:
+ $(MSGFMT) -o $@ $<
+
+.po.gmo:
+ file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+ && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+ sed -f ../intl/po2msg.sed < $< > $*.msg \
+ && rm -f $@ && $(GENCAT) $@ $*.msg
+
+
+all: all-@USE_NLS@
+
+all-yes: cat-id-tbl.c $(CATALOGS)
+all-no:
+
+$(srcdir)/$(PACKAGE).pot: $(POTFILES)
+ $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
+ --add-comments --keyword=_ --keyword=N_ \
+ --files-from=$(srcdir)/POTFILES.in \
+ && test ! -f $(PACKAGE).po \
+ || ( rm -f $(srcdir)/$(PACKAGE).pot \
+ && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
+
+$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
+$(srcdir)/stamp-cat-id: $(PACKAGE).pot
+ rm -f cat-id-tbl.tmp
+ sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
+ | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
+ if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
+ rm cat-id-tbl.tmp; \
+ else \
+ echo cat-id-tbl.c changed; \
+ rm -f $(srcdir)/cat-id-tbl.c; \
+ mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
+ fi
+ cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
+
+
+install: install-exec install-data
+install-exec:
+install-data: install-data-@USE_NLS@
+install-data-no: all
+install-data-yes: all
+ if test -r "$(MKINSTALLDIRS)"; then \
+ $(MKINSTALLDIRS) $(datadir); \
+ else \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
+ fi
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ case "$$cat" in \
+ *.gmo) destdir=$(gnulocaledir);; \
+ *) destdir=$(localedir);; \
+ esac; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$$destdir/$$lang/LC_MESSAGES; \
+ if test -r "$(MKINSTALLDIRS)"; then \
+ $(MKINSTALLDIRS) $(DESTDIR)$$dir; \
+ else \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$$dir; \
+ fi; \
+ if test -r $$cat; then \
+ $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+ "$(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+ $(INSTALL_DATA) $$cat.m $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $$cat.m as $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+ $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+ "$(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+ fi; \
+ done
+ if test "$(PACKAGE)" = "gettext"; then \
+ if test -r "$(MKINSTALLDIRS)"; then \
+ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
+ else \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
+ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
+ else \
+ : ; \
+ fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ done
+ rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in
+
+check: all
+
+cat-id-tbl.o: ../intl/libgettext.h
+
+dvi info tags TAGS ID:
+
+mostlyclean:
+ rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f $(GMOFILES)
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: update-po $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ for file in $$dists; do \
+ ln $(srcdir)/$$file $(distdir) 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir); \
+ done
+
+update-po: Makefile
+ $(MAKE) $(PACKAGE).pot
+ PATH=`pwd`/../src:$$PATH; \
+ cd $(srcdir); \
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ mv $$lang.po $$lang.old.po; \
+ echo "$$lang:"; \
+ if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
+ rm -f $$lang.old.po; \
+ else \
+ echo "msgmerge for $$cat failed!"; \
+ rm -f $$lang.po; \
+ mv $$lang.old.po $$lang.po; \
+ fi; \
+ done
+
+POTFILES: POTFILES.in
+ ( if test 'x$(srcdir)' != 'x.'; then \
+ posrcprefix='$(top_srcdir)/'; \
+ else \
+ posrcprefix="../"; \
+ fi; \
+ rm -f $@-t $@ \
+ && (sed -e '/^#/d' -e '/^[ ]*$$/d' \
+ -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
+ | sed -e '$$s/\\$$//') > $@-t \
+ && chmod a-w $@-t \
+ && mv $@-t $@ )
+
+Makefile: Makefile.in.in ../config.status POTFILES
+ cd .. \
+ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
+ $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/dldialog/po/POTFILES.in b/dldialog/po/POTFILES.in
new file mode 100644
index 0000000..ebc9b97
--- /dev/null
+++ b/dldialog/po/POTFILES.in
@@ -0,0 +1,3 @@
+src/dldialog.cc
+src/DLD_QT/dld_image.cc
+src/DLD_TV/dld_tvapp.cc
diff --git a/dldialog/po/cat-id-tbl.c b/dldialog/po/cat-id-tbl.c
new file mode 100644
index 0000000..b261a17
--- /dev/null
+++ b/dldialog/po/cat-id-tbl.c
@@ -0,0 +1,53 @@
+/* Automatically generated by po2tbl.sed from dldialog.pot. */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "libgettext.h"
+
+const struct _msg_ent _msg_tbl[] = {
+ {"", 1},
+ {"Usage: ", 2},
+ {"\
+ [OPTIONS]\n\
+\n\
+OPTIONS:\n\
+\t-f, --file \tread input from file, rather than from stdin\n", 3},
+ {"\t-q, --qt \tstart with Qt (X11) interface\n", 4},
+ {"\t-t, --tv \tstart with tvision (terminal) interface\n", 5},
+ {"\
+\t-T, --title \tsets the window title to the next argument\n\
+\t-p, --parse \tparse only to check input\n\
+\t-b, --start \tstart dldialog server\n\
+\t-e, --stop \tstop dldialog server\n\
+\t-w, --wait \twait for dldialog server to end\n\
+\t-d, --debug \tdisplays debugging output\n\
+\t-v, --version \tdisplay version information and exit\n\
+\t-h, --help \tdisplay this help and exit\n\
+\n", 6},
+ {" tried!", 7},
+ {"Sending start", 8},
+ {"Waiting for ok", 9},
+ {"Sending stop", 10},
+ {"Sending client {", 11},
+ {"Sending }", 12},
+ {"Getting output pipe", 13},
+ {" is no output pipe", 14},
+ {"Opening output pipe ", 15},
+ {"Reading output pipe ", 16},
+ {"Deleting output pipe ", 17},
+ {"dldialog version ", 18},
+ {"\
+\tby Harald Hoyer (HarryH@Royal.Net)\n\
+\tfor delix Computer GmbH (http://www.delix.de)\n", 19},
+ {"DLD_PRELOAD not specified!", 20},
+ {"Another mode was already selected!", 21},
+ {"QT support not compiled in!", 22},
+ {"TVision support not compiled in!", 23},
+ {"Try `", 24},
+ {" could not be loaded", 25},
+ {"SPACE selects - TAB to move -", 26},
+};
+
+int _msg_tbl_length = 26;
diff --git a/dldialog/po/de.gmo b/dldialog/po/de.gmo
new file mode 100644
index 0000000..f853e86
--- /dev/null
+++ b/dldialog/po/de.gmo
Binary files differ
diff --git a/dldialog/po/de.po b/dldialog/po/de.po
new file mode 100644
index 0000000..10e18ce
--- /dev/null
+++ b/dldialog/po/de.po
@@ -0,0 +1,148 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: dldialog 1.0\n"
+"POT-Creation-Date: 2001-02-15 11:30+0100\n"
+"PO-Revision-Date: 1999-04-14 13:38+02:00\n"
+"Last-Translator: Harald Hoyer <harald@delix.de>\n"
+"Language-Team: de <harald@delix.de>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: src/dldialog.cc:88
+msgid "Usage: "
+msgstr "Aufruf: "
+
+#: src/dldialog.cc:88
+msgid ""
+" [OPTIONS]\n"
+"\n"
+"OPTIONS:\n"
+"\t-f, --file \tread input from file, rather than from stdin\n"
+msgstr ""
+" [Optionen]\n"
+"\n"
+"Optionen:\n"
+" -f, --file lese von Datei <file> anstatt von der "
+"Standardeingabe\n"
+
+#: src/dldialog.cc:92
+msgid "\t-q, --qt \tstart with Qt (X11) interface\n"
+msgstr " -q, --qt starte mit der QT (X11) Schnittstelle\n"
+
+#: src/dldialog.cc:95
+msgid "\t-t, --tv \tstart with tvision (terminal) interface\n"
+msgstr ""
+" -t, --tv starte mit der tvision (Terminal) Schnittstelle\n"
+
+#: src/dldialog.cc:97
+msgid ""
+"\t-T, --title \tsets the window title to the next argument\n"
+"\t-p, --parse \tparse only to check input\n"
+"\t-b, --start \tstart dldialog server\n"
+"\t-e, --stop \tstop dldialog server\n"
+"\t-w, --wait \twait for dldialog server to end\n"
+"\t-d, --debug \tdisplays debugging output\n"
+"\t-v, --version \tdisplay version information and exit\n"
+"\t-h, --help \tdisplay this help and exit\n"
+"\n"
+msgstr ""
+" -T, --title setzt den Fenstertitel auf das nächste Argument\n"
+" -p, --parse parst nur die Eingabe um den Syntax zu checken\n"
+" -b, --start startet den dldialog Server\n"
+" -e, --stop stoppt den dldialog Server\n"
+" -w, --wait wartet bis der dldialog Server sich beendet hat\n"
+" -d, --debug zeigt zusätzliche debugging Informationen an\n"
+" -v, --version zeigt Versionsinformationen an und beendet dldialog\n"
+" -h, --help zeigt diesen Hilfetext an und beendet dldialog\n"
+"\n"
+
+#: src/dldialog.cc:316 src/dldialog.cc:385
+msgid " tried!"
+msgstr " versucht!"
+
+#: src/dldialog.cc:324
+msgid "Sending start"
+msgstr "Sende start"
+
+#: src/dldialog.cc:331 src/dldialog.cc:364
+msgid "Waiting for ok"
+msgstr "Warte auf ok"
+
+#: src/dldialog.cc:357
+msgid "Sending stop"
+msgstr "Sende Stop"
+
+#: src/dldialog.cc:393
+msgid "Sending client {"
+msgstr "Klient: sende {"
+
+#: src/dldialog.cc:431
+msgid "Sending }"
+msgstr "Klient: sende }"
+
+#: src/dldialog.cc:447
+msgid "Getting output pipe"
+msgstr "Hole Ausgabe-Pipe"
+
+#: src/dldialog.cc:452
+msgid " is no output pipe"
+msgstr " ist keine Ausgabe-Pipe"
+
+#: src/dldialog.cc:459
+msgid "Opening output pipe "
+msgstr "Öffne Ausgabe-Pipe "
+
+#: src/dldialog.cc:466
+msgid "Reading output pipe "
+msgstr "Lese von Ausgabe-Pipe "
+
+#: src/dldialog.cc:473
+msgid "Deleting output pipe "
+msgstr "Lösche Ausgabe-Pipe "
+
+#: src/dldialog.cc:527 src/dldialog.cc:842
+msgid "dldialog version "
+msgstr "dldialog Version "
+
+#: src/dldialog.cc:528 src/dldialog.cc:843
+msgid ""
+"\tby Harald Hoyer (HarryH@Royal.Net)\n"
+"\tfor delix Computer GmbH (http://www.delix.de)\n"
+msgstr ""
+" von Harald Hoyer (harald@delix.de)\n"
+" für die delix Computer GmbH (http://www.delix.de)\n"
+
+#: src/dldialog.cc:549
+msgid "DLD_PRELOAD not specified!"
+msgstr "DLD_PRELOAD wurde nicht definiert!"
+
+#: src/dldialog.cc:562 src/dldialog.cc:580 src/dldialog.cc:593
+msgid "Another mode was already selected!"
+msgstr "Ein anderer Modus wurde schon ausgewählt (-q|-t)!"
+
+#: src/dldialog.cc:565
+msgid "QT support not compiled in!"
+msgstr "QT-Modus Unterstützung wurde nicht aktiviert beim Kompilieren!"
+
+#: src/dldialog.cc:583
+msgid "TVision support not compiled in!"
+msgstr "TVision-Modus Unterstützung wurde nicht aktiviert beim Kompilieren!"
+
+#: src/dldialog.cc:617 src/dldialog.cc:889
+msgid "Try `"
+msgstr "Versuche `"
+
+#: src/DLD_QT/dld_image.cc:116
+msgid " could not be loaded"
+msgstr " konnte nicht geladen werden"
+
+#. *new TStatusItem ("~Alt-X~ to Cancel!",
+#. kbAltX, cmDLDQuit) +
+#: src/DLD_TV/dld_tvapp.cc:180
+msgid "SPACE selects - TAB to move -"
+msgstr "LEERTASTE zum auswaehlen - TABULATOR zum wechseln -"
diff --git a/dldialog/po/dldialog.pot b/dldialog/po/dldialog.pot
new file mode 100644
index 0000000..50259cd
--- /dev/null
+++ b/dldialog/po/dldialog.pot
@@ -0,0 +1,132 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2001-02-15 11:30+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: ENCODING\n"
+
+#: src/dldialog.cc:88
+msgid "Usage: "
+msgstr ""
+
+#: src/dldialog.cc:88
+msgid ""
+" [OPTIONS]\n"
+"\n"
+"OPTIONS:\n"
+"\t-f, --file \tread input from file, rather than from stdin\n"
+msgstr ""
+
+#: src/dldialog.cc:92
+msgid "\t-q, --qt \tstart with Qt (X11) interface\n"
+msgstr ""
+
+#: src/dldialog.cc:95
+msgid "\t-t, --tv \tstart with tvision (terminal) interface\n"
+msgstr ""
+
+#: src/dldialog.cc:97
+msgid ""
+"\t-T, --title \tsets the window title to the next argument\n"
+"\t-p, --parse \tparse only to check input\n"
+"\t-b, --start \tstart dldialog server\n"
+"\t-e, --stop \tstop dldialog server\n"
+"\t-w, --wait \twait for dldialog server to end\n"
+"\t-d, --debug \tdisplays debugging output\n"
+"\t-v, --version \tdisplay version information and exit\n"
+"\t-h, --help \tdisplay this help and exit\n"
+"\n"
+msgstr ""
+
+#: src/dldialog.cc:316 src/dldialog.cc:385
+msgid " tried!"
+msgstr ""
+
+#: src/dldialog.cc:324
+msgid "Sending start"
+msgstr ""
+
+#: src/dldialog.cc:331 src/dldialog.cc:364
+msgid "Waiting for ok"
+msgstr ""
+
+#: src/dldialog.cc:357
+msgid "Sending stop"
+msgstr ""
+
+#: src/dldialog.cc:393
+msgid "Sending client {"
+msgstr ""
+
+#: src/dldialog.cc:431
+msgid "Sending }"
+msgstr ""
+
+#: src/dldialog.cc:447
+msgid "Getting output pipe"
+msgstr ""
+
+#: src/dldialog.cc:452
+msgid " is no output pipe"
+msgstr ""
+
+#: src/dldialog.cc:459
+msgid "Opening output pipe "
+msgstr ""
+
+#: src/dldialog.cc:466
+msgid "Reading output pipe "
+msgstr ""
+
+#: src/dldialog.cc:473
+msgid "Deleting output pipe "
+msgstr ""
+
+#: src/dldialog.cc:527 src/dldialog.cc:842
+msgid "dldialog version "
+msgstr ""
+
+#: src/dldialog.cc:528 src/dldialog.cc:843
+msgid ""
+"\tby Harald Hoyer (HarryH@Royal.Net)\n"
+"\tfor delix Computer GmbH (http://www.delix.de)\n"
+msgstr ""
+
+#: src/dldialog.cc:549
+msgid "DLD_PRELOAD not specified!"
+msgstr ""
+
+#: src/dldialog.cc:562 src/dldialog.cc:580 src/dldialog.cc:593
+msgid "Another mode was already selected!"
+msgstr ""
+
+#: src/dldialog.cc:565
+msgid "QT support not compiled in!"
+msgstr ""
+
+#: src/dldialog.cc:583
+msgid "TVision support not compiled in!"
+msgstr ""
+
+#: src/dldialog.cc:617 src/dldialog.cc:889
+msgid "Try `"
+msgstr ""
+
+#: src/DLD_QT/dld_image.cc:116
+msgid " could not be loaded"
+msgstr ""
+
+#. *new TStatusItem ("~Alt-X~ to Cancel!",
+#. kbAltX, cmDLDQuit) +
+#: src/DLD_TV/dld_tvapp.cc:180
+msgid "SPACE selects - TAB to move -"
+msgstr ""
diff --git a/dldialog/po/stamp-cat-id b/dldialog/po/stamp-cat-id
new file mode 100644
index 0000000..9788f70
--- /dev/null
+++ b/dldialog/po/stamp-cat-id
@@ -0,0 +1 @@
+timestamp
diff --git a/dldialog/src/DLD_GEN/Makefile.am b/dldialog/src/DLD_GEN/Makefile.am
new file mode 100644
index 0000000..3da4520
--- /dev/null
+++ b/dldialog/src/DLD_GEN/Makefile.am
@@ -0,0 +1,16 @@
+#/*****************************************************************************
+#**
+#** $Id: Makefile.am,v 1.4 2000/03/15 20:02:16 harald Exp $
+#**
+#** 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.
+#**
+#**
+#*****************************************************************************/
+lib_LTLIBRARIES = libdld_gen.la
+
+libdld_gen_la_SOURCES = dld_lib.cc dld_gengui.h
+libdld_gen_la_LDFLAGS = -export-dynamic -version-info @GUI_VERSION_INFO@
+
diff --git a/dldialog/src/DLD_GEN/Makefile.in b/dldialog/src/DLD_GEN/Makefile.in
new file mode 100644
index 0000000..e062dea
--- /dev/null
+++ b/dldialog/src/DLD_GEN/Makefile.in
@@ -0,0 +1,376 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+#/*****************************************************************************
+#**
+#** $Id: Makefile.am,v 1.4 2000/03/15 20:02:16 harald Exp $
+#**
+#** 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.
+#**
+#**
+#*****************************************************************************/
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AS = @AS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CXX = @CXX@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
+GENCAT = @GENCAT@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+GUI_VERSION_INFO = @GUI_VERSION_INFO@
+HAVE_FINAL = @HAVE_FINAL@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+KDOC = @KDOC@
+LATEX = @LATEX@
+LEX = @LEX@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIBS = @QT_LIBS@
+RANLIB = @RANLIB@
+SGML2HTML = @SGML2HTML@
+TV_INCLUDES = @TV_INCLUDES@
+TV_LDFLAGS = @TV_LDFLAGS@
+TV_LIBS = @TV_LIBS@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+YACC = @YACC@
+l = @l@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+tv_includes = @tv_includes@
+tv_libraries = @tv_libraries@
+
+lib_LTLIBRARIES = libdld_gen.la
+
+libdld_gen_la_SOURCES = dld_lib.cc dld_gengui.h
+libdld_gen_la_LDFLAGS = -export-dynamic -version-info @GUI_VERSION_INFO@
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(lib_LTLIBRARIES)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I../..
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+libdld_gen_la_LIBADD =
+libdld_gen_la_OBJECTS = dld_lib.lo
+CXXFLAGS = @CXXFLAGS@
+CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON = Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+SOURCES = $(libdld_gen_la_SOURCES)
+OBJECTS = $(libdld_gen_la_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .cc .lo .o .s
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/DLD_GEN/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-libLTLIBRARIES:
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+
+distclean-libLTLIBRARIES:
+
+maintainer-clean-libLTLIBRARIES:
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(libdir)
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
+ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
+ else :; fi; \
+ done
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
+ done
+
+.c.o:
+ $(COMPILE) -c $<
+
+.s.o:
+ $(COMPILE) -c $<
+
+.S.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+libdld_gen.la: $(libdld_gen_la_OBJECTS) $(libdld_gen_la_DEPENDENCIES)
+ $(CXXLINK) -rpath $(libdir) $(libdld_gen_la_LDFLAGS) $(libdld_gen_la_OBJECTS) $(libdld_gen_la_LIBADD) $(LIBS)
+.cc.o:
+ $(CXXCOMPILE) -c $<
+.cc.lo:
+ $(LTCXXCOMPILE) -c $<
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = src/DLD_GEN
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+dld_lib.lo dld_lib.o : dld_lib.cc ../dld_lib.h ../../config.h \
+ dld_gengui.h ../dld_gui.h ../dld_out.h ../dld_button.h \
+ ../dld_obj.h ../dld_checkbutton.h ../dld_checklist.h \
+ ../dld_col.h ../dld_container.h ../dld_combobox.h \
+ ../dld_comboitem.h ../dld_dialog.h ../dld_form.h ../dld_gauge.h \
+ ../dld_image.h ../dld_input.h ../dld_list.h ../dld_listitem.h \
+ ../dld_menu.h ../dld_parser.h ../dld_parser_yacc.h \
+ ../dld_radiobutton.h ../dld_radiolist.h ../dld_row.h \
+ ../dld_text.h ../dld_textbox.h
+
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am: install-libLTLIBRARIES
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-libLTLIBRARIES
+uninstall: uninstall-am
+all-am: Makefile $(LTLIBRARIES)
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(libdir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \
+ mostlyclean-libtool mostlyclean-tags \
+ mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-libLTLIBRARIES clean-compile clean-libtool clean-tags \
+ clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-libLTLIBRARIES distclean-compile \
+ distclean-libtool distclean-tags distclean-generic \
+ clean-am
+ -rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-libLTLIBRARIES \
+ maintainer-clean-compile maintainer-clean-libtool \
+ maintainer-clean-tags maintainer-clean-generic \
+ distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
+clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
+uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
+distclean-compile clean-compile maintainer-clean-compile \
+mostlyclean-libtool distclean-libtool clean-libtool \
+maintainer-clean-libtool tags mostlyclean-tags distclean-tags \
+clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
+check-am installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/dldialog/src/DLD_GEN/dld_gengui.h b/dldialog/src/DLD_GEN/dld_gengui.h
new file mode 100644
index 0000000..0353f86
--- /dev/null
+++ b/dldialog/src/DLD_GEN/dld_gengui.h
@@ -0,0 +1,279 @@
+/******************************************************************************
+**
+** $Id: dld_gengui.h,v 1.13 2000/03/15 20:02:16 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#ifndef DLD_GENGUI_H
+#define DLD_GENGUI_H
+
+#include "../dld_gui.h"
+#include "../dld_button.h"
+#include "../dld_checkbutton.h"
+#include "../dld_checklist.h"
+#include "../dld_col.h"
+#include "../dld_combobox.h"
+#include "../dld_comboitem.h"
+#include "../dld_container.h"
+#include "../dld_dialog.h"
+#include "../dld_form.h"
+#include "../dld_gauge.h"
+#include "../dld_image.h"
+#include "../dld_input.h"
+#include "../dld_lib.h"
+#include "../dld_list.h"
+#include "../dld_listitem.h"
+#include "../dld_menu.h"
+#include "../dld_obj.h"
+#include "../dld_out.h"
+#include "../dld_parser.h"
+#include "../dld_parser_yacc.h"
+#include "../dld_radiobutton.h"
+#include "../dld_radiolist.h"
+#include "../dld_row.h"
+#include "../dld_text.h"
+#include "../dld_textbox.h"
+#include <stack>
+
+class DLD_GENObj : public virtual DLD_Obj {
+public:
+ DLD_GENObj(DLD_Dialog *parent);
+
+ virtual ~DLD_GENObj();
+
+ virtual void set_exit(bool flag);
+
+ virtual void widthP (unsigned int _w);
+
+ virtual void heightP(unsigned int _h);
+
+ virtual void activate();
+};
+
+class DLD_GENListItem : public virtual DLD_ListItem , public virtual DLD_GENObj {
+public:
+ DLD_GENListItem(DLD_Dialog *parent) : DLD_GENObj(parent) {DLDdbg << "listitem" << endl;};
+ virtual ~DLD_GENListItem() {DLDdbg << "~listitem" << endl;};
+};
+
+class DLD_GENList : public virtual DLD_List, public virtual DLD_GENObj {
+public:
+ DLD_GENList(DLD_Dialog *parent) : DLD_GENObj(parent) {DLDdbg << "list" << endl;};
+ virtual ~DLD_GENList() {DLDdbg << "~list" << endl;};
+
+ virtual DLD_ListItem * listitem (const string& name) {DLDdbg << name;DLD_GENListItem *p = new DLD_GENListItem(dialog);add_child(p);return p;};
+
+ virtual void set_multi(bool) {} ;
+
+ virtual void open_brace() {};
+
+ virtual void close_brace() {};
+};
+
+class DLD_GENCheckButton : public virtual DLD_CheckButton, public virtual DLD_GENObj {
+public:
+ DLD_GENCheckButton(DLD_Dialog *parent) : DLD_GENObj(parent) {DLDdbg << "checkbutton" << endl;};
+ virtual ~DLD_GENCheckButton() {DLDdbg << "~checkbutton" << endl;};
+};
+
+class DLD_GENCheckList : public virtual DLD_GENObj, public virtual DLD_CheckList {
+public:
+ DLD_GENCheckList(DLD_Dialog *parent) : DLD_GENObj(parent) {DLDdbg << "checklist" << endl;};
+ virtual ~DLD_GENCheckList() {DLDdbg << "~checklist" << endl;};
+
+ virtual DLD_CheckButton *checkbutton(const string&) {DLD_GENCheckButton *p = new DLD_GENCheckButton(dialog);add_child(p);return p;};
+
+ virtual void open_brace() {};
+
+ virtual void close_brace() {};
+};
+
+class DLD_GENRadioButton : public virtual DLD_GENObj, public virtual DLD_RadioButton {
+public:
+ DLD_GENRadioButton(DLD_Dialog *parent) : DLD_GENObj(parent) {};
+ virtual ~DLD_GENRadioButton() {};
+};
+
+class DLD_GENRadioList : public virtual DLD_GENObj, public virtual DLD_RadioList {
+public:
+ DLD_GENRadioList(DLD_Dialog *parent) : DLD_GENObj(parent) {};
+ virtual ~DLD_GENRadioList() {};
+
+ virtual DLD_RadioButton *radiobutton(const string&) {DLD_GENRadioButton *p = new DLD_GENRadioButton(dialog);add_child(p);return p;};
+
+ virtual void open_brace() {};
+
+ virtual void close_brace() {};
+};
+
+class DLD_GENComboItem : public virtual DLD_GENObj, public virtual DLD_ComboItem {
+public:
+ DLD_GENComboItem(DLD_Dialog *parent) : DLD_GENObj(parent) {};
+ virtual ~DLD_GENComboItem() {};
+};
+
+class DLD_GENComboBox : public virtual DLD_GENObj , public virtual DLD_ComboBox {
+public:
+ DLD_GENComboBox(DLD_Dialog *parent) : DLD_GENObj(parent) {};
+ virtual ~DLD_GENComboBox() {};
+
+ virtual DLD_ComboItem *comboitem(const string& = 0) {DLD_GENComboItem *p = new DLD_GENComboItem(dialog);add_child(p);return p;};
+
+ virtual void open_brace() {};
+
+ virtual void close_brace() {};
+};
+
+class DLD_GENText : public virtual DLD_GENObj, public virtual DLD_Text {
+public:
+ DLD_GENText(DLD_Dialog *parent) : DLD_GENObj(parent) {};
+ virtual ~DLD_GENText() {};
+};
+
+class DLD_GENButton : public virtual DLD_GENObj, public virtual DLD_Button {
+public:
+ DLD_GENButton(DLD_Dialog *parent) : DLD_GENObj(parent) {};
+ virtual ~DLD_GENButton() {};
+};
+
+class DLD_GENImage : public virtual DLD_GENObj, public virtual DLD_Image {
+public:
+ DLD_GENImage(DLD_Dialog *parent) : DLD_GENObj(parent) {};
+ virtual ~DLD_GENImage() {};
+};
+
+class DLD_GENGauge : public virtual DLD_GENObj, public virtual DLD_Gauge {
+public:
+ DLD_GENGauge(DLD_Dialog *parent) : DLD_GENObj(parent) {};
+ virtual ~DLD_GENGauge() {};
+ void set_progress(int) {};
+ void add_exec (const string&) {};
+};
+
+class DLD_GENTextBox : public virtual DLD_GENObj, public virtual DLD_TextBox {
+public:
+ DLD_GENTextBox(DLD_Dialog *parent) : DLD_GENObj(parent) {};
+ virtual ~DLD_GENTextBox() {};
+
+ virtual void set_filename(const string&) {};
+};
+
+class DLD_GENInput : public virtual DLD_GENObj, public virtual DLD_Input {
+public:
+ DLD_GENInput(DLD_Dialog *parent) : DLD_GENObj(parent) {};
+ virtual ~DLD_GENInput() {};
+
+ virtual void set_ip(bool) {};
+
+ virtual void set_passwd(bool) {};
+
+ virtual void set_numeric(bool) {};
+ virtual void set_length(int) {};
+};
+
+class DLD_GENMenu : public virtual DLD_GENObj, public virtual DLD_Menu {
+public:
+ DLD_GENMenu(DLD_Dialog *parent) : DLD_GENObj(parent) {};
+ virtual ~DLD_GENMenu() {};
+
+ virtual void set_global(bool) {};
+};
+
+class DLD_GENDialog;
+
+class DLD_GENContainer : public virtual DLD_GENObj, public virtual DLD_Container {
+public:
+ DLD_GENContainer(DLD_GENDialog *parent);
+ virtual ~DLD_GENContainer();
+ virtual DLD_Dialog *dialog (const string& name);
+ virtual DLD_Form * form (const string& name);
+ virtual DLD_Col * col (const string& name);
+ virtual DLD_Row * row (const string& name);
+ virtual DLD_List * list (const string& name);
+ virtual DLD_CheckList * checklist (const string& named);
+ virtual DLD_RadioList * radiolist (const string& name);
+ virtual DLD_ComboBox * combobox (const string& name );
+ virtual DLD_Text * text (const string& name );
+ virtual DLD_Button * button (const string& name );
+ virtual DLD_Gauge * gauge (const string& name );
+ virtual DLD_TextBox * textbox (const string& name );
+ virtual DLD_Input * input (const string& name );
+ virtual DLD_Image * image (const string& name );
+ virtual DLD_Menu * menu (const string& name , bool check = false);
+ virtual void open_brace() {};
+ virtual void close_brace() {};
+ DLD_GENDialog *pd;
+};
+
+class DLD_GENGui;
+
+class DLD_GENDialog : public DLD_GENContainer, public DLD_Dialog {
+public:
+ DLD_GENDialog(DLD_GENGui *parent, const DLD_Out _out);
+ virtual ~DLD_GENDialog();
+ DLD_Out out;
+ DLD_GENGui *app;
+};
+
+class DLD_GENCol : public virtual DLD_GENObj, public virtual DLD_GENContainer, public virtual DLD_Col {
+public:
+ DLD_GENCol(DLD_GENDialog *_parent) : DLD_GENObj(_parent),
+ DLD_GENContainer(_parent) {};
+ virtual ~DLD_GENCol() {};
+};
+
+class DLD_GENRow : public virtual DLD_GENObj, public virtual DLD_GENContainer, public virtual DLD_Row {
+public:
+ DLD_GENRow(DLD_GENDialog *parent) : DLD_GENObj(parent),
+ DLD_GENContainer(parent) {};
+ virtual ~DLD_GENRow() {};
+};
+
+class DLD_GENForm : public virtual DLD_GENObj, public virtual DLD_GENContainer, public virtual DLD_Form {
+public:
+ DLD_GENForm(DLD_GENDialog *parent) : DLD_GENObj(parent),
+ DLD_GENContainer(parent) {};
+ virtual ~DLD_GENForm() {};
+};
+
+class DLD_GENGui : public virtual DLD_Gui
+{
+public:
+ DLD_GENGui(const char *, int , char **) {};
+ ~DLD_GENGui() {};
+
+ DLD_Dialog *dialog (const string&, const DLD_Out& _out) {
+ DLD_GENDialog *p=new DLD_GENDialog(this, _out );
+ childs.push(p);
+ return p;
+ };
+
+ int exec () {
+ while(DLD_Gui::parse(-1)) {
+ DLD_GENObj *p;
+ while(!childs.empty()) {
+ p = childs.top();
+ delete p;
+ childs.pop();
+ }
+ }
+ cerr << "parsed" << endl << flush;
+ return 0;
+ };
+
+ const string& name (const string& newname) {return mname = newname;};
+ const string& name () {return mname;};
+ virtual int print_status (const string& txt) {cerr << txt << endl << flush; return 0;};
+ stack<DLD_GENObj *> childs;
+
+private:
+ string mname;
+};
+
+#endif
diff --git a/dldialog/src/DLD_GEN/dld_lib.cc b/dldialog/src/DLD_GEN/dld_lib.cc
new file mode 100644
index 0000000..eaebde9
--- /dev/null
+++ b/dldialog/src/DLD_GEN/dld_lib.cc
@@ -0,0 +1,139 @@
+/******************************************************************************
+**
+** $Id: dld_lib.cc,v 1.9 2000/03/15 20:02:16 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#include "../dld_lib.h"
+#include "dld_gengui.h"
+
+DLD_GENDialog::DLD_GENDialog(DLD_GENGui *parent, const DLD_Out _out) :
+ DLD_GENObj(this),
+ DLD_GENContainer(this), DLD_Dialog(parent, _out),
+ out(_out), app(parent)
+{
+ DLDdbg << "Creating dialog" << endl;
+ printvars = true;
+};
+
+DLD_GENDialog::~DLD_GENDialog()
+{
+ DLDdbg << "Destroying dialog" << endl;
+};
+
+DLD_Dialog *DLD_GENContainer::dialog (const string& name)
+{
+ DLD_GENDialog *p=new DLD_GENDialog(pd->app,pd->out);
+ pd->app->childs.push(p);
+ DLDdbg << name;
+ return p;
+};
+
+DLD_Form * DLD_GENContainer::form (const string& name)
+{
+ DLDdbg << name;DLD_GENForm *p = new DLD_GENForm(pd);add_child(p);return p;
+};
+
+DLD_Col * DLD_GENContainer::col (const string& name)
+{
+ DLDdbg << name;DLD_GENCol *p = new DLD_GENCol(pd);add_child(p);return p;
+};
+
+DLD_Row * DLD_GENContainer::row (const string& name)
+{
+ DLDdbg << name;DLD_GENRow *p = new DLD_GENRow(pd);add_child(p);return p;
+};
+
+DLD_List * DLD_GENContainer::list (const string& name)
+{
+ DLDdbg << name;DLD_GENList *p = new DLD_GENList(pd);add_child(p);return p;
+};
+
+DLD_CheckList * DLD_GENContainer::checklist (const string& name)
+{
+ DLDdbg << name;DLD_GENCheckList *p = new DLD_GENCheckList(pd);add_child(p);return p;
+};
+
+DLD_RadioList * DLD_GENContainer::radiolist (const string& name)
+{
+ DLDdbg << name;DLD_GENRadioList *p = new DLD_GENRadioList(pd);add_child(p);return p;
+};
+
+DLD_ComboBox * DLD_GENContainer::combobox (const string& name )
+{
+ DLDdbg << name;DLD_GENComboBox *p = new DLD_GENComboBox(pd);add_child(p);return p;
+};
+
+DLD_Text * DLD_GENContainer::text (const string& name )
+{
+ DLDdbg << name;DLD_GENText *p = new DLD_GENText(pd);add_child(p);return p;
+};
+
+DLD_Button * DLD_GENContainer::button (const string& name )
+{
+ DLDdbg << name;DLD_GENButton *p = new DLD_GENButton(pd);add_child(p);return p;
+};
+
+DLD_Image * DLD_GENContainer::image (const string& name )
+{
+ DLDdbg << name;DLD_GENImage *p = new DLD_GENImage(pd);add_child(p);return p;
+};
+
+DLD_Gauge * DLD_GENContainer::gauge (const string& name )
+{
+ DLDdbg << name;DLD_GENGauge *p = new DLD_GENGauge(pd);add_child(p);return p;
+};
+
+DLD_TextBox * DLD_GENContainer::textbox (const string& name )
+{
+ DLDdbg << name;DLD_GENTextBox *p = new DLD_GENTextBox(pd);add_child(p);return p;
+};
+
+DLD_Input * DLD_GENContainer::input (const string& name )
+{
+ DLDdbg << name;DLD_GENInput *p = new DLD_GENInput(pd);add_child(p);return p;
+};
+
+DLD_Menu * DLD_GENContainer::menu (const string& name , bool)
+{
+ DLDdbg << name;DLD_GENMenu *p = new DLD_GENMenu(pd);add_child(p);return p;
+};
+
+DLD_GENContainer::DLD_GENContainer(DLD_GENDialog *parent) :
+ DLD_GENObj(parent), pd(parent)
+{
+};
+
+DLD_GENContainer::~DLD_GENContainer() {};
+
+DLD_GENObj::DLD_GENObj(DLD_Dialog *parent)
+{
+ set_dialog(parent);
+ DLDdbg << "Creating obj" << endl;
+};
+
+DLD_GENObj::~DLD_GENObj()
+{
+ DLDdbg << "Destroying obj" << endl;
+};
+
+void DLD_GENObj::set_exit(bool) {};
+
+void DLD_GENObj::widthP (unsigned int) {};
+
+void DLD_GENObj::heightP(unsigned int) {};
+
+void DLD_GENObj::activate() {}
+
+
+extern "C" DLD_Gui *
+dld_lib_init (const char *name, int argc, char **argv)
+{
+ return (DLD_Gui *) new DLD_GENGui (name, argc, argv);
+}
diff --git a/dldialog/src/DLD_QT/Makefile.am b/dldialog/src/DLD_QT/Makefile.am
new file mode 100644
index 0000000..472203d
--- /dev/null
+++ b/dldialog/src/DLD_QT/Makefile.am
@@ -0,0 +1,50 @@
+#/*****************************************************************************
+#**
+#** $Id: Makefile.am,v 1.19 2000/03/15 20:02:16 harald Exp $
+#**
+#** 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.
+#**
+#**
+#*****************************************************************************/
+
+libdld_qt_la_LDFLAGS = -export-dynamic -version-info @GUI_VERSION_INFO@ @QT_LDFLAGS@ @X_LDFLAGS@
+libdld_qt_la_LIBADD = @QT_LIBS@
+
+INCLUDES = @QT_INCLUDES@
+
+m%.cc: %.h
+ @MOC@ $< -o $@
+
+if BUILDQT
+lib_LTLIBRARIES = libdld_qt.la
+libdld_qt_la_SOURCES = dld_lib.cc dld_qtlib.h \
+ dld_qtapp.cc dld_qtapp.h mdld_qtapp.cc \
+ dld_qtcontainer.cc dld_qtcontainer.h \
+ dld_dialog.cc dld_dialog.h mdld_dialog.cc \
+ dld_text.cc dld_text.h \
+ dld_button.cc dld_button.h mdld_button.cc \
+ dld_qtobj.cc dld_qtobj.h \
+ dld_row.cc dld_row.h \
+ dld_col.cc dld_col.h \
+ dld_form.cc dld_form.h \
+ dld_radio.cc dld_radio.h mdld_radio.cc \
+ dld_radiolist.cc dld_radiolist.h mdld_radiolist.cc \
+ dld_list.cc dld_list.h mdld_list.cc \
+ dld_listitem.cc dld_listitem.h \
+ dld_checklist.cc dld_checklist.h mdld_checklist.cc \
+ dld_check.cc dld_check.h mdld_check.cc \
+ dld_input.cc dld_input.h mdld_input.cc \
+ dld_textbox.cc dld_textbox.h \
+ dld_combobox.h dld_combobox.cc mdld_combobox.cc \
+ dld_comboitem.h dld_comboitem.cc \
+ dld_gauge.cc dld_gauge.h \
+ dld_image.cc dld_image.h mdld_image.cc
+
+clean-compile:
+ rm -f m*.cc
+
+endif
+
diff --git a/dldialog/src/DLD_QT/Makefile.in b/dldialog/src/DLD_QT/Makefile.in
new file mode 100644
index 0000000..e6bd1c7
--- /dev/null
+++ b/dldialog/src/DLD_QT/Makefile.in
@@ -0,0 +1,507 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+#/*****************************************************************************
+#**
+#** $Id: Makefile.am,v 1.19 2000/03/15 20:02:16 harald Exp $
+#**
+#** 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.
+#**
+#**
+#*****************************************************************************/
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AS = @AS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CXX = @CXX@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
+GENCAT = @GENCAT@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+GUI_VERSION_INFO = @GUI_VERSION_INFO@
+HAVE_FINAL = @HAVE_FINAL@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+KDOC = @KDOC@
+LATEX = @LATEX@
+LEX = @LEX@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIBS = @QT_LIBS@
+RANLIB = @RANLIB@
+SGML2HTML = @SGML2HTML@
+TV_INCLUDES = @TV_INCLUDES@
+TV_LDFLAGS = @TV_LDFLAGS@
+TV_LIBS = @TV_LIBS@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+YACC = @YACC@
+l = @l@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+tv_includes = @tv_includes@
+tv_libraries = @tv_libraries@
+
+libdld_qt_la_LDFLAGS = -export-dynamic -version-info @GUI_VERSION_INFO@ @QT_LDFLAGS@ @X_LDFLAGS@
+libdld_qt_la_LIBADD = @QT_LIBS@
+
+INCLUDES = @QT_INCLUDES@
+
+@BUILDQT_TRUE@lib_LTLIBRARIES = libdld_qt.la
+@BUILDQT_TRUE@libdld_qt_la_SOURCES = dld_lib.cc dld_qtlib.h dld_qtapp.cc dld_qtapp.h mdld_qtapp.cc dld_qtcontainer.cc dld_qtcontainer.h dld_dialog.cc dld_dialog.h mdld_dialog.cc dld_text.cc dld_text.h dld_button.cc dld_button.h mdld_button.cc dld_qtobj.cc dld_qtobj.h dld_row.cc dld_row.h dld_col.cc dld_col.h dld_form.cc dld_form.h dld_radio.cc dld_radio.h mdld_radio.cc dld_radiolist.cc dld_radiolist.h mdld_radiolist.cc dld_list.cc dld_list.h mdld_list.cc dld_listitem.cc dld_listitem.h dld_checklist.cc dld_checklist.h mdld_checklist.cc dld_check.cc dld_check.h mdld_check.cc dld_input.cc dld_input.h mdld_input.cc dld_textbox.cc dld_textbox.h dld_combobox.h dld_combobox.cc mdld_combobox.cc dld_comboitem.h dld_comboitem.cc dld_gauge.cc dld_gauge.h dld_image.cc dld_image.h mdld_image.cc
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(lib_LTLIBRARIES)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I../..
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+libdld_qt_la_DEPENDENCIES =
+@BUILDQT_TRUE@libdld_qt_la_OBJECTS = dld_lib.lo dld_qtapp.lo \
+@BUILDQT_TRUE@mdld_qtapp.lo dld_qtcontainer.lo dld_dialog.lo \
+@BUILDQT_TRUE@mdld_dialog.lo dld_text.lo dld_button.lo mdld_button.lo \
+@BUILDQT_TRUE@dld_qtobj.lo dld_row.lo dld_col.lo dld_form.lo \
+@BUILDQT_TRUE@dld_radio.lo mdld_radio.lo dld_radiolist.lo \
+@BUILDQT_TRUE@mdld_radiolist.lo dld_list.lo mdld_list.lo \
+@BUILDQT_TRUE@dld_listitem.lo dld_checklist.lo mdld_checklist.lo \
+@BUILDQT_TRUE@dld_check.lo mdld_check.lo dld_input.lo mdld_input.lo \
+@BUILDQT_TRUE@dld_textbox.lo dld_combobox.lo mdld_combobox.lo \
+@BUILDQT_TRUE@dld_comboitem.lo dld_gauge.lo dld_image.lo mdld_image.lo
+CXXFLAGS = @CXXFLAGS@
+CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON = Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+SOURCES = $(libdld_qt_la_SOURCES)
+OBJECTS = $(libdld_qt_la_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .cc .lo .o .s
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/DLD_QT/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-libLTLIBRARIES:
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+
+distclean-libLTLIBRARIES:
+
+maintainer-clean-libLTLIBRARIES:
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(libdir)
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
+ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
+ else :; fi; \
+ done
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
+ done
+
+.c.o:
+ $(COMPILE) -c $<
+
+.s.o:
+ $(COMPILE) -c $<
+
+.S.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+libdld_qt.la: $(libdld_qt_la_OBJECTS) $(libdld_qt_la_DEPENDENCIES)
+ $(CXXLINK) -rpath $(libdir) $(libdld_qt_la_LDFLAGS) $(libdld_qt_la_OBJECTS) $(libdld_qt_la_LIBADD) $(LIBS)
+.cc.o:
+ $(CXXCOMPILE) -c $<
+.cc.lo:
+ $(LTCXXCOMPILE) -c $<
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = src/DLD_QT
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+dld_button.lo dld_button.o : dld_button.cc dld_qtlib.h dld_button.h \
+ ../dld_button.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_qtobj.h dld_dialog.h ../dld_dialog.h ../dld_container.h \
+ ../dld_out.h dld_qtcontainer.h
+dld_check.lo dld_check.o : dld_check.cc dld_qtlib.h dld_check.h \
+ ../dld_checkbutton.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_qtobj.h dld_dialog.h ../dld_dialog.h ../dld_container.h \
+ ../dld_out.h dld_qtcontainer.h
+dld_checklist.lo dld_checklist.o : dld_checklist.cc dld_qtlib.h \
+ dld_checklist.h ../dld_checklist.h ../dld_obj.h ../dld_lib.h \
+ ../../config.h dld_qtobj.h dld_check.h ../dld_checkbutton.h \
+ dld_qtapp.h ../dld_gui.h ../dld_out.h dld_dialog.h \
+ ../dld_dialog.h ../dld_container.h dld_qtcontainer.h
+dld_col.lo dld_col.o : dld_col.cc dld_qtlib.h dld_col.h ../dld_col.h \
+ ../dld_container.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_qtcontainer.h dld_qtobj.h
+dld_combobox.lo dld_combobox.o : dld_combobox.cc dld_qtlib.h \
+ dld_combobox.h ../dld_combobox.h ../dld_obj.h ../dld_lib.h \
+ ../../config.h dld_qtobj.h dld_comboitem.h ../dld_comboitem.h \
+ dld_qtapp.h ../dld_gui.h ../dld_out.h dld_dialog.h \
+ ../dld_dialog.h ../dld_container.h dld_qtcontainer.h
+dld_comboitem.lo dld_comboitem.o : dld_comboitem.cc dld_qtlib.h \
+ dld_comboitem.h ../dld_comboitem.h ../dld_obj.h ../dld_lib.h \
+ ../../config.h dld_qtobj.h
+dld_dialog.lo dld_dialog.o : dld_dialog.cc dld_qtlib.h dld_dialog.h \
+ ../dld_dialog.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ ../dld_container.h ../dld_out.h dld_qtcontainer.h dld_qtobj.h \
+ dld_qtapp.h ../dld_gui.h
+dld_form.lo dld_form.o : dld_form.cc dld_qtlib.h dld_form.h \
+ ../dld_form.h ../dld_container.h ../dld_obj.h ../dld_lib.h \
+ ../../config.h dld_qtcontainer.h dld_qtobj.h
+dld_gauge.lo dld_gauge.o : dld_gauge.cc dld_qtlib.h dld_gauge.h \
+ ../dld_gauge.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ ../dld_dialog.h ../dld_container.h ../dld_out.h dld_qtobj.h \
+ dld_dialog.h dld_qtcontainer.h
+dld_image.lo dld_image.o : dld_image.cc dld_qtlib.h dld_image.h \
+ ../dld_image.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_qtobj.h dld_dialog.h ../dld_dialog.h ../dld_container.h \
+ ../dld_out.h dld_qtcontainer.h
+dld_input.lo dld_input.o : dld_input.cc dld_qtlib.h dld_input.h \
+ ../dld_input.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_qtobj.h dld_text.h ../dld_text.h dld_dialog.h \
+ ../dld_dialog.h ../dld_container.h ../dld_out.h \
+ dld_qtcontainer.h
+dld_lib.lo dld_lib.o : dld_lib.cc dld_qtlib.h dld_qtapp.h ../dld_gui.h \
+ ../dld_out.h dld_qtobj.h ../dld_obj.h ../dld_lib.h \
+ ../../config.h dld_dialog.h ../dld_dialog.h ../dld_container.h \
+ dld_qtcontainer.h
+dld_list.lo dld_list.o : dld_list.cc dld_qtlib.h dld_list.h \
+ ../dld_list.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_qtobj.h dld_listitem.h ../dld_listitem.h dld_qtapp.h \
+ ../dld_gui.h ../dld_out.h dld_dialog.h ../dld_dialog.h \
+ ../dld_container.h dld_qtcontainer.h
+dld_listitem.lo dld_listitem.o : dld_listitem.cc dld_qtlib.h \
+ dld_listitem.h ../dld_listitem.h ../dld_obj.h ../dld_lib.h \
+ ../../config.h dld_qtobj.h
+dld_qtapp.lo dld_qtapp.o : dld_qtapp.cc dld_qtapp.h ../dld_gui.h \
+ ../dld_out.h dld_qtlib.h dld_qtobj.h ../dld_obj.h ../dld_lib.h \
+ ../../config.h dld_dialog.h ../dld_dialog.h ../dld_container.h \
+ dld_qtcontainer.h
+dld_qtcontainer.lo dld_qtcontainer.o : dld_qtcontainer.cc dld_qtapp.h \
+ ../dld_gui.h ../dld_out.h dld_qtlib.h dld_qtobj.h ../dld_obj.h \
+ ../dld_lib.h ../../config.h dld_dialog.h ../dld_dialog.h \
+ ../dld_container.h dld_qtcontainer.h dld_button.h \
+ ../dld_button.h dld_text.h ../dld_text.h dld_row.h ../dld_row.h \
+ dld_form.h ../dld_form.h dld_col.h ../dld_col.h dld_list.h \
+ ../dld_list.h dld_checklist.h ../dld_checklist.h \
+ dld_radiolist.h ../dld_radiolist.h dld_radio.h \
+ ../dld_radiobutton.h dld_textbox.h ../dld_textbox.h \
+ dld_combobox.h ../dld_combobox.h dld_comboitem.h \
+ ../dld_comboitem.h dld_gauge.h ../dld_gauge.h dld_input.h \
+ ../dld_input.h dld_image.h ../dld_image.h
+dld_qtobj.lo dld_qtobj.o : dld_qtobj.cc dld_qtobj.h ../dld_obj.h \
+ ../dld_lib.h ../../config.h dld_dialog.h ../dld_dialog.h \
+ ../dld_container.h ../dld_out.h dld_qtcontainer.h
+dld_radio.lo dld_radio.o : dld_radio.cc dld_qtlib.h dld_radio.h \
+ ../dld_radiobutton.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_qtobj.h dld_dialog.h ../dld_dialog.h ../dld_container.h \
+ ../dld_out.h dld_qtcontainer.h
+dld_radiolist.lo dld_radiolist.o : dld_radiolist.cc dld_qtlib.h \
+ dld_radiolist.h ../dld_radiolist.h ../dld_obj.h ../dld_lib.h \
+ ../../config.h dld_qtobj.h dld_radio.h ../dld_radiobutton.h \
+ dld_qtapp.h ../dld_gui.h ../dld_out.h dld_dialog.h \
+ ../dld_dialog.h ../dld_container.h dld_qtcontainer.h
+dld_row.lo dld_row.o : dld_row.cc dld_qtlib.h dld_row.h ../dld_row.h \
+ ../dld_container.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_qtcontainer.h dld_qtobj.h
+dld_text.lo dld_text.o : dld_text.cc dld_qtlib.h dld_text.h \
+ ../dld_text.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_qtobj.h
+dld_textbox.lo dld_textbox.o : dld_textbox.cc dld_qtlib.h dld_textbox.h \
+ ../dld_textbox.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_qtobj.h
+mdld_button.lo mdld_button.o : mdld_button.cc dld_button.h \
+ ../dld_button.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_qtobj.h
+mdld_check.lo mdld_check.o : mdld_check.cc dld_check.h \
+ ../dld_checkbutton.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_qtlib.h dld_qtobj.h
+mdld_checklist.lo mdld_checklist.o : mdld_checklist.cc dld_checklist.h \
+ ../dld_checklist.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_qtlib.h dld_qtobj.h
+mdld_combobox.lo mdld_combobox.o : mdld_combobox.cc dld_combobox.h \
+ ../dld_combobox.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_qtlib.h dld_qtobj.h dld_comboitem.h ../dld_comboitem.h
+mdld_dialog.lo mdld_dialog.o : mdld_dialog.cc dld_dialog.h \
+ ../dld_dialog.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ ../dld_container.h ../dld_out.h dld_qtcontainer.h dld_qtobj.h
+mdld_image.lo mdld_image.o : mdld_image.cc dld_image.h ../dld_image.h \
+ ../dld_obj.h ../dld_lib.h ../../config.h dld_qtobj.h
+mdld_input.lo mdld_input.o : mdld_input.cc dld_input.h ../dld_input.h \
+ ../dld_obj.h ../dld_lib.h ../../config.h dld_qtobj.h
+mdld_list.lo mdld_list.o : mdld_list.cc dld_list.h ../dld_list.h \
+ ../dld_obj.h ../dld_lib.h ../../config.h dld_qtobj.h
+mdld_qtapp.lo mdld_qtapp.o : mdld_qtapp.cc dld_qtapp.h ../dld_gui.h \
+ ../dld_out.h dld_qtlib.h dld_qtobj.h ../dld_obj.h ../dld_lib.h \
+ ../../config.h dld_dialog.h ../dld_dialog.h ../dld_container.h \
+ dld_qtcontainer.h
+mdld_radio.lo mdld_radio.o : mdld_radio.cc dld_radio.h \
+ ../dld_radiobutton.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_qtlib.h dld_qtobj.h
+mdld_radiolist.lo mdld_radiolist.o : mdld_radiolist.cc dld_radiolist.h \
+ ../dld_radiolist.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_qtlib.h dld_qtobj.h dld_radio.h ../dld_radiobutton.h
+
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am: install-libLTLIBRARIES
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-libLTLIBRARIES
+uninstall: uninstall-am
+all-am: Makefile $(LTLIBRARIES)
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(libdir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \
+ mostlyclean-libtool mostlyclean-tags \
+ mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-libLTLIBRARIES clean-compile clean-libtool clean-tags \
+ clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-libLTLIBRARIES distclean-compile \
+ distclean-libtool distclean-tags distclean-generic \
+ clean-am
+ -rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-libLTLIBRARIES \
+ maintainer-clean-compile maintainer-clean-libtool \
+ maintainer-clean-tags maintainer-clean-generic \
+ distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
+clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
+uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
+distclean-compile clean-compile maintainer-clean-compile \
+mostlyclean-libtool distclean-libtool clean-libtool \
+maintainer-clean-libtool tags mostlyclean-tags distclean-tags \
+clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
+check-am installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+m%.cc: %.h
+ @MOC@ $< -o $@
+
+@BUILDQT_TRUE@clean-compile:
+@BUILDQT_TRUE@ rm -f m*.cc
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/dldialog/src/DLD_QT/dld_button.cc b/dldialog/src/DLD_QT/dld_button.cc
new file mode 100644
index 0000000..3b51a4a
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_button.cc
@@ -0,0 +1,297 @@
+/******************************************************************************
+**
+** $Id: dld_button.cc,v 1.20 1999/04/19 10:49:48 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+!******************************************************************************/
+#include "dld_qtlib.h"
+#include "dld_button.h"
+#include "dld_dialog.h"
+#include <iostream.h>
+#include <qpainter.h>
+#include <qbitmap.h>
+
+DLD_QTButton::DLD_QTButton (QWidget *_parent,
+ const string& name, DLD_QTDialog *pd):
+ QPushButton (convstr(name).c_str(), _parent),
+ DLD_QTObj (name, pd),
+ bigpic(false)
+{
+ signature = false;
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "button " << dld_name
+ << " constructed " << endl
+ << flush;
+#endif
+ if ( fontname.length() > 0 )
+ this->setFont( QFont( fontname.c_str() , fontsize, false ) );
+
+
+ setMinimumWidth (sizeHint ().width ());
+ setFixedHeight (sizeHint ().height ());
+ fixed_height = true;
+
+ connect (this, SIGNAL (clicked ()), SLOT (slot_activate ()));
+}
+
+DLD_QTButton::
+~DLD_QTButton ()
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "button deleted\n";
+#endif
+}
+
+void DLD_QTButton::movieStatus( int status)
+{
+ if (status < 0) {
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "button is no movie status = " << status << endl << flush;
+#endif
+ movie.disconnectStatus(this, SLOT(movieStatus(int)));
+ movie.disconnectUpdate(this, SLOT(movieUpdate(const QRect&)));
+ movie.disconnectResize(this, SLOT(movieResized(const QSize&)));
+ getPixmap();
+ }
+ else {
+ is_movie = true;
+ movie.setBackgroundColor(backgroundColor());
+
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "button is movie!!" << endl << flush;
+#endif
+ }
+}
+
+void DLD_QTButton::movieUpdate( const QRect& area)
+{
+ QPainter paint( this );
+
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "button update." << endl << flush;
+#endif
+ if(movie.frameNumber() == 1) {
+ const QBitmap& bmap = QBitmap();
+ QPixmap& pmap = const_cast<QPixmap&>(movie.framePixmap());
+ pmap.setMask(bmap);
+ }
+ drawButtonPixmap(&paint, area);
+}
+
+void DLD_QTButton::movieResized(const QSize& size)
+{
+ QSize pushs = QPushButton::minimumSize();
+ if(signature) {
+ setMinimumSize(QSize(max(pushs.width(), size.width()+8),
+ pushs.height() + size.height() ));
+ setFixedHeight (pushs.height() + size.height());
+ //setIsMenuButton(TRUE);
+ bigpic = true;
+ }
+ else {
+ setMinimumSize(QSize(pushs.width() + size.width() - 10,
+ max(pushs.height(), size.height()+4)));
+ setFixedHeight (max(pushs.height(), size.height()+4));
+ }
+// resize( minimumSize().width() , minimumSize().height() );
+ repaint();
+}
+
+void DLD_QTButton::getPixmap()
+{
+ pix.load(imagestr.c_str());
+ if(pix.isNull()) {
+ DLDerr << "image " << imagestr << _(" could not be loaded")
+ << endl << flush;
+ }
+ else {
+ QSize pushs = QPushButton::minimumSize(), pixs = pix.size();
+ if(signature) {
+ setMinimumSize(QSize(max(pushs.width(), pixs.width()+8),
+ pushs.height() + pixs.height() ));
+ setFixedHeight (pushs.height() + pixs.height());
+ //setIsMenuButton(TRUE);
+ bigpic = true;
+ }
+ else {
+ setMinimumSize(QSize(pushs.width() + pixs.width() - 10,
+ max(pushs.height(), pixs.height()+4)));
+ setFixedHeight (max(pushs.height(), pixs.height()+4));
+ }
+ }
+ repaint();
+}
+
+void DLD_QTButton::
+create ()
+{
+ if(imagestr.length()) {
+ if(is_movie) {
+ movie = QMovie(imagestr.c_str());
+
+ if(movie.isNull()) {
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "button is no movie" << endl << flush;
+#endif
+ getPixmap();
+ }
+ else {
+ movie.connectStatus(this, SLOT(movieStatus(int)));
+ movie.connectUpdate(this, SLOT(movieUpdate(const QRect&)));
+ movie.connectResize(this, SLOT(movieResized(const QSize&)));
+ }
+ }
+ else {
+ getPixmap();
+ }
+ }
+ DLD_Obj::create();
+}
+
+int DLD_QTButton::
+slot_activate ()
+{
+ DLD_QTObj::activate ();
+ return 0;
+}
+
+
+void DLD_QTButton::drawButtonLabel ( QPainter * p )
+{
+ bool pressed = false;
+ QPixmap pm;
+
+ if ( fontname.length() > 0 )
+ p->setFont( QFont( fontname.c_str() , fontsize, false ) );
+ if (bg_color.length() > 0)
+ p->setBackgroundColor(QColor(bg_color.c_str()));
+
+ if(is_movie) {
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "movie pixmap" << endl << flush;
+#endif
+ pm = movie.framePixmap();
+ }
+ else {
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "normal pixmap" << endl << flush;
+#endif
+ pm = pix;
+ }
+
+ if(!pm.isNull()) {
+ QRect r = rect();
+ int x, y, w, h;
+ r.rect( &x, &y, &w, &h );
+ if ( (isDown() || isOn()) && style() == WindowsStyle ) {
+ // shift pixmap/text
+ x++;
+ y++;
+ pressed = true;
+ }
+
+ if(!bigpic) {
+ x += pm.width()+12; y += 2; w -= 14+pm.width(); h -= 4;
+
+ const QColorGroup g(colorGroup());
+ if (fg_color.length() > 0)
+ p->setPen(QColor(fg_color.c_str()));
+ else
+ p->setPen( g.text() );
+
+ if ( style() == WindowsStyle && !isEnabled() ) {
+ p->setPen( g.light() );
+ p->drawText( x+1, y+1, w, h, AlignCenter|ShowPrefix, text(), -1 );
+ p->setPen( g.text() );
+ }
+
+ p->drawText( x, y, w, h, AlignCenter|ShowPrefix, text(), -1 );
+ }
+ else {
+ x += 2; y += pm.height()+7; w -= 4; h -= pm.height()+9;
+
+ const QColorGroup g(colorGroup());
+ if (fg_color.length() > 0)
+ p->setPen(QColor(fg_color.c_str()));
+ else
+ p->setPen( g.text() );
+
+ if ( style() == WindowsStyle && !isEnabled() ) {
+ p->setPen( g.light() );
+ p->drawText( x+1, y+1, w, h, AlignCenter|ShowPrefix, text(), -1 );
+ p->setPen( g.text() );
+ }
+ if (fg_color.length() > 0)
+ p->setPen(QColor(fg_color.c_str()));
+ p->drawText( x, y, w, h, AlignCenter|ShowPrefix, text(), -1 );
+ }
+ drawButtonPixmap(p, QRect());
+ }
+ else {
+#ifdef DEBUG
+ DLDdbg << "pixmap was null" << endl << flush;
+#endif
+ QPushButton::drawButtonLabel(p);
+ }
+}
+
+void DLD_QTButton::drawButtonPixmap ( QPainter * p , const QRect& area)
+{
+ bool pressed = false;
+ QPixmap pm;
+
+ if(is_movie) {
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "movie pixmap" << endl << flush;
+#endif
+ pm = movie.framePixmap();
+ }
+ else {
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "normal pixmap" << endl << flush;
+#endif
+ pm = pix;
+ }
+
+ if(!pm.isNull()) {
+ QRect r = rect();
+ int x, y, w, h;
+ r.rect( &x, &y, &w, &h );
+ if ( (isDown() || isOn()) && style() == WindowsStyle ) {
+ // shift pixmap/text
+ x++;
+ y++;
+ pressed = true;
+ }
+ int px, py;
+
+ if(!bigpic) {
+ x += pm.width()+12; y += 2; w -= 14+pm.width(); h -= 4;
+ QRect br = p->boundingRect( x, y, w, h, AlignCenter|ShowPrefix, text(), -1 );
+ px = br.x() - pm.width() - 10;
+ py = (height() - pm.height())/2 + pressed;
+ }
+ else {
+ x += 2; y += pm.height()+7; w -= 4; h -= pm.height()+9;
+ QRect br = p->boundingRect( x, y, w, h, AlignCenter|ShowPrefix, text(), -1 );
+ px = (width() - pm.width())/2 + pressed;
+ py = br.y() - pm.height() - 5;
+ }
+
+ if(! area.isNull() ) {
+ p->setClipRect(area.x()+px, area.y()+py,
+ area.width(), area.height() );
+ }
+ else {
+ p->setClipRect(px, py, pm.width(), pm.height() );
+ }
+
+ p->drawPixmap(px, py, pm);
+ }
+}
diff --git a/dldialog/src/DLD_QT/dld_button.h b/dldialog/src/DLD_QT/dld_button.h
new file mode 100644
index 0000000..aa57feb
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_button.h
@@ -0,0 +1,60 @@
+/******************************************************************************
+**
+** $Id: dld_button.h,v 1.15 2000/03/15 20:02:16 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+
+#ifndef DLD_QTBUTTON_H
+#define DLD_QTBUTTON_H
+
+#include "../dld_button.h"
+#include "dld_qtobj.h"
+#include <qwidget.h>
+#include <qpushbt.h>
+#include <qpixmap.h>
+#include <qmovie.h>
+
+/** The button class in qt style.
+ *
+ */
+class DLD_QTButton : public QPushButton, public DLD_QTObj, public DLD_Button
+{
+ Q_OBJECT;
+public:
+ ///
+ DLD_QTButton(QWidget *_parent, const string& name, DLD_QTDialog *pd);
+ ///
+ virtual ~DLD_QTButton();
+ ///
+ void create();
+
+ /** Disables the object
+ */
+ virtual void disable() {
+ setEnabled(FALSE);
+ };
+
+///
+public slots:
+ int slot_activate();
+ void movieStatus(int);
+ void movieUpdate(const QRect&);
+ void movieResized(const QSize&);
+
+protected:
+ void drawButtonLabel ( QPainter * paint );
+ void drawButtonPixmap ( QPainter * paint, const QRect& area );
+ bool bigpic;
+ void getPixmap();
+ QMovie movie;
+ QPixmap pix;
+};
+
+#endif
diff --git a/dldialog/src/DLD_QT/dld_check.cc b/dldialog/src/DLD_QT/dld_check.cc
new file mode 100644
index 0000000..ad51aef
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_check.cc
@@ -0,0 +1,65 @@
+/******************************************************************************
+**
+** $Id: dld_check.cc,v 1.10 1999/04/07 07:38:30 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#include "dld_qtlib.h"
+#include "dld_check.h"
+#include "dld_dialog.h"
+#include <iostream.h>
+
+DLD_QTCheckButton::
+DLD_QTCheckButton (QWidget *_parent, const string& name, DLD_QTDialog *pd):
+ QCheckBox (convstr(name).c_str(), _parent),
+ DLD_QTObj (name, pd)
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "check ";
+#endif
+ setMinimumSize (sizeHint ());
+ connect (this, SIGNAL (toggled ( bool )), SLOT (slot_activate ( bool )));
+}
+
+DLD_QTCheckButton::
+~DLD_QTCheckButton ()
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "check deleted\n";
+#endif
+}
+
+void DLD_QTCheckButton::
+create ()
+{
+ if (test_env ())
+ setChecked (TRUE);
+ DLD_Obj::create();
+}
+
+void DLD_QTCheckButton::
+slot_activate(bool on)
+{
+ if(on) {
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "checkbutton "
+ << " toggled on" << endl << flush;
+#endif
+ DLD_QTObj::activate();
+ emit signal_cbpress();
+ }
+ else {
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "checkbutton "
+ << " toggled off" << endl << flush;
+#endif
+ DLD_QTObj::deactivate();
+ emit signal_cbpress();
+ }
+}
diff --git a/dldialog/src/DLD_QT/dld_check.h b/dldialog/src/DLD_QT/dld_check.h
new file mode 100644
index 0000000..c5587a7
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_check.h
@@ -0,0 +1,47 @@
+/******************************************************************************
+**
+** $Id: dld_check.h,v 1.7 2000/03/15 20:02:16 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#ifndef DLD_QTCHECKBUTTON_H
+#define DLD_QTCHECKBUTTON_H
+
+#include "../dld_checkbutton.h"
+#include "dld_qtlib.h"
+#include "dld_qtobj.h"
+#include <qchkbox.h>
+
+/** The check class in qt style.
+ *
+ */
+class DLD_QTCheckButton : public QCheckBox, public DLD_CheckButton,
+ public DLD_QTObj
+{
+ Q_OBJECT;
+public:
+ ///
+ DLD_QTCheckButton(QWidget *_parent, const string& name, DLD_QTDialog *pd);
+
+ ///
+ virtual ~DLD_QTCheckButton();
+
+ ///
+ void create();
+
+signals:
+ void signal_cbpress();
+
+///
+public slots:
+ void slot_activate(bool);
+
+};
+
+#endif
diff --git a/dldialog/src/DLD_QT/dld_checklist.cc b/dldialog/src/DLD_QT/dld_checklist.cc
new file mode 100644
index 0000000..87a0969
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_checklist.cc
@@ -0,0 +1,126 @@
+/******************************************************************************
+**
+** $Id: dld_checklist.cc,v 1.13 2000/03/15 20:02:16 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#include "dld_qtlib.h"
+#include "dld_checklist.h"
+#include "dld_check.h"
+#include "dld_qtapp.h"
+#include <iostream.h>
+#include <qbutton.h>
+
+DLD_QTCheckList::
+DLD_QTCheckList (QWidget *_parent,
+ const string& name, DLD_QTDialog *pd):
+ QButtonGroup (convstr(name).c_str(), _parent),
+ DLD_QTObj (name, pd),
+ count (0)
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "checklist ";
+#endif
+ topLayout = new QVBoxLayout ((QGroupBox *) this, QT_BORDER * 2, QT_BORDER);
+ if (dld_name.length() == 0)
+ QButtonGroup::setFrameStyle (NoFrame);
+}
+
+DLD_QTCheckList::
+~DLD_QTCheckList ()
+{
+// update_var();
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "checklist delete";
+#endif
+}
+
+DLD_CheckButton * DLD_QTCheckList::
+checkbutton (const string& name)
+{
+ DLD_QTCheckButton *p = new DLD_QTCheckButton(this, name, pardia);
+ topLayout->addWidget (p);
+ insert(p, count);
+
+ connect (p, SIGNAL (signal_cbpress()),
+ this, SLOT (slot_cbpress()));
+
+ add_child(p);
+ count++;
+ return p;
+}
+
+void DLD_QTCheckList::
+create (void)
+{
+ topLayout->activate ();
+
+ int i;
+ QString istr;
+
+ for (i = 0; i < count; i++)
+ {
+ if (test_env(string(istr.setNum (i + 1))))
+ {
+ QButton *obj = find (i);
+ if (obj)
+ {
+ if(!obj->isOn ()) {
+ obj->animateClick ();
+ }
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "checklist activate " << i << "\n";
+#endif
+ }
+ }
+ }
+
+// pardia->dld_app->processEvents();
+
+ for(CI i = childlist.begin(); i != childlist.end(); ++i) {
+ (*i)->create ();
+ }
+ DLD_Obj::create();
+}
+
+void DLD_QTCheckList::
+update_var()
+{
+ QString str (""), istr;
+ int i;
+
+ for (i = 0; i < count; i++)
+ {
+ QButton *obj = find (i);
+ if (obj)
+ {
+ if (obj->isOn ())
+ {
+ str += istr.setNum (i + 1) + QString (" ");
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "checklist " << i << " is active\n";
+#endif
+ }
+ }
+ }
+
+ varvalue = str;
+
+ activate ();
+}
+
+void DLD_QTCheckList::
+slot_cbpress ()
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "checkbutton "
+ << " pressed" << endl << flush;
+#endif
+ update_var();
+}
diff --git a/dldialog/src/DLD_QT/dld_checklist.h b/dldialog/src/DLD_QT/dld_checklist.h
new file mode 100644
index 0000000..d334a3d
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_checklist.h
@@ -0,0 +1,69 @@
+/******************************************************************************
+**
+** $Id: dld_checklist.h,v 1.7 2000/03/15 20:02:16 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#ifndef DLD_QTCHECKLIST_H
+#define DLD_QTCHECKLIST_H
+
+#include "../dld_checklist.h"
+#include "dld_qtlib.h"
+#include "dld_qtobj.h"
+#include <qbttngrp.h>
+#include <qlayout.h>
+
+/** The checklist in qt style.
+ *
+ */
+class DLD_QTCheckList : public QButtonGroup, public DLD_CheckList,
+ public DLD_QTObj
+{
+ Q_OBJECT;
+public:
+ ///
+ DLD_QTCheckList(QWidget *_parent, const string& name, DLD_QTDialog *pd);
+
+ ///
+ virtual ~DLD_QTCheckList();
+
+ ///
+ void create();
+
+ /** Adds a checkbutton to the checklist.
+ * @param name The text of the item
+ * @return ptr to item
+ */
+ DLD_CheckButton *checkbutton(const string&);
+
+ /** Indicates the beginning of a new block
+ *
+ * Can be used to reserve space for children.
+ */
+ void open_brace() {};
+
+ /** Indicates the end of a block.
+ *
+ * Can be used to collect all children.
+ */
+ void close_brace() {};
+
+public slots:
+ void slot_cbpress ();
+
+private:
+ void update_var();
+
+ ///
+ int count;
+
+ QVBoxLayout *topLayout;
+};
+
+#endif
diff --git a/dldialog/src/DLD_QT/dld_col.cc b/dldialog/src/DLD_QT/dld_col.cc
new file mode 100644
index 0000000..37822d4
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_col.cc
@@ -0,0 +1,96 @@
+/******************************************************************************
+**
+** $Id: dld_col.cc,v 1.13 1999/04/19 14:37:34 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#include "dld_qtlib.h"
+#include "dld_col.h"
+#include <iostream.h>
+#include <qfontmetrics.h>
+
+DLD_QTCol::
+DLD_QTCol (QWidget *_parent, const string& _name,
+ DLD_QTApp *aptr, DLD_QTDialog *dia) :
+ QGroupBox (convstr(_name).c_str(), _parent),
+ QVBoxLayout ((QGroupBox *) this, 0, QT_BORDER/2),
+ DLD_QTObj (_name, dia),
+ DLD_QTContainer(_name, aptr, dia),
+ dld_rows(0)
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "row ";
+#endif
+
+ if (dld_name.length() == 0)
+ setFrameStyle (NoFrame);
+ else {
+#if QT_VERSION < 200
+ basicManager()->setBorder(20);
+#endif
+ }
+
+// setRowStretch(0, 1);
+
+ qwidget = this;
+ fixed_width = fixed_height = true;
+}
+
+DLD_QTCol::
+~DLD_QTCol ()
+{
+}
+
+void DLD_QTCol::
+insert (QWidget * w, DLD_QTObj *obj)
+{
+ QVBoxLayout::addWidget (w, AlignLeft|AlignVCenter);
+ qtobjs[dld_rows] = obj;
+ qwidgets[dld_rows] = w;
+ dld_rows++;
+}
+
+void DLD_QTCol::
+create (void)
+{
+ int nullanz=0, sum=0;
+ for(int i = 0; i < dld_rows; i++)
+ {
+ if(!qtobjs[i])
+ continue;
+ int p = qtobjs[i]->obj_heightP;
+
+ if (qtobjs[i]->obj_heightP)
+ fixed_width = false;
+
+ if(p) {
+ sum += p;
+ fixed_height = false;
+ }
+ else
+ nullanz++;
+ }
+ sum = (sum && (sum < 100)) ? 100 - nullanz : nullanz;
+ for(int i = 0; i < dld_rows; i++)
+ {
+ if(!qtobjs[i])
+ continue;
+ int p = qtobjs[i]->obj_heightP;
+ if(p)
+ setStretchFactor(qwidgets[i], p);
+ else {
+ if(qtobjs[i]->fixed_height)
+ setStretchFactor(qwidgets[i], 0);
+ else
+ setStretchFactor(qwidgets[i], sum / nullanz);
+ }
+ }
+ DLD_QTContainer::create ();
+ QVBoxLayout::activate ();
+}
diff --git a/dldialog/src/DLD_QT/dld_col.h b/dldialog/src/DLD_QT/dld_col.h
new file mode 100644
index 0000000..52c2216
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_col.h
@@ -0,0 +1,53 @@
+/******************************************************************************
+**
+** $Id: dld_col.h,v 1.9 2000/03/15 20:02:16 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#ifndef DLD_COL_H
+#define DLD_COL_H
+
+#include "../dld_col.h"
+#include "dld_qtcontainer.h"
+#include <qlayout.h>
+#include <qgrpbox.h>
+#include <map>
+
+class DLD_QTDialog;
+class DLD_QTApp;
+
+/** A container for other dldialog elements, that orders these in a column.
+ *
+ */
+class DLD_QTCol : public QGroupBox, public QVBoxLayout,
+ public DLD_QTContainer, public DLD_Col
+{
+public:
+ ///
+ DLD_QTCol(QWidget *_parent, const string& _name,
+ DLD_QTApp *aptr, DLD_QTDialog *dia);
+
+ ///
+ virtual ~DLD_QTCol();
+
+ ///
+ void insert(QWidget *w, DLD_QTObj *obj);
+
+ ///
+ void create();
+
+ void close_brace() { create(); };
+
+private:
+ int dld_rows;
+ map<int, DLD_QTObj*> qtobjs;
+ map<int, QWidget*> qwidgets;
+};
+
+#endif
diff --git a/dldialog/src/DLD_QT/dld_combobox.cc b/dldialog/src/DLD_QT/dld_combobox.cc
new file mode 100644
index 0000000..921f34f
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_combobox.cc
@@ -0,0 +1,159 @@
+/******************************************************************************
+**
+** $Id: dld_combobox.cc,v 1.8 2000/03/15 20:02:16 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#include "dld_qtlib.h"
+#include "dld_combobox.h"
+#include "dld_comboitem.h"
+#include "dld_qtapp.h"
+#include <qstring.h>
+#include <iostream.h>
+DLD_QTComboBox::
+DLD_QTComboBox (QWidget *_parent,
+ const string& name, DLD_QTDialog *pd):
+ QComboBox (FALSE, _parent, convstr(name).c_str()),
+ DLD_QTObj (name, pd)
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "combobox " << dld_name << " constructed\n";
+#endif
+}
+
+DLD_QTComboBox::
+~DLD_QTComboBox ()
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "combobox " << dld_name << " deleted\n";
+#endif
+}
+
+void DLD_QTComboBox::slot_activated(int index)
+{
+ QString str ("");
+ int cnt = count ();
+
+ for (int i = 0; i < cnt; i++)
+ {
+ if(i != index) {
+ DLD_QTObj *obj = citems[i];
+ if (obj)
+ {
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "comboitem deactivate "
+ << i << "\n";
+#endif
+ obj->deactivate();
+ }
+ }
+ }
+
+ DLD_QTObj *obj = citems[index];
+ if (obj)
+ {
+ str.setNum (index + 1);
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "comboitem activate "
+ << index << "\n";
+#endif
+ obj->activate ();
+ }
+
+ varvalue = str;
+
+ activate ();
+}
+
+DLD_ComboItem *DLD_QTComboBox::comboitem(const string& name)
+{
+ DLD_QTComboItem *lbi = new DLD_QTComboItem(name, pardia);
+ QComboBox::insertItem (lbi->dld_name.c_str());
+ citems[count()-1] = lbi;
+ return lbi;
+}
+
+void DLD_QTComboBox::
+create (void)
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "combobox create\n";
+#endif
+ QString str, istr;
+ int i, cnt = count ();
+
+ setFixedHeight (sizeHint ().height());
+ fixed_height = true;
+ setMinimumWidth (sizeHint ().width());
+
+ if(cnt) {
+
+ connect(this, SIGNAL(activated(int)),
+ this, SLOT(slot_activated(int)));
+
+ bool wasset=false;
+
+ for (i = 0; i < cnt; i++)
+ {
+ DLD_QTObj *obj = citems[i];
+ if (obj)
+ {
+ if (obj->test_env ())
+ {
+ setCurrentItem(i);
+ slot_activated(i);
+ wasset=true;
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "comboitem activate " << i << "\n";
+#endif
+ }
+ }
+#ifdef DEBUG
+ else DLDdbg << DLD_LIB_PREFIX "combobox error at " << i << "\n";
+#endif
+
+ }
+
+ for (i = 0; i < cnt; i++)
+ {
+ if (test_env (string(istr.setNum (i + 1))))
+ {
+ setCurrentItem(i);
+ slot_activated(i);
+ wasset=true;
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "combobox activate " << i << "\n";
+#endif
+ }
+#ifdef DEBUG
+ else DLDdbg << DLD_LIB_PREFIX "combobox " << istr << " not active\n";
+#endif
+ }
+
+ if (!wasset) {
+ setCurrentItem(0);
+ slot_activated(0);
+ }
+
+// pardia->dld_app->processEvents();
+
+ for (i = 0; i < cnt; i++)
+ {
+ DLD_QTObj *obj = citems[i];
+ if (obj)
+ {
+ obj->create();
+ }
+ }
+ DLD_Obj::create();
+ }
+}
+
+
+
diff --git a/dldialog/src/DLD_QT/dld_combobox.h b/dldialog/src/DLD_QT/dld_combobox.h
new file mode 100644
index 0000000..7547794
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_combobox.h
@@ -0,0 +1,65 @@
+/******************************************************************************
+**
+** $Id: dld_combobox.h,v 1.4 2000/03/15 20:02:16 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#ifndef DLD_QTCOMBOBOX_H
+#define DLD_QTCOMBOBOX_H
+
+#include "../dld_combobox.h"
+#include "dld_qtlib.h"
+#include "dld_qtobj.h"
+#include "dld_comboitem.h"
+#include <qcombobox.h>
+#include <qptrdict.h>
+#include <map>
+/** The combobox class in qt style.
+ * Ordering of QTObj and ListBox is important, because ListBox wants to delete
+ * our children.
+ */
+
+class DLD_QTComboBox : public QComboBox, public DLD_ComboBox,
+ public DLD_QTObj
+{
+ Q_OBJECT;
+public:
+ ///
+ DLD_QTComboBox(QWidget *_parent,
+ const string& name, DLD_QTDialog *pd);
+ ///
+ virtual ~DLD_QTComboBox();
+
+ ///
+ DLD_ComboItem *comboitem(const string& name);
+ ///
+ void create();
+
+ /** Indicates the beginning of a new block
+ *
+ * Can be used to reserve space for children.
+ */
+ virtual void open_brace() {};
+
+ /** Indicates the end of a block.
+ *
+ * Can be used to collect all children.
+ */
+ virtual void close_brace() {};
+
+public slots:
+ void slot_activated(int);
+
+protected:
+ ///
+ typedef DLD_QTComboItem *DLD_QTComboItem_PTR;
+ map<int, DLD_QTComboItem_PTR> citems;
+};
+
+#endif
diff --git a/dldialog/src/DLD_QT/dld_comboitem.cc b/dldialog/src/DLD_QT/dld_comboitem.cc
new file mode 100644
index 0000000..fdba804
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_comboitem.cc
@@ -0,0 +1,33 @@
+/******************************************************************************
+**
+** $Id: dld_comboitem.cc,v 1.6 2000/03/15 20:02:16 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#include "dld_qtlib.h"
+#include "dld_comboitem.h"
+
+#include <iostream.h>
+
+DLD_QTComboItem::
+DLD_QTComboItem (const string& name, DLD_QTDialog *pd):
+ DLD_QTObj (name, pd)
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "comboitem " << dld_name << " created\n";
+#endif
+}
+
+DLD_QTComboItem::
+~DLD_QTComboItem ()
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "comboitem " << dld_name << " deleted\n";
+#endif
+}
diff --git a/dldialog/src/DLD_QT/dld_comboitem.h b/dldialog/src/DLD_QT/dld_comboitem.h
new file mode 100644
index 0000000..11b547c
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_comboitem.h
@@ -0,0 +1,32 @@
+/******************************************************************************
+**
+** $Id: dld_comboitem.h,v 1.6 2000/03/15 20:02:17 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#ifndef DLD_QTCOMBOITEM_H
+#define DLD_QTCOMBOITEM_H
+
+#include "../dld_comboitem.h"
+#include "dld_qtobj.h"
+
+/** .
+ *
+ */
+class DLD_QTComboItem : public DLD_QTObj, public DLD_ComboItem
+{
+public:
+ ///
+ DLD_QTComboItem(const string& name, DLD_QTDialog *pd);
+ ///
+ virtual ~DLD_QTComboItem();
+ void create() {DLD_Obj::create();};
+};
+
+#endif
diff --git a/dldialog/src/DLD_QT/dld_dialog.cc b/dldialog/src/DLD_QT/dld_dialog.cc
new file mode 100644
index 0000000..f7decc0
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_dialog.cc
@@ -0,0 +1,242 @@
+/******************************************************************************
+**
+** $Id: dld_dialog.cc,v 1.6 1998/10/13 01:43:33 saturn Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+
+#include "qobjectlist.h"
+#include "dld_qtlib.h"
+#include "dld_dialog.h"
+#include "dld_qtapp.h"
+#include <iostream.h>
+
+DLD_QTDialog::
+DLD_QTDialog (const string& _name, DLD_QTApp *_app, const DLD_Out _out):
+ QDialog (0, convstr(_name).c_str(), FALSE, WStyle_Title),
+ DLD_QTContainer(_name, _app, this),
+ DLD_QTObj (_name, this),
+ DLD_Dialog(_app, _out),
+ init_size(0,0,0,0)
+{
+
+// toplayout = new QGridLayout (this, 1, 1, QT_BORDER, QT_BORDER);
+ toplayout = new QVBoxLayout (this, QT_BORDER, QT_BORDER);
+
+ dld_rows = 0;
+ setCaption (_name.c_str());
+ pardia = this;
+ qwidget = this;
+ empty = true;
+ first_time = true;
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "dialog " << dld_name << " constructed"
+ << endl << flush;
+#endif
+/*
+ menu = new QMenuBar(this);
+ toplayout->addWidget(menu);
+*/
+}
+
+DLD_QTDialog::
+~DLD_QTDialog ()
+{
+ dld_app->del_child(this);
+
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "dialog " << dld_name << " delete";
+ DLDdbg.flush ();
+#endif
+}
+
+void DLD_QTDialog::setGeometry ( int x, int y, int w, int h )
+{
+ // QDialog::setGeometry ( x, y, w, h );
+ init_size = QRect(x,y,w,h);
+}
+
+void DLD_QTDialog::
+create ()
+{
+ if(is_created)
+ return;
+
+ printvars = true;
+
+ setUpdatesEnabled( FALSE );
+
+ int nullanz=0, sum=0;
+ for(int i = 0; i < dld_rows; i++)
+ {
+ if(!qtobjs[i])
+ continue;
+ int p = qtobjs[i]->obj_heightP;
+ if(p)
+ sum += p;
+ else
+ nullanz++;
+ }
+ sum = (sum && (sum < 100)) ? 100 - nullanz : nullanz;
+
+ for(int i = 0; i < dld_rows; i++)
+ {
+ if(!qtobjs[i])
+ continue;
+ int p = qtobjs[i]->obj_heightP;
+ if(p)
+ toplayout->setStretchFactor(qtwidgets[i], p);
+ else {
+ if(qtobjs[i]->fixed_height)
+ toplayout->setStretchFactor(qtwidgets[i], 0);
+ else
+ toplayout->setStretchFactor(qtwidgets[i], sum / nullanz);
+ }
+ }
+
+ DLD_QTContainer::create();
+
+ toplayout->activate ();
+
+ if(init_size.isNull()) {
+ init_size = geometry();
+ resize((obj_widthP) ? init_size.width() * obj_widthP / 100
+ : sizeHint().width(),
+ (obj_heightP) ? init_size.height() * obj_heightP / 100
+ : sizeHint().height());
+ init_size = geometry();
+ } else {
+ resize((obj_widthP) ? init_size.width() * obj_widthP / 100
+ : init_size.width(),
+ (obj_heightP) ? init_size.height() * obj_heightP / 100
+ : init_size.height());
+
+ if ( children() ) {
+ QObjectListIt it(*children());
+ register QObject *object;
+ QWidget *widget;
+ while ( it ) { // show all widget children
+ object = it.current(); // (except popups)
+ ++it;
+ if ( object->isWidgetType() ) {
+ widget = (QWidget*)object;
+ widget->show();
+ }
+ }
+ }
+ }
+
+ if(first_time) {
+ // Window-Manager soll Fenster plazieren, deshalb raus:
+ // move(init_size.x(), init_size.y());
+ first_time = false;
+ }
+
+ setUpdatesEnabled( TRUE );
+ show ();
+
+ is_created = true;
+ DLD_Obj::create();
+}
+
+void DLD_QTDialog::
+insert (QWidget * w, DLD_QTObj * obj)
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "dialog add widget at row " << dld_rows << endl << flush;
+#endif
+
+// toplayout->expand(dld_rows+1, 1);
+
+ toplayout->addWidget (w);
+// toplayout->addWidget (w, dld_rows, 0, AlignCenter);
+ qtobjs[dld_rows] = obj;
+ qtwidgets[dld_rows] = w;
+ dld_rows++;
+ empty = false;
+}
+
+void DLD_QTDialog::
+done (int w)
+{
+ DLDdbg << "qt_dialog done(" << w << ") called" << endl << flush;
+
+ emit has_exited();
+
+ if(dld_app->mainDialog != this) {
+ QDialog::done(w);
+ delete this;
+ } else {
+ /*
+ * Don't call done if we are the mainDialog,
+ * cause it would delete us.
+ */
+// QDialog::done(w);
+ /* Don't call cleanup here */
+// cleanup();
+ }
+};
+
+int DLD_QTDialog::
+set_name (const string& name)
+{
+ dld_name = name;
+ setCaption (name.c_str());
+ return 0;
+}
+
+void DLD_QTDialog::cleanup()
+{
+// init_size = geometry();
+
+ setUpdatesEnabled( FALSE );
+
+ // Clean up childlist
+ for(CI i = childlist.begin(); i != childlist.end(); i = childlist.begin()) {
+ delete *i;
+ }
+
+ delete toplayout;
+
+ toplayout = new QVBoxLayout (this);
+
+ setUpdatesEnabled( TRUE );
+
+ toplayout->activate ();
+
+ repaint();
+
+// setUpdatesEnabled( FALSE );
+ dld_rows = 0;
+
+ // Clean up dld_name
+ dld_name.erase();
+
+ is_created = false;
+ empty = true;
+
+ DLD_Dialog::close();
+ out.flush();
+}
+
+void DLD_QTDialog::closeEvent ( QCloseEvent * e)
+{
+ printvars = false;
+ if(dld_app->mainDialog == this) {
+ /*
+ * Don't close the window,
+ * if we are the main Dialog
+ */
+ cleanup();
+ emit has_exited();
+ }
+ else {
+ QDialog::closeEvent(e);
+ }
+}
diff --git a/dldialog/src/DLD_QT/dld_dialog.h b/dldialog/src/DLD_QT/dld_dialog.h
new file mode 100644
index 0000000..1900d1f
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_dialog.h
@@ -0,0 +1,82 @@
+/******************************************************************************
+**
+** $Id: dld_dialog.h,v 1.15 2000/03/15 20:02:17 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+
+#ifndef DLD_QTDIALOG_H
+#define DLD_QTDIALOG_H
+
+#include "../dld_dialog.h"
+#include "dld_qtcontainer.h"
+#include <qdialog.h>
+#include <qgrpbox.h>
+#include <qlayout.h>
+#include <qmenubar.h>
+
+/** provides an user dialog in qt style for dldialog.
+ *
+ */
+class DLD_QTDialog: public QDialog, public DLD_QTContainer, public DLD_Dialog
+{
+ Q_OBJECT;
+
+public:
+
+ ///
+ DLD_QTDialog(const string& name, DLD_QTApp *aptr, const DLD_Out path);
+ ///
+ virtual ~DLD_QTDialog();
+
+ ///
+ void create();
+
+ ///
+ virtual void done(int);
+
+ ///
+ void cleanup() ;
+
+ void close_brace() { create(); };
+
+ ///
+ QRect init_size;
+
+ int set_name (const string& name);
+
+ void insert (QWidget * w, DLD_QTObj *obj);
+
+ bool isEmpty() {
+ return empty;
+ }
+
+ void setGeometry ( int x, int y, int w, int h );
+
+signals:
+ ///
+ void has_exited();
+
+protected:
+ ///
+// QGridLayout *toplayout;
+ QVBoxLayout *toplayout;
+ ///
+ QMenuBar *menu;
+
+ int dld_rows;
+ bool empty, first_time;
+ map<int, DLD_QTObj*> qtobjs;
+ map<int, QWidget*> qtwidgets;
+
+protected slots:
+ virtual void closeEvent ( QCloseEvent * );
+};
+
+#endif
diff --git a/dldialog/src/DLD_QT/dld_form.cc b/dldialog/src/DLD_QT/dld_form.cc
new file mode 100644
index 0000000..a0d484b
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_form.cc
@@ -0,0 +1,90 @@
+/******************************************************************************
+**
+** $Id: dld_form.cc,v 1.10 1999/04/12 13:19:54 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#include "dld_qtlib.h"
+#include "dld_form.h"
+#include <iostream.h>
+#include <qfontmetrics.h>
+
+DLD_QTForm::
+DLD_QTForm (QWidget *_parent, const string& _name, DLD_QTApp *aptr,
+ DLD_QTDialog *dia) :
+ QGroupBox (convstr(_name).c_str(), _parent),
+ QHBoxLayout ((QGroupBox *) this, QT_BORDER),
+ DLD_QTObj (_name, dia),
+ DLD_QTContainer(_name, aptr, dia),
+ dld_cols(0),
+ dld_rows(0)
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "row ";
+#endif
+ if (_name.length() == 0)
+ setFrameStyle (NoFrame);
+ else
+#if QT_VERSION < 200
+ basicManager()->setBorder(20);
+#endif
+// dld_rows = 1;
+// setRowStretch(0, 1);
+
+// setMargin(10);
+ qwidget = this;
+ fixed_width = fixed_height = true;
+}
+
+DLD_QTForm::
+~DLD_QTForm ()
+{
+}
+
+void DLD_QTForm::
+insert (QWidget * w, DLD_QTObj *obj)
+{
+ QHBoxLayout::addWidget (w, AlignCenter);
+ qtobjs[dld_rows] = obj;
+ qwidgets[dld_rows] = w;
+ dld_cols++;
+}
+
+void DLD_QTForm::
+create (void)
+{
+ int nullanz=0, sum=0;
+ for(int i = 0; i < dld_rows; i++)
+ {
+ if(!qtobjs[i])
+ continue;
+ int p = qtobjs[i]->obj_heightP;
+ if(p)
+ sum += p;
+ else
+ nullanz++;
+ }
+ sum = (sum && (sum < 100)) ? 100 - nullanz : nullanz;
+ for(int i = 0; i < dld_rows; i++)
+ {
+ if(!qtobjs[i])
+ continue;
+ int p = qtobjs[i]->obj_heightP;
+ if(p)
+ setStretchFactor(qwidgets[i], p);
+ else {
+ if(qtobjs[i]->fixed_height)
+ setStretchFactor(qwidgets[i], 0);
+ else
+ setStretchFactor(qwidgets[i], sum / nullanz);
+ }
+ }
+ DLD_QTContainer::create ();
+ QHBoxLayout::activate ();
+}
diff --git a/dldialog/src/DLD_QT/dld_form.h b/dldialog/src/DLD_QT/dld_form.h
new file mode 100644
index 0000000..00161cf
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_form.h
@@ -0,0 +1,53 @@
+/******************************************************************************
+**
+** $Id: dld_form.h,v 1.8 2000/03/15 20:02:17 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#ifndef DLD_FORM_H
+#define DLD_FORM_H
+
+#include "../dld_form.h"
+#include "dld_qtcontainer.h"
+#include <qlayout.h>
+#include <qgrpbox.h>
+#include <map>
+
+class DLD_QTDialog;
+class DLD_QTApp;
+
+/** A container for other dldialog elements, that orders these in a row.
+ *
+ */
+class DLD_QTForm : public QGroupBox, public QHBoxLayout,
+ public DLD_QTContainer, public DLD_Form
+{
+public:
+ ///
+ DLD_QTForm(QWidget *_parent, const string& _name,
+ DLD_QTApp *aptr, DLD_QTDialog *dia);
+
+ ///
+ virtual ~DLD_QTForm();
+
+ ///
+ void insert(QWidget *w, DLD_QTObj *obj);
+
+ ///
+ void create();
+
+ void close_brace() { create(); };
+
+private:
+ int dld_cols, dld_rows;
+ map<int, DLD_QTObj*> qtobjs;
+ map<int, QWidget*> qwidgets;
+};
+
+#endif
diff --git a/dldialog/src/DLD_QT/dld_gauge.cc b/dldialog/src/DLD_QT/dld_gauge.cc
new file mode 100644
index 0000000..82c40e9
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_gauge.cc
@@ -0,0 +1,87 @@
+/******************************************************************************
+**
+** $Id: dld_gauge.cc,v 1.8 1999/04/19 10:49:48 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+!******************************************************************************/
+#include "dld_qtlib.h"
+#include "dld_gauge.h"
+#include "dld_dialog.h"
+#include <stdio.h>
+#include <iostream.h>
+
+DLD_QTGauge::DLD_QTGauge (QWidget *_parent,
+ const string& name, DLD_QTDialog *pd):
+ QProgressBar (_parent),
+ DLD_QTObj (name, pd)
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "gauge " << dld_name << flush;
+#endif
+// setMinimumWidth (sizeHint ().width ());
+ setFixedHeight (sizeHint ().height ());
+ fixed_height = true;
+
+#ifdef DEBUG
+ DLDdbg << " constructed." << endl << flush;
+#endif
+}
+
+DLD_QTGauge::
+~DLD_QTGauge ()
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "gauge deleted\n";
+#endif
+ activate();
+}
+
+void DLD_QTGauge::
+create ()
+{
+ setTotalSteps(100);
+ if(varname.length()) {
+ int progress;
+ string val(dialog->get_env(varname));
+ sscanf(val.c_str(), "%d", &progress);
+ set_progress(progress);
+ }
+ DLD_Obj::create();
+ DLD_Gauge::create();
+}
+
+void DLD_QTGauge::
+set_progress (int _p)
+{
+ static int oldp = 0;
+ if ( (_p >= 0) && (_p <= 100) ) {
+ char istr[512];
+ sprintf(istr, "%d", _p);
+ varvalue = istr;
+ if (oldp > _p) {
+ setUpdatesEnabled( FALSE );
+ reset();
+ setProgress(_p);
+ setUpdatesEnabled( TRUE );
+ repaint();
+ }
+ else
+ setProgress(_p);
+ oldp = _p;
+ // DLD_Obj is without exit
+ DLD_Obj::activate();
+ }
+
+ if (_p < 0) {
+ if(is_exit())
+ {
+ pardia->done(0);
+ }
+ }
+}
diff --git a/dldialog/src/DLD_QT/dld_gauge.h b/dldialog/src/DLD_QT/dld_gauge.h
new file mode 100644
index 0000000..fe9a500
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_gauge.h
@@ -0,0 +1,38 @@
+/******************************************************************************
+**
+** $Id: dld_gauge.h,v 1.3 2000/03/15 20:02:17 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+
+#ifndef DLD_QTGAUGE_H
+#define DLD_QTGAUGE_H
+
+#include "../dld_gauge.h"
+#include "dld_qtobj.h"
+#include <qwidget.h>
+#include <qprogressbar.h>
+
+/** The button class in qt style.
+ *
+ */
+class DLD_QTGauge : public QProgressBar, public DLD_QTObj,
+ public DLD_Gauge
+{
+public:
+ ///
+ DLD_QTGauge(QWidget *_parent, const string& name, DLD_QTDialog *pd);
+ ///
+ virtual ~DLD_QTGauge();
+ ///
+ void create();
+ void set_progress(int p);
+};
+
+#endif
diff --git a/dldialog/src/DLD_QT/dld_image.cc b/dldialog/src/DLD_QT/dld_image.cc
new file mode 100644
index 0000000..6434875
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_image.cc
@@ -0,0 +1,158 @@
+/******************************************************************************
+**
+** $Id: dld_image.cc,v 1.7 2000/03/15 20:02:17 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+!******************************************************************************/
+#include "dld_qtlib.h"
+#include "dld_image.h"
+#include "dld_dialog.h"
+#ifdef HAVE_QIMGIO
+#include <qpngio.h>
+#endif
+#include <qpainter.h>
+#include <qbitmap.h>
+#include <iostream.h>
+
+DLD_QTImage::DLD_QTImage (QWidget *_parent,
+ const string& name, DLD_QTDialog *pd):
+ QWidget (_parent),
+ DLD_QTObj (name, pd)
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "image " << dld_name
+ << " constructed " << endl
+ << flush;
+#endif
+ fixed_height = fixed_width = true;
+#ifdef HAVE_QIMGIO
+ qInitPngIO ();
+#endif
+#ifdef DEBUG
+ DLDdbg << " constructed." << endl << flush;
+#endif
+}
+
+DLD_QTImage::
+~DLD_QTImage ()
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "image deleted\n";
+#endif
+}
+
+void DLD_QTImage::
+create ()
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "image loading " << dld_name << endl
+ << flush;
+#endif
+
+ if(is_movie) {
+ movie = QMovie(dld_name.c_str());
+
+ if(movie.isNull()) {
+ getPixmap();
+ }
+ else {
+ movie.setBackgroundColor(backgroundColor());
+ movie.connectStatus(this, SLOT(movieStatus(int)));
+ movie.connectUpdate(this, SLOT(movieUpdate(const QRect&)));
+ movie.connectResize(this, SLOT(movieResized(const QSize&)));
+ }
+ }
+ else {
+ getPixmap();
+ }
+
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "image filling." << endl << flush;
+#endif
+
+// pix.fill(this, 0, 0);
+
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "image filled." << endl << flush;
+#endif
+
+/* setFixedWidth (p.width ());
+ setFixedHeight (p.height ());
+*/
+// repaint();
+ DLD_Obj::create();
+}
+
+
+void DLD_QTImage::paintEvent( QPaintEvent *e)
+{
+ QPainter paint( this );
+ paint.setClipRect(e->rect());
+
+ QPixmap pm;
+
+ if(is_movie)
+ pm = movie.framePixmap();
+ else
+ pm = pix;
+
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "image paintEvent." << endl << flush;
+#endif
+
+ paint.drawPixmap(0, 0, pm);
+}
+
+void DLD_QTImage::getPixmap()
+{
+ pix.load(dld_name.c_str());
+ if(pix.isNull())
+ DLDerr << "image " << dld_name << _(" could not be loaded")
+ << endl << flush;
+ else {
+ setFixedWidth (pix.width ());
+ setFixedHeight (pix.height ());
+ repaint();
+ }
+}
+
+void DLD_QTImage::movieStatus( int status)
+{
+ if (status < 0) {
+ movie.disconnectStatus(this, SLOT(movieStatus(int)));
+ movie.disconnectUpdate(this, SLOT(movieUpdate(const QRect&)));
+ movie.disconnectResize(this, SLOT(movieResized(const QSize&)));
+ getPixmap();
+ }
+ else is_movie = true;
+}
+
+void DLD_QTImage::movieUpdate( const QRect& area)
+{
+ QRect r = rect();
+/*
+ if ( r.size() != movie.framePixmap().size() ) {
+ // Need to scale - redraw whole frame.
+ repaint( r );
+ } else {
+*/
+ // Only redraw the changed area of the frame
+ repaint( area.x()+r.x(), area.y()+r.y(),
+ area.width(), area.height() );
+// }
+
+}
+
+void DLD_QTImage::movieResized(const QSize& size)
+{
+ // The movie changed size, probably from its initial zero size.
+ resize( size.width() , size.height() );
+ setFixedWidth (size.width ());
+ setFixedHeight (size.height ());
+}
diff --git a/dldialog/src/DLD_QT/dld_image.h b/dldialog/src/DLD_QT/dld_image.h
new file mode 100644
index 0000000..bca2ed6
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_image.h
@@ -0,0 +1,51 @@
+/******************************************************************************
+**
+** $Id: dld_image.h,v 1.5 2000/03/15 20:02:17 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+
+#ifndef DLD_QTIMAGE_H
+#define DLD_QTIMAGE_H
+
+#include "../dld_image.h"
+#include "dld_qtobj.h"
+#include <qwidget.h>
+#include <qpixmap.h>
+#include <qmovie.h>
+
+/** The image class in qt style.
+ *
+ */
+class DLD_QTImage : public QWidget, public DLD_QTObj, public DLD_Image
+{
+ Q_OBJECT;
+public:
+ ///
+ DLD_QTImage(QWidget *_parent, const string& name, DLD_QTDialog *pd);
+ ///
+ virtual ~DLD_QTImage();
+ ///
+ void create();
+ void paintEvent(QPaintEvent*);
+
+ public slots:
+ void movieStatus(int);
+ void movieUpdate(const QRect&);
+ void movieResized(const QSize&);
+
+protected:
+ void getPixmap();
+
+private:
+ QMovie movie;
+ QPixmap pix;
+};
+
+#endif
diff --git a/dldialog/src/DLD_QT/dld_input.cc b/dldialog/src/DLD_QT/dld_input.cc
new file mode 100644
index 0000000..f81b541
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_input.cc
@@ -0,0 +1,230 @@
+/******************************************************************************
+**
+** $Id: dld_input.cc,v 1.15 2000/03/23 11:39:00 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#include "dld_qtlib.h"
+#include "dld_input.h"
+#include "dld_text.h"
+#include "dld_dialog.h"
+
+#include <iostream.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <qregexp.h>
+#include <qstring.h>
+#include <qkeycode.h>
+
+DLD_QTInput::
+DLD_QTInput (QWidget *_parent, const string& name, DLD_QTDialog *pd) :
+ QLineEdit (_parent, convstr(name).c_str()),
+ DLD_QTObj (name, pd),
+ isIp(false),
+ isNum(false),
+ isPass(false),
+ dld_length(0)
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "input " << dld_name << " constructed "
+ << endl << flush;
+#endif
+ setMaxLength (1024);
+}
+
+
+DLD_QTInput::
+~DLD_QTInput ()
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "input deleted\n";
+#endif
+}
+
+void DLD_QTInput::slotTextChanged1(const char *)
+{
+ varvalue = text();
+ DLD_Obj::activate ();
+}
+
+void DLD_QTInput::slotTextChanged2(const QString &)
+{
+ varvalue = text();
+ DLD_Obj::activate ();
+}
+
+void DLD_QTInput::slotReturn()
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "return pressed"
+ << endl << flush;
+#endif
+ varvalue = text ();
+ DLD_QTObj::activate ();
+}
+
+void DLD_QTInput::
+create ()
+{
+ setText(pardia->get_env(varname).c_str());
+
+ if (isPass)
+ {
+ setEchoMode(Password);
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "input passwd\n";
+#endif
+ }
+
+ if (isNum)
+ {
+ setValidator (new DLD_NumInput (this));
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "input numeric\n";
+#endif
+ setMinimumWidth (sizeHint ().width ());
+ }
+ else if (isIp)
+ {
+ if(!strlen(text()))
+ setText("0.0.0.0");
+ setMaxLength (15);
+ setValidator (new DLD_IPInput (this));
+ setFixedWidth (sizeHint ().width ());
+ fixed_width = true;
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "input IP\n";
+#endif
+ }
+ else
+ setMinimumWidth (sizeHint ().width ());
+
+ setFixedHeight (sizeHint ().height ());
+ fixed_height = true;
+
+ if(dld_length) {
+ setMaxLength (dld_length);
+ int w = sizeHint ().width () / 15 * (dld_length+1);
+ setMinimumWidth (w);
+ setFixedWidth (w);
+ fixed_width = true;
+ }
+
+ connect( this, SIGNAL(returnPressed(void)),
+ this, SLOT(slotReturn(void)));
+#if QT_VERSION < 200
+ connect( this, SIGNAL(textChanged(const char *)),
+ this, SLOT(slotTextChanged1(const char *)));
+#else
+ connect( this, SIGNAL(textChanged(const QString &)),
+ this, SLOT(slotTextChanged2(const QString &)));
+#endif
+
+ DLD_Obj::create();
+}
+
+void DLD_QTInput::keyPressEvent ( QKeyEvent * e )
+{
+ if (e->key() == Key_Return || e->key() == Key_Enter ) {
+ QLineEdit::keyPressEvent(e);
+ emit returnPressed();
+ }
+ else
+ QLineEdit::keyPressEvent(e);
+}
+
+void DLD_QTInput::focusInEvent ( QFocusEvent * e) {
+ setText(pardia->get_env(varname).c_str());
+ QLineEdit::focusInEvent(e);
+}
+
+
+DLD_IPInput::
+ DLD_IPInput (QWidget * parent, const char *name):
+ QValidator (parent, name)
+{
+}
+
+DLD_IPInput::
+~DLD_IPInput ()
+{
+}
+
+QValidator::State DLD_IPInput::
+validate (QString & input, int &)
+#if QT_VERSION > 200
+const
+#endif
+{
+ QRegExp accept = QRegExp ("^[0-2]?[0-9]?[0-9]?\\.[0-2]?[0-9]?[0-9]?\\.[0-2]?[0-9]?[0-9]?\\.[0-2]?[0-9]?[0-9]?$", FALSE, FALSE);
+
+ QRegExp correct = QRegExp ("^[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]$", FALSE, FALSE);
+
+ if(correct.match(input) == 0) {
+ int num[4], i;
+
+ if(sscanf(input, "%d.%d.%d.%d", &num[0], &num[1], &num[2], &num[3]) != 4)
+ return QValidator::Invalid;
+
+ for(i=0; i<4; i++) {
+ // DLDerr << "Checking num" << i << "=" << num[i] << endl << flush;
+ if(num[i] < 0 || num[i] > 255)
+ return QValidator::Invalid;
+ }
+
+ return QValidator::Valid;
+ }
+
+ if (accept.match(input) == 0) {
+ return QValidator::Acceptable;
+ }
+
+ return QValidator::Invalid;
+
+}
+
+void DLD_IPInput::
+fixup (QString &)
+{
+}
+
+DLD_NumInput::
+ DLD_NumInput (QWidget * parent, const char *name):
+ QValidator (parent, name)
+{
+}
+
+DLD_NumInput::
+~DLD_NumInput ()
+{
+}
+
+QValidator::State DLD_NumInput::
+validate (QString & input, int &)
+#if QT_VERSION > 200
+const
+#endif
+{
+ QRegExp accept = QRegExp ("^[0-9]*$");
+ QRegExp correct = QRegExp ("^[0-9]+$");
+
+ if(correct.match(input) == 0)
+ return QValidator::Valid;
+
+ if (accept.match(input) == 0)
+ return QValidator::Acceptable;
+
+ return QValidator::Invalid;
+
+}
+
+void DLD_NumInput::
+fixup (QString &)
+{
+}
diff --git a/dldialog/src/DLD_QT/dld_input.h b/dldialog/src/DLD_QT/dld_input.h
new file mode 100644
index 0000000..3dcdc92
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_input.h
@@ -0,0 +1,96 @@
+/*************************************************************************
+**
+** $Id: dld_input.h,v 1.10 2000/03/23 11:39:00 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+*************************************************************************/
+
+#ifndef DLD_QTINPUT_H
+#define DLD_QTINPUT_H
+
+#include "../dld_input.h"
+#include "dld_qtobj.h"
+#include <qlined.h>
+#include <qvalidator.h>
+
+/** The input widget in qt style
+ *
+ */
+class DLD_QTInput : public QLineEdit, public DLD_Input, public DLD_QTObj
+{
+ Q_OBJECT;
+public:
+ ///
+ DLD_QTInput(QWidget *_parent, const string& name, DLD_QTDialog *pd);
+ ///
+ ~DLD_QTInput();
+ ///
+ void create();
+ /** Set the maximal length of the input field
+ * @param len the length
+ */
+ void set_length(int len) { dld_length = len; };
+ void set_ip(bool b) { isIp = b;};
+ void set_passwd(bool b) { isPass = b;};
+ void set_numeric(bool b) { isNum = b; };
+
+public slots:
+ void slotReturn();
+
+ void slotTextChanged1(const char *);
+ void slotTextChanged2(const QString &);
+
+protected:
+ virtual void keyPressEvent ( QKeyEvent * e );
+ virtual void focusInEvent ( QFocusEvent * ) ;
+ bool isIp, isNum, isPass;
+ int dld_length;
+};
+
+/** The input widget validator for ip input
+ *
+ */
+class DLD_IPInput : public QValidator
+{
+public:
+ ///
+ DLD_IPInput(QWidget * parent, const char * name = 0);
+ ///
+ virtual ~DLD_IPInput();
+ ///
+#if QT_VERSION < 200
+ State validate ( QString &, int & );
+#else
+ State validate ( QString &, int & ) const;
+#endif
+ ///
+ void fixup ( QString & );
+};
+
+/** The input widget validator for numeric input
+ *
+ */
+class DLD_NumInput : public QValidator
+{
+public:
+ ///
+ DLD_NumInput(QWidget * parent, const char * name = 0);
+ ///
+ virtual ~DLD_NumInput();
+ ///
+#if QT_VERSION < 200
+ State validate ( QString &, int & ) ;
+#else
+ State validate ( QString &, int & ) const;
+#endif
+ ///
+ void fixup ( QString & );
+};
+
+#endif
diff --git a/dldialog/src/DLD_QT/dld_lib.cc b/dldialog/src/DLD_QT/dld_lib.cc
new file mode 100644
index 0000000..9fad080
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_lib.cc
@@ -0,0 +1,18 @@
+/******************************************************************************
+**
+** $Id: dld_lib.cc,v 1.3 1998/06/19 09:17:52 saturn Exp $
+**
+** 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.
+**
+******************************************************************************/
+#include "dld_qtlib.h"
+#include "dld_qtapp.h"
+
+extern "C" DLD_Gui *
+dld_lib_init (const char *name, int argc, char **argv)
+{
+ return new DLD_QTApp (name, argc, argv);
+}
diff --git a/dldialog/src/DLD_QT/dld_list.cc b/dldialog/src/DLD_QT/dld_list.cc
new file mode 100644
index 0000000..f998c23
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_list.cc
@@ -0,0 +1,198 @@
+/******************************************************************************
+**
+** $Id: dld_list.cc,v 1.12 1999/04/02 17:36:03 harald Exp $
+**
+** 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.
+**
+******************************************************************************/
+#include "dld_qtlib.h"
+#include "dld_list.h"
+#include "dld_listitem.h"
+#include "dld_qtapp.h"
+
+#include <qstring.h>
+#include <iostream.h>
+
+DLD_QTList::
+DLD_QTList (QWidget *_parent,
+ const string& name, DLD_QTDialog *pd):
+ QListBox (_parent, name.c_str()),
+ DLD_QTObj (name, pd),
+ dict ()
+{
+ set_multi(false);
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "list ";
+#endif
+ connect (this, SIGNAL(selected(int)),
+ this, SLOT(slotSelected(int)));
+}
+
+DLD_QTList::
+~DLD_QTList ()
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "list delete\n";
+#endif
+ slotSelected(0);
+}
+
+void DLD_QTList::slotSelected(int)
+{
+ deactivate();
+ QString str (""), istr;
+ int i, cnt = count ();
+
+ for (i = 0; i < cnt; i++)
+ {
+ DLD_QTObj *obj = dict.find (item (i));
+ if (obj)
+ {
+ if (!isSelected (i))
+ obj->deactivate();
+ }
+ }
+
+ for (i = 0; i < cnt; i++)
+ {
+ DLD_QTObj *obj = dict.find (item (i));
+ if (obj)
+ {
+ if (isSelected (i))
+ {
+ if(is_multi) {
+ str += istr.setNum (i + 1);
+ str += QString (" ");
+ } else {
+ str = istr.setNum (i + 1);
+ }
+
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "list activate " << obj->dld_name
+ << endl << flush;
+#endif
+ obj->activate ();
+ }
+ }
+ }
+
+ varvalue = (const char *)str;
+
+ activate ();
+}
+
+DLD_ListItem *DLD_QTList::
+listitem (const string& name)
+{
+ DLD_QTListItem *lbi = new DLD_QTListItem(this, name, pardia);
+ QListBox::insertItem (lbi);
+
+ add_child(lbi);
+
+ dict.insert ((QListBoxItem *) lbi, lbi);
+
+ return lbi;
+}
+
+
+QSize DLD_QTList::
+sizeHint ()
+{
+ int cnt = count ();
+ int height = 0;
+ int i;
+ cnt = (cnt <= 12) ? cnt : 12;
+ for (i = 0; i < cnt; i++)
+ height += (itemHeight (i) + 2);
+ return QSize (maxItemWidth () + 10, 10 + height);
+}
+
+
+void DLD_QTList::
+create (void)
+{
+ bool wasset=false;
+ clearSelection ();
+
+ QString str, istr;
+ int i, cnt = count ();
+
+ // This must be here .... do not REMOVE!
+ if(cnt)
+ setCurrentItem(0);
+
+ if ( fontname.length() > 0 ) {
+ QFont newfont( fontname.c_str() , fontsize, false );
+ this->setFont( newfont );
+ }
+
+ setMinimumSize(((maxItemWidth() < 100) ? maxItemWidth() : 100 )
+ + 10, 10 + itemHeight (0) * ((count() <= 3) ? count() : 3));
+
+ if(cnt) {
+
+ // First check the listitems
+ for (i = 0; i < cnt; i++)
+ {
+ DLD_QTListItem *obj = dict.find (item (i));
+ if (obj)
+ {
+ if (obj->test_env())
+ {
+ wasset=true;
+ setSelected(i, TRUE);
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "list activate " << i << " obj "
+ << obj->dld_name << "\n";
+#endif
+ }
+ }
+ }
+
+ // Now check my own variable
+ for (i = 0; i < cnt; i++)
+ {
+ if (test_env(string(istr.setNum (i + 1))))
+ {
+ wasset=true;
+ setSelected(i, TRUE);
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "list activate " << i << "\n";
+#endif
+ }
+ }
+
+ if (!is_multi && !wasset ) {
+ setSelected(0, TRUE);
+ }
+
+ centerCurrentItem();
+ updateCellWidth();
+ repaint();
+
+// pardia->dld_app->processEvents();
+// slotSelected(0);
+
+ for (i = 0; i < cnt; i++)
+ {
+ DLD_QTListItem *obj = dict.find (item (i));
+ if (obj)
+ {
+ obj->create();
+ }
+ }
+
+ DLD_Obj::create();
+ }
+}
+
+void DLD_QTList::
+set_multi(bool on)
+{
+ setMultiSelection (on);
+ DLD_List::set_multi(on);
+}
+
diff --git a/dldialog/src/DLD_QT/dld_list.h b/dldialog/src/DLD_QT/dld_list.h
new file mode 100644
index 0000000..9cf9a4a
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_list.h
@@ -0,0 +1,71 @@
+/******************************************************************************
+**
+** $Id: dld_list.h,v 1.8 1999/08/09 15:29:11 harald Exp $
+**
+** 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.
+**
+******************************************************************************/
+#ifndef DLD_QTLIST_H
+#define DLD_QTLIST_H
+
+#include "../dld_list.h"
+#include "dld_qtobj.h"
+#include <qlistbox.h>
+#include <qptrdict.h>
+
+class DLD_QTListItem;
+class DLD_ListItem;
+
+/** The list class in qt style.
+ */
+
+class DLD_QTList : public QListBox, public DLD_QTObj, public DLD_List
+{
+ Q_OBJECT;
+public:
+ ///
+ DLD_QTList(QWidget *_parent, const string& name, DLD_QTDialog *pd);
+
+ ///
+ virtual ~DLD_QTList();
+
+ ///
+ QSize sizeHint();
+
+ void DLD_QTList::set_font(char*, int);
+
+ /** Adds a listitem to the list.
+ * @param name The text of the listitem
+ * @return ptr to DLD_ListItem
+ */
+ DLD_ListItem * listitem (const string&);
+
+ ///
+ void create();
+
+ void set_multi(bool);
+
+ /** Indicates the beginning of a new block
+ *
+ * Can be used to reserve space for children.
+ */
+ void open_brace() {};
+
+ /** Indicates the end of a block.
+ *
+ * Can be used to collect all children.
+ */
+ void close_brace() {};
+
+public slots:
+ void slotSelected(int index);
+
+protected:
+ ///
+ QPtrDict<DLD_QTListItem> dict;
+};
+
+#endif
diff --git a/dldialog/src/DLD_QT/dld_listitem.cc b/dldialog/src/DLD_QT/dld_listitem.cc
new file mode 100644
index 0000000..8a2ed6f
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_listitem.cc
@@ -0,0 +1,93 @@
+/******************************************************************************
+**
+** $Id: dld_listitem.cc,v 1.9 1999/09/13 13:24:07 harald Exp $
+**
+** 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.
+**
+******************************************************************************/
+#include "dld_qtlib.h"
+#include "dld_listitem.h"
+#include <qpixmap.h>
+#include <qpainter.h>
+#include <qwidget.h>
+
+#include <iostream.h>
+
+DLD_QTListItem::
+DLD_QTListItem (QWidget *, const string& name, DLD_QTDialog *pd):
+ QListBoxText (),
+ DLD_QTObj (name, pd)
+{
+ QListBoxText::setText(dld_name.c_str());
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "listitem ";
+#endif
+}
+
+DLD_QTListItem::
+~DLD_QTListItem ()
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "listitem deleted\n";
+#endif
+}
+
+void DLD_QTListItem::create () {
+ if (imagestr.length() > 0 )
+ {
+ pm.load(imagestr.c_str());
+ if(pm.isNull()) {
+ DLDerr << "image " << imagestr << _(" could not be loaded")
+ << endl << flush;
+ }
+ }
+ DLD_Obj::create();
+
+}
+
+void DLD_QTListItem::paint( QPainter *p )
+{
+ // store the old settings
+ QPen oldpen(p->pen());
+ QColor oldbg(p->backgroundColor ());
+ QFont oldfont(p->font());
+ if ( fontname.length() > 0 )
+ p->setFont( QFont( fontname.c_str() , fontsize, false ));
+
+ if (fg_color.length() > 0)
+ p->setPen(QColor(fg_color.c_str()));
+
+ if (bg_color.length() > 0)
+ p->setBackgroundColor(QColor(bg_color.c_str()));
+
+ if(!pm.isNull()) {
+ p->drawPixmap( 0, 0, pm );
+ }
+
+ QFontMetrics fm = p->fontMetrics();
+ int yPos; // vertical text position
+ if ( pm.height() < fm.height() )
+ yPos = fm.ascent() + fm.leading()/2;
+ else
+ yPos = pm.height()/2 - fm.height()/2 + fm.ascent();
+ p->drawText( pm.width() + 5, yPos, text() );
+
+ // restore the old settings
+ p->setFont( oldfont );
+ p->setPen(oldpen);
+ p->setBackgroundColor(oldbg);
+}
+
+int DLD_QTListItem::height(const QListBox *lb ) const
+{
+ return QMAX( pm.height() + 1, lb->fontMetrics().lineSpacing() + 1 );
+}
+
+int DLD_QTListItem::width(const QListBox *lb ) const
+{
+ return pm.width() + lb->fontMetrics().width( text() ) + 6;
+}
+
diff --git a/dldialog/src/DLD_QT/dld_listitem.h b/dldialog/src/DLD_QT/dld_listitem.h
new file mode 100644
index 0000000..0fe1a2f
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_listitem.h
@@ -0,0 +1,53 @@
+/******************************************************************************
+**
+** $Id: dld_listitem.h,v 1.9 2000/03/15 20:02:17 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+
+#ifndef DLD_QTLISTITEM_H
+#define DLD_QTLISTITEM_H
+
+#include "../dld_listitem.h"
+#include "dld_qtobj.h"
+#include <qlistbox.h>
+#include <qpixmap.h>
+
+
+class DLD_QTDialog;
+class QWidget;
+
+/** The listitem in qt style for use with @ref DLD_List.
+ *
+ */
+class DLD_QTListItem : public QListBoxText, public DLD_QTObj,
+ public DLD_ListItem
+{
+public:
+ ///
+ DLD_QTListItem(QWidget *_parent, const string& name, DLD_QTDialog *pd);
+
+ ///
+ virtual ~DLD_QTListItem();
+
+ ///
+ void create();
+
+protected:
+ virtual void paint( QPainter * );
+ virtual int height( const QListBox * ) const;
+ virtual int width( const QListBox * ) const;
+ virtual const QPixmap *pixmap() { return &pm; }
+
+private:
+ QPixmap pm;
+
+};
+
+#endif
diff --git a/dldialog/src/DLD_QT/dld_qtapp.cc b/dldialog/src/DLD_QT/dld_qtapp.cc
new file mode 100644
index 0000000..4e73d30
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_qtapp.cc
@@ -0,0 +1,226 @@
+/******************************************************************************
+**
+** $Id: dld_qtapp.cc,v 1.23 2000/03/23 11:39:00 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#include "dld_qtapp.h"
+#include "dld_dialog.h"
+#include <qwidgetlist.h>
+#include <signal.h>
+#include <time.h>
+
+DLD_QTApp::DLD_QTApp (const string&, int argc, char **argv) :
+ QApplication (argc, argv)
+{
+
+#if QT_VERSION < 200
+ setStyle(WindowsStyle);
+#endif
+
+ mainDialog = 0;
+ running = false;
+ connect (this, SIGNAL (lastWindowClosed(void)),
+ this, SLOT (slot_has_exited (void)));
+ signal(SIGCHLD, SIG_IGN);
+}
+
+DLD_QTApp::
+~DLD_QTApp ()
+{
+ CI first = childlist.begin();
+ CI last = childlist.end();
+
+ while(first != last)
+ {
+ if(*first) {
+ delete *first;
+ }
+ first = childlist.begin();
+ last = childlist.end();
+ }
+
+ if(mainDialog)
+ delete mainDialog;
+
+#ifdef DEBUG
+ DLDdbg << "->Closing<-\n";
+ DLDdbg.flush ();
+#endif
+}
+
+DLD_Dialog *DLD_QTApp::
+dialog (const string& _name , const DLD_Out& _out)
+{
+ DLD_QTDialog *dia;
+
+ if (mainDialog && mainDialog->isEmpty()){
+ mainDialog->set_name(_name);
+ mainDialog->out.init(_out);
+ dia = mainDialog;
+ }
+ else {
+
+ dia = new DLD_QTDialog (_name, this, _out);
+
+#ifdef DEBUG
+ DLDdbg << guiname << " created new dldialog" << endl << flush;
+#endif
+ if(!mainDialog) {
+ connect (dia, SIGNAL (has_exited(void)),
+ this, SLOT (slot_has_exited (void)));
+
+ mainDialog = dia;
+ setMainWidget( mainDialog );
+ init_size = mainDialog->frameGeometry();
+ }
+ else {
+ dia->init_size = init_size;
+ }
+ }
+
+ add_child (dia);
+
+#ifdef DEBUG
+ DLDdbg << guiname << " added new dldialog " << _name << endl << flush;
+#endif
+
+ return dia;
+}
+
+int DLD_QTApp::
+exec ()
+{
+ if(!running && mainDialog && mainDialog->was_created()) {
+ print_status ("->Running<-");
+ running = true;
+/*
+ QWidgetList *list = QApplication::topLevelWidgets();
+ QWidgetListIt it( *list ); // iterate over the widgets
+ while ( it.current() ) { // for each top level widget...
+ if ( !it.current()->isVisible() )
+ it.current()->show();
+ ++it;
+ }
+ delete list; // delete the list, not the widgets
+*/
+ while(running) {
+ clock_t start, stop;
+ start = clock();
+ QApplication::processEvents(100);
+ stop = clock();
+ if(running) {
+ int tosleep = 100 - (stop - start) * 1000 / CLOCKS_PER_SEC;
+ DLD_Gui::parse(tosleep*1000);
+ }
+ }
+
+ QApplication::processEvents();
+
+ // Must be here
+ mainDialog->cleanup();
+
+ CI first = childlist.begin();
+ CI last = childlist.end();
+
+ while(first != last)
+ {
+ if(*first) {
+ if(*first != mainDialog) {
+ (*first)->hide();
+ delete *first;
+ }
+ else {
+ childlist.erase(first);
+ }
+ }
+ first = childlist.begin();
+ last = childlist.end();
+ }
+ print_status ("->Idle<-");
+ QApplication::processEvents();
+ }
+ else if(!running) {
+ print_status ("->Idle Parsing<-");
+ QApplication::processEvents();
+ DLD_Gui::parse(-1);
+ }
+
+ return 0;
+}
+
+void DLD_QTApp::
+slot_has_exited ()
+{
+ running = false;
+}
+
+void DLD_QTApp::
+del_child(DLD_QTDialog *dia)
+{
+ CI first = childlist.begin();
+ CI last = childlist.end();
+ while (first != last) {
+ if (*first == dia) {
+ // Remove it from the list
+ childlist.erase(first);
+
+ if(dia == mainDialog) {
+ /*
+ * First delete all other dialogs.
+ * This will get us here, but we already removed the mainDialog.
+ */
+ CI first = childlist.begin();
+ CI last = childlist.end();
+ while(first != last)
+ {
+/* (*first)->done(QDialog::Rejected);
+ QApplication::processEvents();
+*/
+ delete (*first);
+ first = childlist.begin();
+ last = childlist.end();
+ }
+ }
+ break;
+ }
+ first++;
+ }
+}
+
+int DLD_QTApp::
+add_child (DLD_QTDialog * nobj)
+{
+ Assert(Bad_arg, nobj);
+
+ childlist.push_back(nobj);
+
+ return 0;
+}
+
+int DLD_QTApp::
+print_status (const string &str)
+{
+#ifdef DEBUG
+ DLDdbg << "status " << str << "\n";
+ DLDdbg.flush ();
+#endif
+
+ return 0;
+}
+
+const string& DLD_QTApp::name(const string& newname)
+{
+ guiname = newname;
+
+ if(mainDialog)
+ mainDialog->set_name(newname);
+
+ return guiname;
+}
diff --git a/dldialog/src/DLD_QT/dld_qtapp.h b/dldialog/src/DLD_QT/dld_qtapp.h
new file mode 100644
index 0000000..d003d34
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_qtapp.h
@@ -0,0 +1,81 @@
+/******************************************************************************
+**
+** $Id: dld_qtapp.h,v 1.13 2000/03/15 20:02:18 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#ifndef DLD_QTAPP_H
+#define DLD_QTAPP_H
+
+#include "../dld_gui.h"
+#include "dld_qtlib.h"
+#include "dld_qtobj.h"
+#include "dld_dialog.h"
+#include <qapp.h>
+
+/** The main interface class for the qt module.
+ *
+ */
+class DLD_QTApp : public QApplication, public DLD_Gui
+{
+ ///
+ Q_OBJECT;
+public:
+ /// Constructor
+ DLD_QTApp (const string& _name, int argc, char **argv);
+
+ /// Destructor
+ virtual ~DLD_QTApp ();
+
+ DLD_Dialog *dialog (const string& _name , const DLD_Out& out);
+
+ /// Virtual function.
+ int exec();
+
+ const string& name(const string& newname);
+
+ /// Virtual function.
+ const string& name () {
+ return guiname;
+ };
+
+ /// Virtual function.
+ int print_status (const string& text);
+
+ void del_child(DLD_QTDialog *dia);
+
+ int add_child (DLD_QTDialog *dia);
+
+ ///
+ DLD_QTDialog *mainDialog;
+
+///
+public slots:
+// void slot_has_exited(DLD_QTDialog *);
+ void slot_has_exited(void);
+
+protected:
+
+ typedef DLD_QTDialog *DLD_QTDialog_Ptr;
+ list<DLD_QTDialog_Ptr> childlist;
+ bool childlock;
+ typedef list<DLD_QTDialog_Ptr>::iterator CI;
+
+ bool app_done;
+
+private:
+///
+ string guiname;
+ bool running;
+ ///
+ QRect init_size;
+
+};
+
+#endif
diff --git a/dldialog/src/DLD_QT/dld_qtcontainer.cc b/dldialog/src/DLD_QT/dld_qtcontainer.cc
new file mode 100644
index 0000000..2e43f20
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_qtcontainer.cc
@@ -0,0 +1,199 @@
+/******************************************************************************
+**
+** $Id: dld_qtcontainer.cc,v 1.12 2000/03/15 20:02:18 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#include "dld_qtapp.h"
+#include "dld_qtcontainer.h"
+#include "dld_dialog.h"
+#include "dld_button.h"
+#include "dld_text.h"
+#include "dld_row.h"
+#include "dld_form.h"
+#include "dld_col.h"
+#include "dld_list.h"
+#include "dld_checklist.h"
+#include "dld_radiolist.h"
+#include "dld_textbox.h"
+#include "dld_combobox.h"
+#include "dld_gauge.h"
+#include "dld_input.h"
+#include "dld_image.h"
+
+DLD_QTContainer::
+DLD_QTContainer(const string& _name, DLD_QTApp *_app, DLD_QTDialog *pd) :
+ DLD_QTObj(_name, pd),
+ dld_app(_app)
+{
+#ifdef DEBUG
+ DLDdbg << "QTContainer " << dld_name << " constructed." << endl;
+#endif
+}
+
+DLD_QTContainer::
+~DLD_QTContainer()
+{
+}
+
+DLD_Dialog *DLD_QTContainer::
+dialog (const string& _name = 0)
+{
+ DLD_QTDialog *p = new DLD_QTDialog(_name, dld_app, pardia->out);
+ dld_app->add_child(p);
+ return p;
+}
+
+DLD_Form * DLD_QTContainer::
+form (const string& name)
+{
+ DLD_QTForm *p = new DLD_QTForm(qwidget, name, dld_app, pardia);
+ insert(p, p);
+ add_child(p);
+ return p;
+}
+
+DLD_Col * DLD_QTContainer::
+col (const string& name)
+{
+ DLD_QTCol *p = new DLD_QTCol(qwidget, name, dld_app, pardia);
+ insert(p, p);
+ add_child(p);
+ return p;
+}
+
+DLD_Row * DLD_QTContainer::
+row (const string& name)
+{
+ DLD_QTRow *p = new DLD_QTRow(qwidget, name, dld_app, pardia);
+ insert(p, p);
+ add_child(p);
+ return p;
+}
+
+DLD_List * DLD_QTContainer::
+list (const string& name)
+{
+ DLD_QTList *p = new DLD_QTList(qwidget, name, pardia);
+ add_child(p);
+ insert(p, p);
+ return p;
+}
+
+DLD_CheckList * DLD_QTContainer::
+checklist (const string& name)
+{
+ DLD_QTCheckList *p = new DLD_QTCheckList(qwidget, name, pardia);
+ add_child(p);
+ insert(p, p);
+ return p;
+}
+
+DLD_RadioList * DLD_QTContainer::
+radiolist (const string& name)
+{
+ DLD_QTRadioList *p = new DLD_QTRadioList(qwidget, name, pardia);
+ add_child(p);
+ insert(p, p);
+ return p;
+}
+
+DLD_ComboBox * DLD_QTContainer::
+combobox (const string& name)
+{
+ DLD_QTComboBox *p = new DLD_QTComboBox(qwidget, name, pardia);
+ add_child(p);
+ insert(p, p);
+ return p;
+}
+
+DLD_Text * DLD_QTContainer::
+text (const string& _name)
+{
+ DLD_QTText *p = new DLD_QTText(qwidget, _name, pardia);
+ add_child(p);
+ insert(p, p);
+ return p;
+}
+
+DLD_Button * DLD_QTContainer::
+button (const string& _name)
+{
+ DLD_QTButton *p = new DLD_QTButton(qwidget, _name, pardia);
+ add_child(p);
+ insert(p, p);
+ return p;
+}
+
+DLD_Gauge * DLD_QTContainer::
+gauge (const string& _name)
+{
+ DLD_QTGauge *p = new DLD_QTGauge(qwidget, _name, pardia);
+ add_child(p);
+ insert(p, p);
+ return p;
+}
+
+DLD_TextBox * DLD_QTContainer::
+textbox (const string& _name)
+{
+ DLD_QTTextBox *p = new DLD_QTTextBox(qwidget, _name, pardia);
+ add_child(p);
+ insert(p, p);
+ return p;
+}
+
+DLD_Input * DLD_QTContainer::
+input (const string& _name)
+{
+ DLD_QTInput *p = new DLD_QTInput(qwidget, _name, pardia);
+ add_child(p);
+ insert(p, p);
+ return p;
+}
+
+DLD_Image * DLD_QTContainer::
+image (const string& _name)
+{
+ DLD_QTImage *p = new DLD_QTImage(qwidget, _name, pardia);
+ add_child(p);
+ insert(p, p);
+ return p;
+}
+
+DLD_Menu * DLD_QTContainer::
+menu (const string&, bool)
+{
+ /* TODO */
+ DLDerr << "menu: not yet implemented\n" << endl;
+ Assert(Bad_arg, 0);
+ return 0;
+}
+
+void DLD_QTContainer::
+open_brace()
+{
+}
+
+void DLD_QTContainer::
+close_brace()
+{
+}
+
+void DLD_QTContainer::
+create()
+{
+ if (is_created)
+ return;
+
+ for(CI i = childlist.begin(); i != childlist.end(); ++i) {
+ (*i)->create ();
+ }
+ DLD_Obj::create();
+}
diff --git a/dldialog/src/DLD_QT/dld_qtcontainer.h b/dldialog/src/DLD_QT/dld_qtcontainer.h
new file mode 100644
index 0000000..c6aed16
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_qtcontainer.h
@@ -0,0 +1,110 @@
+/******************************************************************************
+**
+** $Id: dld_qtcontainer.h,v 1.8 2000/03/15 20:02:18 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+
+#ifndef DLD_QTCONTAINER_H
+#define DLD_QTCONTAINER_H
+
+#include "../dld_container.h"
+#include "dld_qtobj.h"
+#include <string>
+#include <list>
+
+/** QT implementation of the DLD_Container class
+ *
+ */
+class DLD_QTContainer: public virtual DLD_QTObj,
+ public virtual DLD_Container
+{
+public:
+
+ /** Constructor.
+ * @param _name The name of the container.
+ * @param _app The parent application.
+ * @param _pd The parent dialog
+ */
+ DLD_QTContainer(const string& _name,
+ DLD_QTApp *_app, DLD_QTDialog *_pd);
+
+ /// Destructor.
+ virtual ~DLD_QTContainer() ;
+
+ /// Pure virtual function.
+ virtual DLD_Dialog *dialog (const string& _name = 0);
+
+ /// Pure virtual function.
+ virtual DLD_Form * form (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_Col * col (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_Row * row (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_List * list (const string& _name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_CheckList * checklist (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_RadioList * radiolist (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_ComboBox * combobox (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_Text * text (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_Button * button (const string& _name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_Gauge * gauge (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_TextBox * textbox (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_Input * input (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_Image * image (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_Menu * menu (const string& name = 0, bool = false) ;
+
+ /// Pure virtual function.
+ virtual void open_brace() ;
+
+ /// Pure virtual function.
+ virtual void close_brace() ;
+
+ /// Pure virtual function.
+ virtual void create() ;
+
+ /** Delete a possible child from the childlist
+ * @param obj A DLD_QTObj, that may be a child of this container.
+ */
+ void del_child(DLD_QTObj * obj);
+
+ /// The parent DLD_QTApp application.
+ DLD_QTApp *dld_app;
+
+ virtual void insert (QWidget * w, DLD_QTObj *) = 0;
+
+protected:
+
+ QWidget *qwidget;
+};
+
+#endif
diff --git a/dldialog/src/DLD_QT/dld_qtlib.h b/dldialog/src/DLD_QT/dld_qtlib.h
new file mode 100644
index 0000000..c1c72c1
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_qtlib.h
@@ -0,0 +1,19 @@
+/******************************************************************************
+**
+** $Id: dld_qtlib.h,v 1.10 2000/03/15 20:02:18 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#ifndef DLD_QTLIB_H
+#define DLD_QTLIB_H
+
+#define DLD_LIB_PREFIX "dldqt_"
+#define QT_BORDER 10
+
+#endif
diff --git a/dldialog/src/DLD_QT/dld_qtobj.cc b/dldialog/src/DLD_QT/dld_qtobj.cc
new file mode 100644
index 0000000..cba76ec
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_qtobj.cc
@@ -0,0 +1,64 @@
+/******************************************************************************
+**
+** $Id: dld_qtobj.cc,v 1.14 2000/03/15 20:02:18 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+
+#include "dld_qtobj.h"
+#include "dld_dialog.h"
+
+string conname (const string& _str);
+
+/// Constructor
+DLD_QTObj::DLD_QTObj(const string& name, DLD_QTDialog *pd) :
+ dld_name(conname(name)),
+ obj_widthP(0),
+ obj_heightP(0),
+ fixed_width(false),
+ fixed_height(false),
+ pardia(pd),
+ app(0),
+ isexit(false)
+{
+ set_dialog(pd);
+}
+
+DLD_QTObj::
+~DLD_QTObj()
+{
+ DLDdbg << dld_name << " ~DLD_QTObj virtual destruktor" << endl;
+}
+
+void DLD_QTObj::activate()
+{
+ DLD_Obj::activate();
+
+ if(is_exit() && pardia && is_created) {
+ DLDdbg << dld_name << " exited Dialog" << endl;
+ pardia->done(0);
+ }
+}
+
+string conname (const string& _str)
+{
+ string str = convstr (_str);
+ string::size_type i;
+
+ while ((i = str.find("\t")) != string::npos) {
+ str.replace(i, 1, " ");
+ int lp = i - str.rfind("\n", i);
+ for(int j = 7 - (lp%8); j > 0; j--) {
+ str.insert(i, " ");
+ }
+ }
+
+ return str;
+}
+
diff --git a/dldialog/src/DLD_QT/dld_qtobj.h b/dldialog/src/DLD_QT/dld_qtobj.h
new file mode 100644
index 0000000..05737d6
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_qtobj.h
@@ -0,0 +1,75 @@
+/******************************************************************************
+**
+** $Id: dld_qtobj.h,v 1.15 2000/03/15 20:02:18 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+
+#ifndef DLD_QTOBJ_H
+#define DLD_QTOBJ_H
+
+#include "../dld_obj.h"
+#include <qwidget.h>
+
+class DLD_QTContainer;
+class DLD_QTDialog;
+class DLD_QTApp;
+
+/** Basic class for DLD_QT objects providing common methods.
+ *
+ */
+class DLD_QTObj : public virtual DLD_Obj
+{
+public:
+ /// Constructor
+ DLD_QTObj(const string& name, DLD_QTDialog *pd);
+
+ /// Destructor
+ virtual ~DLD_QTObj();
+
+ /** Set/Unset that the dialog should exit if item is activated.
+ * @param flag Bool
+ */
+ virtual void set_exit(bool flag) { isexit = flag;};
+
+ /** Set the width in percent.
+ * @param _w the new width in percent of the parent width
+ */
+ virtual void widthP (unsigned int _w) {obj_widthP = _w;};
+
+ /** Set the height in percent.
+ * @param _h the new height in percent of the parent height
+ */
+ virtual void heightP(unsigned int _h) {obj_heightP = _h;};
+
+ virtual void create() = 0;
+
+ virtual void activate();
+
+ virtual bool is_exit() {return isexit;};
+
+ /// name
+ string dld_name;
+
+ int obj_widthP, obj_heightP;
+
+ bool fixed_width, fixed_height;
+
+protected:
+ ///
+ DLD_QTDialog *pardia;
+
+ ///
+ DLD_QTApp *app;
+
+private:
+ bool isexit;
+};
+
+#endif
diff --git a/dldialog/src/DLD_QT/dld_radio.cc b/dldialog/src/DLD_QT/dld_radio.cc
new file mode 100644
index 0000000..7c57b67
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_radio.cc
@@ -0,0 +1,64 @@
+/******************************************************************************
+**
+** $Id: dld_radio.cc,v 1.10 1999/04/07 07:38:30 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#include "dld_qtlib.h"
+#include "dld_radio.h"
+#include "dld_dialog.h"
+#include <iostream.h>
+
+DLD_QTRadioButton::
+DLD_QTRadioButton (int num, QWidget *_parent,
+ const string& name, DLD_QTDialog *pd):
+ QRadioButton (convstr(name).c_str(), _parent),
+ DLD_QTObj (name, pd),
+ mynum(num)
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "radio ";
+#endif
+ setMinimumSize (sizeHint ());
+ connect (this, SIGNAL (toggled ( bool )), SLOT (slot_activate ( bool )));
+}
+
+DLD_QTRadioButton::
+~DLD_QTRadioButton ()
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "radio deleted\n";
+#endif
+}
+
+void DLD_QTRadioButton::
+create ()
+{
+ DLD_Obj::create();
+}
+
+void DLD_QTRadioButton::
+slot_activate(bool on)
+{
+ if(on) {
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "radiobutton " << mynum
+ << " toggled on" << endl << flush;
+#endif
+ emit signal_rbpress(mynum);
+ DLD_QTObj::activate();
+ }
+ else {
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "radiobutton " << mynum
+ << " toggled off" << endl << flush;
+#endif
+ DLD_QTObj::deactivate();
+ }
+}
diff --git a/dldialog/src/DLD_QT/dld_radio.h b/dldialog/src/DLD_QT/dld_radio.h
new file mode 100644
index 0000000..80a61d1
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_radio.h
@@ -0,0 +1,52 @@
+/******************************************************************************
+**
+** $Id: dld_radio.h,v 1.7 2000/03/15 20:02:18 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#ifndef DLD_RADIO_H
+#define DLD_RADIO_H
+
+#include "../dld_radiobutton.h"
+#include "dld_qtlib.h"
+#include "dld_qtobj.h"
+#include <qradiobt.h>
+#include <qwidget.h>
+
+/** The radiobutton class in qt style, to use within @ref DLD_Radiolist.
+ *
+ */
+class DLD_QTRadioButton : public QRadioButton, public DLD_QTObj,
+ public DLD_RadioButton
+{
+ Q_OBJECT;
+
+public:
+ ///
+ DLD_QTRadioButton(int num, QWidget *_parent,
+ const string& name, DLD_QTDialog *pd);
+
+ ///
+ virtual ~DLD_QTRadioButton();
+
+ ///
+ void create();
+
+signals:
+ void signal_rbpress(int num);
+
+///
+public slots:
+ void slot_activate(bool);
+
+private:
+ int mynum;
+};
+
+#endif
diff --git a/dldialog/src/DLD_QT/dld_radiolist.cc b/dldialog/src/DLD_QT/dld_radiolist.cc
new file mode 100644
index 0000000..702ff22
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_radiolist.cc
@@ -0,0 +1,122 @@
+/******************************************************************************
+**
+** $Id: dld_radiolist.cc,v 1.11 2000/03/15 20:02:18 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#include "dld_qtlib.h"
+#include "dld_radiolist.h"
+#include "dld_qtapp.h"
+#include <iostream.h>
+#include <qbutton.h>
+
+DLD_QTRadioList::
+DLD_QTRadioList (QWidget *_parent,
+ const string& name, DLD_QTDialog *pd):
+ QButtonGroup (convstr(name).c_str(), _parent),
+ DLD_QTObj (name, pd),
+ count (0)
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "radiolist constructed" << endl << flush;
+#endif
+
+ if (dld_name.length() == 0)
+ QButtonGroup::setFrameStyle (NoFrame);
+
+ topLayout = new QVBoxLayout ((QGroupBox *) this, QT_BORDER * 2, QT_BORDER);
+}
+
+DLD_QTRadioList::
+~DLD_QTRadioList ()
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "radiolist delete" << endl << flush;
+#endif
+}
+
+DLD_RadioButton * DLD_QTRadioList::
+radiobutton(const string& name)
+{
+ DLD_QTRadioButton *rb = new DLD_QTRadioButton(count, this, name, pardia);
+
+ topLayout->addWidget (rb);
+
+ add_child(rb);
+ rb_childlist.push_back(rb);
+
+ insert(rb, count);
+
+ connect (rb, SIGNAL(signal_rbpress(int)),
+ this, SLOT(slot_rbpress(int)));
+
+ count++;
+
+ return rb;
+}
+
+void DLD_QTRadioList::
+create (void)
+{
+ topLayout->activate ();
+ bool wasset=false;
+ int i;
+ QString istr;
+
+ // First activate all radiobuttons
+ for(RBI i = rb_childlist.begin(); i != rb_childlist.end(); ++i) {
+ if((*i)->test_env()) {
+ (*i)->animateClick();
+ wasset=true;
+ }
+ }
+
+ // Now check my own variable.
+ for (i = 0; i < count; i++)
+ {
+ if (test_env (string(istr.setNum (i + 1))))
+ {
+ QButton *obj = find (i);
+ if (obj)
+ {
+ obj->animateClick ();
+ wasset=true;
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "radiolist activate " << i << "\n";
+#endif
+ }
+ }
+ }
+
+ if(!wasset) {
+ QButton *obj = find (0);
+ if (obj)
+ {
+ obj->animateClick ();
+ }
+ }
+
+// pardia->dld_app->processEvents();
+
+ for(RBI i = rb_childlist.begin(); i != rb_childlist.end(); ++i) {
+ (*i)->create ();
+ }
+ DLD_Obj::create();
+}
+
+void DLD_QTRadioList::
+slot_rbpress (int num)
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "radiobutton " << num
+ << " pressed" << endl << flush;
+#endif
+ varvalue = QString().setNum (num + 1);
+ DLD_QTObj::activate ();
+}
diff --git a/dldialog/src/DLD_QT/dld_radiolist.h b/dldialog/src/DLD_QT/dld_radiolist.h
new file mode 100644
index 0000000..35d22dc
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_radiolist.h
@@ -0,0 +1,77 @@
+/******************************************************************************
+**
+** $Id: dld_radiolist.h,v 1.9 2000/03/15 20:02:18 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#ifndef DLD_QTRADIOLIST_H
+#define DLD_QTRADIOLIST_H
+
+#include "../dld_radiolist.h"
+#include "dld_qtlib.h"
+#include "dld_qtobj.h"
+#include "dld_radio.h"
+#include <qbttngrp.h>
+#include <qlayout.h>
+
+/** A class providing container methods for @ref DLD_Radio.
+ *
+ */
+class DLD_QTRadioList : public QButtonGroup,
+ public DLD_QTObj, public DLD_RadioList
+{
+ Q_OBJECT;
+
+public:
+ ///
+ DLD_QTRadioList(QWidget *_parent, const string& name, DLD_QTDialog *pd);
+
+ ///
+ virtual ~DLD_QTRadioList();
+
+ /** Adds a radiobutton to the radiolist.
+ * @param name The text of the item
+ * @return ptr to item
+ */
+ DLD_RadioButton *radiobutton(const string&);
+
+ ///
+ void create();
+
+ /** Indicates the beginning of a new block
+ *
+ * Can be used to reserve space for children.
+ */
+ void open_brace() {};
+
+ /** Indicates the end of a block.
+ *
+ * Can be used to collect all children.
+ */
+ void close_brace() {};
+
+
+public slots:
+ void slot_rbpress (int num);
+
+
+private:
+ ///
+ int count;
+ QVBoxLayout *topLayout;
+
+ typedef DLD_QTRadioButton *DLD_QTRadioButton_Ptr;
+ /** The child list.
+ */
+ list<DLD_QTRadioButton_Ptr> rb_childlist;
+ typedef list<DLD_QTRadioButton_Ptr>::iterator RBI;
+
+};
+
+#endif
diff --git a/dldialog/src/DLD_QT/dld_row.cc b/dldialog/src/DLD_QT/dld_row.cc
new file mode 100644
index 0000000..82b581c
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_row.cc
@@ -0,0 +1,96 @@
+/******************************************************************************
+**
+** $Id: dld_row.cc,v 1.13 1999/04/19 14:37:34 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#include "dld_qtlib.h"
+#include "dld_row.h"
+#include <iostream.h>
+#include <qfontmetrics.h>
+
+DLD_QTRow::
+DLD_QTRow (QWidget *_parent, const string& _name, DLD_QTApp *aptr,
+ DLD_QTDialog *dia) :
+ QGroupBox (convstr(_name).c_str(), _parent),
+ QHBoxLayout ((QGroupBox *) this, 0, QT_BORDER),
+ DLD_QTObj (_name, dia),
+ DLD_QTContainer(_name, aptr, dia),
+ dld_cols(0),
+ dld_rows(0)
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "row ";
+#endif
+ if (dld_name.length() == 0)
+ setFrameStyle (NoFrame);
+ else {
+#if QT_VERSION < 200
+ basicManager()->setBorder(20);
+#endif
+// dld_rows = 1;
+ }
+
+ qwidget = this;
+ fixed_width = fixed_height = true;
+}
+
+DLD_QTRow::
+~DLD_QTRow ()
+{
+}
+
+void DLD_QTRow::
+insert (QWidget * w, DLD_QTObj *obj)
+{
+ QHBoxLayout::addWidget (w, AlignLeft|AlignVCenter);
+ qtobjs[dld_cols] = obj;
+ qwidgets[dld_cols] = w;
+ dld_cols++;
+}
+
+void DLD_QTRow::
+create (void)
+{
+ int nullanz=0, sum=0;
+ for(int i = 0; i < dld_cols; i++)
+ {
+ if(!qtobjs[i])
+ continue;
+ int p = qtobjs[i]->obj_widthP;
+
+ if (qtobjs[i]->obj_heightP)
+ fixed_height = false;
+
+ if(p) {
+ sum += p;
+ fixed_width = false;
+ }
+ else
+ nullanz++;
+ }
+ sum = (sum && (sum < 100)) ? 100 - nullanz : nullanz;
+ for(int i = 0; i < dld_cols; i++)
+ {
+ if(!qtobjs[i])
+ continue;
+ int p = qtobjs[i]->obj_widthP;
+ if(p)
+ setStretchFactor(qwidgets[i], p);
+ else {
+ if(qtobjs[i]->fixed_width)
+ setStretchFactor(qwidgets[i], 0);
+ else
+ setStretchFactor(qwidgets[i], sum / nullanz);
+ }
+ }
+
+ DLD_QTContainer::create ();
+ QHBoxLayout::activate ();
+}
diff --git a/dldialog/src/DLD_QT/dld_row.h b/dldialog/src/DLD_QT/dld_row.h
new file mode 100644
index 0000000..18fb4ba
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_row.h
@@ -0,0 +1,52 @@
+/******************************************************************************
+**
+** $Id: dld_row.h,v 1.8 2000/03/15 20:02:18 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#ifndef DLD_ROW_H
+#define DLD_ROW_H
+
+#include "../dld_row.h"
+#include "dld_qtcontainer.h"
+#include <qlayout.h>
+#include <qgrpbox.h>
+#include <map>
+class DLD_QTDialog;
+class DLD_QTApp;
+
+/** A container for other dldialog elements, that orders these in a row.
+ *
+ */
+class DLD_QTRow : public QGroupBox, public QHBoxLayout,
+ public DLD_QTContainer, public DLD_Row
+{
+public:
+ ///
+ DLD_QTRow(QWidget *_parent, const string& _name,
+ DLD_QTApp *aptr, DLD_QTDialog *dia);
+
+ ///
+ virtual ~DLD_QTRow();
+
+ ///
+ void insert(QWidget *w, DLD_QTObj *obj);
+
+ ///
+ void create();
+
+ void close_brace() { create(); };
+
+private:
+ int dld_cols, dld_rows;
+ map<int, DLD_QTObj*> qtobjs;
+ map<int, QWidget*> qwidgets;
+};
+
+#endif
diff --git a/dldialog/src/DLD_QT/dld_text.cc b/dldialog/src/DLD_QT/dld_text.cc
new file mode 100644
index 0000000..51310d7
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_text.cc
@@ -0,0 +1,60 @@
+/******************************************************************************
+**
+** $Id: dld_text.cc,v 1.9 1999/04/08 14:40:51 harald Exp $
+**
+** 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.
+**
+**
+******************************************************************************/
+
+#include "dld_qtlib.h"
+#include "dld_text.h"
+#include <qpainter.h>
+
+#include <iostream.h>
+
+DLD_QTText::
+DLD_QTText (QWidget *_parent, const string& name, DLD_QTDialog *pd) :
+ QLabel (convstr(name).c_str(), _parent),
+ DLD_QTObj (name, pd)
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "text " << dld_name
+ << " constructed " << endl
+ << flush;
+#endif
+ fixed_height = fixed_width = true;
+}
+
+DLD_QTText::
+~DLD_QTText ()
+{
+}
+
+void DLD_QTText::
+create ()
+{
+ if ( fontname.length() > 0 ) {
+ QFont newfont( fontname.c_str() , fontsize, false );
+ this->setFont( newfont );
+ }
+
+ if (bg_color.length() > 0)
+ setBackgroundColor(QColor(bg_color.c_str()));
+
+ repaint();
+ setFixedWidth (sizeHint ().width ());
+ setFixedHeight (sizeHint ().height ());
+ DLD_Obj::create();
+}
+
+void DLD_QTText::drawContents( QPainter *p )
+{
+ if (fg_color.length() > 0)
+ p->setPen(QColor(fg_color.c_str()));
+
+ QLabel::drawContents(p);
+}
diff --git a/dldialog/src/DLD_QT/dld_text.h b/dldialog/src/DLD_QT/dld_text.h
new file mode 100644
index 0000000..d0f5cbb
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_text.h
@@ -0,0 +1,39 @@
+/******************************************************************************
+**
+** $Id: dld_text.h,v 1.8 2000/03/15 20:02:18 harald Exp $
+**
+** 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.
+**
+**
+******************************************************************************/
+
+#ifndef DLD_TEXT_H
+#define DLD_TEXT_H
+
+#include "../dld_text.h"
+#include "dld_qtobj.h"
+#include <qlabel.h>
+
+/** Displays a text line in the dialog.
+ *
+ */
+class DLD_QTText : public QLabel, public DLD_QTObj, public DLD_Text
+{
+public:
+ ///
+ DLD_QTText(QWidget *_parent, const string& name, DLD_QTDialog *pd);
+
+ ///
+ virtual ~DLD_QTText();
+
+ ///
+ void create();
+
+ void drawContents(QPainter *);
+
+};
+
+#endif
diff --git a/dldialog/src/DLD_QT/dld_textbox.cc b/dldialog/src/DLD_QT/dld_textbox.cc
new file mode 100644
index 0000000..b8d335a
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_textbox.cc
@@ -0,0 +1,88 @@
+/******************************************************************************
+**
+** $Id: dld_textbox.cc,v 1.9 2000/03/15 20:02:18 harald Exp $
+**
+** 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.
+**
+**
+******************************************************************************/
+#include "dld_qtlib.h"
+#include "dld_textbox.h"
+#include <qfile.h>
+#include <qtextstream.h>
+#include <iostream.h>
+
+DLD_QTTextBox::
+DLD_QTTextBox (QWidget *_parent, const string& name, DLD_QTDialog *pd):
+ QMultiLineEdit (_parent),
+ DLD_QTObj (name, pd)
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "textbox " << dld_name
+ << " constructed " << endl
+ << flush;
+#endif
+
+ nlines = 0;
+}
+
+
+QSize DLD_QTTextBox::
+sizeHint ()
+{
+ return QSize (QMultiLineEdit::sizeHint().width() + 10,
+ 10 + fontMetrics ().height () * nlines);
+}
+
+DLD_QTTextBox::
+~DLD_QTTextBox ()
+{
+}
+
+void DLD_QTTextBox::
+set_filename(const string& fname)
+{
+ filename = fname;
+}
+
+void DLD_QTTextBox::
+create ()
+{
+ setReadOnly(TRUE);
+ setAutoUpdate( FALSE );
+ clear();
+
+ if ( fontname.length() > 0 ) {
+ QFont newfont( fontname.c_str() , fontsize, false );
+ this->setFont( newfont );
+ }
+
+ if(filename.length())
+ {
+ QFile f( filename.c_str() );
+ if ( f.open( IO_ReadOnly ) )
+ {
+ QTextStream t(&f);
+
+ while ( !t.eof() ) {
+ QString s = t.readLine();
+ append( s );
+ nlines++;
+ }
+
+ f.close();
+ }
+ }
+ else
+ setText(dld_name.c_str());
+
+ setAutoUpdate( TRUE );
+ repaint();
+
+ setMinimumWidth (fontMetrics ().maxWidth () * 10 + 10);
+ setMinimumHeight (fontMetrics ().height () * 3 + 10);
+ DLD_Obj::create();
+}
diff --git a/dldialog/src/DLD_QT/dld_textbox.h b/dldialog/src/DLD_QT/dld_textbox.h
new file mode 100644
index 0000000..ebe4e0f
--- /dev/null
+++ b/dldialog/src/DLD_QT/dld_textbox.h
@@ -0,0 +1,51 @@
+/************************************************************************
+**
+** $Id: dld_textbox.h,v 1.6 2000/03/15 20:02:18 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+************************************************************************/
+
+#ifndef DLD_QTTEXTBOX_H
+#define DLD_QTTEXTBOX_H
+
+#include "../dld_textbox.h"
+#include "dld_qtobj.h"
+#include <qmultilinedit.h>
+
+/** Displays a text file in the dialog.
+ *
+ */
+class DLD_QTTextBox : public QMultiLineEdit, public DLD_TextBox,
+ public DLD_QTObj
+{
+public:
+ ///
+ DLD_QTTextBox(QWidget *_parent, const string& name, DLD_QTDialog *pd);
+ ///
+ ~DLD_QTTextBox();
+ ///
+ void create();
+
+ /** Sets the filename of the file that will be printed
+ * @param fname the filename
+ */
+ void set_filename(const string& fname);
+
+ ///
+ void text_parse(const char *p);
+
+ ///
+ QSize sizeHint ();
+
+private:
+ int nlines;
+ string filename;
+};
+
+#endif
diff --git a/dldialog/src/DLD_QT/mdld_button.cc b/dldialog/src/DLD_QT/mdld_button.cc
new file mode 100644
index 0000000..c3aedd9
--- /dev/null
+++ b/dldialog/src/DLD_QT/mdld_button.cc
@@ -0,0 +1,102 @@
+/****************************************************************************
+** DLD_QTButton meta object code from reading C++ file 'dld_button.h'
+**
+** Created: Thu Feb 15 11:30:17 2001
+** by: The Qt MOC ($Id: mocgen.cpp,v 1.23 2001/02/02 17:17:35 mueller Exp $)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#if !defined(Q_MOC_OUTPUT_REVISION)
+#define Q_MOC_OUTPUT_REVISION 9
+#elif Q_MOC_OUTPUT_REVISION != 9
+#error "Moc format conflict - please regenerate all moc files"
+#endif
+
+#include "dld_button.h"
+#include <qmetaobject.h>
+#include <qapplication.h>
+
+
+
+const char *DLD_QTButton::className() const
+{
+ return "DLD_QTButton";
+}
+
+QMetaObject *DLD_QTButton::metaObj = 0;
+
+void DLD_QTButton::initMetaObject()
+{
+ if ( metaObj )
+ return;
+ if ( qstrcmp(QPushButton::className(), "QPushButton") != 0 )
+ badSuperclassWarning("DLD_QTButton","QPushButton");
+ (void) staticMetaObject();
+}
+
+#ifndef QT_NO_TRANSLATION
+
+QString DLD_QTButton::tr(const char* s)
+{
+ return qApp->translate( "DLD_QTButton", s, 0 );
+}
+
+QString DLD_QTButton::tr(const char* s, const char * c)
+{
+ return qApp->translate( "DLD_QTButton", s, c );
+}
+
+#endif // QT_NO_TRANSLATION
+
+QMetaObject* DLD_QTButton::staticMetaObject()
+{
+ if ( metaObj )
+ return metaObj;
+ (void) QPushButton::staticMetaObject();
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ typedef int (DLD_QTButton::*m1_t0)();
+ typedef int (QObject::*om1_t0)();
+ typedef void (DLD_QTButton::*m1_t1)(int);
+ typedef void (QObject::*om1_t1)(int);
+ typedef void (DLD_QTButton::*m1_t2)(const QRect&);
+ typedef void (QObject::*om1_t2)(const QRect&);
+ typedef void (DLD_QTButton::*m1_t3)(const QSize&);
+ typedef void (QObject::*om1_t3)(const QSize&);
+ m1_t0 v1_0 = &DLD_QTButton::slot_activate;
+ om1_t0 ov1_0 = (om1_t0)v1_0;
+ m1_t1 v1_1 = &DLD_QTButton::movieStatus;
+ om1_t1 ov1_1 = (om1_t1)v1_1;
+ m1_t2 v1_2 = &DLD_QTButton::movieUpdate;
+ om1_t2 ov1_2 = (om1_t2)v1_2;
+ m1_t3 v1_3 = &DLD_QTButton::movieResized;
+ om1_t3 ov1_3 = (om1_t3)v1_3;
+ QMetaData *slot_tbl = QMetaObject::new_metadata(4);
+ QMetaData::Access *slot_tbl_access = QMetaObject::new_metaaccess(4);
+ slot_tbl[0].name = "slot_activate()";
+ slot_tbl[0].ptr = (QMember)ov1_0;
+ slot_tbl_access[0] = QMetaData::Public;
+ slot_tbl[1].name = "movieStatus(int)";
+ slot_tbl[1].ptr = (QMember)ov1_1;
+ slot_tbl_access[1] = QMetaData::Public;
+ slot_tbl[2].name = "movieUpdate(const QRect&)";
+ slot_tbl[2].ptr = (QMember)ov1_2;
+ slot_tbl_access[2] = QMetaData::Public;
+ slot_tbl[3].name = "movieResized(const QSize&)";
+ slot_tbl[3].ptr = (QMember)ov1_3;
+ slot_tbl_access[3] = QMetaData::Public;
+ metaObj = QMetaObject::new_metaobject(
+ "DLD_QTButton", "QPushButton",
+ slot_tbl, 4,
+ 0, 0,
+#ifndef QT_NO_PROPERTIES
+ 0, 0,
+ 0, 0,
+#endif // QT_NO_PROPERTIES
+ 0, 0 );
+ metaObj->set_slot_access( slot_tbl_access );
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ return metaObj;
+}
diff --git a/dldialog/src/DLD_QT/mdld_check.cc b/dldialog/src/DLD_QT/mdld_check.cc
new file mode 100644
index 0000000..1ea95a9
--- /dev/null
+++ b/dldialog/src/DLD_QT/mdld_check.cc
@@ -0,0 +1,94 @@
+/****************************************************************************
+** DLD_QTCheckButton meta object code from reading C++ file 'dld_check.h'
+**
+** Created: Thu Feb 15 11:30:17 2001
+** by: The Qt MOC ($Id: mocgen.cpp,v 1.23 2001/02/02 17:17:35 mueller Exp $)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#if !defined(Q_MOC_OUTPUT_REVISION)
+#define Q_MOC_OUTPUT_REVISION 9
+#elif Q_MOC_OUTPUT_REVISION != 9
+#error "Moc format conflict - please regenerate all moc files"
+#endif
+
+#include "dld_check.h"
+#include <qmetaobject.h>
+#include <qapplication.h>
+
+
+
+const char *DLD_QTCheckButton::className() const
+{
+ return "DLD_QTCheckButton";
+}
+
+QMetaObject *DLD_QTCheckButton::metaObj = 0;
+
+void DLD_QTCheckButton::initMetaObject()
+{
+ if ( metaObj )
+ return;
+ if ( qstrcmp(QCheckBox::className(), "QCheckBox") != 0 )
+ badSuperclassWarning("DLD_QTCheckButton","QCheckBox");
+ (void) staticMetaObject();
+}
+
+#ifndef QT_NO_TRANSLATION
+
+QString DLD_QTCheckButton::tr(const char* s)
+{
+ return qApp->translate( "DLD_QTCheckButton", s, 0 );
+}
+
+QString DLD_QTCheckButton::tr(const char* s, const char * c)
+{
+ return qApp->translate( "DLD_QTCheckButton", s, c );
+}
+
+#endif // QT_NO_TRANSLATION
+
+QMetaObject* DLD_QTCheckButton::staticMetaObject()
+{
+ if ( metaObj )
+ return metaObj;
+ (void) QCheckBox::staticMetaObject();
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ typedef void (DLD_QTCheckButton::*m1_t0)(bool);
+ typedef void (QObject::*om1_t0)(bool);
+ m1_t0 v1_0 = &DLD_QTCheckButton::slot_activate;
+ om1_t0 ov1_0 = (om1_t0)v1_0;
+ QMetaData *slot_tbl = QMetaObject::new_metadata(1);
+ QMetaData::Access *slot_tbl_access = QMetaObject::new_metaaccess(1);
+ slot_tbl[0].name = "slot_activate(bool)";
+ slot_tbl[0].ptr = (QMember)ov1_0;
+ slot_tbl_access[0] = QMetaData::Public;
+ typedef void (DLD_QTCheckButton::*m2_t0)();
+ typedef void (QObject::*om2_t0)();
+ m2_t0 v2_0 = &DLD_QTCheckButton::signal_cbpress;
+ om2_t0 ov2_0 = (om2_t0)v2_0;
+ QMetaData *signal_tbl = QMetaObject::new_metadata(1);
+ signal_tbl[0].name = "signal_cbpress()";
+ signal_tbl[0].ptr = (QMember)ov2_0;
+ metaObj = QMetaObject::new_metaobject(
+ "DLD_QTCheckButton", "QCheckBox",
+ slot_tbl, 1,
+ signal_tbl, 1,
+#ifndef QT_NO_PROPERTIES
+ 0, 0,
+ 0, 0,
+#endif // QT_NO_PROPERTIES
+ 0, 0 );
+ metaObj->set_slot_access( slot_tbl_access );
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ return metaObj;
+}
+
+// SIGNAL signal_cbpress
+void DLD_QTCheckButton::signal_cbpress()
+{
+ activate_signal( "signal_cbpress()" );
+}
diff --git a/dldialog/src/DLD_QT/mdld_checklist.cc b/dldialog/src/DLD_QT/mdld_checklist.cc
new file mode 100644
index 0000000..3691185
--- /dev/null
+++ b/dldialog/src/DLD_QT/mdld_checklist.cc
@@ -0,0 +1,81 @@
+/****************************************************************************
+** DLD_QTCheckList meta object code from reading C++ file 'dld_checklist.h'
+**
+** Created: Thu Feb 15 11:30:17 2001
+** by: The Qt MOC ($Id: mocgen.cpp,v 1.23 2001/02/02 17:17:35 mueller Exp $)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#if !defined(Q_MOC_OUTPUT_REVISION)
+#define Q_MOC_OUTPUT_REVISION 9
+#elif Q_MOC_OUTPUT_REVISION != 9
+#error "Moc format conflict - please regenerate all moc files"
+#endif
+
+#include "dld_checklist.h"
+#include <qmetaobject.h>
+#include <qapplication.h>
+
+
+
+const char *DLD_QTCheckList::className() const
+{
+ return "DLD_QTCheckList";
+}
+
+QMetaObject *DLD_QTCheckList::metaObj = 0;
+
+void DLD_QTCheckList::initMetaObject()
+{
+ if ( metaObj )
+ return;
+ if ( qstrcmp(QButtonGroup::className(), "QButtonGroup") != 0 )
+ badSuperclassWarning("DLD_QTCheckList","QButtonGroup");
+ (void) staticMetaObject();
+}
+
+#ifndef QT_NO_TRANSLATION
+
+QString DLD_QTCheckList::tr(const char* s)
+{
+ return qApp->translate( "DLD_QTCheckList", s, 0 );
+}
+
+QString DLD_QTCheckList::tr(const char* s, const char * c)
+{
+ return qApp->translate( "DLD_QTCheckList", s, c );
+}
+
+#endif // QT_NO_TRANSLATION
+
+QMetaObject* DLD_QTCheckList::staticMetaObject()
+{
+ if ( metaObj )
+ return metaObj;
+ (void) QButtonGroup::staticMetaObject();
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ typedef void (DLD_QTCheckList::*m1_t0)();
+ typedef void (QObject::*om1_t0)();
+ m1_t0 v1_0 = &DLD_QTCheckList::slot_cbpress;
+ om1_t0 ov1_0 = (om1_t0)v1_0;
+ QMetaData *slot_tbl = QMetaObject::new_metadata(1);
+ QMetaData::Access *slot_tbl_access = QMetaObject::new_metaaccess(1);
+ slot_tbl[0].name = "slot_cbpress()";
+ slot_tbl[0].ptr = (QMember)ov1_0;
+ slot_tbl_access[0] = QMetaData::Public;
+ metaObj = QMetaObject::new_metaobject(
+ "DLD_QTCheckList", "QButtonGroup",
+ slot_tbl, 1,
+ 0, 0,
+#ifndef QT_NO_PROPERTIES
+ 0, 0,
+ 0, 0,
+#endif // QT_NO_PROPERTIES
+ 0, 0 );
+ metaObj->set_slot_access( slot_tbl_access );
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ return metaObj;
+}
diff --git a/dldialog/src/DLD_QT/mdld_combobox.cc b/dldialog/src/DLD_QT/mdld_combobox.cc
new file mode 100644
index 0000000..439e77b
--- /dev/null
+++ b/dldialog/src/DLD_QT/mdld_combobox.cc
@@ -0,0 +1,81 @@
+/****************************************************************************
+** DLD_QTComboBox meta object code from reading C++ file 'dld_combobox.h'
+**
+** Created: Thu Feb 15 11:30:17 2001
+** by: The Qt MOC ($Id: mocgen.cpp,v 1.23 2001/02/02 17:17:35 mueller Exp $)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#if !defined(Q_MOC_OUTPUT_REVISION)
+#define Q_MOC_OUTPUT_REVISION 9
+#elif Q_MOC_OUTPUT_REVISION != 9
+#error "Moc format conflict - please regenerate all moc files"
+#endif
+
+#include "dld_combobox.h"
+#include <qmetaobject.h>
+#include <qapplication.h>
+
+
+
+const char *DLD_QTComboBox::className() const
+{
+ return "DLD_QTComboBox";
+}
+
+QMetaObject *DLD_QTComboBox::metaObj = 0;
+
+void DLD_QTComboBox::initMetaObject()
+{
+ if ( metaObj )
+ return;
+ if ( qstrcmp(QComboBox::className(), "QComboBox") != 0 )
+ badSuperclassWarning("DLD_QTComboBox","QComboBox");
+ (void) staticMetaObject();
+}
+
+#ifndef QT_NO_TRANSLATION
+
+QString DLD_QTComboBox::tr(const char* s)
+{
+ return qApp->translate( "DLD_QTComboBox", s, 0 );
+}
+
+QString DLD_QTComboBox::tr(const char* s, const char * c)
+{
+ return qApp->translate( "DLD_QTComboBox", s, c );
+}
+
+#endif // QT_NO_TRANSLATION
+
+QMetaObject* DLD_QTComboBox::staticMetaObject()
+{
+ if ( metaObj )
+ return metaObj;
+ (void) QComboBox::staticMetaObject();
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ typedef void (DLD_QTComboBox::*m1_t0)(int);
+ typedef void (QObject::*om1_t0)(int);
+ m1_t0 v1_0 = &DLD_QTComboBox::slot_activated;
+ om1_t0 ov1_0 = (om1_t0)v1_0;
+ QMetaData *slot_tbl = QMetaObject::new_metadata(1);
+ QMetaData::Access *slot_tbl_access = QMetaObject::new_metaaccess(1);
+ slot_tbl[0].name = "slot_activated(int)";
+ slot_tbl[0].ptr = (QMember)ov1_0;
+ slot_tbl_access[0] = QMetaData::Public;
+ metaObj = QMetaObject::new_metaobject(
+ "DLD_QTComboBox", "QComboBox",
+ slot_tbl, 1,
+ 0, 0,
+#ifndef QT_NO_PROPERTIES
+ 0, 0,
+ 0, 0,
+#endif // QT_NO_PROPERTIES
+ 0, 0 );
+ metaObj->set_slot_access( slot_tbl_access );
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ return metaObj;
+}
diff --git a/dldialog/src/DLD_QT/mdld_dialog.cc b/dldialog/src/DLD_QT/mdld_dialog.cc
new file mode 100644
index 0000000..269dd28
--- /dev/null
+++ b/dldialog/src/DLD_QT/mdld_dialog.cc
@@ -0,0 +1,94 @@
+/****************************************************************************
+** DLD_QTDialog meta object code from reading C++ file 'dld_dialog.h'
+**
+** Created: Thu Feb 15 11:30:17 2001
+** by: The Qt MOC ($Id: mocgen.cpp,v 1.23 2001/02/02 17:17:35 mueller Exp $)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#if !defined(Q_MOC_OUTPUT_REVISION)
+#define Q_MOC_OUTPUT_REVISION 9
+#elif Q_MOC_OUTPUT_REVISION != 9
+#error "Moc format conflict - please regenerate all moc files"
+#endif
+
+#include "dld_dialog.h"
+#include <qmetaobject.h>
+#include <qapplication.h>
+
+
+
+const char *DLD_QTDialog::className() const
+{
+ return "DLD_QTDialog";
+}
+
+QMetaObject *DLD_QTDialog::metaObj = 0;
+
+void DLD_QTDialog::initMetaObject()
+{
+ if ( metaObj )
+ return;
+ if ( qstrcmp(QDialog::className(), "QDialog") != 0 )
+ badSuperclassWarning("DLD_QTDialog","QDialog");
+ (void) staticMetaObject();
+}
+
+#ifndef QT_NO_TRANSLATION
+
+QString DLD_QTDialog::tr(const char* s)
+{
+ return qApp->translate( "DLD_QTDialog", s, 0 );
+}
+
+QString DLD_QTDialog::tr(const char* s, const char * c)
+{
+ return qApp->translate( "DLD_QTDialog", s, c );
+}
+
+#endif // QT_NO_TRANSLATION
+
+QMetaObject* DLD_QTDialog::staticMetaObject()
+{
+ if ( metaObj )
+ return metaObj;
+ (void) QDialog::staticMetaObject();
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ typedef void (DLD_QTDialog::*m1_t0)(QCloseEvent*);
+ typedef void (QObject::*om1_t0)(QCloseEvent*);
+ m1_t0 v1_0 = &DLD_QTDialog::closeEvent;
+ om1_t0 ov1_0 = (om1_t0)v1_0;
+ QMetaData *slot_tbl = QMetaObject::new_metadata(1);
+ QMetaData::Access *slot_tbl_access = QMetaObject::new_metaaccess(1);
+ slot_tbl[0].name = "closeEvent(QCloseEvent*)";
+ slot_tbl[0].ptr = (QMember)ov1_0;
+ slot_tbl_access[0] = QMetaData::Protected;
+ typedef void (DLD_QTDialog::*m2_t0)();
+ typedef void (QObject::*om2_t0)();
+ m2_t0 v2_0 = &DLD_QTDialog::has_exited;
+ om2_t0 ov2_0 = (om2_t0)v2_0;
+ QMetaData *signal_tbl = QMetaObject::new_metadata(1);
+ signal_tbl[0].name = "has_exited()";
+ signal_tbl[0].ptr = (QMember)ov2_0;
+ metaObj = QMetaObject::new_metaobject(
+ "DLD_QTDialog", "QDialog",
+ slot_tbl, 1,
+ signal_tbl, 1,
+#ifndef QT_NO_PROPERTIES
+ 0, 0,
+ 0, 0,
+#endif // QT_NO_PROPERTIES
+ 0, 0 );
+ metaObj->set_slot_access( slot_tbl_access );
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ return metaObj;
+}
+
+// SIGNAL has_exited
+void DLD_QTDialog::has_exited()
+{
+ activate_signal( "has_exited()" );
+}
diff --git a/dldialog/src/DLD_QT/mdld_image.cc b/dldialog/src/DLD_QT/mdld_image.cc
new file mode 100644
index 0000000..6caafba
--- /dev/null
+++ b/dldialog/src/DLD_QT/mdld_image.cc
@@ -0,0 +1,95 @@
+/****************************************************************************
+** DLD_QTImage meta object code from reading C++ file 'dld_image.h'
+**
+** Created: Thu Feb 15 11:30:17 2001
+** by: The Qt MOC ($Id: mocgen.cpp,v 1.23 2001/02/02 17:17:35 mueller Exp $)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#if !defined(Q_MOC_OUTPUT_REVISION)
+#define Q_MOC_OUTPUT_REVISION 9
+#elif Q_MOC_OUTPUT_REVISION != 9
+#error "Moc format conflict - please regenerate all moc files"
+#endif
+
+#include "dld_image.h"
+#include <qmetaobject.h>
+#include <qapplication.h>
+
+
+
+const char *DLD_QTImage::className() const
+{
+ return "DLD_QTImage";
+}
+
+QMetaObject *DLD_QTImage::metaObj = 0;
+
+void DLD_QTImage::initMetaObject()
+{
+ if ( metaObj )
+ return;
+ if ( qstrcmp(QWidget::className(), "QWidget") != 0 )
+ badSuperclassWarning("DLD_QTImage","QWidget");
+ (void) staticMetaObject();
+}
+
+#ifndef QT_NO_TRANSLATION
+
+QString DLD_QTImage::tr(const char* s)
+{
+ return qApp->translate( "DLD_QTImage", s, 0 );
+}
+
+QString DLD_QTImage::tr(const char* s, const char * c)
+{
+ return qApp->translate( "DLD_QTImage", s, c );
+}
+
+#endif // QT_NO_TRANSLATION
+
+QMetaObject* DLD_QTImage::staticMetaObject()
+{
+ if ( metaObj )
+ return metaObj;
+ (void) QWidget::staticMetaObject();
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ typedef void (DLD_QTImage::*m1_t0)(int);
+ typedef void (QObject::*om1_t0)(int);
+ typedef void (DLD_QTImage::*m1_t1)(const QRect&);
+ typedef void (QObject::*om1_t1)(const QRect&);
+ typedef void (DLD_QTImage::*m1_t2)(const QSize&);
+ typedef void (QObject::*om1_t2)(const QSize&);
+ m1_t0 v1_0 = &DLD_QTImage::movieStatus;
+ om1_t0 ov1_0 = (om1_t0)v1_0;
+ m1_t1 v1_1 = &DLD_QTImage::movieUpdate;
+ om1_t1 ov1_1 = (om1_t1)v1_1;
+ m1_t2 v1_2 = &DLD_QTImage::movieResized;
+ om1_t2 ov1_2 = (om1_t2)v1_2;
+ QMetaData *slot_tbl = QMetaObject::new_metadata(3);
+ QMetaData::Access *slot_tbl_access = QMetaObject::new_metaaccess(3);
+ slot_tbl[0].name = "movieStatus(int)";
+ slot_tbl[0].ptr = (QMember)ov1_0;
+ slot_tbl_access[0] = QMetaData::Public;
+ slot_tbl[1].name = "movieUpdate(const QRect&)";
+ slot_tbl[1].ptr = (QMember)ov1_1;
+ slot_tbl_access[1] = QMetaData::Public;
+ slot_tbl[2].name = "movieResized(const QSize&)";
+ slot_tbl[2].ptr = (QMember)ov1_2;
+ slot_tbl_access[2] = QMetaData::Public;
+ metaObj = QMetaObject::new_metaobject(
+ "DLD_QTImage", "QWidget",
+ slot_tbl, 3,
+ 0, 0,
+#ifndef QT_NO_PROPERTIES
+ 0, 0,
+ 0, 0,
+#endif // QT_NO_PROPERTIES
+ 0, 0 );
+ metaObj->set_slot_access( slot_tbl_access );
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ return metaObj;
+}
diff --git a/dldialog/src/DLD_QT/mdld_input.cc b/dldialog/src/DLD_QT/mdld_input.cc
new file mode 100644
index 0000000..1067a4b
--- /dev/null
+++ b/dldialog/src/DLD_QT/mdld_input.cc
@@ -0,0 +1,95 @@
+/****************************************************************************
+** DLD_QTInput meta object code from reading C++ file 'dld_input.h'
+**
+** Created: Thu Feb 15 11:30:17 2001
+** by: The Qt MOC ($Id: mocgen.cpp,v 1.23 2001/02/02 17:17:35 mueller Exp $)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#if !defined(Q_MOC_OUTPUT_REVISION)
+#define Q_MOC_OUTPUT_REVISION 9
+#elif Q_MOC_OUTPUT_REVISION != 9
+#error "Moc format conflict - please regenerate all moc files"
+#endif
+
+#include "dld_input.h"
+#include <qmetaobject.h>
+#include <qapplication.h>
+
+
+
+const char *DLD_QTInput::className() const
+{
+ return "DLD_QTInput";
+}
+
+QMetaObject *DLD_QTInput::metaObj = 0;
+
+void DLD_QTInput::initMetaObject()
+{
+ if ( metaObj )
+ return;
+ if ( qstrcmp(QLineEdit::className(), "QLineEdit") != 0 )
+ badSuperclassWarning("DLD_QTInput","QLineEdit");
+ (void) staticMetaObject();
+}
+
+#ifndef QT_NO_TRANSLATION
+
+QString DLD_QTInput::tr(const char* s)
+{
+ return qApp->translate( "DLD_QTInput", s, 0 );
+}
+
+QString DLD_QTInput::tr(const char* s, const char * c)
+{
+ return qApp->translate( "DLD_QTInput", s, c );
+}
+
+#endif // QT_NO_TRANSLATION
+
+QMetaObject* DLD_QTInput::staticMetaObject()
+{
+ if ( metaObj )
+ return metaObj;
+ (void) QLineEdit::staticMetaObject();
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ typedef void (DLD_QTInput::*m1_t0)();
+ typedef void (QObject::*om1_t0)();
+ typedef void (DLD_QTInput::*m1_t1)(const char*);
+ typedef void (QObject::*om1_t1)(const char*);
+ typedef void (DLD_QTInput::*m1_t2)(const QString&);
+ typedef void (QObject::*om1_t2)(const QString&);
+ m1_t0 v1_0 = &DLD_QTInput::slotReturn;
+ om1_t0 ov1_0 = (om1_t0)v1_0;
+ m1_t1 v1_1 = &DLD_QTInput::slotTextChanged1;
+ om1_t1 ov1_1 = (om1_t1)v1_1;
+ m1_t2 v1_2 = &DLD_QTInput::slotTextChanged2;
+ om1_t2 ov1_2 = (om1_t2)v1_2;
+ QMetaData *slot_tbl = QMetaObject::new_metadata(3);
+ QMetaData::Access *slot_tbl_access = QMetaObject::new_metaaccess(3);
+ slot_tbl[0].name = "slotReturn()";
+ slot_tbl[0].ptr = (QMember)ov1_0;
+ slot_tbl_access[0] = QMetaData::Public;
+ slot_tbl[1].name = "slotTextChanged1(const char*)";
+ slot_tbl[1].ptr = (QMember)ov1_1;
+ slot_tbl_access[1] = QMetaData::Public;
+ slot_tbl[2].name = "slotTextChanged2(const QString&)";
+ slot_tbl[2].ptr = (QMember)ov1_2;
+ slot_tbl_access[2] = QMetaData::Public;
+ metaObj = QMetaObject::new_metaobject(
+ "DLD_QTInput", "QLineEdit",
+ slot_tbl, 3,
+ 0, 0,
+#ifndef QT_NO_PROPERTIES
+ 0, 0,
+ 0, 0,
+#endif // QT_NO_PROPERTIES
+ 0, 0 );
+ metaObj->set_slot_access( slot_tbl_access );
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ return metaObj;
+}
diff --git a/dldialog/src/DLD_QT/mdld_list.cc b/dldialog/src/DLD_QT/mdld_list.cc
new file mode 100644
index 0000000..6213160
--- /dev/null
+++ b/dldialog/src/DLD_QT/mdld_list.cc
@@ -0,0 +1,81 @@
+/****************************************************************************
+** DLD_QTList meta object code from reading C++ file 'dld_list.h'
+**
+** Created: Thu Feb 15 11:30:17 2001
+** by: The Qt MOC ($Id: mocgen.cpp,v 1.23 2001/02/02 17:17:35 mueller Exp $)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#if !defined(Q_MOC_OUTPUT_REVISION)
+#define Q_MOC_OUTPUT_REVISION 9
+#elif Q_MOC_OUTPUT_REVISION != 9
+#error "Moc format conflict - please regenerate all moc files"
+#endif
+
+#include "dld_list.h"
+#include <qmetaobject.h>
+#include <qapplication.h>
+
+
+
+const char *DLD_QTList::className() const
+{
+ return "DLD_QTList";
+}
+
+QMetaObject *DLD_QTList::metaObj = 0;
+
+void DLD_QTList::initMetaObject()
+{
+ if ( metaObj )
+ return;
+ if ( qstrcmp(QListBox::className(), "QListBox") != 0 )
+ badSuperclassWarning("DLD_QTList","QListBox");
+ (void) staticMetaObject();
+}
+
+#ifndef QT_NO_TRANSLATION
+
+QString DLD_QTList::tr(const char* s)
+{
+ return qApp->translate( "DLD_QTList", s, 0 );
+}
+
+QString DLD_QTList::tr(const char* s, const char * c)
+{
+ return qApp->translate( "DLD_QTList", s, c );
+}
+
+#endif // QT_NO_TRANSLATION
+
+QMetaObject* DLD_QTList::staticMetaObject()
+{
+ if ( metaObj )
+ return metaObj;
+ (void) QListBox::staticMetaObject();
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ typedef void (DLD_QTList::*m1_t0)(int);
+ typedef void (QObject::*om1_t0)(int);
+ m1_t0 v1_0 = &DLD_QTList::slotSelected;
+ om1_t0 ov1_0 = (om1_t0)v1_0;
+ QMetaData *slot_tbl = QMetaObject::new_metadata(1);
+ QMetaData::Access *slot_tbl_access = QMetaObject::new_metaaccess(1);
+ slot_tbl[0].name = "slotSelected(int)";
+ slot_tbl[0].ptr = (QMember)ov1_0;
+ slot_tbl_access[0] = QMetaData::Public;
+ metaObj = QMetaObject::new_metaobject(
+ "DLD_QTList", "QListBox",
+ slot_tbl, 1,
+ 0, 0,
+#ifndef QT_NO_PROPERTIES
+ 0, 0,
+ 0, 0,
+#endif // QT_NO_PROPERTIES
+ 0, 0 );
+ metaObj->set_slot_access( slot_tbl_access );
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ return metaObj;
+}
diff --git a/dldialog/src/DLD_QT/mdld_qtapp.cc b/dldialog/src/DLD_QT/mdld_qtapp.cc
new file mode 100644
index 0000000..8f0b21c
--- /dev/null
+++ b/dldialog/src/DLD_QT/mdld_qtapp.cc
@@ -0,0 +1,81 @@
+/****************************************************************************
+** DLD_QTApp meta object code from reading C++ file 'dld_qtapp.h'
+**
+** Created: Thu Feb 15 11:30:17 2001
+** by: The Qt MOC ($Id: mocgen.cpp,v 1.23 2001/02/02 17:17:35 mueller Exp $)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#if !defined(Q_MOC_OUTPUT_REVISION)
+#define Q_MOC_OUTPUT_REVISION 9
+#elif Q_MOC_OUTPUT_REVISION != 9
+#error "Moc format conflict - please regenerate all moc files"
+#endif
+
+#include "dld_qtapp.h"
+#include <qmetaobject.h>
+#include <qapplication.h>
+
+
+
+const char *DLD_QTApp::className() const
+{
+ return "DLD_QTApp";
+}
+
+QMetaObject *DLD_QTApp::metaObj = 0;
+
+void DLD_QTApp::initMetaObject()
+{
+ if ( metaObj )
+ return;
+ if ( qstrcmp(QApplication::className(), "QApplication") != 0 )
+ badSuperclassWarning("DLD_QTApp","QApplication");
+ (void) staticMetaObject();
+}
+
+#ifndef QT_NO_TRANSLATION
+
+QString DLD_QTApp::tr(const char* s)
+{
+ return qApp->translate( "DLD_QTApp", s, 0 );
+}
+
+QString DLD_QTApp::tr(const char* s, const char * c)
+{
+ return qApp->translate( "DLD_QTApp", s, c );
+}
+
+#endif // QT_NO_TRANSLATION
+
+QMetaObject* DLD_QTApp::staticMetaObject()
+{
+ if ( metaObj )
+ return metaObj;
+ (void) QApplication::staticMetaObject();
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ typedef void (DLD_QTApp::*m1_t0)();
+ typedef void (QObject::*om1_t0)();
+ m1_t0 v1_0 = &DLD_QTApp::slot_has_exited;
+ om1_t0 ov1_0 = (om1_t0)v1_0;
+ QMetaData *slot_tbl = QMetaObject::new_metadata(1);
+ QMetaData::Access *slot_tbl_access = QMetaObject::new_metaaccess(1);
+ slot_tbl[0].name = "slot_has_exited()";
+ slot_tbl[0].ptr = (QMember)ov1_0;
+ slot_tbl_access[0] = QMetaData::Public;
+ metaObj = QMetaObject::new_metaobject(
+ "DLD_QTApp", "QApplication",
+ slot_tbl, 1,
+ 0, 0,
+#ifndef QT_NO_PROPERTIES
+ 0, 0,
+ 0, 0,
+#endif // QT_NO_PROPERTIES
+ 0, 0 );
+ metaObj->set_slot_access( slot_tbl_access );
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ return metaObj;
+}
diff --git a/dldialog/src/DLD_QT/mdld_radio.cc b/dldialog/src/DLD_QT/mdld_radio.cc
new file mode 100644
index 0000000..ec610a4
--- /dev/null
+++ b/dldialog/src/DLD_QT/mdld_radio.cc
@@ -0,0 +1,94 @@
+/****************************************************************************
+** DLD_QTRadioButton meta object code from reading C++ file 'dld_radio.h'
+**
+** Created: Thu Feb 15 11:30:17 2001
+** by: The Qt MOC ($Id: mocgen.cpp,v 1.23 2001/02/02 17:17:35 mueller Exp $)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#if !defined(Q_MOC_OUTPUT_REVISION)
+#define Q_MOC_OUTPUT_REVISION 9
+#elif Q_MOC_OUTPUT_REVISION != 9
+#error "Moc format conflict - please regenerate all moc files"
+#endif
+
+#include "dld_radio.h"
+#include <qmetaobject.h>
+#include <qapplication.h>
+
+
+
+const char *DLD_QTRadioButton::className() const
+{
+ return "DLD_QTRadioButton";
+}
+
+QMetaObject *DLD_QTRadioButton::metaObj = 0;
+
+void DLD_QTRadioButton::initMetaObject()
+{
+ if ( metaObj )
+ return;
+ if ( qstrcmp(QRadioButton::className(), "QRadioButton") != 0 )
+ badSuperclassWarning("DLD_QTRadioButton","QRadioButton");
+ (void) staticMetaObject();
+}
+
+#ifndef QT_NO_TRANSLATION
+
+QString DLD_QTRadioButton::tr(const char* s)
+{
+ return qApp->translate( "DLD_QTRadioButton", s, 0 );
+}
+
+QString DLD_QTRadioButton::tr(const char* s, const char * c)
+{
+ return qApp->translate( "DLD_QTRadioButton", s, c );
+}
+
+#endif // QT_NO_TRANSLATION
+
+QMetaObject* DLD_QTRadioButton::staticMetaObject()
+{
+ if ( metaObj )
+ return metaObj;
+ (void) QRadioButton::staticMetaObject();
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ typedef void (DLD_QTRadioButton::*m1_t0)(bool);
+ typedef void (QObject::*om1_t0)(bool);
+ m1_t0 v1_0 = &DLD_QTRadioButton::slot_activate;
+ om1_t0 ov1_0 = (om1_t0)v1_0;
+ QMetaData *slot_tbl = QMetaObject::new_metadata(1);
+ QMetaData::Access *slot_tbl_access = QMetaObject::new_metaaccess(1);
+ slot_tbl[0].name = "slot_activate(bool)";
+ slot_tbl[0].ptr = (QMember)ov1_0;
+ slot_tbl_access[0] = QMetaData::Public;
+ typedef void (DLD_QTRadioButton::*m2_t0)(int);
+ typedef void (QObject::*om2_t0)(int);
+ m2_t0 v2_0 = &DLD_QTRadioButton::signal_rbpress;
+ om2_t0 ov2_0 = (om2_t0)v2_0;
+ QMetaData *signal_tbl = QMetaObject::new_metadata(1);
+ signal_tbl[0].name = "signal_rbpress(int)";
+ signal_tbl[0].ptr = (QMember)ov2_0;
+ metaObj = QMetaObject::new_metaobject(
+ "DLD_QTRadioButton", "QRadioButton",
+ slot_tbl, 1,
+ signal_tbl, 1,
+#ifndef QT_NO_PROPERTIES
+ 0, 0,
+ 0, 0,
+#endif // QT_NO_PROPERTIES
+ 0, 0 );
+ metaObj->set_slot_access( slot_tbl_access );
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ return metaObj;
+}
+
+// SIGNAL signal_rbpress
+void DLD_QTRadioButton::signal_rbpress( int t0 )
+{
+ activate_signal( "signal_rbpress(int)", t0 );
+}
diff --git a/dldialog/src/DLD_QT/mdld_radiolist.cc b/dldialog/src/DLD_QT/mdld_radiolist.cc
new file mode 100644
index 0000000..0514b4e
--- /dev/null
+++ b/dldialog/src/DLD_QT/mdld_radiolist.cc
@@ -0,0 +1,81 @@
+/****************************************************************************
+** DLD_QTRadioList meta object code from reading C++ file 'dld_radiolist.h'
+**
+** Created: Thu Feb 15 11:30:17 2001
+** by: The Qt MOC ($Id: mocgen.cpp,v 1.23 2001/02/02 17:17:35 mueller Exp $)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#if !defined(Q_MOC_OUTPUT_REVISION)
+#define Q_MOC_OUTPUT_REVISION 9
+#elif Q_MOC_OUTPUT_REVISION != 9
+#error "Moc format conflict - please regenerate all moc files"
+#endif
+
+#include "dld_radiolist.h"
+#include <qmetaobject.h>
+#include <qapplication.h>
+
+
+
+const char *DLD_QTRadioList::className() const
+{
+ return "DLD_QTRadioList";
+}
+
+QMetaObject *DLD_QTRadioList::metaObj = 0;
+
+void DLD_QTRadioList::initMetaObject()
+{
+ if ( metaObj )
+ return;
+ if ( qstrcmp(QButtonGroup::className(), "QButtonGroup") != 0 )
+ badSuperclassWarning("DLD_QTRadioList","QButtonGroup");
+ (void) staticMetaObject();
+}
+
+#ifndef QT_NO_TRANSLATION
+
+QString DLD_QTRadioList::tr(const char* s)
+{
+ return qApp->translate( "DLD_QTRadioList", s, 0 );
+}
+
+QString DLD_QTRadioList::tr(const char* s, const char * c)
+{
+ return qApp->translate( "DLD_QTRadioList", s, c );
+}
+
+#endif // QT_NO_TRANSLATION
+
+QMetaObject* DLD_QTRadioList::staticMetaObject()
+{
+ if ( metaObj )
+ return metaObj;
+ (void) QButtonGroup::staticMetaObject();
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ typedef void (DLD_QTRadioList::*m1_t0)(int);
+ typedef void (QObject::*om1_t0)(int);
+ m1_t0 v1_0 = &DLD_QTRadioList::slot_rbpress;
+ om1_t0 ov1_0 = (om1_t0)v1_0;
+ QMetaData *slot_tbl = QMetaObject::new_metadata(1);
+ QMetaData::Access *slot_tbl_access = QMetaObject::new_metaaccess(1);
+ slot_tbl[0].name = "slot_rbpress(int)";
+ slot_tbl[0].ptr = (QMember)ov1_0;
+ slot_tbl_access[0] = QMetaData::Public;
+ metaObj = QMetaObject::new_metaobject(
+ "DLD_QTRadioList", "QButtonGroup",
+ slot_tbl, 1,
+ 0, 0,
+#ifndef QT_NO_PROPERTIES
+ 0, 0,
+ 0, 0,
+#endif // QT_NO_PROPERTIES
+ 0, 0 );
+ metaObj->set_slot_access( slot_tbl_access );
+#ifndef QT_NO_PROPERTIES
+#endif // QT_NO_PROPERTIES
+ return metaObj;
+}
diff --git a/dldialog/src/DLD_TV/Makefile.am b/dldialog/src/DLD_TV/Makefile.am
new file mode 100644
index 0000000..f76558b
--- /dev/null
+++ b/dldialog/src/DLD_TV/Makefile.am
@@ -0,0 +1,52 @@
+#/*****************************************************************************
+#**
+#** $Id: Makefile.am,v 1.8 2000/03/15 20:02:18 harald Exp $
+#**
+#** 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.
+#**
+#**
+#*****************************************************************************/
+dnl AUTOMAKE_OPTIONS = foreign
+
+libdld_tv_la_LDFLAGS = -export-dynamic -version-info @GUI_VERSION_INFO@ @TV_LDFLAGS@
+
+libdld_tv_la_LIBADD = @TV_LIBS@
+
+INCLUDES = @TV_INCLUDES@
+
+if BUILDTV
+lib_LTLIBRARIES = libdld_tv.la
+
+libdld_tv_la_SOURCES = \
+ dld_lib.cc dld_tvlib.h \
+ dld_tvapp.cc dld_tvapp.h \
+ dld_tvobj.cc dld_tvobj.h \
+ dld_geom.h dld_geom.cc \
+ dld_tvcontainer.h dld_tvcontainer.cc \
+ dld_dialog.h dld_dialog.cc \
+ dld_form.cc dld_form.h \
+ dld_row.cc dld_row.h \
+ dld_col.cc dld_col.h \
+ dld_checklist.cc dld_checklist.h \
+ dld_radiolist.cc dld_radiolist.h \
+ dld_tvcheck.cc dld_tvcheck.h \
+ dld_tvradio.cc dld_tvradio.h \
+ dld_button.h dld_button.cc \
+ dld_text.cc dld_text.h \
+ dld_list.cc dld_list.h \
+ dld_listitem.cc dld_listitem.h \
+ nmcmbobx.cpp nmcmbown.cpp tcmbovwr.cpp tcombobx.cpp \
+ nmcmbovw.cpp nmsinput.cpp tcmbowin.cpp tsinputl.cpp \
+ tcombobx.h tsinputl.h \
+ dld_combobox.cc dld_combobox.h \
+ dld_comboitem.cc dld_comboitem.h \
+ dld_gauge.cc dld_gauge.h \
+ fileview.cc fileview.h \
+ dld_textbox.cc dld_textbox.h \
+ dld_input.h dld_input.cc
+
+#DEFS += -export-dynamic
+endif
diff --git a/dldialog/src/DLD_TV/Makefile.in b/dldialog/src/DLD_TV/Makefile.in
new file mode 100644
index 0000000..032acf2
--- /dev/null
+++ b/dldialog/src/DLD_TV/Makefile.in
@@ -0,0 +1,494 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+#/*****************************************************************************
+#**
+#** $Id: Makefile.am,v 1.8 2000/03/15 20:02:18 harald Exp $
+#**
+#** 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.
+#**
+#**
+#*****************************************************************************/
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AS = @AS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CXX = @CXX@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
+GENCAT = @GENCAT@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+GUI_VERSION_INFO = @GUI_VERSION_INFO@
+HAVE_FINAL = @HAVE_FINAL@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+KDOC = @KDOC@
+LATEX = @LATEX@
+LEX = @LEX@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIBS = @QT_LIBS@
+RANLIB = @RANLIB@
+SGML2HTML = @SGML2HTML@
+TV_INCLUDES = @TV_INCLUDES@
+TV_LDFLAGS = @TV_LDFLAGS@
+TV_LIBS = @TV_LIBS@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+YACC = @YACC@
+l = @l@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+tv_includes = @tv_includes@
+tv_libraries = @tv_libraries@
+
+libdld_tv_la_LDFLAGS = -export-dynamic -version-info @GUI_VERSION_INFO@ @TV_LDFLAGS@
+
+libdld_tv_la_LIBADD = @TV_LIBS@
+
+INCLUDES = @TV_INCLUDES@
+
+@BUILDTV_TRUE@lib_LTLIBRARIES = libdld_tv.la
+
+@BUILDTV_TRUE@libdld_tv_la_SOURCES = dld_lib.cc dld_tvlib.h dld_tvapp.cc dld_tvapp.h dld_tvobj.cc dld_tvobj.h dld_geom.h dld_geom.cc dld_tvcontainer.h dld_tvcontainer.cc dld_dialog.h dld_dialog.cc dld_form.cc dld_form.h dld_row.cc dld_row.h dld_col.cc dld_col.h dld_checklist.cc dld_checklist.h dld_radiolist.cc dld_radiolist.h dld_tvcheck.cc dld_tvcheck.h dld_tvradio.cc dld_tvradio.h dld_button.h dld_button.cc dld_text.cc dld_text.h dld_list.cc dld_list.h dld_listitem.cc dld_listitem.h nmcmbobx.cpp nmcmbown.cpp tcmbovwr.cpp tcombobx.cpp nmcmbovw.cpp nmsinput.cpp tcmbowin.cpp tsinputl.cpp tcombobx.h tsinputl.h dld_combobox.cc dld_combobox.h dld_comboitem.cc dld_comboitem.h dld_gauge.cc dld_gauge.h fileview.cc fileview.h dld_textbox.cc dld_textbox.h dld_input.h dld_input.cc
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(lib_LTLIBRARIES)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I../..
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+libdld_tv_la_DEPENDENCIES =
+@BUILDTV_TRUE@libdld_tv_la_OBJECTS = dld_lib.lo dld_tvapp.lo \
+@BUILDTV_TRUE@dld_tvobj.lo dld_geom.lo dld_tvcontainer.lo dld_dialog.lo \
+@BUILDTV_TRUE@dld_form.lo dld_row.lo dld_col.lo dld_checklist.lo \
+@BUILDTV_TRUE@dld_radiolist.lo dld_tvcheck.lo dld_tvradio.lo \
+@BUILDTV_TRUE@dld_button.lo dld_text.lo dld_list.lo dld_listitem.lo \
+@BUILDTV_TRUE@nmcmbobx.lo nmcmbown.lo tcmbovwr.lo tcombobx.lo \
+@BUILDTV_TRUE@nmcmbovw.lo nmsinput.lo tcmbowin.lo tsinputl.lo \
+@BUILDTV_TRUE@dld_combobox.lo dld_comboitem.lo dld_gauge.lo fileview.lo \
+@BUILDTV_TRUE@dld_textbox.lo dld_input.lo
+CXXFLAGS = @CXXFLAGS@
+CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON = Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+SOURCES = $(libdld_tv_la_SOURCES)
+OBJECTS = $(libdld_tv_la_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .cc .cpp .lo .o .s
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/DLD_TV/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-libLTLIBRARIES:
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+
+distclean-libLTLIBRARIES:
+
+maintainer-clean-libLTLIBRARIES:
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(libdir)
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
+ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
+ else :; fi; \
+ done
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
+ done
+
+.c.o:
+ $(COMPILE) -c $<
+
+.s.o:
+ $(COMPILE) -c $<
+
+.S.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+libdld_tv.la: $(libdld_tv_la_OBJECTS) $(libdld_tv_la_DEPENDENCIES)
+ $(CXXLINK) -rpath $(libdir) $(libdld_tv_la_LDFLAGS) $(libdld_tv_la_OBJECTS) $(libdld_tv_la_LIBADD) $(LIBS)
+.cc.o:
+ $(CXXCOMPILE) -c $<
+.cc.lo:
+ $(LTCXXCOMPILE) -c $<
+.cpp.o:
+ $(CXXCOMPILE) -c $<
+.cpp.lo:
+ $(LTCXXCOMPILE) -c $<
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = src/DLD_TV
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+dld_button.lo dld_button.o : dld_button.cc dld_tvlib.h dld_button.h \
+ ../dld_button.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_tvobj.h dld_geom.h dld_dialog.h ../dld_dialog.h \
+ ../dld_container.h ../dld_out.h dld_tvcontainer.h
+dld_checklist.lo dld_checklist.o : dld_checklist.cc dld_checklist.h \
+ ../dld_checklist.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_tvobj.h dld_geom.h dld_tvlib.h dld_tvcheck.h \
+ ../dld_checkbutton.h dld_dialog.h ../dld_dialog.h \
+ ../dld_container.h ../dld_out.h dld_tvcontainer.h dld_text.h \
+ ../dld_text.h
+dld_col.lo dld_col.o : dld_col.cc dld_col.h ../dld_col.h \
+ ../dld_container.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_tvobj.h dld_geom.h dld_tvlib.h dld_tvcontainer.h \
+ dld_dialog.h ../dld_dialog.h ../dld_out.h
+dld_combobox.lo dld_combobox.o : dld_combobox.cc dld_combobox.h \
+ ../dld_combobox.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_tvobj.h dld_geom.h dld_tvlib.h tcombobx.h tsinputl.h \
+ dld_comboitem.h ../dld_comboitem.h dld_dialog.h ../dld_dialog.h \
+ ../dld_container.h ../dld_out.h dld_tvcontainer.h
+dld_comboitem.lo dld_comboitem.o : dld_comboitem.cc
+dld_dialog.lo dld_dialog.o : dld_dialog.cc dld_tvlib.h dld_tvapp.h \
+ ../dld_gui.h ../dld_out.h dld_tvobj.h ../dld_obj.h ../dld_lib.h \
+ ../../config.h dld_geom.h dld_dialog.h ../dld_dialog.h \
+ ../dld_container.h dld_tvcontainer.h
+dld_form.lo dld_form.o : dld_form.cc dld_form.h ../dld_form.h \
+ ../dld_container.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_tvobj.h dld_geom.h dld_tvlib.h dld_tvcontainer.h \
+ dld_dialog.h ../dld_dialog.h ../dld_out.h
+dld_gauge.lo dld_gauge.o : dld_gauge.cc dld_tvlib.h dld_gauge.h \
+ ../dld_gauge.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ ../dld_dialog.h ../dld_container.h ../dld_out.h dld_tvobj.h \
+ dld_geom.h
+dld_geom.lo dld_geom.o : dld_geom.cc dld_geom.h
+dld_input.lo dld_input.o : dld_input.cc dld_input.h ../dld_input.h \
+ ../dld_obj.h ../dld_lib.h ../../config.h dld_tvobj.h dld_geom.h \
+ dld_tvlib.h dld_dialog.h ../dld_dialog.h ../dld_container.h \
+ ../dld_out.h dld_tvcontainer.h
+dld_lib.lo dld_lib.o : dld_lib.cc ../dld_lib.h ../../config.h \
+ dld_tvapp.h dld_tvlib.h ../dld_gui.h ../dld_out.h dld_tvobj.h \
+ ../dld_obj.h dld_geom.h
+dld_list.lo dld_list.o : dld_list.cc dld_tvlib.h dld_list.h \
+ ../dld_list.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_tvobj.h dld_geom.h dld_listitem.h ../dld_listitem.h \
+ dld_dialog.h ../dld_dialog.h ../dld_container.h ../dld_out.h \
+ dld_tvcontainer.h
+dld_listitem.lo dld_listitem.o : dld_listitem.cc dld_tvlib.h \
+ dld_listitem.h ../dld_listitem.h ../dld_obj.h ../dld_lib.h \
+ ../../config.h dld_tvobj.h dld_geom.h
+dld_radiolist.lo dld_radiolist.o : dld_radiolist.cc dld_radiolist.h \
+ ../dld_radiolist.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_tvobj.h dld_geom.h dld_tvlib.h dld_tvradio.h \
+ ../dld_radiobutton.h dld_dialog.h ../dld_dialog.h \
+ ../dld_container.h ../dld_out.h dld_tvcontainer.h dld_text.h \
+ ../dld_text.h
+dld_row.lo dld_row.o : dld_row.cc dld_row.h ../dld_row.h \
+ ../dld_container.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_tvobj.h dld_geom.h dld_tvlib.h dld_tvcontainer.h \
+ dld_dialog.h ../dld_dialog.h ../dld_out.h
+dld_text.lo dld_text.o : dld_text.cc dld_tvlib.h dld_text.h \
+ ../dld_text.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_tvobj.h dld_geom.h dld_dialog.h ../dld_dialog.h \
+ ../dld_container.h ../dld_out.h dld_tvcontainer.h
+dld_textbox.lo dld_textbox.o : dld_textbox.cc dld_textbox.h \
+ ../dld_textbox.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_tvobj.h dld_geom.h dld_tvlib.h dld_list.h ../dld_list.h \
+ dld_listitem.h ../dld_listitem.h fileview.h dld_dialog.h \
+ ../dld_dialog.h ../dld_container.h ../dld_out.h \
+ dld_tvcontainer.h
+dld_tvapp.lo dld_tvapp.o : dld_tvapp.cc dld_tvlib.h dld_tvapp.h \
+ ../dld_gui.h ../dld_out.h dld_tvobj.h ../dld_obj.h ../dld_lib.h \
+ ../../config.h dld_geom.h dld_dialog.h ../dld_dialog.h \
+ ../dld_container.h dld_tvcontainer.h
+dld_tvcheck.lo dld_tvcheck.o : dld_tvcheck.cc dld_tvlib.h dld_tvcheck.h \
+ ../dld_checkbutton.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_dialog.h ../dld_dialog.h ../dld_container.h ../dld_out.h \
+ dld_tvobj.h dld_geom.h dld_tvcontainer.h dld_checklist.h \
+ ../dld_checklist.h
+dld_tvcontainer.lo dld_tvcontainer.o : dld_tvcontainer.cc dld_input.h \
+ ../dld_input.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_tvobj.h dld_geom.h dld_tvlib.h dld_tvapp.h ../dld_gui.h \
+ ../dld_out.h dld_tvcontainer.h ../dld_container.h dld_dialog.h \
+ ../dld_dialog.h dld_row.h ../dld_row.h dld_form.h ../dld_form.h \
+ dld_col.h ../dld_col.h dld_list.h ../dld_list.h dld_listitem.h \
+ ../dld_listitem.h dld_checklist.h ../dld_checklist.h \
+ dld_radiolist.h ../dld_radiolist.h dld_button.h ../dld_button.h \
+ dld_text.h ../dld_text.h dld_textbox.h ../dld_textbox.h \
+ fileview.h dld_combobox.h ../dld_combobox.h tcombobx.h \
+ tsinputl.h dld_gauge.h ../dld_gauge.h
+dld_tvobj.lo dld_tvobj.o : dld_tvobj.cc dld_tvobj.h ../dld_obj.h \
+ ../dld_lib.h ../../config.h dld_geom.h dld_tvlib.h \
+ dld_tvcontainer.h ../dld_container.h dld_dialog.h \
+ ../dld_dialog.h ../dld_out.h dld_tvapp.h ../dld_gui.h
+dld_tvradio.lo dld_tvradio.o : dld_tvradio.cc dld_tvlib.h dld_tvradio.h \
+ ../dld_radiobutton.h ../dld_obj.h ../dld_lib.h ../../config.h \
+ dld_dialog.h ../dld_dialog.h ../dld_container.h ../dld_out.h \
+ dld_tvobj.h dld_geom.h dld_tvcontainer.h dld_radiolist.h \
+ ../dld_radiolist.h
+fileview.lo fileview.o : fileview.cc fileview.h
+nmcmbobx.lo nmcmbobx.o : nmcmbobx.cpp tcombobx.h tsinputl.h
+nmcmbovw.lo nmcmbovw.o : nmcmbovw.cpp tcombobx.h tsinputl.h
+nmcmbown.lo nmcmbown.o : nmcmbown.cpp tcombobx.h tsinputl.h
+nmsinput.lo nmsinput.o : nmsinput.cpp tsinputl.h
+tcmbovwr.lo tcmbovwr.o : tcmbovwr.cpp tcombobx.h tsinputl.h
+tcmbowin.lo tcmbowin.o : tcmbowin.cpp tcombobx.h tsinputl.h
+tcombobx.lo tcombobx.o : tcombobx.cpp tcombobx.h tsinputl.h
+tsinputl.lo tsinputl.o : tsinputl.cpp tsinputl.h
+
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am: install-libLTLIBRARIES
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-libLTLIBRARIES
+uninstall: uninstall-am
+all-am: Makefile $(LTLIBRARIES)
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(libdir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \
+ mostlyclean-libtool mostlyclean-tags \
+ mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-libLTLIBRARIES clean-compile clean-libtool clean-tags \
+ clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-libLTLIBRARIES distclean-compile \
+ distclean-libtool distclean-tags distclean-generic \
+ clean-am
+ -rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-libLTLIBRARIES \
+ maintainer-clean-compile maintainer-clean-libtool \
+ maintainer-clean-tags maintainer-clean-generic \
+ distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
+clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
+uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
+distclean-compile clean-compile maintainer-clean-compile \
+mostlyclean-libtool distclean-libtool clean-libtool \
+maintainer-clean-libtool tags mostlyclean-tags distclean-tags \
+clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
+check-am installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+dnl AUTOMAKE_OPTIONS = foreign
+
+#DEFS += -export-dynamic
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/dldialog/src/DLD_TV/dld_button.cc b/dldialog/src/DLD_TV/dld_button.cc
new file mode 100644
index 0000000..5f07d2d
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_button.cc
@@ -0,0 +1,337 @@
+/******************************************************************************
+**
+** $Id: dld_button.cc,v 1.11 1999/04/01 10:32:05 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+
+#include "dld_tvlib.h"
+#include "dld_button.h"
+
+#define Uses_TRect
+#define Uses_TEvent
+#define Uses_TButton
+#define Uses_TDialog
+#include <tvision/tv.h>
+
+#include "dld_dialog.h"
+
+#include <iostream.h>
+
+#define cpTVBDis "\x10\x0B\x0C\x0D\x0E\x0E\x0E\x0F"
+
+const int cmGrabDefault = 61, cmReleaseDefault = 62;
+
+DLD_TVButton::
+DLD_TVButton (const string& _name, DLD_TVDialog *pd,
+ int _width, int _height):
+ DLD_TVObj (_name, pd),
+ TButton (TRect (1,1,0,0), _name.c_str(), cmOK, bfNormal),
+ markers("[]")
+{
+ height = _height + 1;
+ width = _width - (hotk) * 2 + 5;
+ lenWidth.setMin(width);
+ lenHeight.setMin(height);
+ lenHeight.setPref(height);
+// lenWidth.setPref(width*1000);
+// lenHeight.setPref(height*1000);
+
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "button "<< dld_name
+ << " (" << width << "," << height
+ << ") constructed.\n" ;
+ DLDdbg.flush ();
+#endif
+ dld_title = dld_name.c_str();
+}
+
+DLD_TVButton::
+~DLD_TVButton ()
+{
+#ifdef DEBUG
+ DLDdbg << "~button " << dld_name << "\n";
+ DLDdbg.flush ();
+#endif
+}
+
+void DLD_TVButton::
+create ()
+{
+#ifdef DEBUG
+ DLDdbg << "button create" << dld_name << "\n";
+#endif
+ DLD_Obj::create();
+}
+
+TPalette& DLD_TVButton::getPalette() const
+{
+ static TPalette palette (cpTVBDis, sizeof(cpTVBDis)-1);
+
+ if(is_disabled) {
+ return palette;
+ }
+ else return TButton::getPalette();
+}
+
+void DLD_TVButton::
+activate ()
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "button " << dld_name << "activate\n";
+#endif
+
+ DLD_TVObj::activate ();
+}
+
+void DLD_TVButton::
+press ()
+{
+ activate ();
+}
+
+void DLD_TVButton::
+changeBounds( const TRect& bounds ) {
+ TButton::changeBounds(bounds);
+
+#ifdef DEBUG
+ DLDdbg << "button changeBounds(" << bounds.a.x << "," << bounds.a.y << ")"
+ << "(" << bounds.b.x << "," << bounds.b.y << ")"
+ << endl;
+#endif
+};
+
+
+void DLD_TVButton::
+calcBounds(TRect& bounds, TPoint)
+{
+ bounds = geom;
+}
+
+void DLD_TVButton::draw()
+{
+ drawState(False);
+}
+
+void DLD_TVButton::drawState(Boolean down)
+{
+ ushort cButton, cShadow;
+ char ch = ' ';
+ TDrawBuffer b;
+
+ if( (state & sfDisabled) != 0 )
+ cButton = getColor(0x0404);
+ else
+ {
+ cButton = getColor(0x0501);
+ if( (state & sfActive) != 0 )
+ if( (state & sfSelected) != 0 )
+ cButton = getColor(0x0703);
+ else if( amDefault )
+ cButton = getColor(0x0602);
+ }
+ cShadow = getColor(0x8);
+ int s = size.x-1;
+// int T = size.y / 2 - 1;
+
+#ifdef DEBUG
+ DLDdbg << "button drawState y <= " << size.y-2 << endl << flush;
+#endif
+ Boolean center=True;
+ int l = strlen(dld_title);
+ int p = 0, j = 0;
+ int i = 0;
+
+ for( int y = 0; y <= size.y-2; y++ ) {
+ if(dld_title) {
+ int begin = 0;
+
+ b.moveChar( 0, ' ', cButton, size.x );
+ b.putAttribute( 0, cShadow );
+ if( down ) {
+ b.putAttribute( 1, cShadow );
+ ch = ' ';
+ begin = 3;
+ }
+ else {
+ b.putAttribute( s, cShadow );
+ if( showMarkers == True )
+ ch = ' ';
+ else {
+ if( y == 0 )
+ b.putChar( s, shadows[0] );
+ else
+ b.putChar( s, shadows[1] );
+ ch = shadows[2];
+ }
+ begin = 2;
+ }
+
+ // b.moveChar(0, ' ', cButton, s);
+ if (p < l) {
+ if (dld_title[p] == 3) {
+ center = True;
+ ++p;
+ }
+ i = p;
+ do {
+ j = p;
+ while ((p < l) && (dld_title[p] == ' '))
+ ++p;
+ while ((p < l) && (dld_title[p] != ' ') && (dld_title[p] != '\n'))
+ ++p;
+ } while ((p < l) && (p < i + s) && (dld_title[p] != '\n'));
+ if (p > i + s)
+ if (j > i)
+ p = j;
+ else
+ p = i + s;
+ if (center == True)
+ j = begin + (s - p + i) / 2 ;
+ else
+ j = begin;
+
+ char txt[p-i+1];
+ memcpy(txt, &dld_title[i], (p-i));
+ txt[p-i] = '\0';
+
+ b.moveCStr(j, txt, cButton);
+
+ while ((p < l) && (dld_title[p] == ' '))
+ p++;
+
+ if ((p < l) && (dld_title[p] == '\n')) {
+ // center = False;
+ p++;
+ }
+ }
+
+// b.moveCStr(0, y, s, 1);
+
+ if( showMarkers == True && !down )
+ {
+ int scOff;
+ if( (state & sfSelected) != 0 )
+ scOff = 0;
+ else if( amDefault )
+ scOff = 2;
+ else
+ scOff = 4;
+ b.putChar( 0, specialChars[scOff] );
+ b.putChar( s, specialChars[scOff+1] );
+ b.putChar( 1, markers[0] );
+ b.putChar( s-1, markers[1] );
+ }
+ writeLine( 0, y, size.x, 1, b );
+ }
+
+ if( showMarkers && !down ) {
+ b.putChar( 1, markers[0] );
+ b.putChar( s-1, markers[1] );
+ }
+ writeLine( 0, y, size.x, 1, b );
+ }
+ b.moveChar( 0, ' ', cShadow, 2 );
+ b.moveChar( 2, ch, cShadow, s-1 );
+ writeLine( 0, size.y-1, size.x, 1, b );
+}
+
+void DLD_TVButton::handleEvent( TEvent& event )
+{
+ if(is_disabled)
+ return;
+
+ TPoint mouse;
+ TRect clickRect;
+
+ clickRect = getExtent();
+ clickRect.a.x++;
+ clickRect.b.x--;
+ clickRect.b.y--;
+
+ if( event.what == evMouseDown )
+ {
+ mouse = makeLocal( event.mouse.where );
+ if( !clickRect.contains(mouse) )
+ clearEvent( event );
+ }
+ if (flags & bfGrabFocus)
+ TView::handleEvent(event);
+
+ char c = hotKey( dld_title );
+ switch( event.what )
+ {
+ case evMouseDown:
+ if ((state & sfDisabled) == 0)
+ {
+ clickRect.b.x++;
+ Boolean down = False;
+ do {
+ mouse = makeLocal( event.mouse.where );
+ if( down != clickRect.contains( mouse ) )
+ {
+ down = Boolean( !down );
+ drawState( down );
+ }
+ } while( mouseEvent( event, evMouseMove ) );
+ if( down )
+ {
+ press();
+ drawState( False );
+ }
+ }
+ clearEvent( event );
+ break;
+
+ case evKeyDown:
+ if( event.keyDown.keyCode == getAltCode(c) ||
+ ( owner->phase == phPostProcess &&
+ c != 0 &&
+ toupper(event.keyDown.charScan.charCode) == c
+ ) ||
+ ( (state & sfFocused) != 0 &&
+ event.keyDown.charScan.charCode == ' '
+ )
+ )
+ {
+ press();
+ clearEvent( event );
+ }
+ break;
+
+ case evBroadcast:
+ switch( event.message.command )
+ {
+ case cmDefault:
+ if( amDefault && !(state & sfDisabled) )
+ {
+ press();
+ clearEvent(event);
+ }
+ break;
+
+ case cmGrabDefault:
+ case cmReleaseDefault:
+ if( (flags & bfDefault) != 0 )
+ {
+ amDefault = Boolean(event.message.command == cmReleaseDefault);
+ drawView();
+ }
+ break;
+
+ case cmCommandSetChanged:
+ setState(sfDisabled,Boolean(!commandEnabled(command)));
+ drawView();
+ break;
+ }
+ break;
+ }
+
+}
+
diff --git a/dldialog/src/DLD_TV/dld_button.h b/dldialog/src/DLD_TV/dld_button.h
new file mode 100644
index 0000000..df8ba82
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_button.h
@@ -0,0 +1,64 @@
+/******************************************************************************
+**
+** $Id: dld_button.h,v 1.3 1998/10/13 01:43:43 saturn Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#ifndef DLD_TVBUTTON_H
+#define DLD_TVBUTTON_H
+
+#include "../dld_button.h"
+#include "dld_tvobj.h"
+#define Uses_TRect
+#define Uses_TButton
+#define Uses_TDialog
+#include <tvision/tv.h>
+
+///
+class DLD_TVButton : public DLD_TVObj, public DLD_Button,
+ public TButton
+{
+public:
+ ///
+ DLD_TVButton(const string& name, DLD_TVDialog *pd,
+ int _width, int _height);
+ ///
+ ~DLD_TVButton();
+
+ ///
+ virtual void activate();
+
+ ///
+ void create();
+
+ ///
+ void press();
+
+ void changeBounds( const TRect& bounds );
+
+ void calcBounds(TRect& bounds, TPoint delta );
+
+ virtual TPalette& getPalette() const;
+ virtual void disable() {
+ DLD_Obj::disable();
+ setState(sfDisabled, True);
+ options &= ~ofSelectable;
+ };
+
+ virtual void handleEvent( TEvent& event );
+ void drawState(Boolean down);
+ const char * markers;
+ const char * dld_title;
+ /**
+ * Draws the button.
+ */
+ virtual void draw();
+};
+
+#endif
diff --git a/dldialog/src/DLD_TV/dld_checklist.cc b/dldialog/src/DLD_TV/dld_checklist.cc
new file mode 100644
index 0000000..6e79bcd
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_checklist.cc
@@ -0,0 +1,199 @@
+/******************************************************************************
+**
+** $Id: dld_checklist.cc,v 1.11 1999/02/25 14:25:24 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+
+/** TODO
+ *
+ * - add childs to a list and destroy them
+ *
+ */
+
+#define Uses_TGroup
+#define Uses_TRect
+#define Uses_TBackground
+#define Uses_TStringCollection
+
+#include "dld_checklist.h"
+#include "dld_tvlib.h"
+#include "dld_tvcheck.h"
+#include "dld_text.h"
+#include "dld_dialog.h"
+#include <iostream.h>
+#include <stdio.h>
+#include <string.h>
+
+DLD_TVCheckList::
+DLD_TVCheckList (const string& name, DLD_TVDialog *pd):
+ DLD_TVObj (name, pd),
+ TCheckBoxes (TRect(2,2,0,0), NULL)
+{
+ // Cope with bad implementation in tvision
+ delete strings;
+ strings = new TStringCollection( 0, 1 );
+
+ check_ctr = 0;
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "checklist \n" ;
+#endif
+ growMode = gfFixed;
+ height = 2;
+ width = dld_name.length() - (hotk) * 2 + 4;
+
+ lenWidth.setMin(width);
+ lenHeight.setMin(height);
+
+ for (int i = 0; i < 32; i++)
+ {
+ check[i] = 0;
+ }
+
+
+ if(dld_name.length()) {
+ options |= ofFramed;
+ label = new TLabel(TRect(2, 1, width, 2),
+ dld_name.c_str(), this);
+ dia->insert(label);
+ }
+ else label = 0;
+}
+
+DLD_TVCheckList::
+~DLD_TVCheckList ()
+{
+ update_var();
+#ifdef DEBUG
+ DLDdbg << "~checklist " << dld_name << "\n";
+ DLDdbg.flush ();
+#endif
+}
+
+void DLD_TVCheckList::
+close_brace ()
+{
+#ifdef DEBUG
+ DLDdbg << "checklist " << dld_name
+ << "(" << width << "," << height << ")\n";
+ DLDdbg.flush ();
+#endif
+ lenWidth.setMin(width);
+ lenHeight.setMin(height);
+ lenWidth.setPref(width);
+ lenHeight.setPref(height);
+
+}
+
+void DLD_TVCheckList::
+create ()
+{
+ for (int i = 0; i < check_ctr; i++)
+ {
+ char num[4];
+ sprintf(num, "%d", i+1);
+ if(test_env(string(num)) || check[i]->test_env())
+ TCheckBoxes::press(i);
+ }
+ draw();
+ update_var();
+ for (int i = 0; i < check_ctr; i++)
+ {
+ check[i]->create();
+ }
+ DLD_Obj::create();
+}
+
+DLD_CheckButton *DLD_TVCheckList::
+checkbutton(const string& name)
+{
+ string nstr = conname(name);
+
+ DLD_TVCheckButton *p=0;
+
+ if(check_ctr < 32) {
+ check[check_ctr] = p = new DLD_TVCheckButton(name, dia);
+
+ add_child(p);
+
+ // We use atInsert otherwise we get a sorted list
+ strings->atInsert( check_ctr, newStr(nstr.c_str()) );
+
+ check_ctr++;
+ height++;
+ width = max(nstr.length() - (p->hotk) * 2 + 8, width);
+ }
+ else
+ DLDerr << "No more than 32 Checkbuttons allowed due to TVision!\n";
+
+ return p;
+}
+
+void DLD_TVCheckList::
+changeBounds( const TRect& bounds)
+{
+ if(label)
+ label->moveTo(bounds.a.x+1, bounds.a.y);
+
+ TRect nb(bounds);
+ nb.grow(-1,-1);
+ TCheckBoxes::changeBounds(nb);
+#ifdef DEBUG
+ DLDdbg << "checklist changeBounds("
+ << bounds.a.x << "," << bounds.a.y << ")"
+ << "(" << bounds.b.x << "," << bounds.b.y << ")"
+ << endl;
+#endif
+}
+
+void DLD_TVCheckList::
+calcBounds(TRect& bounds, TPoint)
+{
+ bounds = geom;
+}
+
+void DLD_TVCheckList::
+press(int item)
+{
+ TCheckBoxes::press(item);
+ update_var();
+}
+
+void DLD_TVCheckList::
+update_var()
+{
+ char istr[512];
+
+ for (int i = 0; i < check_ctr; i++)
+ {
+ if (!(value & (1<<i)))
+ check[i]->deactivate ();
+ }
+
+ varvalue.erase();
+
+ for (int i = 0; i < check_ctr; i++)
+ {
+ if (value & (1<<i)) {
+ if (check[i])
+ {
+#ifdef DEBUG
+ DLDdbg << "~checklist " << dld_name << "activate "
+ << check[i]->dld_name << "\n";
+ DLDdbg.flush ();
+#endif
+ check[i]->activate ();
+ sprintf(istr, "%d ", i+1);
+ varvalue += istr;
+ }
+ }
+ }
+
+ activate();
+}
diff --git a/dldialog/src/DLD_TV/dld_checklist.h b/dldialog/src/DLD_TV/dld_checklist.h
new file mode 100644
index 0000000..152ec1c
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_checklist.h
@@ -0,0 +1,77 @@
+/******************************************************************************
+**
+** $Id: dld_checklist.h,v 1.6 1999/01/29 14:15:26 saturn Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+
+#ifndef DLD_TVCHECKLIST_H
+#define DLD_TVCHECKLIST_H
+
+#define Uses_TCheckBoxes
+#define Uses_TLabel
+
+#include "../dld_checklist.h"
+#include "dld_tvobj.h"
+
+#include <tvision/tv.h>
+
+///
+class DLD_TVCheckButton;
+
+class DLD_TVCheckList : public DLD_TVObj,
+ public DLD_CheckList,
+ public TCheckBoxes
+{
+public:
+ ///
+ DLD_TVCheckList(const string& name, DLD_TVDialog *pd);
+ ///
+ virtual ~DLD_TVCheckList();
+
+ /** Indicates the beginning of a new block
+ *
+ * Can be used to reserve space for children.
+ */
+ void open_brace() {};
+
+ /** Indicates the end of a block.
+ *
+ * Can be used to collect all children.
+ */
+ void close_brace();
+
+ /** Indicates the creation.
+ *
+ */
+ void create();
+
+ DLD_CheckButton *checkbutton(const string& name);
+
+ void changeBounds( const TRect& bounds );
+ void calcBounds(TRect& bounds, TPoint delta );
+
+ void press(int item);
+
+protected:
+ void update_var();
+ ///
+ TSItem *item;
+
+ ///
+ DLD_TVCheckButton *check[32];
+
+ ///
+ int check_ctr;
+
+ ///
+ TLabel *label;
+};
+
+#endif
diff --git a/dldialog/src/DLD_TV/dld_col.cc b/dldialog/src/DLD_TV/dld_col.cc
new file mode 100644
index 0000000..72aeab4
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_col.cc
@@ -0,0 +1,137 @@
+/******************************************************************************
+**
+** $Id: dld_col.cc,v 1.8 1999/02/17 13:28:00 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+
+#define Uses_TGroup
+#define Uses_TFrame
+#define Uses_TRect
+#define Uses_TBackground
+
+#include "dld_col.h"
+#include "dld_dialog.h"
+
+/* TODO:
+ *
+ * - Add a frame around the col
+ */
+
+
+DLD_TVCol::DLD_TVCol(const string& _name, DLD_TVApp *_aptr, DLD_TVDialog *_dia) :
+/* TView(TRect(0,0,1,1)),*/
+ DLD_TVObj (_name, _dia),
+ DLD_TVContainer(_name, _aptr, _dia, DLD_TVContainer::O_VER)
+{
+
+// options &= ~ofSelectable;
+// setState(sfVisible, False);
+ if(dld_name.length()) {
+// options |= ofFramed;
+// setState(sfShadow, True);
+ width = dld_name.length() - (hotk) * 2 + 6;
+
+ lenWidth.setMin(width);
+
+// lenWidth.setSizeAdd(2);
+
+ lenHeight.setSizeAdd(1);
+
+// lenHeight.addChild(new Len(1,1,0));
+
+ label = new TStaticText(TRect(2, 1, width, 2),
+ dld_name.c_str());
+ /*TLabel*/
+
+ dia->insert(label);
+// label->putInFrontOf(this);
+
+ }
+ else {
+ label = 0;
+ }
+
+};
+
+DLD_TVCol::~DLD_TVCol()
+{
+}
+
+void DLD_TVCol::
+create()
+{
+ DLD_TVContainer::create ();
+};
+
+void DLD_TVCol::
+changeBounds( const TRect& bounds)
+{
+#ifdef DEBUG
+ DLDdbg << "Col changeBounds(" << bounds.a.x << "," << bounds.a.y << ")"
+ << "(" << bounds.b.x << "," << bounds.b.y << ")"
+ << endl;
+#endif
+
+
+ TRect nb(bounds);
+
+ if(label) {
+ nb.grow(-1,-1);
+ label->moveTo(bounds.a.x+1, bounds.a.y);
+ label->draw();
+ }
+
+ DLD_TVContainer::changeBounds(nb);
+// TView::changeBounds(nb);
+
+}
+
+void DLD_TVCol::
+draw()
+{
+// TView::draw();
+/*
+ TDrawBuffer b;
+ b.moveChar(0, '*' , getColor(0x02), size.x);
+ writeLine(0, 0, size.x, 1, b);
+ writeLine(0, size.y-1, size.x, 1, b);
+
+ b.moveChar(0, '*' , getColor(0x02), size.y);
+ writeLine(0, 0, 1, size.y, b);
+ writeLine(size.x-1, 0, 1, size.y, b);
+*/
+}
+
+void DLD_TVCol::
+insert(TView *p)
+{
+ dia->insert(p);
+// putInFrontOf(p);
+}
+
+void DLD_TVCol::
+close_brace()
+{
+// if(dld_name.length())
+// lenHeight.addChild(new Len(1,1,0));
+}
+
+void DLD_TVCol::
+setGeom(const TRect& _g)
+{
+ geom = _g;
+
+ TRect nb(_g);
+ if(label) {
+ nb.grow(-1,-1);
+ label->moveTo(geom.a.x+1, geom.a.y);
+ }
+ DLD_TVContainer::changeBounds(nb);
+}
diff --git a/dldialog/src/DLD_TV/dld_col.h b/dldialog/src/DLD_TV/dld_col.h
new file mode 100644
index 0000000..4edf1a0
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_col.h
@@ -0,0 +1,54 @@
+/******************************************************************************
+**
+** $Id: dld_col.h,v 1.7 1999/04/18 20:59:36 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+
+#ifndef DLD_COL_H
+#define DLD_COL_H
+
+#define Uses_TRect
+#define Uses_TPoint
+//#define Uses_TLabel
+#define Uses_TStaticText
+#define Uses_TFrame
+
+#include "../dld_col.h"
+#include "dld_tvobj.h"
+#include "dld_tvcontainer.h"
+
+#include <tvision/tv.h>
+
+class DLD_TVCol : public DLD_Col, public DLD_TVContainer
+{
+public:
+ DLD_TVCol(const string& _name, DLD_TVApp *aptr, DLD_TVDialog *dia);
+ ~DLD_TVCol();
+
+ void create();
+
+ void changeBounds( const TRect& bounds);
+
+ void calcBounds(TRect& bounds, TPoint) { bounds = geom; };
+
+ void setGeom(const TRect& _g);
+
+ void insert(TView *p);
+
+ void draw();
+
+ void close_brace();
+private:
+ ///
+ TStaticText *label;
+// TLabel *label;
+};
+
+#endif
diff --git a/dldialog/src/DLD_TV/dld_combobox.cc b/dldialog/src/DLD_TV/dld_combobox.cc
new file mode 100644
index 0000000..c6c9b68
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_combobox.cc
@@ -0,0 +1,173 @@
+/******************************************************************************
+**
+** $Id: dld_combobox.cc,v 1.15 2000/03/15 20:02:18 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#include "dld_combobox.h"
+#include "dld_comboitem.h"
+#include "dld_dialog.h"
+#include <stdio.h>
+
+DLD_TVComboBox::
+DLD_TVComboBox(const string& _name, DLD_TVDialog *_parent) :
+ DLD_TVObj(_name, _parent),
+ TStaticInputLine(TRect(0,0,128,1), 128, &ilist),
+ ilist(0,1),
+ item_nr(0)
+{
+ lenWidth.setMin(2);
+ lenHeight.setMin(1);
+ lenHeight.setPref(1);
+ ibox = new DLD_NTVComboBox(TRect(0,0,1,1), this, &ilist);
+}
+
+DLD_TVComboBox::
+~DLD_TVComboBox()
+{
+// ibox is deleted by the window
+// delete ibox;
+}
+
+void DLD_TVComboBox::
+create()
+{
+ bool activated=false;
+ int no=0;
+
+ if(item_nr) {
+
+ // First check the items
+ for(IMI i = itemmap.begin(); i != itemmap.end(); ++i,++no) {
+ if(i->second && i->second->test_env()) {
+ ccIndex index = list->indexOf((char *)i->second->dld_name.c_str());
+ TStaticInputLine::newData((char *)TStaticInputLine::list->at(index));
+ i->second->activate();
+ activated=true;
+ }
+ }
+
+ // Then check our own variable
+ for(IMI i = itemmap.begin(); i != itemmap.end(); ++i,++no) {
+ char itemno[100];
+ sprintf(itemno, "%d", i->second->getNumber()+1);
+
+ if(i->second && test_env(itemno)) {
+ ccIndex index = list->indexOf((char *)i->second->dld_name.c_str());
+ TStaticInputLine::newData((char *)TStaticInputLine::list->at(index));
+ i->second->activate();
+ activated=true;
+ }
+ }
+
+ if (!activated) {
+ IMI i = itemmap.begin();
+ ccIndex index = list->indexOf((char *)i->second->dld_name.c_str());
+ TStaticInputLine::newData((char *)TStaticInputLine::list->at(index));
+ i->second->activate();
+ char buf[100];
+ sprintf(buf, "%d", i->second->getNumber()+1);
+ varvalue = buf;
+ deactivate();
+ activate();
+ }
+ dia->insert(ibox);
+ } else {
+ ibox->disable();
+ }
+
+ DLD_Obj::create();
+ for(IMI i = itemmap.begin(); i != itemmap.end(); ++i,++no) {
+ if(i->second) {
+ i->second->create();
+ }
+ }
+ DLD_Obj::create();
+}
+
+void DLD_TVComboBox::
+changeBounds( const TRect& bounds )
+{
+#ifdef DEBUG
+ DLDdbg << "ComboBox change bounds" << endl << flush;
+#endif
+ TStaticInputLine::changeBounds(bounds);
+}
+
+void DLD_TVComboBox::
+calcBounds(TRect& bounds, TPoint)
+{
+#ifdef DEBUG
+ DLDdbg << "ComboBox calc bounds" << endl << flush;
+#endif
+ bounds = geom;
+}
+
+DLD_ComboItem *DLD_TVComboBox::
+comboitem(const string& name)
+{
+ DLD_TVComboItem *p = new DLD_TVComboItem(name, dia, item_nr);
+
+ add_child(p);
+
+ itemmap[name] = p;
+ ilist.insert(newStr(p->dld_name.c_str()));
+
+ item_nr++;
+
+ lenWidth.setMin(max(p->dld_name.length()+3, lenWidth.getMin()));
+
+ return p;
+}
+
+void DLD_TVComboBox::
+setGeom( const TRect& geom )
+{
+#ifdef DEBUG
+ DLDdbg << "ComboBox set geom" << endl << flush;
+#endif
+
+ TRect nb(geom);
+ nb.b.x--;
+ DLD_TVObj::setGeom(nb);
+ ibox->setGeom(geom);
+}
+
+void DLD_TVComboBox::
+newData(char *val)
+{
+ if(! (val && strlen(val)))
+ return;
+
+ TStaticInputLine::newData(val);
+
+ const string str(val);
+ DLD_TVComboItem *item = itemmap[str];
+
+ for(IMI i = itemmap.begin(); i != itemmap.end(); ++i) {
+ if ( i->second != item)
+ i->second->deactivate();
+ }
+
+ if ( item ) {
+ item->activate();
+ char buf[100];
+ sprintf(buf, "%d", item->getNumber()+1);
+ varvalue = buf;
+ deactivate();
+ activate();
+ }
+}
+
+
+void DLD_TVComboBox::handleEvent( TEvent& event )
+{
+ if(item_nr)
+ TStaticInputLine::handleEvent(event);
+}
diff --git a/dldialog/src/DLD_TV/dld_combobox.h b/dldialog/src/DLD_TV/dld_combobox.h
new file mode 100644
index 0000000..4f85f15
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_combobox.h
@@ -0,0 +1,110 @@
+/******************************************************************************
+**
+** $Id: dld_combobox.h,v 1.10 2000/03/15 20:02:18 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#ifndef DLD_TVCOMBOBOX_H
+#define DLD_TVCOMBOBOX_H
+
+#define Uses_TComboBox
+#define Uses_TStaticInputLine
+#define Uses_TStringCollection
+
+#include "../dld_combobox.h"
+#include "dld_tvobj.h"
+
+#include "tcombobx.h"
+#include "tsinputl.h"
+#include <map>
+
+class DLD_NTVComboBox : public TComboBox
+{
+public:
+ DLD_NTVComboBox(const TRect& bounds, TStaticInputLine *aLink, TCollection *aList):
+ TComboBox(bounds,aLink,aList), enabled(true) { geom = bounds;};
+
+ virtual ~DLD_NTVComboBox() {};
+
+ void setGeom(const TRect& _geom) {
+ geom = _geom;
+ geom.a.x = geom.b.x - 1;
+ };
+
+ void disable() {enabled = false; };
+ void handleEvent( TEvent& event ) {
+ if(enabled)
+ TComboBox::handleEvent(event);
+ };
+
+
+ /// empty
+ void create() ;
+
+ void calcBounds(TRect& bounds, TPoint) { bounds = geom; };
+
+private:
+ TRect geom;
+ bool enabled;
+};
+
+class DLD_TVComboItem;
+
+/**
+ * Abstract Interface
+ * @short Abstract Interface
+ * @author Harald Hoyer <HarryH@Royal.Net>
+ */
+class DLD_TVComboBox : public DLD_TVObj,
+ public DLD_ComboBox,
+ public TStaticInputLine
+{
+public:
+ DLD_TVComboBox(const string& _name, DLD_TVDialog *parent);
+
+ ~DLD_TVComboBox();
+
+ /** Adds a comboitem to the combobox.
+ * @param name The text of the item
+ * @return ptr to item
+ */
+ DLD_ComboItem *comboitem(const string& = 0);
+
+ /** Indicates the beginning of a new block
+ *
+ * Can be used to reserve space for children.
+ */
+ void open_brace() {};
+
+ /** Indicates the end of a block.
+ *
+ * Can be used to collect all children.
+ */
+ void close_brace() {};
+
+ void create();
+
+ void changeBounds( const TRect& bounds );
+
+ void calcBounds(TRect& bounds, TPoint delta );
+
+ void setGeom( const TRect& geom );
+
+ void newData(char *);
+
+ void handleEvent( TEvent& event );
+
+private:
+ TStringCollection ilist;
+ DLD_NTVComboBox *ibox;
+ map<string, DLD_TVComboItem *>itemmap;
+ typedef map<string, DLD_TVComboItem *>::iterator IMI;
+ int item_nr;
+};
+#endif
diff --git a/dldialog/src/DLD_TV/dld_comboitem.cc b/dldialog/src/DLD_TV/dld_comboitem.cc
new file mode 100644
index 0000000..72f5f30
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_comboitem.cc
@@ -0,0 +1,12 @@
+/******************************************************************************
+**
+** $Id: dld_comboitem.cc,v 1.3 2000/03/15 20:02:18 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
diff --git a/dldialog/src/DLD_TV/dld_comboitem.h b/dldialog/src/DLD_TV/dld_comboitem.h
new file mode 100644
index 0000000..94a898f
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_comboitem.h
@@ -0,0 +1,37 @@
+/******************************************************************************
+**
+** $Id: dld_comboitem.h,v 1.7 2000/03/15 20:02:18 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#include "../dld_comboitem.h"
+#include "dld_tvobj.h"
+
+/**
+ * Abstract Interface
+ * @short Abstract Interface
+ * @author Harald Hoyer <HarryH@Royal.Net>
+ */
+class DLD_TVComboItem : public DLD_TVObj, public DLD_ComboItem {
+public:
+ DLD_TVComboItem(const string& name, DLD_TVDialog *parent, int _nr) :
+ DLD_TVObj(name, parent),
+ number(_nr) {};
+
+ void create() { DLD_Obj::create(); };
+
+ void changeBounds( const TRect& ) {};
+
+ void calcBounds(TRect& , TPoint ) {};
+
+ int getNumber() { return number; };
+
+private:
+ int number;
+};
diff --git a/dldialog/src/DLD_TV/dld_dialog.cc b/dldialog/src/DLD_TV/dld_dialog.cc
new file mode 100644
index 0000000..79aae39
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_dialog.cc
@@ -0,0 +1,208 @@
+/******************************************************************************
+**
+** $Id: dld_dialog.cc,v 1.5 1999/01/20 14:40:28 saturn Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#define Uses_TStatusLine
+#define Uses_TMenuBar
+#define Uses_TKeys
+
+#include "dld_tvlib.h"
+#include "dld_tvapp.h"
+#include "dld_dialog.h"
+#include <iostream.h>
+
+DLD_TVDialog::
+DLD_TVDialog (const string& _name, DLD_TVApp *_app, const DLD_Out _out):
+ DLD_TVObj (_name, this),
+// TDialog (TRect(0,0,132,255), dld_name.c_str()),
+ TDialog (_app->deskTop->getExtent(), dld_name.c_str()),
+ TWindowInit (&TDialog::initFrame),
+ DLD_TVContainer(_name, _app, this, DLD_TVContainer::O_VER),
+ DLD_Dialog(_app, _out)
+{
+ ow = oh = 0;
+ width = dld_name.length() + 10;
+ height = 0;
+
+ lenWidth.setMin(width);
+ lenHeight.setMin(height);
+
+ lenWidth.setPer(0);
+ lenHeight.setPer(0);
+
+ options |= ofTileable;
+ flags = wfMove|wfGrow|wfClose|wfZoom;
+
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "dialog " << dld_name
+ << "(" << width << "," << height << ")"
+ << endl << flush;
+#endif
+ hide();
+}
+
+DLD_TVDialog::
+~DLD_TVDialog ()
+{
+ // Remove us from the childlist
+ app->del_child (this);
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "dialog " << dld_name << " deleted\n";
+ DLDdbg.flush ();
+#endif
+ dia = 0;
+}
+
+void DLD_TVDialog::
+close_brace()
+{
+ // Insert ourselves in the desktop
+ app->deskTop->insert(this);
+// app->deskTop->insertBefore(app->deskTop->first(), this);
+ create();
+// app->deskTop->redraw();
+// app->menuBar->draw();
+// app->statusLine->draw ();
+ if(app->mainDialog == this)
+ putInFrontOf(owner->last);
+ selectNext(False);
+}
+
+void DLD_TVDialog::
+create ()
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "dialog " << dld_name << " create\n";
+ DLDdbg.flush ();
+#endif
+
+ if(is_created)
+ return;
+
+ printvars=false;
+
+ // First create our children
+ DLD_TVContainer::create ();
+
+ TRect newBounds;
+
+ if(((signed)width > size.x || (signed)height > size.y) ||
+ (lenWidth.getPer() || lenHeight.getPer()))
+ {
+ // Height or Width specified
+ if(lenWidth.getPer() == 0)
+ lenWidth.setPer(100);
+
+ if(lenHeight.getPer() == 0)
+ lenHeight.setPer(100);
+
+ newBounds = TRect(origin.x, origin.y,
+ origin.x + size.x * lenWidth.getPer() / 100 ,
+ origin.y + size.y * lenHeight.getPer() / 100);
+ }
+ else {
+ // Set the smallest size
+ newBounds = TRect(origin.x, origin.y,
+ origin.x + width+2,
+ origin.y + height+2);
+ }
+
+ // Fake to really update all gui elements the first time
+ TRect fake(newBounds);
+ fake.grow(-1,-1);
+ TDialog::setBounds(fake);
+
+ changeBounds(newBounds);
+ show();
+
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "dialog " << dld_name << " width="
+ << width << " height=" << height << "\n";
+ DLDdbg.flush ();
+#endif
+ DLD_Obj::create();
+}
+
+void DLD_TVDialog::
+insert(TView *p)
+{
+ TDialog::insert(p);
+}
+
+void DLD_TVDialog::
+changeBounds( const TRect& bounds)
+{
+ if(!is_created)
+ return;
+
+#ifdef DEBUG
+ DLDdbg << "dldialog changeBounds(" << bounds.a.x << "," << bounds.a.y << ")"
+ << "(" << bounds.b.x << "," << bounds.b.y << ")"
+ << endl;
+#endif
+
+ TRect nb(1, 1, bounds.b.x - bounds.a.x - 1, bounds.b.y - bounds.a.y - 1);
+
+ if((nb.b.y != oh) || (nb.b.x != ow)) {
+
+ DLD_TVContainer::changeBounds(nb);
+
+ DLDdbg << "dldialog changeBounds(" << bounds.a.x << ","
+ << bounds.a.y << ")"
+ << "(" << lenWidth.getLen()+2 << ","
+ << lenHeight.getLen()+2 << ")"
+ << endl << flush;
+ ow = nb.b.x;
+ oh = nb.b.y;
+ }
+
+ TRect db(bounds.a.x, bounds.a.y,
+ bounds.a.x + lenWidth.getLen()+2,
+ bounds.a.y + lenHeight.getLen()+2);
+
+ TDialog::changeBounds(db);
+
+}
+
+void DLD_TVDialog::
+calcBounds(TRect& bounds, TPoint delta )
+{
+ TDialog::calcBounds(bounds, delta );
+}
+
+void DLD_TVDialog::
+handleEvent( TEvent& event )
+{
+ if (event.what == evCommand) {
+ switch (event.message.command)
+ {
+ case cmOK: // Close current window
+ event.message.command = cmClose;
+ printvars = true;
+ break;
+ }
+ }
+
+ TDialog::handleEvent(event);
+
+ if (event.what == evKeyDown) {
+ switch (event.keyDown.keyCode) {
+ case kbUp :
+ focusNext(True);
+ clearEvent(event);
+ break;
+ case kbDown :
+ focusNext(False);
+ clearEvent(event);
+ break;
+ }
+ }
+}
diff --git a/dldialog/src/DLD_TV/dld_dialog.h b/dldialog/src/DLD_TV/dld_dialog.h
new file mode 100644
index 0000000..50fd615
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_dialog.h
@@ -0,0 +1,53 @@
+/******************************************************************************
+**
+** $Id: dld_dialog.h,v 1.3 1998/10/13 01:43:51 saturn Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+
+#ifndef DLD_TVDIALOG_H
+#define DLD_TVDIALOG_H
+
+#define Uses_TDialog
+
+#include "../dld_dialog.h"
+#include "dld_tvobj.h"
+#include "dld_tvcontainer.h"
+
+#include <tvision/tv.h>
+
+class DLD_TVApp;
+
+///
+class DLD_TVDialog: public TDialog, public DLD_TVContainer,
+ public DLD_Dialog
+{
+public:
+ ///
+ DLD_TVDialog(const string& name, DLD_TVApp *aptr, const DLD_Out path);
+
+ ///
+ ~DLD_TVDialog();
+
+ ///
+ void create();
+
+ void insert(TView *p);
+
+ void changeBounds( const TRect& bounds );
+ void calcBounds(TRect& bounds, TPoint delta );
+
+ void close_brace() ;
+ void handleEvent( TEvent& event );
+
+private:
+ int oh, ow;
+};
+
+#endif
diff --git a/dldialog/src/DLD_TV/dld_form.cc b/dldialog/src/DLD_TV/dld_form.cc
new file mode 100644
index 0000000..d86a420
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_form.cc
@@ -0,0 +1,126 @@
+/******************************************************************************
+**
+** $Id: dld_form.cc,v 1.7 1999/02/17 13:28:01 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#define Uses_TGroup
+#define Uses_TRect
+#define Uses_TBackground
+#define Uses_TKeys
+#define Uses_TFrame
+
+#include "dld_form.h"
+#include "dld_dialog.h"
+
+
+DLD_TVForm::
+DLD_TVForm(const string& _name, DLD_TVApp *_aptr, DLD_TVDialog *_dia) :
+ DLD_TVObj (_name, _dia),
+ TView(TRect(0,0,1,1)),
+ DLD_TVContainer(_name, _aptr, _dia, DLD_TVContainer::O_HOR)
+{
+/*
+ setState(sfVisible, False);
+ options &= ~ofSelectable;
+*/
+ if(dld_name.length()) {
+// options |= ofFramed;
+// setState(sfExposed, True);
+ width = dld_name.length() - (hotk) * 2 + 6;
+
+ lenWidth.setMin(width);
+ lenWidth.setSizeAdd(2);
+ lenHeight.setSizeAdd(2);
+
+ label = new TStaticText(TRect(2, 1, width, 2),
+ dld_name.c_str() /*, dia*/);
+
+ dia->insert(label);
+// label->putInFrontOf(this);
+ }
+ else label = 0;
+
+}
+
+DLD_TVForm::
+~DLD_TVForm()
+{
+}
+
+void DLD_TVForm::
+create()
+{
+ DLD_TVContainer::create ();
+};
+
+void DLD_TVForm::
+changeBounds( const TRect& bounds)
+{
+#ifdef DEBUG
+ DLDdbg << "Row changeBounds(" << bounds.a.x << "," << bounds.a.y << ")"
+ << "(" << bounds.b.x << "," << bounds.b.y << ")"
+ << endl;
+#endif
+
+
+ TRect nb(bounds);
+
+ if(label) {
+ label->moveTo(bounds.a.x+1, bounds.a.y);
+ nb.grow(-1,-1);
+ }
+
+ DLD_TVContainer::changeBounds(nb);
+
+ TView::changeBounds(nb);
+}
+
+void DLD_TVForm::
+draw()
+{
+ TView::draw();
+/*
+ TDrawBuffer b;
+ b.moveChar(0, '*' , getColor(0x02), size.x);
+ writeLine(0, 0, size.x, 1, b);
+ writeLine(0, size.y-1, size.x, 1, b);
+
+ b.moveChar(0, '*' , getColor(0x02), size.y);
+ writeLine(0, 0, 1, size.y, b);
+ writeLine(size.x-1, 0, 1, size.y, b);
+*/
+}
+
+void DLD_TVForm::
+insert(TView *p)
+{
+ dia->insert(p);
+// putInFrontOf(p);
+}
+
+void DLD_TVForm::
+close_brace()
+{
+}
+
+void DLD_TVForm::
+setGeom(const TRect& _g)
+{
+ geom = _g;
+
+ TRect nb(_g);
+
+ if(label) {
+ nb.grow(-1,-1);
+ label->moveTo(geom.a.x+1, geom.a.y);
+ }
+
+ DLD_TVContainer::changeBounds(nb);
+}
diff --git a/dldialog/src/DLD_TV/dld_form.h b/dldialog/src/DLD_TV/dld_form.h
new file mode 100644
index 0000000..d02e10c
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_form.h
@@ -0,0 +1,54 @@
+/******************************************************************************
+**
+** $Id: dld_form.h,v 1.7 1999/04/18 20:59:36 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+
+#ifndef DLD_FORM_H
+#define DLD_FORM_H
+
+#define Uses_TRect
+#define Uses_TPoint
+#define Uses_TStaticText
+
+#include "../dld_form.h"
+#include "dld_tvobj.h"
+#include "dld_tvcontainer.h"
+#include <tvision/tv.h>
+
+///
+class DLD_TVForm : public TView, public DLD_Form, public DLD_TVContainer
+{
+public:
+ DLD_TVForm(const string& _name, DLD_TVApp *aptr, DLD_TVDialog *dia);
+
+ ~DLD_TVForm();
+
+ void create();
+
+ void changeBounds( const TRect& bounds);
+
+ void calcBounds(TRect& bounds, TPoint) { bounds = geom; };
+
+ void setGeom(const TRect& _g);
+
+ void insert(TView *p);
+
+ void close_brace();
+
+ void draw();
+
+private:
+ ///
+ TStaticText *label;
+};
+
+#endif
+
diff --git a/dldialog/src/DLD_TV/dld_gauge.cc b/dldialog/src/DLD_TV/dld_gauge.cc
new file mode 100644
index 0000000..0890afd
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_gauge.cc
@@ -0,0 +1,133 @@
+/******************************************************************************
+**
+** $Id: dld_gauge.cc,v 1.9 1999/04/18 20:59:36 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#define Uses_TDrawBuffer
+#define Uses_TColor
+#define Uses_TEvent
+
+#include "dld_tvlib.h"
+#include "dld_gauge.h"
+
+#include <tvision/tv.h>
+#include <iostream.h>
+#include <stdio.h>
+
+#define cpTVGauge "\x0A\x0B\x0C\x0D\x0E\x0E\x0E\x0F"
+
+DLD_TVGauge::
+DLD_TVGauge (const string& _name, DLD_TVDialog *_pd) :
+ DLD_TVObj(_name, _pd),
+ TView(TRect(0,0,7,1)),
+ progress(0)
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "gauge " << dld_name << "\n";;
+#endif
+
+ options |= ofFramed;
+ options &= ~ofSelectable;
+
+ lenWidth.setMin(8);
+
+ lenHeight.setMin(3);
+ lenHeight.setPref(3);
+}
+
+DLD_TVGauge::
+~DLD_TVGauge ()
+{
+#ifdef DEBUG
+ DLDdbg << "~gauge " << dld_name << "\n";
+#endif
+ char istr[512];
+ sprintf(istr, "%d", progress);
+ varvalue = istr;
+ activate();
+}
+
+void DLD_TVGauge::
+draw()
+{
+ if (progress >= 0 && progress <= 100) {
+ ushort cProgress, cNProgress;
+ TDrawBuffer b;
+
+ cNProgress = getColor(10);
+ cProgress = getColor(0x503);
+
+ // Numberx of progress chars
+ int nc = (size.x-6) * progress / 100;
+
+ char pstr[5];
+ sprintf(pstr, "% 4d%%", progress);
+ for(int i=0; i < 5 ; i++)
+ b.moveChar(i, pstr[i], getColor(8), 1);
+
+ b.moveChar( 5, ' ', getColor(8), 1);
+ b.moveChar( 6, '#', cProgress, nc);
+ b.moveChar( nc + 6, '.', cNProgress, size.x - nc - 6);
+
+ // Write size.y line with chars
+ writeLine( 0, 0, size.x, size.y, b );
+ }
+}
+
+void DLD_TVGauge::
+changeBounds( const TRect& bounds ) {
+ TRect nb(bounds);
+ nb.grow(-1,-1);
+ TView::changeBounds(nb);
+}
+
+TPalette& DLD_TVGauge::getPalette() const
+{
+ static TPalette palette (cpTVGauge, sizeof(cpTVGauge)-1);
+ return palette;
+}
+
+void DLD_TVGauge::
+create()
+{
+ if(varname.length()) {
+ string val(dialog->get_env(varname));
+ sscanf(val.c_str(), "%d", &progress);
+ draw();
+ }
+ DLD_Gauge::create();
+ DLD_Obj::create();
+}
+
+void DLD_TVGauge::
+set_progress(int _p)
+{
+ if((_p >= 0 ) && (_p <= 100)) {
+ progress = _p;
+ char istr[512];
+ sprintf(istr, "%d", progress);
+ varvalue = istr;
+ // DLD_Obj is without exit
+ DLD_Obj::activate();
+ draw();
+ }
+ if (_p < 0) {
+ if(is_exit())
+ {
+ progress = _p;
+ // Generate Dialog exit event
+ TEvent te;
+ te.what = evCommand;
+ te.message.command = cmClose;
+ te.message.infoPtr = 0;
+ putEvent (te);
+ }
+ }
+}
diff --git a/dldialog/src/DLD_TV/dld_gauge.h b/dldialog/src/DLD_TV/dld_gauge.h
new file mode 100644
index 0000000..3eba614
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_gauge.h
@@ -0,0 +1,50 @@
+/******************************************************************************
+**
+** $Id: dld_gauge.h,v 1.3 1998/10/13 01:43:55 saturn Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+
+#ifndef DLD_GAUGE_H
+#define DLD_GAUGE_H
+
+#define Uses_TView
+#include "../dld_gauge.h"
+#include "dld_tvobj.h"
+#include <tvision/tv.h>
+
+///
+class DLD_TVGauge : public DLD_TVObj, public DLD_Gauge, public TView
+{
+public:
+ /// Constructor
+ DLD_TVGauge(const string& name, DLD_TVDialog *pd);
+
+ /// Destructor
+ ~DLD_TVGauge();
+
+ void create();
+
+ void changeBounds( const TRect& bounds );
+
+ void calcBounds(TRect& bounds, TPoint) { bounds = geom; };
+
+ void draw();
+
+ TPalette& getPalette() const;
+
+ void set_progress(int p);
+
+private:
+ /// The progress in percent to display
+ int progress;
+
+};
+
+#endif
diff --git a/dldialog/src/DLD_TV/dld_geom.cc b/dldialog/src/DLD_TV/dld_geom.cc
new file mode 100644
index 0000000..cc28b9a
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_geom.cc
@@ -0,0 +1,271 @@
+/******************************************************************************
+**
+** $Id: dld_geom.cc,v 1.6 2000/03/15 20:02:19 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#include "dld_geom.h"
+#include <algorithm>
+#include <numeric>
+
+long Len::checkMin(long pref_len)
+{
+ long min = getMin();
+
+ if(pref_len < min)
+ return min;
+
+ return pref_len;
+}
+
+long Len::getMin()
+{
+ if(!child.size())
+ return min;
+
+ long maxmin = 0;
+
+ for( LI i = child.begin(); i != child.end(); ++i) {
+ Len& l = **i;
+ long m = l.getMin();
+ if(max_flag) {
+ if(m > maxmin)
+ maxmin = m;
+ }
+ else
+ maxmin += m;
+ }
+ return maxmin + sad;
+}
+
+long Len::getPref()
+{
+ long m = getMin();
+
+ if(pref) {
+ return (pref > m) ? pref : m;
+ }
+
+ /* No pref set and no childs */
+ if(!child.size())
+ return m*1000;
+
+ if (max_flag == true) {
+ long maxmin = getMin();
+
+ for( LI i = child.begin(); i != child.end(); ++i) {
+ Len& l = **i;
+ long pr = l.getPref();
+ if(pr > maxmin)
+ maxmin = pr;
+ }
+ return maxmin+sad;
+ }
+
+ long all_per = 0;
+ long nwidth = 0;
+ long fixed = 0;
+
+ for( LI i = child.begin(); i != child.end(); ++i) {
+ Len& l = **i;
+ if(l.per)
+ all_per += l.per;
+ else {
+ fixed += l.getMin();
+ nwidth += l.getPref();
+ }
+ }
+
+ if(all_per)
+ {
+ if(all_per >= 100)
+ {
+ nwidth = 0;
+ }
+ else {
+ nwidth = 100 * nwidth / (100 - all_per);
+ all_per = 100;
+ fixed = 0;
+ }
+
+ for( LI i = child.begin(); i != child.end(); ++i) {
+ Len& l = **i;
+
+ if(l.per) {
+ long t1 = all_per
+ * l.checkMin(nwidth * l.per / all_per)
+ / l.per;
+
+ long t2 = all_per * l.checkMin(l.getPref()) / l.per;
+ if(t1 > nwidth)
+ nwidth = t1;
+
+ if(t2 > nwidth)
+ nwidth = t2;
+ }
+ }
+ }
+ else fixed = 0;
+
+ return nwidth + fixed + sad;
+}
+
+long Len::calcSize(long length)
+{
+ long min = getMin();
+ long hundred = 100;
+ long fixed = sad;
+
+/* if(length && (length == real))
+ return real;
+*/
+ if(length < min)
+ length = min;
+
+ if (child.size()) {
+ length -= sad;
+
+ long all_per = 0;
+ unsigned long nwidth = 0;
+ long nfix = 0;
+
+ for( LI i = child.begin(); i != child.end(); ++i) {
+ Len& l = **i;
+
+ long min = l.getMin();
+
+ if(l.per) {
+ all_per += l.per;
+ }
+ else {
+ nwidth += l.getPref();
+ nfix += min;
+ }
+ fixed += min;
+ }
+ length = max((long)length, (long)fixed);
+
+ long remain = length - fixed;
+
+ if(all_per >= 100)
+ hundred = all_per;
+
+
+ bool prop = false;
+ for( LI i = child.begin(); i != child.end(); ++i) {
+ Len& l = **i;
+ if(l.per && (l.per * length / hundred < l.getMin()))
+ prop = true;
+ }
+
+ long nremain = (hundred-all_per) * length / hundred;
+ int apos = 0;
+
+ for( LI i = child.begin(); i != child.end(); ++i) {
+ Len& l = **i;
+ long plus = 0;
+ long min = l.getMin();
+
+ if(l.per) {
+ if(remain) {
+ // All nonpercent elements exceed the total size
+ if(nfix > nremain) {
+ plus = remain * l.per / hundred;
+ }
+ else {
+ if(prop) {
+ plus = remain * l.per / hundred;
+ }
+ else {
+ // All right
+ plus = length * l.per / hundred - min;
+ }
+ }
+ }
+ }
+ else {
+ if((nfix < nremain) && remain) {
+ if(prop) {
+ plus = (remain + nfix) * (hundred - all_per) / hundred
+ * l.getPref() / nwidth - min;
+ }
+ else
+ plus = (nremain - nfix) * l.getPref() / nwidth;
+ }
+ }
+
+ if (plus < 0)
+ plus = 0;
+
+ l.setSize(min + plus);
+ l.pos = apos;
+ apos += l.real;
+ }
+ }
+ return ( length );
+}
+
+long Len::getMaxSize(long length)
+{
+ if (child.size()) {
+
+ long min = getMin();
+
+ if(length < min)
+ length = min;
+
+ length -= sad;
+
+ bool recalc;
+ long all_per = 100;
+
+ for( LI i = child.begin(); i != child.end(); ++i) {
+ Len& l = **i;
+ if(l.per > all_per)
+ all_per = l.per;
+ }
+
+ do {
+ recalc = false;
+ for( LI i = child.begin(); i != child.end(); ++i) {
+ Len& l = **i;
+ long perc = l.getPer();
+ long nl = l.setSize( perc ?
+ length * perc / all_per : length );
+ l.pos = 0;
+ if(nl > length) {
+ length = nl;
+ recalc = true;
+ break;
+ }
+ }
+ } while (recalc);
+ length += sad;
+ }
+ else
+ {
+ long pref = getPref();
+ if(length > pref)
+ length = pref;
+
+ long min = getMin();
+ if(length < min)
+ length = min;
+ }
+
+ return length;
+}
+
+long Len::setSize(long length)
+{
+ if (max_flag == true)
+ return real = getMaxSize(length);
+ else
+ return real = calcSize(length);
+}
diff --git a/dldialog/src/DLD_TV/dld_geom.h b/dldialog/src/DLD_TV/dld_geom.h
new file mode 100644
index 0000000..65371e0
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_geom.h
@@ -0,0 +1,169 @@
+/******************************************************************************
+**
+** $Id: dld_geom.h,v 1.4 2000/03/15 20:02:19 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#ifndef DLD_GEOM_H
+#define DLD_GEOM_H
+
+#include <string>
+#include <numeric>
+#include <list>
+
+/**
+ * Basic class for one dimensional size handling.
+ *
+ * Used to implement a geometry handler.
+ *
+ * @author Harald Hoyer <Harald@Hoyer.org>
+ * @version $Id: dld_geom.h,v 1.4 2000/03/15 20:02:19 harald Exp $
+ * @short basic class for one dimensional size handling.
+ */
+class Len {
+public:
+ /**
+ * Constructs a one dimensional length with child support
+ * @param _flag true if the length is a max length, false if the size
+ * has to be calculated by the childs.
+ * @param _min the minimal length. The length will never be shorter.
+ * @param _pref the preferred size. Is taken to calculate also properties.
+ * @param _per the length in percent from the parent length.
+ */
+ Len ( long _min = 0, long _pref = 0,
+ long _per = 0) :
+ min(_min), pref(_pref),
+ real(0), pos(0), sad(0), per(_per), max_flag(true)
+ {};
+
+ ~Len() {};
+
+ /// Get the actual length.
+ long getLen() {
+ return real;
+ };
+
+ /// Get the actual position.
+ int getPos() {
+ return pos;
+ };
+
+ /// Get the actual position.
+ void setPos(int _pos) {
+ pos = _pos;
+ };
+
+ /// Get the additional size.
+ int getSizeAdd() {
+ return sad;
+ };
+
+ /// Get the actual position.
+ void setSizeAdd(int _sad) {
+ sad = _sad;
+ };
+
+ /// Get the minimal length
+ long getMin();
+
+ /// Set the minimal length
+ void setMin(long _min) {min = _min;};
+
+ /// Get the preferred length
+ long getPref();
+
+ /// Set the preferred length
+ void setPref(long _pref) {pref = _pref;};
+
+ /// Get length in percent
+ long getPer() { return per; };
+
+ /// Set length in percent
+ void setPer(long _per) { per = _per; };
+
+ long setSize(long length);
+
+ /**
+ * Adds a children to the calculation process
+ * @param childlen the child
+ */
+ void addChild(Len *childlen) {child.push_back(childlen);};
+
+ /**
+ * Deletes a children from the calculation process
+ * @param childlen the child
+ */
+ void delChild(Len *childlen) {child.remove(childlen);};
+
+ Len& operator=(Len a) {
+ // child.clear();
+ child.erase(child.begin(), child.end());
+
+ min = a.min;
+ pref = a.pref;
+ real = a.real;
+ per = a.per;
+ };
+
+ void setSizeFlag(bool flag) { max_flag = flag; };
+
+protected:
+
+ long getMaxSize(long length);
+
+ /**
+ * Calculates the length of the children for the desired length.
+ * The length is never shorter than the minimal length.
+ * If no percent size is specified, the preferred size is taken to
+ * calculate the size.
+ * If a percent size is given, the algorithm tries to fit it with these
+ * properties in the parent length.
+ * If all percent sizes exceed 100. All non percent lengths take their
+ * minimum value and the rest is shared under the percent lengths according
+ * to their minimum values and percent sizes.
+ * @param length the desired length
+ * @return the real length after calculation
+ */
+ long calcSize(long length);
+
+private:
+ /**
+ * Check if the len is in the valid range.
+ * @param len the len to be checked
+ */
+ long checkMin(long len);
+
+ /// the childlist
+ list<Len*> child;
+
+ /// the iterator for the childlist
+ typedef list<Len*>::const_iterator LI;
+
+ /// minimal length
+ long min;
+
+ /// prefered length
+ long pref;
+
+ /// real length
+ int real;
+
+ /// real pos
+ int pos;
+
+ /// additional size
+ int sad;
+
+ /// percentual length of the parent
+ long per;
+
+ bool max_flag;
+};
+
+#endif
diff --git a/dldialog/src/DLD_TV/dld_input.cc b/dldialog/src/DLD_TV/dld_input.cc
new file mode 100644
index 0000000..623451e
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_input.cc
@@ -0,0 +1,196 @@
+/******************************************************************************
+**
+** $Id: dld_input.cc,v 1.15 2000/03/15 20:02:19 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#define Uses_TFilterValidator
+#define Uses_TEvent
+#define Uses_TKeys
+#include "dld_input.h"
+#include "dld_dialog.h"
+#include <tvision/tv.h>
+#include <stdio.h>
+
+DLD_TVInput::DLD_TVInput(const string& name, DLD_TVDialog *pd) :
+ DLD_TVObj(name, pd),
+ TInputLine(TRect(0,0,10,1), 1024)
+{
+ height = 1;
+ width = 3;
+ lenWidth.setMin(width);
+ lenHeight.setMin(height);
+ lenHeight.setPref(height);
+ isPasswd=false;
+ TInputLine::maxLen = 1023;
+ eventMask |= evBroadcast;
+}
+
+DLD_TVInput::~DLD_TVInput()
+{
+ varvalue = TInputLine::data;
+ dia = 0;
+ activate();
+}
+
+void DLD_TVInput::create()
+{
+ strncpy(TInputLine::data, dia->get_env(varname).c_str(),
+ TInputLine::maxLen);
+ int mlen = max(maxLen, dia->get_env(varname).length());
+ TInputLine::data[mlen]=0;
+ DLD_Obj::create();
+}
+
+void DLD_TVInput::set_length(int len)
+{
+ width = len+2;
+ TInputLine::maxLen = len;
+ lenWidth.setMin(width);
+ lenWidth.setPref(width);
+}
+
+void DLD_TVInput::set_ip(bool flag)
+{
+ if(!flag)
+ return;
+
+ width = 18;
+ lenWidth.setMin(width);
+ lenWidth.setPref(width);
+
+ setValidator(new DLD_TVIPValidator());
+}
+
+void DLD_TVInput::set_numeric(bool flag)
+{
+ if(!flag)
+ return;
+
+ setValidator(new TFilterValidator("01234567890"));
+}
+
+void DLD_TVInput::set_passwd(bool flag)
+{
+ if(!flag)
+ return;
+ isPasswd = flag;
+}
+
+void DLD_TVInput::draw()
+{
+ if(!isPasswd) {
+ TInputLine::draw();
+ return;
+ }
+ else {
+ int l, r;
+ TDrawBuffer b;
+
+ uchar color = (state & sfFocused) ? getColor( 2 ) : getColor( 1 );
+
+ b.moveChar( 0, ' ', color, size.x );
+ char buf[256];
+ int i;
+ for(i = 0; (i < size.x - 2) && data[firstPos+i]; i++)
+ buf[i] = '*';
+
+ buf[i] = 0;
+
+ buf[size.x - 2 ] = EOS;
+ b.moveStr( 1, buf, color );
+
+ if( canScroll(1) )
+ b.moveChar( size.x-1, '\x10', getColor(4), 1 );
+ if( (state & sfSelected) != 0 )
+ {
+ if( canScroll(-1) )
+ b.moveChar( 0, '\x11', getColor(4), 1 );
+ l = selStart - firstPos;
+ r = selEnd - firstPos;
+ l = max( 0, l );
+ r = min( size.x - 2, r );
+ if (l < r)
+ b.moveChar( l+1, 0, getColor(3), r - l );
+ }
+ writeLine( 0, 0, size.x, size.y, b );
+ setCursor( curPos-firstPos+1, 0);
+ }
+}
+
+Boolean DLD_TVInput::canScroll( int delta )
+{
+ if( delta < 0 )
+ return Boolean( firstPos > 0 );
+ else
+ if( delta > 0 )
+ return Boolean( (int)strlen(data) - firstPos + 2 > size.x );
+ else
+ return False;
+}
+
+void DLD_TVInput::handleEvent(TEvent& event)
+{
+ if( (state & sfSelected) != 0 )
+ switch (event.what)
+ {
+ case evBroadcast:
+ switch(event.message.command)
+ {
+ case cmDefault:
+ activate();
+ break;
+ }
+ break;
+ }
+ TInputLine::handleEvent(event);
+}
+
+DLD_TVIPValidator::DLD_TVIPValidator()
+{
+ regcomp(&accept, "^[0-2]?[0-9]?[0-9]?\\.[0-2]?[0-9]?[0-9]?\\."
+ "[0-2]?[0-9]?[0-9]?\\.[0-2]?[0-9]?[0-9]?$", REG_NOSUB|REG_EXTENDED);
+
+ regcomp(&correct, "^[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\."
+ "[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]$", REG_NOSUB|REG_EXTENDED);
+
+}
+
+DLD_TVIPValidator::~DLD_TVIPValidator()
+{
+ regfree(&accept);
+ regfree(&correct);
+}
+
+
+Boolean DLD_TVIPValidator::isValid(const char* s)
+{
+ int num[4], i;
+
+ if(sscanf(s, "%d.%d.%d.%d", &num[0], &num[1], &num[2], &num[3]) != 4)
+ return False;
+
+ for(i=0; i<4; i++) {
+ if(num[i] < 0 || num[i] > 255)
+ return False;
+ }
+
+ return (Boolean)(regexec(&correct, s, 0, 0, 0) == 0);
+}
+
+Boolean DLD_TVIPValidator::isValidInput(char* s, Boolean)
+{
+ if(strlen(s) == 0) {
+ strcpy(s, "0.0.0.0");
+ return True;
+ }
+
+ return (Boolean)(regexec(&accept, s, 0, 0, 0) == 0);
+}
+
diff --git a/dldialog/src/DLD_TV/dld_input.h b/dldialog/src/DLD_TV/dld_input.h
new file mode 100644
index 0000000..46dd82c
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_input.h
@@ -0,0 +1,83 @@
+/******************************************************************************
+**
+** $Id: dld_input.h,v 1.11 2000/03/15 20:02:19 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#ifndef DLD_TVINPUT_H
+#define DLD_TVINPUT_H
+
+#include <sys/types.h>
+#include <regex.h>
+
+#define Uses_TInputLine
+#define Uses_TValidator
+
+#include "../dld_input.h"
+#include "dld_tvobj.h"
+
+#include <tvision/tv.h>
+
+/**
+ * Abstract Interface
+ * @short Abstract Interface
+ * @author Harald Hoyer <HarryH@Royal.Net>
+ */
+class DLD_TVInput : public DLD_TVObj, public DLD_Input, public TInputLine
+{
+public:
+
+ DLD_TVInput(const string& name, DLD_TVDialog *parent);
+ /// Destructor.
+ ~DLD_TVInput();
+
+ void create() ;
+
+ void changeBounds( const TRect& bounds ) {
+ TInputLine::changeBounds(bounds);
+ };
+
+ void calcBounds(TRect& bounds, TPoint) {
+ bounds = geom;
+ };
+
+ void set_ip(bool);
+ void set_passwd(bool);
+ void set_numeric(bool);
+
+ /** Set the maximal length of the input field
+ * @param len the length
+ */
+ void set_length(int len);
+
+ void draw();
+ virtual void handleEvent(TEvent& event);
+
+private:
+ Boolean canScroll( int delta );
+
+ bool isPasswd;
+};
+
+class DLD_TVIPValidator : public TValidator
+{
+public:
+ DLD_TVIPValidator();
+ ~DLD_TVIPValidator();
+
+ Boolean isValid(const char* s);
+
+ Boolean isValidInput(char* s, Boolean);
+
+private:
+ regex_t accept, correct;
+};
+
+#endif
+
diff --git a/dldialog/src/DLD_TV/dld_lib.cc b/dldialog/src/DLD_TV/dld_lib.cc
new file mode 100644
index 0000000..04d8160
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_lib.cc
@@ -0,0 +1,50 @@
+/******************************************************************************
+**
+** $Id: dld_lib.cc,v 1.9 1999/02/11 08:43:30 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#include "../dld_lib.h"
+#include "dld_tvapp.h"
+#include <stdio.h>
+#include <signal.h>
+#include <termios.h>
+#include <errno.h>
+
+extern "C" DLD_Gui *
+dld_lib_init (const char *name, int argc, char **argv)
+{
+ dup2 (tty_fdin, STDIN_FILENO);
+ dup2 (tty_fdout, STDOUT_FILENO);
+ dup2 (tty_fderr, STDERR_FILENO);
+
+ /*
+ * We don't want to go in the background.
+ */
+ signal(SIGTTIN, SIG_IGN);
+ signal(SIGTTOU, SIG_IGN);
+
+ int oldsid = tcgetpgrp (tty_fdin);
+
+ /*
+ * Steal the Terminal.
+ * Good for the SIGWINSZ.
+ */
+ if(tcsetpgrp (tty_fdin, getpid()) != 0) {
+ DLDerr << strerror(errno);
+ }
+
+ /*
+ * Lets be the master of the session.
+ * Good for the console.
+ */
+ setsid();
+
+ return new DLD_TVApp (name, oldsid, argc, argv);
+}
diff --git a/dldialog/src/DLD_TV/dld_list.cc b/dldialog/src/DLD_TV/dld_list.cc
new file mode 100644
index 0000000..7cbef41
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_list.cc
@@ -0,0 +1,428 @@
+/******************************************************************************
+**
+** $Id: dld_list.cc,v 1.6 1999/01/29 14:15:27 saturn Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+
+#define Uses_TListBox
+#define Uses_TScrollBar
+#define Uses_TEvent
+#define Uses_TKeys
+
+#include "dld_tvlib.h"
+#include "dld_list.h"
+#include "dld_listitem.h"
+#include "dld_dialog.h"
+#include <stdio.h>
+#include <iostream.h>
+
+DLD_ScrollBar::DLD_ScrollBar(const TRect a, DLD_TVDialog *pd)
+ : TScrollBar(a)
+{
+ pd->insert(this);
+// options |= ofFramed;
+};
+
+
+DLD_TVList::
+DLD_TVList (const string& name, DLD_TVDialog * pd):
+ DLD_TVObj (name, pd),
+ TListBox(TRect(0,0,1,1), 1,
+ aScrollBar= new DLD_ScrollBar(TRect(0,0,1,3), pd)),
+ listcol(0,1),
+ list_ctr(0),
+ was_double(false)
+{
+ is_multi = false;
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "list " << flush ;
+#endif
+
+ options |= ofFramed;
+
+ height = 2;
+ width = dld_name.length() - (hotk) * 2 + 6;
+
+ lenHeight.setMin(height);
+ lenWidth.setMin(width);
+
+ if(dld_name.length()) {
+ label = new TLabel(TRect(2, 1, width, 2),
+ dld_name.c_str(), this);
+ dia->insert(label);
+ }
+ else label = 0;
+
+// tag='*';
+ tag='\020';
+}
+
+DLD_TVList::
+~DLD_TVList ()
+{
+#ifdef DEBUG
+ DLDdbg << "~list " << dld_name << "\n";
+#endif
+}
+
+void DLD_TVList::
+create()
+{
+ DLD_Obj::create();
+}
+
+void DLD_TVList::
+changeBounds( const TRect& bounds )
+{
+ if(label)
+ label->moveTo(bounds.a.x+3, bounds.a.y);
+
+
+ TRect nb(bounds), sb(bounds);
+ nb.grow(-2,-1);
+
+ if(aScrollBar) {
+ sb.grow(-1,-1);
+ sb.b.x = sb.a.x+1;
+ aScrollBar->setGeom(sb);
+ }
+ TListBox::changeBounds(nb);
+}
+
+void DLD_TVList::
+calcBounds(TRect& bounds, TPoint)
+{
+ bounds = geom;
+}
+
+DLD_ListItem * DLD_TVList::
+listitem (const string& _name)
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "list insert " << _name << endl << flush ;
+#endif
+
+ DLD_TVListItem *p = new DLD_TVListItem(_name, dia);
+
+ add_child(p);
+
+ childarray.push_back(p);
+
+ // We use atInsert otherwise we get a sorted list
+ listcol.atInsert(list_ctr, newStr((string(" ") + conname(_name)).c_str()));
+
+ list_ctr++;
+
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "list inserted " << _name << endl << flush ;
+#endif
+
+ width = max(_name.length()+5, width);
+ height++;
+
+ return p;
+}
+
+void DLD_TVList::
+open_brace()
+{
+}
+
+void DLD_TVList::
+close_brace()
+{
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "list close_brace" << endl << flush ;
+#endif
+ bool items[list_ctr];
+ bool wasset=false;
+ newList(&listcol);
+
+
+ // First check the items
+ for (unsigned int i=0; i < list_ctr; i++) {
+ if(childarray[i] && childarray[i]->test_env()) {
+ items[i] = true;
+ wasset=true;
+ }
+ else
+ items[i] = false;
+ }
+
+ for (unsigned int i=0; i < list_ctr; i++) {
+ if(items[i]) {
+ focusItem(i);
+ ToggleItem(i);
+ }
+ }
+
+ // Then check our own variable
+ for (unsigned int i=0; i < list_ctr; i++) {
+ char itemno[10];
+ sprintf(itemno, "%d", i+1);
+ if(test_env(itemno)) {
+ items[i] = true;
+ wasset=true;
+ }
+ else
+ items[i] = false;
+ }
+
+ for (unsigned int i=0; i < list_ctr; i++) {
+ if(items[i]) {
+ focusItem(i);
+ ToggleItem(i);
+ }
+ }
+
+ if(!wasset || is_multi) {
+ focusItem(0);
+ if(!is_multi)
+ ToggleItem(0);
+ }
+
+ // For the scrollbar
+ width+=2;
+
+ lenHeight.setMin((height > 7) ? 7 : height);
+ lenWidth.setMin((width > 10) ? 10 : width);
+ lenWidth.setPref(width);
+ lenHeight.setPref(height);
+
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "list h=" << height << " w=" << width << "\n";
+#endif
+
+ for (unsigned int i=0; i < list_ctr; i++) {
+ if(childarray[i]) {
+ childarray[i]->create();
+ }
+ }
+ create();
+ update_var();
+}
+
+void DLD_TVList::selectItem( short item )
+{
+ TListBox::selectItem( item );
+
+ if(!is_multi) {
+ for (unsigned int i=0; i < list_ctr; i++) {
+ char *itemaddr;
+ itemaddr=(char *)(list()->at(i));
+ itemaddr[0]=' ';
+ }
+
+
+ for(CI i = childarray.begin(); i != childarray.end(); ++i) {
+ (*i)->deactivate();
+ }
+ }
+ ToggleItem(item);
+}
+
+void DLD_TVList::handleEvent(TEvent& event)
+{
+ if(is_multi) {
+ // we dont want to lose mouse button events to the main handler....
+ if ((event.what==evMouseDown) && (event.mouse.buttons==mbLeftButton))
+ {
+ was_double=false;
+ // Small workaround to exit only if the item was double clicked
+ if (event.mouse.eventFlags & meDoubleClick) {
+ was_double = true;
+ }
+ TListBox::handleEvent(event);
+ ToggleItem(focused);
+ TListBox::draw();
+ }
+ else
+ TListBox::handleEvent(event);
+
+ switch (event.what)
+ {
+ case evKeyDown:
+ switch(event.keyDown.keyCode)
+ {
+ case kbEnter:
+ if ( focused < range ) {
+ ToggleItem(focused);
+ }
+ break;
+ case kbF7:
+ MarkAll();
+ break;
+ case kbF8:
+ UnMarkAll();
+ break;
+ case kbF9:
+ ToggleAll();
+ break;
+ default:
+ int n=0;
+ for(CI i = childarray.begin(); i != childarray.end();
+ ++i, ++n) {
+ string name = (*i)->dld_name;
+ if(event.keyDown.charScan.charCode == name[0]) {
+ clearEvent(event);
+ focusItem(n);
+ break;
+ }
+ }
+ break;
+ }
+ TListBox::draw();
+ break;
+ }
+ }
+ else {
+ // we dont want to lose mouse button events to the main handler....
+ if ((event.what==evMouseDown) && (event.mouse.buttons==mbLeftButton))
+ {
+ was_double=false;
+ // Small workaround to exit only if the item was double clicked
+ if (event.mouse.eventFlags & meDoubleClick) {
+ was_double = true;
+ }
+
+ TListBox::handleEvent(event);
+ selectItem(focused);
+ TListBox::draw();
+
+ }
+ else
+ {
+ TListBox::handleEvent(event);
+ if (event.what == evKeyDown) {
+ switch(event.keyDown.keyCode) {
+ case kbEnter:
+ if ( focused < range ) {
+ was_double = true;
+ focusItemNum(focused);
+ selectItem(focused);
+ }
+ clearEvent(event);
+ break;
+ }
+ }
+ }
+ }
+}
+
+void DLD_TVList::ToggleItem(int item_no)
+{
+ if (range<=0)
+ return;
+
+ char *itemaddr;
+ itemaddr=(char *)(list()->at(item_no));
+ if (itemaddr[0]==tag) {
+ if(childarray[item_no])
+ childarray[item_no]->deactivate ();
+ itemaddr[0]=' ';
+ }
+ else {
+ if(childarray[item_no]) {
+ if (!was_double && childarray[item_no]->is_exit()) {
+ childarray[item_no]->set_exit(false);
+ childarray[item_no]->activate ();
+ childarray[item_no]->set_exit(true);
+ }
+ else {
+ childarray[item_no]->activate ();
+ was_double = false;
+ }
+ }
+ itemaddr[0]=tag;
+ }
+ update_var();
+}
+
+void DLD_TVList::MarkAll()
+{
+ if (range<=0)
+ return;
+
+ char *itemaddr;
+ for (int i=0;i<range;i++)
+ {
+ itemaddr=(char *)(list()->at(i));
+ itemaddr[0]=tag;
+ if(childarray[i])
+ childarray[i]->activate ();
+ }
+ update_var();
+}
+
+void DLD_TVList::UnMarkAll()
+{
+ if (range<=0)
+ return;
+ char *itemaddr;
+ for (int i=0;i<range;i++)
+ {
+ itemaddr=(char *)(list()->at(i));
+ if(childarray[i])
+ childarray[i]->deactivate ();
+ itemaddr[0]=' ';
+ }
+ varvalue.erase();
+}
+
+void DLD_TVList::ToggleAll()
+{
+ if (range<=0)
+ return;
+ char *itemaddr;
+ for (int i=0;i<range;i++)
+ {
+ itemaddr=(char *)(list()->at(i));
+ if (itemaddr[0]==tag) {
+ if(childarray[i])
+ childarray[i]->deactivate ();
+ itemaddr[0]=' ';
+ }
+ else {
+ if(childarray[i])
+ childarray[i]->activate ();
+ itemaddr[0]=tag;
+ }
+ }
+ update_var();
+}
+
+void DLD_TVList::
+update_var()
+{
+ if(!is_created)
+ return;
+
+ char istr[512];
+
+ varvalue.erase();
+
+ for (unsigned int i = 0; i < list_ctr; i++)
+ {
+ unsigned char *itemaddr;
+ itemaddr=(unsigned char *)(list()->at(i));
+ if (itemaddr[0]==tag) {
+ if (childarray.size()>=i)
+ {
+ if(is_multi)
+ sprintf(istr, "%d ", i+1);
+ else
+ sprintf(istr, "%d", i+1);
+ varvalue += istr;
+ }
+ }
+ }
+
+ activate();
+}
diff --git a/dldialog/src/DLD_TV/dld_list.h b/dldialog/src/DLD_TV/dld_list.h
new file mode 100644
index 0000000..7aec4fc
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_list.h
@@ -0,0 +1,98 @@
+/******************************************************************************
+**
+** $Id: dld_list.h,v 1.7 1999/01/29 14:15:27 saturn Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+
+#ifndef DLD_LIST_H
+#define DLD_LIST_H
+
+#define Uses_TListBox
+#define Uses_TScrollBar
+#define Uses_TStringCollection
+#define Uses_TLabel
+
+#include "../dld_list.h"
+#include "dld_tvobj.h"
+#include "dld_listitem.h"
+#include <tvision/tv.h>
+#include <vector>
+
+class DLD_ScrollBar : public TScrollBar {
+public:
+ DLD_ScrollBar(const TRect a, DLD_TVDialog *pd);
+ void changeBounds( const TRect&) { TScrollBar::changeBounds(geom);};
+ void calcBounds(TRect& bounds, TPoint) {
+ bounds = geom;
+ };
+ virtual void setGeom(const TRect& _g) { geom = _g; };
+private:
+ TRect geom;
+};
+
+///
+class DLD_TVList : public DLD_TVObj, public DLD_List,
+ public TListBox
+{
+public:
+ ///
+ DLD_TVList(const string& name, DLD_TVDialog *pd);
+ ///
+ ~DLD_TVList();
+
+ ///
+ void create();
+
+ virtual void handleEvent(TEvent& event);
+
+ void changeBounds( const TRect& bounds );
+
+ void calcBounds(TRect& bounds, TPoint delta );
+
+ DLD_ListItem * listitem (const string& = 0);
+
+ /** Indicates the beginning of a new block
+ *
+ * Can be used to reserve space for children.
+ */
+ void open_brace();
+
+ /** Indicates the end of a block.
+ *
+ * Can be used to collect all children.
+ */
+ void close_brace();
+
+ void selectItem( short item );
+
+protected:
+ void update_var();
+ char tag;
+
+private:
+ DLD_ScrollBar *aScrollBar;
+ TStringCollection listcol;
+
+ typedef DLD_TVListItem *DLD_TVListItem_Ptr;
+ vector<DLD_TVListItem_Ptr> childarray;
+ typedef vector<DLD_TVListItem_Ptr>::iterator CI;
+
+ ///
+ TLabel *label;
+ unsigned int list_ctr;
+
+ void ToggleItem(int item_no);
+ void MarkAll();
+ void UnMarkAll();
+ void ToggleAll();
+ bool was_double;
+};
+
+#endif
diff --git a/dldialog/src/DLD_TV/dld_listitem.cc b/dldialog/src/DLD_TV/dld_listitem.cc
new file mode 100644
index 0000000..7da3f85
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_listitem.cc
@@ -0,0 +1,27 @@
+/******************************************************************************
+**
+** $Id: dld_listitem.cc,v 1.4 2000/03/15 20:02:19 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#include "dld_tvlib.h"
+#include "dld_listitem.h"
+#include <iostream.h>
+
+DLD_TVListItem::
+DLD_TVListItem (const string& name, DLD_TVDialog *pd):
+ DLD_TVObj (name, pd)
+{
+}
+
+DLD_TVListItem::
+~DLD_TVListItem ()
+{
+}
+
diff --git a/dldialog/src/DLD_TV/dld_listitem.h b/dldialog/src/DLD_TV/dld_listitem.h
new file mode 100644
index 0000000..6a5133a
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_listitem.h
@@ -0,0 +1,43 @@
+/******************************************************************************
+**
+** $Id: dld_listitem.h,v 1.6 2000/03/15 20:02:19 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#ifndef DLD_LISTITEM_H
+#define DLD_LISTITEM_H
+
+#include "../dld_listitem.h"
+#include "dld_tvobj.h"
+
+/**
+ * Abstract Interface
+ * @short Abstract Interface
+ * @author Harald Hoyer <HarryH@Royal.Net>
+ */
+class DLD_TVListItem : public DLD_TVObj, public DLD_ListItem {
+public:
+
+ DLD_TVListItem(const string& name, DLD_TVDialog *parent);
+
+ /// Destructor.
+ virtual ~DLD_TVListItem();
+
+ /// empty
+ void create() { DLD_Obj::create(); };
+
+ /// empty
+ void changeBounds(const TRect&) {};
+
+ /// empty
+ void calcBounds(TRect&, TPoint) {};
+
+};
+
+#endif
diff --git a/dldialog/src/DLD_TV/dld_radiolist.cc b/dldialog/src/DLD_TV/dld_radiolist.cc
new file mode 100644
index 0000000..8606136
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_radiolist.cc
@@ -0,0 +1,214 @@
+/******************************************************************************
+**
+** $Id: dld_radiolist.cc,v 1.15 2000/03/15 20:02:19 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+
+#define Uses_TGroup
+#define Uses_TRect
+#define Uses_TBackground
+#define Uses_TStringCollection
+
+#include "dld_radiolist.h"
+#include "dld_tvlib.h"
+#include "dld_tvradio.h"
+#include "dld_text.h"
+#include "dld_dialog.h"
+#include <iostream.h>
+#include <stdio.h>
+#include <string.h>
+
+DLD_TVRadioList::
+DLD_TVRadioList (const string& name, DLD_TVDialog *pd):
+ DLD_TVObj (name, pd),
+ TRadioButtons (TRect(2,2,0,0), NULL)
+{
+ // Cope with bad implementation in tvision
+ delete strings;
+ strings = new TStringCollection( 0, 1 );
+
+ radio_ctr = 0;
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "radiolist \n" ;
+#endif
+ growMode = gfFixed;
+ height = 2;
+ width = dld_name.length() - (hotk) * 2 + 4;
+
+ lenWidth.setMin(width);
+ lenHeight.setMin(height);
+
+ if(dld_name.length()) {
+ label = new TLabel(TRect(2, 1, width, 2),
+ dld_name.c_str(), this);
+ dia->insert(label);
+ options |= ofFramed;
+ }
+ else label = 0;
+
+ for (int i = 0; i < 32; i++)
+ {
+ radio[i] = 0;
+ }
+
+
+}
+
+DLD_TVRadioList::
+~DLD_TVRadioList ()
+{
+ update_var();
+#ifdef DEBUG
+ DLDdbg << "~radiolist " << dld_name << "\n";
+ DLDdbg.flush ();
+#endif
+
+}
+
+void DLD_TVRadioList::
+close_brace ()
+{
+#ifdef DEBUG
+ DLDdbg << "radiolist " << dld_name
+ << "(" << width << "," << height << ")\n";
+ DLDdbg.flush ();
+#endif
+ lenWidth.setMin(width);
+ lenHeight.setMin(height);
+ lenWidth.setPref(width);
+ lenHeight.setPref(height);
+
+ // First check the items
+ for (unsigned int i = 0; i < radio_ctr; i++)
+ {
+ if(radio[i]->test_env()) {
+ press(i);
+ sel=i;
+ TRadioButtons::value = i;
+#ifdef DEBUG
+ DLDdbg << "Radio " << i+1 << endl << flush;
+#endif
+ }
+ }
+
+ // Then check our own variable
+ for (unsigned int i = 0; i < radio_ctr; i++)
+ {
+ char num[10];
+ sprintf(num, "%d", i+1);
+ if(test_env(string(num))) {
+ press(i);
+ sel=i;
+ TRadioButtons::value = i;
+#ifdef DEBUG
+ DLDdbg << "Radio " << i+1 << endl << flush;
+#endif
+ }
+ }
+
+}
+
+void DLD_TVRadioList::
+create ()
+{
+ draw();
+ for ( unsigned int i = 0; i < radio_ctr; i++) {
+ if (i != TRadioButtons::value )
+ radio[i]->create ();
+ }
+ DLD_Obj::create();
+}
+
+DLD_RadioButton *DLD_TVRadioList::
+radiobutton(const string& name)
+{
+ Assert(Bad_arg, (radio_ctr < 32));
+
+ string nstr = conname(name);
+
+ DLD_TVRadioButton *p = new DLD_TVRadioButton(name, dia);
+
+ add_child(p);
+
+ radio[radio_ctr] = p ;
+
+ // We use atInsert otherwise we get a sorted list
+ strings->atInsert( radio_ctr, newStr(nstr.c_str()) );
+
+ radio_ctr++;
+ height++;
+ width = max(nstr.length() - (p->hotk) * 2 + 8, width);
+
+ return p;
+}
+
+
+void DLD_TVRadioList::
+changeBounds( const TRect& bounds)
+{
+ if(label)
+ label->moveTo(bounds.a.x+1, bounds.a.y);
+
+ TRect nb(bounds);
+ nb.grow(-1,-1);
+ TRadioButtons::changeBounds(nb);
+
+#ifdef DEBUG
+ DLDdbg << "radiolist changeBounds("
+ << bounds.a.x << "," << bounds.a.y << ")"
+ << "(" << bounds.b.x << "," << bounds.b.y << ")"
+ << endl;
+#endif
+}
+
+void DLD_TVRadioList::
+calcBounds(TRect& bounds, TPoint)
+{
+ bounds = geom;
+}
+
+void DLD_TVRadioList::
+press(int item)
+{
+#ifdef DEBUG
+ DLDdbg << "Radio pressed " << item << endl << flush;
+#endif
+ TRadioButtons::press(item);
+ update_var();
+}
+
+void DLD_TVRadioList::
+movedTo(int item)
+{
+#ifdef DEBUG
+ DLDdbg << "Radio moved to " << item << endl << flush;
+#endif
+ TRadioButtons::movedTo(item);
+ update_var();
+}
+
+void DLD_TVRadioList::
+update_var()
+{
+ char istr[512];
+
+ for ( unsigned int i = 0; i < radio_ctr; i++) {
+ if (i != TRadioButtons::value )
+ radio[i]->deactivate ();
+ }
+
+ if (radio[TRadioButtons::value])
+ {
+ radio[TRadioButtons::value]->activate ();
+ sprintf(istr, "%ld", TRadioButtons::value+1);
+ varvalue = istr;
+ activate();
+ }
+}
diff --git a/dldialog/src/DLD_TV/dld_radiolist.h b/dldialog/src/DLD_TV/dld_radiolist.h
new file mode 100644
index 0000000..457abef
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_radiolist.h
@@ -0,0 +1,80 @@
+/******************************************************************************
+**
+** $Id: dld_radiolist.h,v 1.10 2000/03/15 20:02:19 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+
+#ifndef DLD_RADIOLIST_H
+#define DLD_RADIOLIST_H
+
+#define Uses_TRadioButtons
+#define Uses_TLabel
+
+#include "../dld_radiolist.h"
+#include "dld_tvobj.h"
+
+#include <tvision/tv.h>
+
+///
+class DLD_TVRadioButton;
+
+class DLD_TVRadioList : public DLD_TVObj,
+ public DLD_RadioList,
+ public TRadioButtons
+{
+public:
+ ///
+ DLD_TVRadioList(const string& name, DLD_TVDialog *pd);
+ ///
+ virtual ~DLD_TVRadioList();
+
+ /** Indicates the beginning of a new block
+ *
+ * Can be used to reserve space for children.
+ */
+ void open_brace() {};
+
+ /** Indicates the end of a block.
+ *
+ * Can be used to collect all children.
+ */
+ void close_brace();
+
+ /** Indicates the creation.
+ *
+ */
+ void create();
+
+ void press( int item );
+ void movedTo( int item );
+
+ DLD_RadioButton *radiobutton(const string& name);
+
+ void changeBounds( const TRect& bounds );
+ void calcBounds(TRect& bounds, TPoint delta );
+
+protected:
+
+ void update_var();
+
+ ///
+ TSItem *item;
+
+ ///
+ DLD_TVRadioButton *radio[32];
+
+ ///
+ unsigned int radio_ctr;
+
+ ///
+ TLabel *label;
+};
+
+#endif
diff --git a/dldialog/src/DLD_TV/dld_row.cc b/dldialog/src/DLD_TV/dld_row.cc
new file mode 100644
index 0000000..a6e4c6d
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_row.cc
@@ -0,0 +1,129 @@
+/******************************************************************************
+**
+** $Id: dld_row.cc,v 1.8 1999/02/17 13:28:01 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+
+#define Uses_TGroup
+#define Uses_TRect
+#define Uses_TBackground
+#define Uses_TKeys
+#define Uses_TFrame
+
+#include "dld_row.h"
+#include "dld_dialog.h"
+
+
+DLD_TVRow::
+DLD_TVRow(const string& _name, DLD_TVApp *aptr, DLD_TVDialog *dia) :
+ /*TView(TRect(0,0,1,1)),*/
+ DLD_TVObj (_name, dia),
+ DLD_TVContainer(_name, aptr, dia, DLD_TVContainer::O_HOR)
+{
+/*
+ setState(sfVisible, False);
+ options &= ~ofSelectable;
+*/
+ if(dld_name.length()) {
+// options |= ofFramed;
+// setState(sfExposed, True);
+ width = dld_name.length() - (hotk) * 2 + 6;
+
+ lenWidth.setMin(width);
+// lenWidth.setSizeAdd(2);
+ lenHeight.setSizeAdd(1);
+
+
+ label = new TStaticText(TRect(2, 1, width, 2),
+ dld_name.c_str());
+// dld_name.c_str(), dia);
+
+ dia->insert(label);
+// label->putInFrontOf(this);
+ }
+ else label = 0;
+
+}
+
+DLD_TVRow::
+~DLD_TVRow()
+{
+}
+
+void DLD_TVRow::
+create()
+{
+ DLD_TVContainer::create ();
+};
+
+void DLD_TVRow::
+changeBounds( const TRect& bounds)
+{
+#ifdef DEBUG
+ DLDdbg << "Row changeBounds(" << bounds.a.x << "," << bounds.a.y << ")"
+ << "(" << bounds.b.x << "," << bounds.b.y << ")"
+ << endl;
+#endif
+
+
+ TRect nb(bounds);
+
+ if(label) {
+ label->moveTo(bounds.a.x+1, bounds.a.y);
+ nb.grow(-1,-1);
+ }
+
+ DLD_TVContainer::changeBounds(nb);
+
+// TView::changeBounds(nb);
+}
+
+void DLD_TVRow::
+draw()
+{
+// TView::draw();
+/*
+ TDrawBuffer b;
+ b.moveChar(0, '*' , getColor(0x02), size.x);
+ writeLine(0, 0, size.x, 1, b);
+ writeLine(0, size.y-1, size.x, 1, b);
+
+ b.moveChar(0, '*' , getColor(0x02), size.y);
+ writeLine(0, 0, 1, size.y, b);
+ writeLine(size.x-1, 0, 1, size.y, b);
+*/
+}
+
+void DLD_TVRow::
+insert(TView *p)
+{
+ dia->insert(p);
+// putInFrontOf(p);
+}
+
+void DLD_TVRow::
+close_brace()
+{
+}
+
+void DLD_TVRow::
+setGeom(const TRect& _g)
+{
+ geom = _g;
+
+ TRect nb(_g);
+
+ if(label) {
+ nb.grow(-1,-1);
+ label->moveTo(geom.a.x+1, geom.a.y);
+ }
+
+ DLD_TVContainer::changeBounds(nb);
+}
diff --git a/dldialog/src/DLD_TV/dld_row.h b/dldialog/src/DLD_TV/dld_row.h
new file mode 100644
index 0000000..11fe1be
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_row.h
@@ -0,0 +1,55 @@
+/******************************************************************************
+**
+** $Id: dld_row.h,v 1.7 1999/04/18 20:59:36 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+
+#ifndef DLD_ROW_H
+#define DLD_ROW_H
+
+#define Uses_TRect
+#define Uses_TPoint
+//#define Uses_TLabel
+#define Uses_TStaticText
+
+#include "../dld_row.h"
+#include "dld_tvobj.h"
+#include "dld_tvcontainer.h"
+#include <tvision/tv.h>
+
+///
+class DLD_TVRow : /*public TView,*/ public DLD_Row, public DLD_TVContainer
+{
+public:
+ DLD_TVRow(const string& _name, DLD_TVApp *aptr, DLD_TVDialog *dia);
+
+ ~DLD_TVRow();
+
+ void create();
+
+ void changeBounds( const TRect& bounds);
+
+ void calcBounds(TRect& bounds, TPoint) { bounds = geom; };
+
+ void setGeom(const TRect& _g);
+
+ void insert(TView *p);
+
+ void close_brace();
+
+ void draw();
+
+private:
+ ///
+ TStaticText *label;
+};
+
+#endif
+
diff --git a/dldialog/src/DLD_TV/dld_text.cc b/dldialog/src/DLD_TV/dld_text.cc
new file mode 100644
index 0000000..bf46cac
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_text.cc
@@ -0,0 +1,113 @@
+/******************************************************************************
+**
+** $Id: dld_text.cc,v 1.12 1999/04/19 11:20:23 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#define Uses_TRect
+
+#include "dld_tvlib.h"
+#include "dld_text.h"
+#include "dld_dialog.h"
+#include <iostream.h>
+#include <string.h>
+
+DLD_TVText ::
+DLD_TVText (const string& name, DLD_TVDialog * pd,
+ int _width, int _height):
+ DLD_TVObj (name, pd),
+ TStaticText (TRect (0, 0, _width, _height), name.c_str())
+{
+ lenWidth.setMin(_width);
+ lenHeight.setMin(_height);
+ lenWidth.setPref(_width);
+ lenHeight.setPref(_height);
+#ifdef DEBUG
+ DLDdbg << DLD_LIB_PREFIX "text h=" << _height << " w=" << _width << "\n";
+#endif
+}
+
+DLD_TVText::
+~DLD_TVText ()
+{
+#ifdef DEBUG
+ DLDdbg << "~text " << dld_name << "\n";
+#endif
+}
+
+void DLD_TVText::
+create()
+{
+ DLD_Obj::create();
+}
+
+void DLD_TVText::
+changeBounds( const TRect& bounds ) {
+ TStaticText::changeBounds(bounds);
+};
+
+void DLD_TVText::
+calcBounds(TRect& bounds, TPoint)
+{
+ bounds = geom;
+}
+
+void DLD_TVText::draw()
+{
+ uchar color;
+ Boolean center;
+ int i, j, l, p, y;
+ TDrawBuffer b;
+ char s[1024];
+
+ color = getColor(1);
+ getText(s);
+ l = strlen(s);
+ p = 0;
+ y = 0;
+ center = False;
+ while (y < size.y)
+ {
+ b.moveChar(0, ' ', color, size.x);
+ if (p < l)
+ {
+ if (s[p] == 3)
+ {
+ center = True;
+ ++p;
+ }
+ i = p;
+ do {
+ j = p;
+ while ((p < l) && (s[p] == ' '))
+ ++p;
+ while ((p < l) && (s[p] != ' ') && (s[p] != '\n'))
+ ++p;
+ } while ((p < l) && (p < i + size.x) && (s[p] != '\n'));
+ if (p > i + size.x)
+ if (j > i)
+ p = j;
+ else
+ p = i + size.x;
+ if (center == True)
+ j = (size.x - p + i) / 2 ;
+ else
+ j = 0;
+ b.moveBuf(j, &s[i], color, (p - i));
+ while ((p < l) && (s[p] == ' '))
+ p++;
+ if ((p < l) && (s[p] == '\n'))
+ {
+ center = False;
+ p++;
+ }
+ }
+ writeLine(0, y++, size.x, 1, b);
+ }
+}
diff --git a/dldialog/src/DLD_TV/dld_text.h b/dldialog/src/DLD_TV/dld_text.h
new file mode 100644
index 0000000..222332c
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_text.h
@@ -0,0 +1,41 @@
+/******************************************************************************
+**
+** $Id: dld_text.h,v 1.8 1999/04/19 11:20:23 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+
+#ifndef DLD_TEXT_H
+#define DLD_TEXT_H
+
+#include "../dld_text.h"
+#include "dld_tvobj.h"
+#define Uses_TStaticText
+#include <tvision/tv.h>
+
+///
+class DLD_TVText : public DLD_TVObj, public DLD_Text,
+ public TStaticText
+{
+public:
+ ///
+ DLD_TVText(const string& , DLD_TVDialog *, int width, int height);
+ ///
+ ~DLD_TVText();
+
+ ///
+ void create();
+
+ void changeBounds( const TRect& bounds );
+
+ void calcBounds(TRect& bounds, TPoint delta );
+ virtual void draw();
+};
+
+#endif
diff --git a/dldialog/src/DLD_TV/dld_textbox.cc b/dldialog/src/DLD_TV/dld_textbox.cc
new file mode 100644
index 0000000..f279b40
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_textbox.cc
@@ -0,0 +1,154 @@
+/******************************************************************************
+**
+** $Id: dld_textbox.cc,v 1.10 2000/03/15 20:02:19 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#define Uses_TEvent
+#define Uses_TKeys
+#include "dld_textbox.h"
+#include "dld_dialog.h"
+DLD_TVTextBox::DLD_TVTextBox(const string& name, DLD_TVDialog *pd) :
+ DLD_TVObj(name, pd),
+ TFileViewer(TRect(0,0,2,2),
+ hScrollBar= new DLD_ScrollBar(TRect(0,2,2,3), pd),
+ vScrollBar= new DLD_ScrollBar(TRect(2,0,3,2), pd)),
+ doFile(false),
+ label(0)
+{
+ lenWidth.setMin(5);
+ lenHeight.setMin(5);
+ options |= ofFramed;
+ fileLines = new TLineCollection(5, 5);
+}
+
+DLD_TVTextBox::~DLD_TVTextBox()
+{
+}
+
+void DLD_TVTextBox::create()
+{
+ if(doFile && dld_name.length()) {
+ label = new TLabel(TRect(0, 0, dld_name.length()+2 , 1),
+ dld_name.c_str(), this);
+ dia->insert(label);
+ }
+ else {
+ typedef string::size_type ST;
+ ST b, e;
+ b=0;
+ string line;
+
+ // Find newlines and feed them to the fileLines
+
+ while((e = dld_name.find("\n", b)) != string::npos)
+ {
+ line = dld_name.substr(b, e-b);
+ limit.x = max( limit.x, line.length() );
+ fileLines->insert( newStr( line.c_str() ) );
+ b = e+1;
+ }
+
+ line = dld_name.substr(b);
+ limit.x = max( limit.x, line.length() );
+ fileLines->insert( newStr( line.c_str() ) );
+ isValid = True;
+ limit.y = fileLines->getCount();
+
+ label = 0;
+ }
+
+ setState(sfSelected, True);
+ DLD_Obj::create();
+}
+
+void DLD_TVTextBox::set_filename(const string& fname)
+{
+ readFile(fname.c_str());
+ doFile = true;
+}
+
+void DLD_TVTextBox::changeBounds( const TRect& bounds )
+{
+ if(label)
+ label->moveTo(bounds.a.x+1, bounds.a.y-1);
+ TFileViewer::changeBounds(bounds);
+}
+
+void DLD_TVTextBox::setGeom( const TRect& bounds )
+{
+ TRect nb(bounds), vsb(bounds), hsb(bounds);
+
+ // Shrink, cause it's framed
+ nb.grow(-1,-1);
+
+ vsb.grow(0,-1);
+ vsb.a.x = vsb.b.x-1;
+ vScrollBar->setGeom(vsb);
+
+ hsb.grow(-1,0);
+ hsb.a.y = hsb.b.y-1;
+ hScrollBar->setGeom(hsb);
+
+ DLD_TVObj::setGeom(nb);
+}
+
+void DLD_TVTextBox::calcBounds(TRect& bounds, TPoint)
+{
+ bounds = geom;
+}
+
+void DLD_TVTextBox::handleEvent(TEvent& event)
+{
+ TFileViewer::handleEvent(event);
+ switch (event.what)
+ {
+ case evKeyDown:
+ switch(event.keyDown.keyCode)
+ {
+ case kbRight:
+ scrollTo(delta.x + 1, delta.y);
+ break;
+ case kbLeft:
+ {
+ int x = (delta.x - 1);
+ scrollTo( (x < 0) ? 0 : x , delta.y);
+ }
+ break;
+ case kbDown:
+ scrollTo(delta.x, delta.y + 1);
+ break;
+ case kbUp:
+ {
+ int y = (delta.y - 1);
+ scrollTo( delta.x, (y < 0) ? 0 : y);
+ }
+ break;
+ case kbPgDn:
+ {
+ TRect size(getBounds());
+ scrollTo(delta.x, delta.y + (size.b - size.a).y);
+ }
+ break;
+ case kbPgUp:
+ {
+ TRect size(getBounds());
+ int y = (delta.y - (size.b - size.a).y);
+ scrollTo( delta.x, (y < 0) ? 0 : y);
+ }
+ break;
+ default:
+ return;
+ }
+ clearEvent(event);
+ break;
+ default:
+ return;
+ }
+}
diff --git a/dldialog/src/DLD_TV/dld_textbox.h b/dldialog/src/DLD_TV/dld_textbox.h
new file mode 100644
index 0000000..beadfe8
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_textbox.h
@@ -0,0 +1,48 @@
+/******************************************************************************
+**
+** $Id: dld_textbox.h,v 1.5 2000/03/15 20:02:19 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#ifndef DLD_TV_TEXTBOX_H
+#define DLD_TV_TEXTBOX_H
+
+#define Uses_TFileViewer
+#include "../dld_textbox.h"
+#include "dld_tvobj.h"
+#include "dld_list.h"
+#include "fileview.h"
+
+#include <tvision/tv.h>
+
+class DLD_TVTextBox: public DLD_TVObj, public DLD_TextBox, public TFileViewer
+{
+public:
+ DLD_TVTextBox(const string& name, DLD_TVDialog *pd);
+ ~DLD_TVTextBox();
+
+ void create();
+
+ void set_filename(const string& fname);
+
+ void changeBounds( const TRect& bounds );
+ void setGeom( const TRect& bounds );
+
+ void calcBounds(TRect& bounds, TPoint delta );
+ void handleEvent(TEvent& event);
+
+private:
+ DLD_ScrollBar *hScrollBar, *vScrollBar;
+ bool doFile;
+ ///
+ TLabel *label;
+
+};
+
+#endif
diff --git a/dldialog/src/DLD_TV/dld_tvapp.cc b/dldialog/src/DLD_TV/dld_tvapp.cc
new file mode 100644
index 0000000..75a5e86
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_tvapp.cc
@@ -0,0 +1,313 @@
+/******************************************************************************
+**
+** $Id: dld_tvapp.cc,v 1.6 1999/01/20 14:40:29 saturn Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#define Uses_TStatusDef
+#define Uses_TStatusItem
+#define Uses_TStatusLine
+#define Uses_TBackground
+#define Uses_TMenuBar
+#define Uses_TSubMenu
+#define Uses_TMenuItem
+#define Uses_TKeys
+
+#include <string.h>
+#include <stdio.h>
+#include <signal.h>
+
+#include "dld_tvlib.h"
+#include "dld_tvapp.h"
+#include "dld_dialog.h"
+
+static TStatusItem *statusItem = 0;
+
+#define DLD_cpBackground "\x08"
+
+#define cmDLDQuit 100
+
+class DLD_TVDesktop : public virtual TDeskTop , public virtual TDeskInit
+{
+public:
+ DLD_TVDesktop( const TRect& bounds );
+
+ static TBackground *initBackground( TRect r );
+};
+
+class DLD_TVBackground : public TBackground
+{
+public:
+ DLD_TVBackground( const TRect& bounds, char aPattern ) :
+ TBackground(bounds,aPattern) {
+ };
+
+ TPalette& getPalette() const {
+ static TPalette
+ palette( DLD_cpBackground, sizeof( DLD_cpBackground )-1 );
+ return palette;
+ };
+
+};
+
+
+TBackground *DLD_TVDesktop::initBackground( TRect r )
+{
+ defaultBkgrnd = '\x20';
+ return new DLD_TVBackground( r, defaultBkgrnd);
+}
+
+DLD_TVDesktop::DLD_TVDesktop( const TRect& bounds ) :
+ TDeskTop(bounds ),
+ TDeskInit( &DLD_TVDesktop::initBackground )
+{
+}
+
+
+DLD_TVApp::
+DLD_TVApp (const string&, int _oldsid, int, char **):
+ TProgInit(&DLD_TVApp::initStatusLine, &DLD_TVApp::initMenuBar,
+ &DLD_TVApp::initDeskTop),
+ mainDialog(0),
+ running(false),
+ oldsid(_oldsid)
+{
+ /*
+ * We don't wanna get stopped
+ */
+ signal(SIGTSTP, SIG_IGN);
+ print_status ("->Starting<-");
+}
+
+DLD_TVApp::
+~DLD_TVApp ()
+{
+#ifdef DEBUG
+ DLDdbg << "tvapp ending!" << endl << flush;
+#endif
+}
+
+DLD_Dialog *DLD_TVApp::
+dialog (const string& name, const DLD_Out& _out)
+{
+ print_status ("->Adding Dialog<-");
+
+ DLD_TVDialog *p = new DLD_TVDialog (conname(name), this, _out);
+
+ add_child(p);
+
+ if(!mainDialog)
+ mainDialog = p;
+
+ return p;
+}
+
+int DLD_TVApp::
+exec ()
+{
+ if(!running && mainDialog) {
+ print_status ("->Running<-");
+
+ running = true;
+/*
+ * Obsoleted by setsid
+ * menuBar->draw();
+ */
+ run ();
+ running = false;
+
+ CI first = childlist.begin();
+ CI last = childlist.end();
+
+ while(first != last)
+ {
+ delete *first;
+ first = childlist.begin();
+ last = childlist.end();
+ }
+
+ print_status ("->Idle<-");
+ mainDialog = 0;
+ }
+ else if(!running) {
+ DLD_Gui::parse(-1);
+ }
+
+ return 0;
+}
+
+void DLD_TVApp::
+idle ()
+{
+ // DLD_Gui::idle for further parsing input, if any
+// if(running)
+ if(!DLD_Gui::parse(100000)) {
+ /* Now generate QUIT event */
+ TEvent te;
+ te.what = evCommand;
+ te.message.command = cmQuit;
+ te.message.infoPtr = 0;
+ /*
+ * needs fix in tvision to remove TProgram:: and call putEvent
+ * directly.
+ */
+ TProgram::putEvent (te);
+ }
+
+ // The native idle function for TApplications
+ TApplication::idle();
+}
+
+TStatusLine *DLD_TVApp::
+initStatusLine (TRect r)
+{
+ char *stptr = new char[21];
+
+ sprintf (stptr, "%20s", " ->Starting<-");
+
+ r.a.y = r.b.y - 1;
+
+ return new TStatusLine (r,
+ *new TStatusDef (0, 0xFFFF) +
+/* *new TStatusItem ("~Alt-X~ to Cancel!",
+ kbAltX, cmDLDQuit) + */
+ *new TStatusItem (_("SPACE selects - TAB to move -"),
+ 0, 0) +
+ *(statusItem = new TStatusItem (stptr, 0, 0)) +
+ *new TStatusItem (0, kbF10, cmMenu) +
+ *new TStatusItem (0, kbAltF3, cmClose) +
+ *new TStatusItem (0, kbF5, cmZoom) +
+ *new TStatusItem (0, kbCtrlF5, cmResize)
+ );
+}
+
+
+
+int DLD_TVApp::
+print_status (const string& str)
+{
+ if ((statusItem != 0) && (statusItem->text != 0))
+ {
+ strncpy (statusItem->text, str.c_str(), 20);
+ statusLine->draw ();
+ }
+
+ return 0;
+}
+
+void DLD_TVApp::
+del_child(DLD_TVDialog *dia)
+{
+ CI first = childlist.begin();
+ CI last = childlist.end();
+ while (first != last) {
+ if (*first == dia) {
+ // Remove it from the list
+ childlist.erase(first);
+ deskTop->remove(*first);
+
+ if(dia == mainDialog) {
+ /*
+ * First delete all other dialogs.
+ * This will get us here, but we already removed the mainDialog.
+ */
+ CI first = childlist.begin();
+ CI last = childlist.end();
+ while(first != last)
+ {
+ delete *first;
+ first = childlist.begin();
+ last = childlist.end();
+ }
+
+ /* Now generate QUIT event */
+ TEvent te;
+ te.what = evCommand;
+ te.message.command = cmQuit;
+ te.message.infoPtr = 0;
+ /*
+ * needs fix in tvision to remove TProgram:: and call putEvent
+ * directly.
+ */
+ TProgram::putEvent (te);
+ }
+ break;
+ }
+ first++;
+ }
+}
+
+int DLD_TVApp::
+add_child (DLD_TVDialog * nobj)
+{
+ Assert(Bad_arg, nobj);
+
+ childlist.push_back(nobj);
+
+ return 0;
+}
+
+void DLD_TVApp::
+handleEvent( TEvent& event )
+{
+ TApplication::handleEvent( event );
+ if (event.what == evCommand)
+ {
+ switch (event.message.command)
+ {
+ case cmTile: // Tile current file windows
+ deskTop->tile(deskTop->getExtent());
+ break;
+
+ case cmCascade: // Cascade current file windows
+ deskTop->cascade(deskTop->getExtent());
+ break;
+
+ case cmDLDQuit:
+ delete mainDialog;
+ break;
+
+ default: // Unknown command
+ return;
+
+ }
+ clearEvent (event);
+ }
+}
+
+
+TMenuBar * DLD_TVApp::initMenuBar(TRect r)
+{
+/* TSubMenu& sub2 =
+ *new TSubMenu( "~F~ile", 0, hcFile ) +
+ *new TMenuItem( "E~x~it", cmQuit, kbAltX, hcFExit, "Alt-X" );
+*/
+ TSubMenu& sub3 =
+ *new TSubMenu( "~W~indows", 0, hcWindows ) +
+ *new TMenuItem( "~R~esize/move", cmResize, kbCtrlF5, hcWSizeMove, "Ctrl-F5" ) +
+ *new TMenuItem( "~Z~oom", cmZoom, kbF5, hcWZoom, "F5" ) +
+ *new TMenuItem( "~N~ext", cmNext, kbF6, hcWNext, "F6" ) +
+ *new TMenuItem( "~C~lose", cmClose, kbAltF3, hcWClose, "Alt-F3" ) +
+ *new TMenuItem( "~T~ile", cmTile, kbNoKey, hcWTile ) +
+ *new TMenuItem( "C~a~scade", cmCascade, kbNoKey, hcWCascade );
+
+ r.b.y = r.a.y + 1;
+ return (new TMenuBar( r, sub3) );
+// return (new TMenuBar( r, sub2 + sub3) );
+}
+
+TDeskTop *DLD_TVApp::initDeskTop( TRect r )
+{
+ r.a.y++;
+ r.b.y--;
+ return new DLD_TVDesktop( r );
+/* TDeskTop::defaultBkgrnd = '\x20';
+ return new TDeskTop( r );
+*/
+}
diff --git a/dldialog/src/DLD_TV/dld_tvapp.h b/dldialog/src/DLD_TV/dld_tvapp.h
new file mode 100644
index 0000000..2fe5a57
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_tvapp.h
@@ -0,0 +1,136 @@
+/******************************************************************************
+**
+** $Id: dld_tvapp.h,v 1.6 1999/01/20 14:40:29 saturn Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+
+#ifndef DLD_TVAPP_H
+#define DLD_TVAPP_H
+
+#include "dld_tvlib.h"
+#include "../dld_gui.h"
+#include "dld_tvobj.h"
+#define Uses_TRect
+#define Uses_TDialog
+#define Uses_TGroup
+#define Uses_TDeskTop
+#define Uses_TRect
+#define Uses_TApplication
+#include <tvision/tv.h>
+
+class DLD_TVDialog;
+class TStatusItem;
+
+const int cmOpenCmd = 105;
+const int cmDOS_Cmd = 107;
+
+const int
+ hcCancelBtn = 35,
+ hcFDosShell = 16,
+ hcFExit = 17,
+ hcFOFileOpenDBox = 31,
+ hcFOFiles = 33,
+ hcFOName = 32,
+ hcFOOpenBtn = 34,
+ hcFOpen = 14,
+ hcFile = 13,
+ hcNocontext = 0,
+ hcOCColorsDBox = 39,
+ hcOColors = 28,
+ hcOMMouseDBox = 38,
+ hcOMouse = 27,
+ hcORestoreDesktop = 30,
+ hcOSaveDesktop = 29,
+ hcOpenBtn = 36,
+ hcOptions = 26,
+ hcPuzzle = 3,
+ hcSAbout = 8,
+ hcSAsciiTable = 11,
+ hcSCalculator = 12,
+ hcSCalendar = 10,
+ hcSPuzzle = 9,
+ hcSystem = 7,
+ hcViewer = 2,
+ hcWCascade = 22,
+ hcWClose = 25,
+ hcWNext = 23,
+ hcWPrevious = 24,
+ hcWSizeMove = 19,
+ hcWTile = 21,
+ hcWZoom = 20,
+ hcWindows = 18;
+
+
+/** the tvision implementation of DLD_Gui.
+ *
+ * @author Harald Hoyer
+ * @version $Version$
+ */
+class DLD_TVApp : public DLD_Gui, public TApplication
+{
+public:
+ /// Constructor
+ DLD_TVApp (const string& name, int oldsid, int argc, char **argv);
+
+ /// Destructor
+ virtual ~DLD_TVApp ();
+
+ /// Virtual function.
+ virtual DLD_Dialog *dialog (const string& name , const DLD_Out& out);
+
+ /// Virtual function.x
+ virtual int exec ();
+
+ /// Virtual function.
+ const string& name (const string& newname) {
+ guiname = newname;
+ return guiname;
+ };
+
+ /// Virtual function.
+ const string& name () {
+ return guiname;
+ };
+
+ /// Virtual function.
+ virtual int print_status (const string& text);
+
+ void idle();
+
+ void del_child(DLD_TVDialog *dia);
+
+ int add_child (DLD_TVDialog * nobj);
+
+ void handleEvent( TEvent& event );
+
+ ///
+ DLD_TVDialog *mainDialog;
+
+private:
+///
+ string guiname;
+
+ ///
+ static TStatusLine *initStatusLine( TRect r );
+ ///
+ static TMenuBar *initMenuBar( TRect r );
+
+ static TDeskTop *initDeskTop( TRect r );
+
+ typedef DLD_TVDialog *DLD_TVDialog_Ptr;
+ list<DLD_TVDialog_Ptr> childlist;
+ bool childlock;
+ typedef list<DLD_TVDialog_Ptr>::iterator CI;
+
+ bool running;
+ int oldsid;
+};
+
+#endif
diff --git a/dldialog/src/DLD_TV/dld_tvcheck.cc b/dldialog/src/DLD_TV/dld_tvcheck.cc
new file mode 100644
index 0000000..48be9f0
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_tvcheck.cc
@@ -0,0 +1,26 @@
+/******************************************************************************
+**
+** $Id: dld_tvcheck.cc,v 1.10 2000/03/15 20:02:19 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#include "dld_tvlib.h"
+#include "dld_tvcheck.h"
+#include <iostream.h>
+
+DLD_TVCheckButton::
+DLD_TVCheckButton (const string& name, DLD_TVDialog *pd):
+ DLD_TVObj (name, pd)
+{
+}
+
+DLD_TVCheckButton::
+~DLD_TVCheckButton ()
+{
+}
diff --git a/dldialog/src/DLD_TV/dld_tvcheck.h b/dldialog/src/DLD_TV/dld_tvcheck.h
new file mode 100644
index 0000000..40cf809
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_tvcheck.h
@@ -0,0 +1,39 @@
+/******************************************************************************
+**
+** $Id: dld_tvcheck.h,v 1.11 2000/03/15 20:02:19 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#ifndef DLD_TVCHECK_H
+#define DLD_TVCHECK_H
+
+#include "../dld_checkbutton.h"
+#include "dld_dialog.h"
+#include "dld_checklist.h"
+#include <tvision/tv.h>
+
+///
+class DLD_TVCheckButton : public DLD_TVObj,
+ public DLD_CheckButton
+{
+public:
+ ///
+ DLD_TVCheckButton(const string& name, DLD_TVDialog *pd);
+
+ ///
+ virtual ~DLD_TVCheckButton();
+
+ ///
+ void create() { DLD_Obj::create(); };
+
+ void changeBounds( const TRect&) {};
+ void calcBounds(TRect&, TPoint) {};
+};
+
+#endif
diff --git a/dldialog/src/DLD_TV/dld_tvcontainer.cc b/dldialog/src/DLD_TV/dld_tvcontainer.cc
new file mode 100644
index 0000000..78a9de3
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_tvcontainer.cc
@@ -0,0 +1,308 @@
+/******************************************************************************
+**
+** $Id: dld_tvcontainer.cc,v 1.12 2000/03/15 20:02:19 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#include "dld_input.h"
+#include "dld_tvapp.h"
+#include "dld_tvcontainer.h"
+#include "dld_dialog.h"
+#include "dld_row.h"
+#include "dld_form.h"
+#include "dld_col.h"
+#include "dld_list.h"
+#include "dld_checklist.h"
+#include "dld_radiolist.h"
+#include "dld_button.h"
+#include "dld_text.h"
+#include "dld_textbox.h"
+#include "dld_combobox.h"
+#include "dld_gauge.h"
+
+DLD_TVContainer::
+DLD_TVContainer(const string& _name, DLD_TVApp *_app, DLD_TVDialog *pd,
+ orient_t _orient) :
+ DLD_TVObj(_name, pd),
+ app(_app),
+ orient(_orient)
+{
+ if(orient == O_HOR) {
+ lenWidth.setSizeFlag(false);
+ lenHeight.setSizeFlag(true);
+ }
+ else if(orient == O_VER) {
+ lenWidth.setSizeFlag(true);
+ lenHeight.setSizeFlag(false);
+ }
+
+#ifdef DEBUG
+ DLDdbg << "TVContainer " << dld_name << " constructed." << endl;
+#endif
+
+};
+
+
+DLD_TVContainer::
+~DLD_TVContainer()
+{
+};
+
+DLD_Dialog *DLD_TVContainer::
+dialog (const string& _name = 0)
+{
+ DLD_TVDialog *p = new DLD_TVDialog(conname(_name), app, dia->out);
+ app->add_child(p);
+ return p;
+};
+
+DLD_Form * DLD_TVContainer::
+form (const string& _name)
+{
+ DLD_TVForm *p = new DLD_TVForm(conname(_name), app, dia);
+ add_child(p);
+ return p;
+};
+
+DLD_Col * DLD_TVContainer::
+col (const string& _name)
+{
+ DLD_TVCol *p = new DLD_TVCol(conname(_name), app, dia);
+ add_child(p);
+ return p;
+};
+
+DLD_Row * DLD_TVContainer::
+row (const string& _name)
+{
+ DLD_TVRow *p = new DLD_TVRow(conname(_name), app, dia);
+ add_child(p);
+ return p;
+};
+
+DLD_List * DLD_TVContainer::
+list (const string& _name)
+{
+ DLD_TVList *p = new DLD_TVList(conname(_name), dia);
+ add_child(p);
+ dia->insert(p);
+ return p;
+};
+
+DLD_CheckList * DLD_TVContainer::
+checklist (const string& _name)
+{
+ DLD_TVCheckList *p = new DLD_TVCheckList(conname(_name), dia);
+ add_child(p);
+ dia->insert(p);
+ return p;
+};
+
+DLD_RadioList * DLD_TVContainer::
+radiolist (const string& _name)
+{
+ DLD_TVRadioList *p = new DLD_TVRadioList(conname(_name), dia);
+ add_child(p);
+ dia->insert(p);
+ return p;
+};
+
+DLD_ComboBox * DLD_TVContainer::
+combobox (const string& _name)
+{
+ DLD_TVComboBox *p = new DLD_TVComboBox(conname(_name), dia);
+ add_child(p);
+ dia->insert(p);
+ return p;
+};
+
+const string &DLD_TVContainer::
+context(const string& name, int& twidth, int& theight)
+{
+ const char *cstr;
+ int len;
+
+ theight = 1;
+ twidth = 0;
+ cstr = name.c_str();
+
+ const char *ptr = cstr, *optr = cstr;
+
+ ptr = strchr (ptr, '\n');
+
+ while (0 != ptr)
+ {
+ len = strlen (optr) - strlen (ptr);
+ theight++;
+ twidth = (twidth > len) ? twidth : len;
+
+ optr = ptr;
+ ptr++;
+ ptr = strchr (ptr, '\n');
+ }
+
+ len = strlen (optr);
+ twidth = (twidth > len) ? twidth : len;
+ return name;
+}
+
+DLD_Text * DLD_TVContainer::
+text (const string& _name)
+{
+ int theight, twidth;
+ string name = context(conname(_name), twidth, theight);
+
+ DLD_TVText *b = new DLD_TVText(name, dia, twidth, theight);
+ dia->insert(b);
+ add_child(b);
+ return b;
+};
+
+DLD_Button * DLD_TVContainer::
+button (const string& _name)
+{
+ int theight, twidth;
+ string name = context(conname(_name), twidth, theight);
+
+ DLD_TVButton *b = new DLD_TVButton(name, dia, twidth, theight);
+ dia->insert(b);
+ add_child(b);
+ return b;
+};
+
+DLD_Gauge * DLD_TVContainer::
+gauge (const string& _name)
+{
+ DLD_TVGauge *p = new DLD_TVGauge(conname(_name), dia);
+ dia->insert(p);
+ add_child(p);
+ return p;
+};
+
+DLD_TextBox * DLD_TVContainer::
+textbox (const string& _name)
+{
+ DLD_TVTextBox *p = new DLD_TVTextBox(conname(_name), dia);
+ dia->insert(p);
+ add_child(p);
+ return p;
+};
+
+DLD_Input * DLD_TVContainer::
+input (const string& _name)
+{
+ DLD_TVInput *p = new DLD_TVInput(conname(_name), dia);
+ dia->insert(p);
+ add_child(p);
+ return p;
+};
+
+DLD_Image * DLD_TVContainer::
+image (const string& _name)
+{
+/*
+ DLD_TVInput *p = new DLD_TVInput(conname(_name), dia);
+ dia->insert(p);
+ add_child(p);
+ return p;
+*/
+ return 0;
+};
+
+DLD_Menu * DLD_TVContainer::
+menu (const string&, bool)
+{
+ /* TODO */
+ DLDerr << "menu: not yet implemented\n" << endl;
+ Assert(Bad_arg, 0);
+ return 0;
+};
+
+void DLD_TVContainer::
+open_brace()
+{
+};
+
+void DLD_TVContainer::
+close_brace()
+{
+};
+
+void DLD_TVContainer::
+create()
+{
+ if (is_created)
+ return;
+
+ for(CI i = childlist.begin(); i != childlist.end(); ++i) {
+ DLD_Obj *childptr = *i;
+ childptr->create ();
+ }
+
+ is_created = true;
+ DLD_Obj::create();
+};
+
+void DLD_TVContainer::
+add_child (DLD_TVObj * nobj)
+{
+ Assert(Bad_arg, nobj != NULL);
+ DLD_Container::add_child(nobj);
+
+ lenWidth.addChild(&nobj->lenWidth);
+ lenHeight.addChild(&nobj->lenHeight);
+}
+
+void DLD_TVContainer::
+changeBounds(const TRect &bounds)
+{
+#ifdef DEBUG
+ DLDdbg << "tvcontainer changeBounds(" << bounds.a.x << "," << bounds.a.y << ")"
+ << "(" << bounds.b.x << "," << bounds.b.y << ")"
+ << endl;
+
+ DLDdbg << "tvcontainer(" << lenWidth.getMin() << "," << lenHeight.getMin() << ")"
+ << endl << flush;
+#endif
+
+// lenWidth.setPos(bounds.a.x);
+// lenHeight.setPos(bounds.a.y);
+ long x = bounds.a.x;
+ long y = bounds.a.y;
+
+ long width = bounds.b.x - x;
+ long height = bounds.b.y - y;
+
+ if((height != lenHeight.getLen()) || (width != lenWidth.getLen())) {
+ lenWidth.setPos(bounds.a.x);
+ lenHeight.setPos(bounds.a.y);
+ lenWidth.setSize(width);
+ lenHeight.setSize(height);
+ }
+
+ for(CI i = childlist.begin(); i != childlist.end(); ++i) {
+ DLD_TVObj *childptr = dynamic_cast<DLD_TVObj*>(*i);
+
+ long h = childptr->lenHeight.getLen();
+ long w = childptr->lenWidth.getLen();
+
+ long dy = childptr->lenHeight.getPos();
+ long dx = childptr->lenWidth.getPos();
+
+#ifdef DEBUG
+ DLDdbg << childptr->dld_name << " setGeom("
+ << dx << "," << dy << ")"
+ << "(" << dx+w << "," << dy+h << ")"
+ << endl << flush;
+#endif
+
+ childptr->setGeom(TRect(x+dx, y+dy, x+dx+w, dy+y+h));
+
+ }
+}
diff --git a/dldialog/src/DLD_TV/dld_tvcontainer.h b/dldialog/src/DLD_TV/dld_tvcontainer.h
new file mode 100644
index 0000000..c126c67
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_tvcontainer.h
@@ -0,0 +1,151 @@
+/******************************************************************************
+**
+** $Id: dld_tvcontainer.h,v 1.8 2000/03/15 20:02:19 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#ifndef DLD_TVCONTAINER_H
+#define DLD_TVCONTAINER_H
+#include <string>
+#include <list>
+#include "../dld_container.h"
+#include "dld_tvobj.h"
+
+#define Uses_TView
+#include <tvision/tv.h>
+
+class DLD_TVApp;
+class DLD_TVDialog;
+class DLD_TVObj;
+
+
+/** TV implementation of the DLD_Container class
+ *
+ */
+class DLD_TVContainer: public virtual DLD_TVObj,
+ public virtual DLD_Container
+{
+public:
+
+ /** Orientation flag.
+ * <ul>
+ * <li>O_HOR Horizontal orientation (DLD_ROW)
+ * <li>O_VER Vertical orientation (DLD_COL)
+ * </ul>
+ */
+ enum orient_t {
+ O_HOR,
+ O_VER
+ };
+
+ /** Constructor.
+ * @param _name The name of the container.
+ * @param _app The parent application.
+ * @param _pd The parent dialog
+ * @param _orient The orientation of the container, if any.
+ */
+ DLD_TVContainer(const string& _name,
+ DLD_TVApp *_app, DLD_TVDialog *_pd,
+ orient_t _orient);
+
+ /// Destructor.
+ virtual ~DLD_TVContainer() ;
+
+ /// Pure virtual function.
+ virtual DLD_Dialog *dialog (const string& _name = 0);
+
+ /// Pure virtual function.
+ virtual DLD_Form * form (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_Col * col (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_Row * row (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_List * list (const string& _name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_CheckList * checklist (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_RadioList * radiolist (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_ComboBox * combobox (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_Text * text (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_Button * button (const string& _name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_Gauge * gauge (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_TextBox * textbox (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_Input * input (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_Image * image (const string& name = 0) ;
+
+ /// Pure virtual function.
+ virtual DLD_Menu * menu (const string& name = 0, bool = false) ;
+
+ /// Pure virtual function.
+ virtual void open_brace() ;
+
+ /// Pure virtual function.
+ virtual void close_brace() ;
+
+ /// Pure virtual function.
+ virtual void create() ;
+
+ /** Delete a possible child from the childlist
+ * @param obj A DLD_TVObj, that may be a child of this container.
+ */
+ void del_child(DLD_TVObj * obj);
+
+ /** Changes this widgets geometry.
+ * @param _bounds The new bounds.
+ */
+ virtual void changeBounds(const TRect& _bounds);
+
+ /** Sets this widgets geometry.
+ * Used as from this Containers class to set the geometry to DLD_TVObj's.
+ * @param _bounds The new bounds.
+ */
+ void setGeom(const TRect& _bounds) { geom = _bounds; changeBounds(geom); };
+
+
+ /// The parent DLD_TVApp application.
+ DLD_TVApp *app;
+
+ const string &context(const string& _name, int& twidth, int& theight);
+
+private:
+ /** The containers orientation.
+ */
+ orient_t orient;
+
+ /// Pure virtual function.
+ virtual void insert(TView *p) =0;
+
+ /** Add a child to the container.
+ * @param nobj A pointer to a DLD_TVObj.
+ */
+ void add_child (DLD_TVObj * nobj);
+};
+
+#endif
+
diff --git a/dldialog/src/DLD_TV/dld_tvlib.h b/dldialog/src/DLD_TV/dld_tvlib.h
new file mode 100644
index 0000000..0eee25c
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_tvlib.h
@@ -0,0 +1,21 @@
+/******************************************************************************
+**
+** $Id: dld_tvlib.h,v 1.5 1999/01/29 14:15:27 saturn Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#ifndef DLD_TVLIB_H
+#define DLD_TVLIB_H
+
+#define DLD_LIB_PREFIX "tv_"
+
+#include <string>
+extern string conname (const string& _str);
+
+#endif
diff --git a/dldialog/src/DLD_TV/dld_tvobj.cc b/dldialog/src/DLD_TV/dld_tvobj.cc
new file mode 100644
index 0000000..d808cbe
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_tvobj.cc
@@ -0,0 +1,102 @@
+/******************************************************************************
+**
+** $Id: dld_tvobj.cc,v 1.9 1999/04/19 11:20:23 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#define Uses_TEvent
+#include <string>
+#include "dld_tvobj.h"
+#include "dld_tvcontainer.h"
+#include "dld_dialog.h"
+#include "dld_tvapp.h"
+
+DLD_TVObj::DLD_TVObj(const string& _name, DLD_TVDialog *pd) :
+ hotk(0),
+ dld_name(_name),
+ width(0), height(0),
+ dia(pd),
+ isexit(false)
+{
+ set_dialog(pd);
+
+ string::size_type i;
+ i = dld_name.find("~");
+ if (i != string::npos) {
+ if(dld_name.compare("~", i+2))
+ hotk = 1;
+ }
+
+};
+
+DLD_TVObj::~DLD_TVObj()
+{
+#ifdef DEBUG
+ DLDdbg << "DLD_TVObj " << dld_name << " destruct!\n";
+#endif
+ dia = 0;
+}
+
+void DLD_TVObj::
+activate ()
+{
+#ifdef DEBUG
+ DLDdbg << "DLD_TVObj " << dld_name << " activate\n";
+#endif
+
+ DLD_Obj::activate ();
+
+ if (dia && is_exit() && is_created)
+ {
+#ifdef DEBUG
+ DLDdbg << dld_name << " called EXIT!!!\n";
+ DLDdbg.flush ();
+#endif
+ // Generate Dialog exit event
+ TEvent te;
+ te.what = evCommand;
+ te.message.command = cmOK;
+ te.message.infoPtr = 0;
+ dia->putEvent (te);
+ }
+}
+
+string conname (const string& _str)
+{
+ string str = convstr (_str);
+ string::size_type i;
+ while ((i = str.find("ß")) != string::npos)
+ str.replace(i, 1, "ss");
+
+ while ((i = str.find("Ä")) != string::npos)
+ str.replace(i, 1, "Ae");
+
+ while ((i = str.find("Ö")) != string::npos)
+ str.replace(i, 1, "Oe");
+
+ while ((i = str.find("Ü")) != string::npos)
+ str.replace(i, 1, "Ue");
+
+ while ((i = str.find("ä")) != string::npos)
+ str.replace(i, 1, "ae");
+
+ if ((i = str.find("&")) != string::npos) {
+ str.replace(i, 2, string("~") + str.substr(i+1, 1) + string("~"));
+ }
+
+ while ((i = str.find("\t")) != string::npos) {
+ str.replace(i, 1, " ");
+ int lp = i - str.rfind("\n", i);
+ for(int j = 7 - (lp%8); j > 0; j--) {
+ str.insert(i, " ");
+ }
+ }
+
+ return str;
+}
diff --git a/dldialog/src/DLD_TV/dld_tvobj.h b/dldialog/src/DLD_TV/dld_tvobj.h
new file mode 100644
index 0000000..081e8fe
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_tvobj.h
@@ -0,0 +1,89 @@
+/******************************************************************************
+**
+** $Id: dld_tvobj.h,v 1.10 1999/04/18 20:59:36 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+
+#ifndef DLD_TVOBJ_H
+#define DLD_TVOBJ_H
+
+#include "../dld_obj.h"
+#include "dld_geom.h"
+#include "dld_tvlib.h"
+#define Uses_TView
+#define Uses_TRect
+#define Uses_TSItem
+#include <tvision/tv.h>
+
+class DLD_TVDialog;
+class DLD_TVContainer;
+
+/** Common class for all TVision objects.
+ *
+ * @short Common class for all TVision objects.
+ * @author Harald Hoyer <HarryH@Royal.Net>
+ *
+ */
+class DLD_TVObj : public virtual DLD_Obj
+{
+public:
+ /// Constructor
+ DLD_TVObj(const string& name, DLD_TVDialog *pd);
+
+ /// Destructor
+ virtual ~DLD_TVObj();
+
+ /** Set/Unset that the dialog should exit if item is activated.
+ * @param flag Bool
+ */
+ virtual void set_exit(bool flag) {isexit = flag;};
+
+ /** Set the width in percent.
+ * @param _w the new width
+ */
+ virtual void widthP (unsigned int _w) { lenWidth.setPer(_w); };
+
+ /** Set the height in percent.
+ * @param _h the new height
+ */
+ virtual void heightP(unsigned int _h) { lenHeight.setPer(_h); };
+
+ virtual void create() = 0;
+
+ bool hotk;
+
+ virtual void changeBounds( const TRect& bounds ) = 0;
+
+ Len lenWidth;
+ Len lenHeight;
+
+ string dld_name;
+
+ virtual void setGeom(const TRect& _g) { geom = _g; };
+
+ virtual void calcBounds(TRect& bounds, TPoint delta ) = 0;
+
+ virtual void activate();
+
+ virtual bool is_exit() {return isexit;};
+
+protected:
+
+ unsigned int width, height;
+
+ TRect geom;
+
+ DLD_TVDialog *dia;
+
+private:
+ bool isexit;
+};
+
+#endif
diff --git a/dldialog/src/DLD_TV/dld_tvradio.cc b/dldialog/src/DLD_TV/dld_tvradio.cc
new file mode 100644
index 0000000..4f1bcd8
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_tvradio.cc
@@ -0,0 +1,27 @@
+/******************************************************************************
+**
+** $Id: dld_tvradio.cc,v 1.8 2000/03/15 20:02:19 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#include "dld_tvlib.h"
+#include "dld_tvradio.h"
+#include <iostream.h>
+
+DLD_TVRadioButton::
+DLD_TVRadioButton (const string& name, DLD_TVDialog *pd):
+ DLD_TVObj (name, pd)
+{
+}
+
+DLD_TVRadioButton::
+~DLD_TVRadioButton ()
+{
+}
+
diff --git a/dldialog/src/DLD_TV/dld_tvradio.h b/dldialog/src/DLD_TV/dld_tvradio.h
new file mode 100644
index 0000000..f5a623e
--- /dev/null
+++ b/dldialog/src/DLD_TV/dld_tvradio.h
@@ -0,0 +1,42 @@
+/******************************************************************************
+**
+** $Id: dld_tvradio.h,v 1.9 2000/03/15 20:02:19 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#ifndef DLD_TVRADIO_H
+#define DLD_TVRADIO_H
+
+#include "../dld_radiobutton.h"
+#include "dld_dialog.h"
+#include "dld_radiolist.h"
+#include <tvision/tv.h>
+
+/** TV RadioButton implementation.
+ */
+class DLD_TVRadioButton : public DLD_TVObj,
+ public DLD_RadioButton
+{
+public:
+ /// Contructor.
+ DLD_TVRadioButton(const string& name, DLD_TVDialog *pd);
+
+ /// Destructor.
+ virtual ~DLD_TVRadioButton();
+
+ /// empty
+ void create() { DLD_Obj::create(); };
+
+ /// empty
+ void changeBounds( const TRect&) {};
+
+ /// empty
+ void calcBounds(TRect&, TPoint) {};
+};
+#endif
diff --git a/dldialog/src/DLD_TV/fileview.cc b/dldialog/src/DLD_TV/fileview.cc
new file mode 100644
index 0000000..1e07dd4
--- /dev/null
+++ b/dldialog/src/DLD_TV/fileview.cc
@@ -0,0 +1,163 @@
+/*---------------------------------------------------------*/
+/* */
+/* Turbo Vision FileViewer Demo Support File */
+/* */
+/*---------------------------------------------------------*/
+/*
+ * Turbo Vision - Version 2.0
+ *
+ * Copyright (c) 1994 by Borland International
+ * All Rights Reserved.
+ *
+ */
+/*
+ * Modified by Sergio Sigala <ssigala@globalnet.it>
+ */
+
+#define Uses_MsgBox
+#define Uses_TKeys
+#define Uses_TScroller
+#define Uses_TDrawBuffer
+#define Uses_TRect
+#define Uses_TProgram
+#define Uses_TDeskTop
+#define Uses_TStreamableClass
+#include <tvision/tv.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+
+#include <fstream.h>
+
+#include "fileview.h"
+#include <string>
+
+const char * const TFileViewer::name = "TFileViewer";
+
+TFileViewer::TFileViewer( const TRect& bounds,
+ TScrollBar *aHScrollBar,
+ TScrollBar *aVScrollBar) :
+ TScroller( bounds, aHScrollBar, aVScrollBar )
+{
+ growMode = gfGrowHiX | gfGrowHiY;
+ isValid = True;
+ fileName = 0;
+}
+
+TFileViewer::~TFileViewer()
+{
+ delete fileName;
+ destroy (fileLines);
+}
+
+void TFileViewer::draw()
+{
+ char *p;
+
+ ushort c = getColor(0x0301);
+ for( short i = 0; i < size.y; i++ )
+ {
+ TDrawBuffer b;
+ b.moveChar( 0, ' ', c, (short)size.x );
+
+ if( delta.y + i < fileLines->getCount() )
+ {
+ char s[maxLineLength+1];
+ p = (char *)( fileLines->at(delta.y+i) );
+ if( p == 0 || (signed)strlen(p) < delta.x )
+ s[0] = EOS;
+ else
+ {
+ strncpy( s, p+delta.x, size.x );
+ if( (signed)strlen( p + delta.x ) > size.x )
+ s[size.x] = EOS;
+ }
+ b.moveStr( 0, s, c );
+ }
+ writeBuf( 0, i, (short)size.x, 1, b );
+ }
+}
+
+void TFileViewer::scrollDraw()
+{
+ TScroller::scrollDraw();
+ draw();
+}
+
+void TFileViewer::readFile( const char *fName )
+{
+ delete fileName;
+
+ limit.x = 0;
+ fileName = newStr( fName );
+ fileLines = new TLineCollection(5, 5);
+ ifstream fileToView( fName );
+ if( !fileToView )
+ {
+ messageBox( "Invalid drive or directory", mfError | mfOKButton );
+ isValid = False;
+ }
+ else
+ {
+ char line[maxLineLength+1];
+ while( !lowMemory() &&
+ !fileToView.eof() &&
+ fileToView.get( line, sizeof line ) != 0
+ )
+ {
+ char c;
+ fileToView.get(c); // grab trailing newline
+ limit.x = max( limit.x, strlen( line ) );
+
+ // Translate \t into 8 spaces
+ string nline(line);
+ for(string::size_type i=nline.find("\t", 0) ;
+ i != string::npos; i=nline.find("\t", i))
+ nline.replace(i, 1, " ");
+
+
+ fileLines->insert( newStr( nline.c_str() ) );
+ }
+ isValid = True;
+ }
+ limit.y = fileLines->getCount();
+}
+
+void TFileViewer::setState( ushort aState, Boolean enable )
+{
+ TScroller::setState( aState, enable );
+ if( enable && (aState & sfExposed) )
+ setLimit( limit.x, limit.y );
+}
+
+Boolean TFileViewer::valid( ushort )
+{
+ return isValid;
+}
+
+void *TFileViewer::read(ipstream& is)
+{
+ char *fName;
+
+ TScroller::read(is);
+ fName = is.readString();
+ fileName = 0;
+ readFile(fName);
+ delete fName;
+ return this;
+}
+
+void TFileViewer::write(opstream& os)
+{
+ TScroller::write(os);
+ os.writeString(fileName);
+}
+
+TStreamable *TFileViewer::build()
+{
+ return new TFileViewer( streamableInit );
+}
+
+
diff --git a/dldialog/src/DLD_TV/fileview.h b/dldialog/src/DLD_TV/fileview.h
new file mode 100644
index 0000000..2f3e084
--- /dev/null
+++ b/dldialog/src/DLD_TV/fileview.h
@@ -0,0 +1,76 @@
+/*---------------------------------------------------------*/
+/* */
+/* Fileview.h: Header file for fileview.cpp. */
+/* */
+/*---------------------------------------------------------*/
+/*
+ * Turbo Vision - Version 2.0
+ *
+ * Copyright (c) 1994 by Borland International
+ * All Rights Reserved.
+ *
+ */
+
+#if !defined( __FILEVIEW_H )
+#define __FILEVIEW_H
+
+#define Uses_TCollection
+#define Uses_TScroller
+#define Uses_TWindow
+#include <tvision/tv.h>
+
+class TLineCollection : public TCollection
+{
+
+public:
+
+ TLineCollection(short lim, short delta) : TCollection(lim, delta) {}
+ virtual void freeItem(void *p) { delete[] (char *)p; }
+
+private:
+
+ virtual void *readItem( ipstream& ) { return 0; }
+ virtual void writeItem( void *, opstream& ) {}
+
+};
+
+class TFileViewer : public TScroller
+{
+
+public:
+
+ char *fileName;
+ TCollection *fileLines;
+ Boolean isValid;
+ TFileViewer( const TRect& bounds,
+ TScrollBar *aHScrollBar,
+ TScrollBar *aVScrollBar
+ );
+ ~TFileViewer();
+ TFileViewer( StreamableInit ) : TScroller(streamableInit) { };
+ void draw();
+ void readFile( const char *fName );
+ void setState( ushort aState, Boolean enable );
+ void scrollDraw();
+ Boolean valid( ushort command );
+
+private:
+
+ virtual const char *streamableName() const
+ { return name; }
+
+protected:
+
+ virtual void write( opstream& );
+ virtual void *read( ipstream& );
+
+public:
+
+ static const char * const name;
+ static TStreamable *build();
+
+};
+
+const int maxLineLength = 1024;
+
+#endif
diff --git a/dldialog/src/DLD_TV/nmcmbobx.cpp b/dldialog/src/DLD_TV/nmcmbobx.cpp
new file mode 100644
index 0000000..c11eb51
--- /dev/null
+++ b/dldialog/src/DLD_TV/nmcmbobx.cpp
@@ -0,0 +1,23 @@
+/*************************************************************************/
+/* */
+/* NMCMBOBX.CPP */
+/* */
+/* Copyright (c) 1992, Vincent J. Dentice */
+/* All rights reserved */
+/* */
+/* This file contains the stream registration object for the class */
+/* TComboBox. */
+/* */
+/* */
+/* Date Prg Ver Description */
+/* -------- --- --- ------------------------------------------------- */
+/* 11/16/92 VJD 0.2 Added streamability to the TComboBox classes. */
+/* */
+/*************************************************************************/
+
+
+#define Uses_TComboBox
+#include "tcombobx.h"
+
+const char * const TComboBox::name = "TComboBox";
+
diff --git a/dldialog/src/DLD_TV/nmcmbovw.cpp b/dldialog/src/DLD_TV/nmcmbovw.cpp
new file mode 100644
index 0000000..bf087d8
--- /dev/null
+++ b/dldialog/src/DLD_TV/nmcmbovw.cpp
@@ -0,0 +1,23 @@
+/*************************************************************************/
+/* */
+/* NMCMBOVW.CPP */
+/* */
+/* Copyright (c) 1992, Vincent J. Dentice */
+/* All rights reserved */
+/* */
+/* This file contains the stream registration object for the class */
+/* TComboViewer. */
+/* */
+/* */
+/* Date Prg Ver Description */
+/* -------- --- --- ------------------------------------------------- */
+/* 11/16/92 VJD 0.2 Added streamability to the TComboBox classes. */
+/* */
+/*************************************************************************/
+
+
+#define Uses_TComboViewer
+#include "tcombobx.h"
+
+const char * const TComboViewer::name = "TComboViewer";
+
diff --git a/dldialog/src/DLD_TV/nmcmbown.cpp b/dldialog/src/DLD_TV/nmcmbown.cpp
new file mode 100644
index 0000000..2b91c00
--- /dev/null
+++ b/dldialog/src/DLD_TV/nmcmbown.cpp
@@ -0,0 +1,23 @@
+/*************************************************************************/
+/* */
+/* NMCMBOWN.CPP */
+/* */
+/* Copyright (c) 1992, Vincent J. Dentice */
+/* All rights reserved */
+/* */
+/* This file contains the stream registration object for the class */
+/* TComboWindow. */
+/* */
+/* */
+/* Date Prg Ver Description */
+/* -------- --- --- ------------------------------------------------- */
+/* 11/16/92 VJD 0.2 Added streamability to the TComboBox class. */
+/* */
+/*************************************************************************/
+
+
+#define Uses_TComboWindow
+#include "tcombobx.h"
+
+const char * const TComboWindow::name = "TComboWindow";
+
diff --git a/dldialog/src/DLD_TV/nmsinput.cpp b/dldialog/src/DLD_TV/nmsinput.cpp
new file mode 100644
index 0000000..535db11
--- /dev/null
+++ b/dldialog/src/DLD_TV/nmsinput.cpp
@@ -0,0 +1,23 @@
+/*************************************************************************/
+/* */
+/* NMSINPUT.CPP */
+/* */
+/* Copyright (c) 1992, Vincent J. Dentice */
+/* All rights reserved */
+/* */
+/* This file contains the stream registration object for the class */
+/* TStaticInputLine. */
+/* */
+/* */
+/* Date Prg Ver Description */
+/* -------- --- --- ------------------------------------------------- */
+/* 11/16/92 VJD 0.2 Added streamability to the TStaticInputLine class */
+/* */
+/*************************************************************************/
+
+
+#define Uses_TStaticInputLine
+#include "tsinputl.h"
+
+const char * const TStaticInputLine::name = "TStaticInputLine";
+
diff --git a/dldialog/src/DLD_TV/tcmbovwr.cpp b/dldialog/src/DLD_TV/tcmbovwr.cpp
new file mode 100644
index 0000000..c10fbba
--- /dev/null
+++ b/dldialog/src/DLD_TV/tcmbovwr.cpp
@@ -0,0 +1,163 @@
+/*************************************************************************/
+/* */
+/* TCMBOVWR.CPP */
+/* */
+/* Copyright (c) 1992, Vincent J. Dentice */
+/* All rights reserved */
+/* */
+/* The TComboBox class is an extension to Borland International's Turbo */
+/* Vision Applications Framework for DOS. It provides a class that */
+/* acts like a Combo Box in other graphical environments like Microsoft */
+/* Windows and IBM OS/2. */
+/* */
+/* It is designed to be with a TDialog class and a TCollection Class. */
+/* */
+/* */
+/* Date Prg Ver Description */
+/* -------- --- --- ------------------------------------------------- */
+/* 09/30/92 VJD 0.1 Initial module definition. */
+/* 11/16/92 VJD 0.2 Added streamability to the TComboBox classes. */
+/* Rewrote header files to behave like original */
+/* Turbo Vision header files. */
+/* 11/17/92 VJD 0.3 Added the missing dataSize function to */
+/* TComboViewer. */
+/* */
+/*************************************************************************/
+
+#define Uses_TComboViewer
+#define Uses_TKeys
+#define Uses_TStreamableClass
+#include "tcombobx.h"
+#include <string.h>
+
+#define cpComboViewer "\x06\x06\x07\x06\x06"
+
+struct TComboViewerRec
+{
+ TCollection *items;
+ ushort selection;
+};
+
+
+TComboViewer::TComboViewer(const TRect& bounds, TCollection *aList, TScrollBar *ts) :
+ TListViewer(bounds, 1, 0, ts)
+{
+ list = 0;
+ newList(aList);
+}
+
+
+ushort TComboViewer::dataSize()
+{
+ return sizeof(TComboViewerRec);
+}
+
+
+TPalette& TComboViewer::getPalette() const
+{
+ static TPalette palette(cpComboViewer, sizeof(cpComboViewer)-1);
+ return palette;
+}
+
+
+void TComboViewer::getData( void * rec )
+{
+ TComboViewerRec *p = (TComboViewerRec *)rec;
+
+ p->items = list;
+ p->selection = focused;
+}
+
+
+void TComboViewer::getText(char *dest, short item, short maxLen)
+{
+ if (list != 0 ) {
+ strncpy( dest, (const char *)(list->at(item)), maxLen );
+ dest[maxLen] = '\0';
+ }
+ else
+ *dest = EOS;
+}
+
+
+void TComboViewer::handleEvent(TEvent& event)
+{
+ bool moused = false;
+ if (event.what == evMouseDown)
+ moused = true;
+ if ((event.what == evKeyDown &&
+ (event.keyDown.keyCode == kbEnter
+ || event.keyDown.charScan.charCode == ' ')
+ ))
+ {
+ endModal(cmOK);
+ clearEvent(event);
+ }
+ else if ((event.what == evKeyDown && event.keyDown.keyCode == kbEsc) ||
+ (event.what == evCommand && event.message.command == cmCancel))
+ {
+ endModal(cmCancel);
+ clearEvent(event);
+ }
+ else {
+ TListViewer::handleEvent(event);
+ if (moused)
+ {
+ endModal(cmOK);
+ }
+ }
+}
+
+
+void TComboViewer::newList( TCollection *aList )
+{
+ if (list)
+ destroy(list);
+ list = aList;
+ if(aList != 0)
+ setRange(aList->getCount());
+ else
+ setRange(0);
+ if(range > 0)
+ focusItem(0);
+ drawView();
+}
+
+
+void TComboViewer::setData( void *rec )
+{
+ TComboViewerRec *p = (TComboViewerRec *)rec;
+ newList(p->items);
+ focusItem(p->selection);
+ drawView();
+}
+
+
+void TComboViewer::shutDown()
+{
+ list = 0;
+ TListViewer::shutDown();
+}
+
+
+void * TComboViewer::read( ipstream& is )
+{
+ TListViewer::read(is);
+ is >> list;
+ return this;
+}
+
+void TComboViewer::write( opstream& os )
+{
+ TListViewer::write(os);
+ os << list;
+}
+
+
+TStreamable *TComboViewer::build()
+{
+ return new TComboViewer(streamableInit);
+}
+
+
+TComboViewer::TComboViewer(StreamableInit) : TListViewer(streamableInit) { }
diff --git a/dldialog/src/DLD_TV/tcmbowin.cpp b/dldialog/src/DLD_TV/tcmbowin.cpp
new file mode 100644
index 0000000..0d91c98
--- /dev/null
+++ b/dldialog/src/DLD_TV/tcmbowin.cpp
@@ -0,0 +1,105 @@
+/*************************************************************************/
+/* */
+/* TCMBOWIN.CPP */
+/* */
+/* Copyright (c) 1992, Vincent J. Dentice */
+/* All rights reserved */
+/* */
+/* The TComboBox class is an extension to Borland International's Turbo */
+/* Vision Applications Framework for DOS. It provides a class that */
+/* acts like a Combo Box in other graphical environments like Microsoft */
+/* Windows and IBM OS/2. */
+/* */
+/* It is designed to be with a TDialog class and a TCollection Class. */
+/* */
+/* */
+/* Date Prg Ver Description */
+/* -------- --- --- ------------------------------------------------- */
+/* 09/30/92 VJD 0.1 Initial module definition. */
+/* 11/16/92 VJD 0.2 Added streamability to the TComboBox classes. */
+/* */
+/*************************************************************************/
+
+
+#define Uses_TComboWindow
+#define Uses_TScrollBar
+#define Uses_TStreamableClass
+#include "tcombobx.h"
+
+#define cpComboWindow "\x13\x13\x15\x04\x05\x1A\x1C"
+
+
+TComboWindow::TComboWindow(const TRect& bounds, TCollection *aList) :
+ TWindow(bounds, 0, wnNoNumber),
+ TWindowInit(&TComboWindow::initFrame)
+{
+ TRect r;
+ TScrollBar *sb;
+
+ setState(sfShadow, False);
+ flags = 0;
+
+ r = getExtent();
+ r.a.x = r.b.x - 1;
+ sb = new TScrollBar(r);
+ insert(sb);
+
+ r = getExtent();
+ r.b.x--;
+ viewer = new TComboViewer(r, aList, sb);
+ insert(viewer);
+}
+
+
+TPalette& TComboWindow::getPalette() const
+{
+ static TPalette palette (cpComboWindow, sizeof(cpComboWindow)-1);
+ return palette;
+}
+
+
+void TComboWindow::getSelection(char *dest)
+{
+ viewer->getText(dest, viewer->focused, 255);
+}
+
+
+void TComboWindow::handleEvent(TEvent& event)
+{
+ if ((event.what == evMouseDown) && !containsMouse(event)) {
+ endModal(cmCancel);
+ clearEvent(event);
+ }
+ TWindow::handleEvent(event);
+}
+
+
+void TComboWindow::setSelection(char *data)
+{
+ viewer->focusItem(viewer->list->indexOf(data));
+}
+
+
+void * TComboWindow::read( ipstream& is )
+{
+ TWindow::read(is);
+ is >> viewer;
+ return this;
+}
+
+void TComboWindow::write( opstream& os )
+{
+ TWindow::write(os);
+ os << viewer;
+}
+
+
+TStreamable *TComboWindow::build()
+{
+ return new TComboWindow(streamableInit);
+}
+
+
+TComboWindow::TComboWindow(StreamableInit) : TWindow(streamableInit),
+ TWindowInit(0)
+{}
diff --git a/dldialog/src/DLD_TV/tcombobx.cpp b/dldialog/src/DLD_TV/tcombobx.cpp
new file mode 100644
index 0000000..0356386
--- /dev/null
+++ b/dldialog/src/DLD_TV/tcombobx.cpp
@@ -0,0 +1,179 @@
+/*************************************************************************/
+/* */
+/* TCOMBOBX.CPP */
+/* */
+/* Copyright (c) 1992, Vincent J. Dentice */
+/* All rights reserved */
+/* */
+/* The TComboBox class is an extension to Borland International's Turbo */
+/* Vision Applications Framework for DOS. It provides a class that */
+/* acts like a Combo Box in other graphical environments like Microsoft */
+/* Windows and IBM OS/2. */
+/* */
+/* It is designed to be with a TDialog class and a TCollection Class. */
+/* */
+/* */
+/* Date Prg Ver Description */
+/* -------- --- --- ------------------------------------------------- */
+/* 09/30/92 VJD 0.1 Initial module definition. */
+/* 11/16/92 VJD 0.2 Added streamability to the TComboBox classes. */
+/* Rewrote header files to behave like original */
+/* Turbo Vision header files. */
+/* 11/17/92 VJD 0.3 Added functions dataSize, getData and setData. */
+/* 11/18/92 RG 0.3 Added code to select the correct item when the */
+/* TComboWindow comes up. These code modifications */
+/* where supplied by Robert Gloeckner (100034,3033). */
+/* */
+/*************************************************************************/
+
+
+#define Uses_TComboBox
+#define Uses_TComboWindow
+#define Uses_TKeys
+#define Uses_TStreamableClass
+#include "tcombobx.h"
+#include <string.h>
+
+#define cpComboBox "\x16"
+
+char* TComboBox::icon = "\x19";
+
+
+TComboBox::TComboBox(const TRect& bounds, TStaticInputLine *aLink, TCollection *aList) :
+ TView(bounds)
+{
+ options |= ofPostProcess;
+ eventMask |= evBroadcast;
+ link = aLink;
+ list = aList;
+}
+
+
+void TComboBox::shutDown()
+{
+ link = 0;
+ TView::shutDown();
+}
+
+
+ushort TComboBox::dataSize()
+{
+ return sizeof(void *);
+}
+
+
+void TComboBox::draw()
+{
+ TDrawBuffer b;
+
+ b.moveStr(0, icon, getColor(0x01));
+ writeLine(0, 0, size.x, size.y, b);
+}
+
+
+void TComboBox::getData(void *rec)
+{
+// TCollection **p = (TCollection **)rec;
+// *p = list;
+ *(TCollection **)rec = list;
+}
+
+
+TPalette& TComboBox::getPalette() const
+{
+ static TPalette palette(cpComboBox, sizeof(cpComboBox)-1);
+ return palette;
+}
+
+
+void TComboBox::handleEvent(TEvent& event)
+{
+ TComboWindow *ComboWindow;
+ TRect r, p;
+ ushort c;
+
+ TView::handleEvent(event);
+ if ((event.what == evMouseDown) ||
+ (event.what == evKeyDown &&
+ (event.keyDown.keyCode == kbEnter
+ || (event.keyDown.charScan.charCode == ' ' && event.keyDown.keyCode != kbTab))
+ && (link->state & sfFocused) != 0))
+ {
+ if (strlen(link->data)) // If length of link->data > 0,
+ list->insert(newStr(link->data)); // add new data to list
+ link->select(); // Make InputLine the active view
+ r = link->getBounds(); // Get bounds of the InputLine
+ r.b.x += 1; // Extend x bound by 1
+ r.a.y += 1; // Move bound down by 1
+ r.b.y += 7; // Extend y bound by 7
+ p = owner->getExtent(); // Get extent of the Dialog Box
+ r.intersect(p); // Get intersection of Dialog and r
+ r.b.y -= 1;
+ ComboWindow = new TComboWindow(r, list); // Create a new TComboWindow
+ if (ComboWindow != 0) {
+ if (strlen(link->data))
+ ComboWindow->setSelection(link->data);
+
+ c = owner->execView(ComboWindow); // Execute TComboWindow as modal view
+
+ if (c == cmOK) { // If TComboWindow return cmOK
+ char rslt[256];
+
+ ComboWindow->getSelection(rslt); // Set the link data to the selection
+ link->newData(rslt);
+ link->selectAll(True); // Select all in the linked view
+ link->drawView(); // Redraw the linked view
+ }
+ destroy(ComboWindow);
+ }
+ clearEvent(event);
+ }
+ else if (event.what == evBroadcast)
+ if ((event.message.command == cmReleasedFocus && event.message.infoPtr == link)
+ || (event.message.command == cmRecordHistory))
+ if (strlen(link->data)) // If length of link->data > 0,
+ list->insert(newStr(link->data)); // add new data to list
+}
+
+
+void TComboBox::newList(TCollection *aList)
+{
+ if (list)
+ destroy(list);
+
+ list = aList;
+}
+
+
+void TComboBox::setData(void *rec)
+{
+ TCollection *p = (TCollection *)rec;
+
+ newList(p);
+}
+
+/*
+void TComboBox::write(opstream& os)
+{
+ TView::write(os);
+ os << link << list;
+}
+
+
+void *TComboBox::read(ipstream& is)
+{
+ TView::read(is);
+ is >> link >> list;
+
+ return this;
+}
+
+
+TStreamable *TComboBox::build()
+{
+ return new TComboBox(streamableInit);
+}
+
+
+TComboBox::TComboBox(StreamableInit) : TView(streamableInit) { }
+*/
diff --git a/dldialog/src/DLD_TV/tcombobx.h b/dldialog/src/DLD_TV/tcombobx.h
new file mode 100644
index 0000000..048b997
--- /dev/null
+++ b/dldialog/src/DLD_TV/tcombobx.h
@@ -0,0 +1,215 @@
+/*************************************************************************/
+/* */
+/* TCOMBOBX.H */
+/* */
+/* Copyright (c) 1992, Vincent J. Dentice */
+/* All rights reserved */
+/* */
+/* The TComboBox class is an extension to Borland International's Turbo */
+/* Vision Applications Framework for DOS. It provides a class that */
+/* acts like a Combo Box in other graphical environments like Microsoft */
+/* Windows and IBM OS/2. */
+/* */
+/* It is designed to be with a TDialog class and a TCollection Class. */
+/* */
+/* */
+/* Date Prg Ver Description */
+/* -------- --- --- ------------------------------------------------- */
+/* 09/30/92 VJD 0.1 Initial module definition. */
+/* 11/16/92 VJD 0.2 Added streamability to the TComboBox classes. */
+/* Rewrote header files to behave like original */
+/* Turbo Vision header files. */
+/* 11/17/92 VJD 0.3 Added getData and setData functions to TComboBox, */
+/* and also added the missing dataSize function to */
+/* TComboViewer. */
+/* */
+/*************************************************************************/
+#if defined( Uses_TComboBox )
+#define Uses_TCollection
+#define Uses_TInputLine
+#define Uses_TView
+#endif
+
+#if defined( Uses_TComboWindow )
+#define Uses_TComboViewer
+#define Uses_TWindow
+#endif
+
+#if defined( Uses_TComboViewer )
+#define Uses_TCollection
+#define Uses_TEvent
+#define Uses_TListViewer
+#endif
+
+#if defined( Uses_TCollection ) && !defined( __TCollection )
+#define INCLUDE_TV_H
+#endif
+
+#if defined( Uses_TEvent ) && !defined( __TEvent)
+#define INCLUDE_TV_H
+#endif
+
+#if defined( Uses_TInputLine ) && !defined( __TInputLine )
+#define INCLUDE_TV_H
+#endif
+
+#if defined( Uses_TListViewer ) && !defined( __TListViewer )
+#define INCLUDE_TV_H
+#endif
+
+#if defined( Uses_TView ) && !defined( __TView )
+#define INCLUDE_TV_H
+#endif
+
+#if defined( Uses_TWindow ) && !defined( __TWindow )
+#define INCLUDE_TV_H
+#endif
+
+#if defined( INCLUDE_TV_H )
+#include <tvision/tv.h>
+#endif
+
+#define Uses_TStaticInputLine
+#include "tsinputl.h"
+
+#if defined( Uses_TComboBox ) && !defined( __TComboBox )
+#define __TComboBox
+
+/**
+ *
+ */
+class TComboBox : public TView {
+ protected:
+ static char *icon;
+ TStaticInputLine *link;
+ TCollection *list;
+
+ public:
+ TComboBox(const TRect&, TStaticInputLine *, TCollection *);
+
+ virtual ushort dataSize();
+ virtual void draw();
+ virtual void getData(void *);
+ TPalette& getPalette() const;
+ virtual void handleEvent(TEvent&);
+ virtual void newList(TCollection *);
+ virtual void setData(void *);
+ void shutDown();
+ static const char * const name;
+/*
+ private:
+ virtual const char *streamableName() const
+ { return name; }
+
+ protected:
+ TComboBox(StreamableInit);
+ virtual void write(opstream&);
+ virtual void *read(ipstream&);
+
+ public:
+ static TStreamable *build();
+*/
+};
+
+inline ipstream& operator >> ( ipstream& is, TComboBox& cl )
+ { return is >> (TStreamable&)cl; }
+inline ipstream& operator >> ( ipstream& is, TComboBox*& cl )
+ { return is >> (void *&)cl; }
+
+inline opstream& operator << ( opstream& os, TComboBox& cl )
+ { return os << (TStreamable&)cl; }
+inline opstream& operator << ( opstream& os, TComboBox* cl )
+ { return os << (TStreamable *)cl; }
+
+#endif
+
+
+
+#if defined( Uses_TComboViewer ) && !defined( __TComboViewer )
+#define __TComboViewer
+
+class TComboViewer : public TListViewer {
+ public:
+ TCollection *list;
+
+ TComboViewer(const TRect&, TCollection*, TScrollBar*);
+
+ virtual ushort dataSize();
+ TPalette& getPalette() const;
+ virtual void getData(void *);
+ virtual void getText(char *, short, short);
+ virtual void handleEvent(TEvent&);
+ virtual void newList(TCollection *);
+ virtual void setData(void *);
+ void shutDown();
+
+ private:
+ virtual const char *streamableName() const
+ { return name; }
+
+ protected:
+ TComboViewer(StreamableInit);
+ virtual void write(opstream&);
+ virtual void *read(ipstream&);
+
+ public:
+ static const char * const name;
+ static TStreamable *build();
+};
+
+inline ipstream& operator >> ( ipstream& is, TComboViewer& cl )
+ { return is >> (TStreamable&)cl; }
+inline ipstream& operator >> ( ipstream& is, TComboViewer*& cl )
+ { return is >> (void *&)cl; }
+
+inline opstream& operator << ( opstream& os, TComboViewer& cl )
+ { return os << (TStreamable&)cl; }
+inline opstream& operator << ( opstream& os, TComboViewer* cl )
+ { return os << (TStreamable *)cl; }
+
+#endif
+
+
+#if defined( Uses_TComboWindow ) && !defined( __TComboWindow )
+#define __TComboWindow
+
+/**
+ *
+ */
+class TComboWindow : public TWindow {
+ protected:
+ TComboViewer *viewer;
+
+ public:
+ TComboWindow(const TRect&, TCollection*);
+
+ TPalette& getPalette() const;
+ void getSelection(char *);
+ virtual void handleEvent(TEvent&);
+ void setSelection(char *);
+
+ private:
+ virtual const char *streamableName() const
+ { return name; }
+
+ protected:
+ TComboWindow(StreamableInit);
+ virtual void write(opstream&);
+ virtual void *read(ipstream&);
+
+ public:
+ static const char * const name;
+ static TStreamable *build();
+};
+
+inline ipstream& operator >> ( ipstream& is, TComboWindow& cl )
+ { return is >> (TStreamable&)cl; }
+inline ipstream& operator >> ( ipstream& is, TComboWindow*& cl )
+ { return is >> (void *&)cl; }
+
+inline opstream& operator << ( opstream& os, TComboWindow& cl )
+ { return os << (TStreamable&)cl; }
+inline opstream& operator << ( opstream& os, TComboWindow* cl )
+ { return os << (TStreamable *)cl; }
+
+#endif
diff --git a/dldialog/src/DLD_TV/tsinputl.cpp b/dldialog/src/DLD_TV/tsinputl.cpp
new file mode 100644
index 0000000..9d5e67d
--- /dev/null
+++ b/dldialog/src/DLD_TV/tsinputl.cpp
@@ -0,0 +1,165 @@
+/*************************************************************************/
+/* */
+/* TSINPUTL.H */
+/* */
+/* Copyright (c) 1992, Vincent J. Dentice */
+/* All rights reserved */
+/* */
+/* */
+/* Date Prg Ver Description */
+/* -------- --- --- ------------------------------------------------- */
+/* 09/30/92 VJD 0.1 Initial module definition. */
+/* 11/16/92 VJD 0.2 Added streamability to TStaticInputLine class. */
+/* 11/17/92 VJD 0.3 Replaced matchFirstChar() function with member */
+/* function getNextMatch(). */
+/* 11/17/92 RG 0.3 Added functionality to jump to the beginning and */
+/* end of the list by using the HOME and END keys. */
+/* This code was supplied by Robert Gloeckner */
+/* (100034,3033). */
+/* */
+/*************************************************************************/
+
+#include <ctype.h>
+#include <string.h>
+
+#define Uses_TEvent
+#define Uses_TKeys
+#define Uses_TStaticInputLine
+#define Uses_TStreamableClass
+#include "tsinputl.h"
+
+Boolean matchFirstChar(void *, void *);
+
+
+TStaticInputLine::TStaticInputLine(const TRect& bounds, int aMaxLen, TCollection *aList) :
+ TInputLine(bounds, aMaxLen)
+{
+ list = aList;
+}
+
+
+void *TStaticInputLine::getNextMatch(char testChar)
+{
+ return (char *)list->firstThat(matchFirstChar, &testChar);
+}
+
+
+void TStaticInputLine::handleEvent(TEvent& event)
+{
+ char testChar[2];
+ char *tempData;
+ ccIndex index;
+
+ if (event.what == evKeyDown) {
+ if (isprint(event.keyDown.charScan.charCode) && event.keyDown.keyCode != kbTab) {
+ if(event.keyDown.charScan.charCode == ' ')
+ return;
+ testChar[0] = event.keyDown.charScan.charCode;
+ testChar[1] = '\0';
+ tempData = (char *)getNextMatch(testChar[0]);
+ if (tempData != 0) {
+ newData(tempData);
+ selectAll(True);
+ drawView();
+ }
+ clearEvent(event);
+ }
+ else
+ switch (event.keyDown.keyCode) {
+ case kbUp :
+ index = list->indexOf(data) - 1;
+ if (index < 0)
+ index = list->getCount() - 1;
+ newData((char *)list->at(index));
+ selectAll(True);
+ drawView();
+ clearEvent(event);
+ break;
+
+ case kbDown :
+ index = list->indexOf(data) + 1;
+ if (index >= list->getCount())
+ index = 0;
+ newData((char *)list->at(index));
+ selectAll(True);
+ drawView();
+ clearEvent(event);
+ break;
+
+ case kbHome:
+ index = 0;
+ newData((char *)list->at(index));
+ selectAll(True);
+ drawView();
+ clearEvent(event);
+ break;
+
+ case kbEnd:
+ index = list->getCount() - 1;
+ newData((char *)list->at(index));
+ selectAll(True);
+ drawView();
+ clearEvent(event);
+ break;
+
+ case kbLeft :
+ case kbRight :
+ case kbBack :
+ case kbIns :
+ case kbDel : clearEvent(event);
+ }
+ }
+ TInputLine::handleEvent(event);
+}
+
+
+void TStaticInputLine::newList(TCollection *aList)
+{
+ if (list)
+ destroy(list);
+ list = aList;
+ drawView();
+}
+
+
+void *TStaticInputLine::read( ipstream& is )
+{
+ TInputLine::read(is);
+ is >> list;
+ return this;
+}
+
+
+void TStaticInputLine::write( opstream& os )
+{
+ TInputLine::write(os);
+ os << list;
+}
+
+TStreamable *TStaticInputLine::build()
+{
+ return new TStaticInputLine(streamableInit);
+}
+
+
+TStaticInputLine::TStaticInputLine(StreamableInit) : TInputLine(streamableInit) { }
+
+
+
+Boolean matchFirstChar(void *string1, void *string2)
+{
+ char *temp1, *temp2;
+
+ temp1 = (char *)string1;
+ temp2 = (char *)string2;
+
+ if (toupper(temp1[0]) == toupper(temp2[0]))
+ return True;
+ else
+ return False;
+}
+
+void TStaticInputLine::newData(char *val)
+{
+ strcpy(data, val);
+}
diff --git a/dldialog/src/DLD_TV/tsinputl.h b/dldialog/src/DLD_TV/tsinputl.h
new file mode 100644
index 0000000..ee64d37
--- /dev/null
+++ b/dldialog/src/DLD_TV/tsinputl.h
@@ -0,0 +1,54 @@
+/*************************************************************************/
+/* */
+/* TSINPUTL.H */
+/* */
+/* Copyright (c) 1992, Vincent J. Dentice */
+/* All rights reserved */
+/* */
+/* */
+/* Date Prg Ver Description */
+/* -------- --- --- ------------------------------------------------- */
+/* 09/30/92 VJD 0.1 Initial module definition. */
+/* 11/16/92 VJD 0.2 Added streamability to the TComboBox classes. */
+/* Rewrote header files to behave like original */
+/* Turbo Vision header files. */
+/* */
+/*************************************************************************/
+
+#define Uses_TCollection
+#define Uses_TInputLine
+#include <tvision/tv.h>
+
+#if defined( Uses_TStaticInputLine ) && !defined( __TStaticInputLine )
+#define __TStaticInputLine
+
+
+class TStaticInputLine : public TInputLine {
+ protected:
+ TCollection *list;
+
+ void *getNextMatch(char);
+
+ public:
+ TStaticInputLine(const TRect&, int, TCollection *aList);
+
+ virtual void handleEvent(TEvent& event);
+ virtual void newList(TCollection *aList);
+ virtual void newData(char *val);
+
+ private:
+ virtual const char *streamableName() const
+ { return name; }
+
+ protected:
+ TStaticInputLine(StreamableInit);
+ virtual void write(opstream&);
+ virtual void *read(ipstream&);
+
+ public:
+ static const char * const name;
+ static TStreamable *build();
+};
+
+
+#endif
diff --git a/dldialog/src/Makefile.am b/dldialog/src/Makefile.am
new file mode 100644
index 0000000..d6cf0c2
--- /dev/null
+++ b/dldialog/src/Makefile.am
@@ -0,0 +1,57 @@
+#/*****************************************************************************
+#**
+#** $Id: Makefile.am,v 1.24 2000/03/15 20:02:15 harald Exp $
+#**
+#** 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.
+#**
+#** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+#**
+#*****************************************************************************/
+
+EXTRA_DIST = parser.sed
+
+SUBDIRS = DLD_GEN DLD_TV DLD_QT
+dldialog_LDADD = @INTLLIBS@ @LEXLIB@ -ldl
+dldialog_LDFLAGS = -export-dynamic
+
+bin_PROGRAMS = dldialog
+
+dldialog_SOURCES = dldialog.cc dld_obj.cc dld_out.cc dld_gauge.cc dld_dialog.cc \
+ dld_gui.cc dldialog.h dld_parser_yacc.yy dld_parser_lex.ll \
+dld_button.h dld_dialog.h dld_list.h dld_radiobutton.h \
+dld_checkbutton.h dld_form.h dld_listitem.h dld_radiolist.h \
+dld_checklist.h dld_gauge.h dld_menu.h dld_row.h \
+dld_col.h dld_gui.h dld_obj.h dld_text.h \
+dld_combobox.h dld_image.h dld_out.h dld_textbox.h \
+dld_comboitem.h dld_input.h dld_parser.h \
+dld_container.h dld_lib.h dld_parser_yacc.h
+
+# .yy.cc:
+
+%.cc: %.yy
+ $(YACC) $(AM_YFLAGS) $(YFLAGS) $< && sed -f parser.sed y.tab.c >$*.cc \
+ && rm -f y.tab.c
+ if test -f y.tab.h; then \
+ if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
+ else :; fi
+
+dld_parser_yacc.h: dld_parser_yacc.cc
+
+dld_parser_yacc.cc: dld_parser_yacc.yy parser.sed
+
+YFLAGS = -d
+
+# INCLUDES = -DLIBDIR="\"@libdir@\""
+localedir = $(datadir)/locale
+# INCLUDES = -I $(top_srcdir)/intl -DLOCALEDIR=\"$(localedir)\"
+INCLUDES = -DLOCALEDIR=\"$(localedir)\"
+EXTRA_dldialog_SOURCES = dld_parser_yacc.h
+
+all-recursive: dld_parser_yacc.h dld_parser_yacc.cc
+
+# DLD_TV/libdld_tv.la: all-recursive
+# DLD_QT/libdld_qt.la: all-recursive
+# DLD_GEN/libdld_gen.la: all-recursive
diff --git a/dldialog/src/Makefile.in b/dldialog/src/Makefile.in
new file mode 100644
index 0000000..1d4c724
--- /dev/null
+++ b/dldialog/src/Makefile.in
@@ -0,0 +1,511 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+#/*****************************************************************************
+#**
+#** $Id: Makefile.am,v 1.24 2000/03/15 20:02:15 harald Exp $
+#**
+#** 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.
+#**
+#** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+#**
+#*****************************************************************************/
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AS = @AS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CXX = @CXX@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
+GENCAT = @GENCAT@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+GUI_VERSION_INFO = @GUI_VERSION_INFO@
+HAVE_FINAL = @HAVE_FINAL@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+KDOC = @KDOC@
+LATEX = @LATEX@
+LEX = @LEX@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIBS = @QT_LIBS@
+RANLIB = @RANLIB@
+SGML2HTML = @SGML2HTML@
+TV_INCLUDES = @TV_INCLUDES@
+TV_LDFLAGS = @TV_LDFLAGS@
+TV_LIBS = @TV_LIBS@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+YACC = @YACC@
+l = @l@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+tv_includes = @tv_includes@
+tv_libraries = @tv_libraries@
+
+EXTRA_DIST = parser.sed
+
+SUBDIRS = DLD_GEN DLD_TV DLD_QT
+dldialog_LDADD = @INTLLIBS@ @LEXLIB@ -ldl
+dldialog_LDFLAGS = -export-dynamic
+
+bin_PROGRAMS = dldialog
+
+dldialog_SOURCES = dldialog.cc dld_obj.cc dld_out.cc dld_gauge.cc dld_dialog.cc dld_gui.cc dldialog.h dld_parser_yacc.yy dld_parser_lex.ll dld_button.h dld_dialog.h dld_list.h dld_radiobutton.h dld_checkbutton.h dld_form.h dld_listitem.h dld_radiolist.h dld_checklist.h dld_gauge.h dld_menu.h dld_row.h dld_col.h dld_gui.h dld_obj.h dld_text.h dld_combobox.h dld_image.h dld_out.h dld_textbox.h dld_comboitem.h dld_input.h dld_parser.h dld_container.h dld_lib.h dld_parser_yacc.h
+
+
+YFLAGS = -d
+
+# INCLUDES = -DLIBDIR="\"@libdir@\""
+localedir = $(datadir)/locale
+# INCLUDES = -I $(top_srcdir)/intl -DLOCALEDIR=\"$(localedir)\"
+INCLUDES = -DLOCALEDIR=\"$(localedir)\"
+EXTRA_dldialog_SOURCES = dld_parser_yacc.h
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+PROGRAMS = $(bin_PROGRAMS)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I..
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+dldialog_OBJECTS = dldialog.o dld_obj.o dld_out.o dld_gauge.o \
+dld_dialog.o dld_gui.o dld_parser_yacc.o dld_parser_lex.o
+dldialog_DEPENDENCIES =
+CXXFLAGS = @CXXFLAGS@
+CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LEXLIB = @LEXLIB@
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON = Makefile.am Makefile.in dld_parser_lex.cc \
+dld_parser_yacc.cc
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+SOURCES = $(dldialog_SOURCES) $(EXTRA_dldialog_SOURCES)
+OBJECTS = $(dldialog_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .cc .ll .lo .o .s .yy
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-binPROGRAMS:
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+distclean-binPROGRAMS:
+
+maintainer-clean-binPROGRAMS:
+
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ list='$(bin_PROGRAMS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ done
+
+.c.o:
+ $(COMPILE) -c $<
+
+.s.o:
+ $(COMPILE) -c $<
+
+.S.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+dldialog: $(dldialog_OBJECTS) $(dldialog_DEPENDENCIES)
+ @rm -f dldialog
+ $(CXXLINK) $(dldialog_LDFLAGS) $(dldialog_OBJECTS) $(dldialog_LDADD) $(LIBS)
+.cc.o:
+ $(CXXCOMPILE) -c $<
+.cc.lo:
+ $(LTCXXCOMPILE) -c $<
+.ll.cc:
+ $(LEX) $(AM_LFLAGS) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
+.yy.cc:
+ $(YACC) $(AM_YFLAGS) $(YFLAGS) $< && mv y.tab.c $*.cc
+ if test -f y.tab.h; then \
+ if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
+ else :; fi
+dld_parser_yacc.hh: dld_parser_yacc.cc
+
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+
+@SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+ rev="$$subdir $$rev"; \
+ test "$$subdir" = "." && dot_seen=yes; \
+ done; \
+ test "$$dot_seen" = "no" && rev=". $$rev"; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = src
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+ for subdir in $(SUBDIRS); do \
+ if test "$$subdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ chmod 777 $(distdir)/$$subdir; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \
+ || exit 1; \
+ fi; \
+ done
+dld_dialog.o: dld_dialog.cc dld_dialog.h dld_obj.h dld_lib.h ../config.h \
+ dld_container.h dld_out.h dld_gui.h
+dld_gauge.o: dld_gauge.cc dld_gauge.h dld_obj.h dld_lib.h ../config.h \
+ dld_dialog.h dld_container.h dld_out.h dld_parser.h
+dld_gui.o: dld_gui.cc dld_lib.h ../config.h dld_parser.h dldialog.h \
+ dld_gui.h dld_out.h dld_gauge.h dld_obj.h dld_dialog.h \
+ dld_container.h
+dld_obj.o: dld_obj.cc dld_obj.h dld_lib.h ../config.h dld_dialog.h \
+ dld_container.h dld_out.h dld_parser.h dldialog.h
+dld_out.o: dld_out.cc dld_out.h dld_lib.h ../config.h
+dld_parser_lex.o: dld_parser_lex.cc dldialog.h dld_lib.h ../config.h \
+ dld_parser.h dld_parser_yacc.h
+dld_parser_yacc.o: dld_parser_yacc.cc dld_parser.h dldialog.h \
+ dld_button.h dld_obj.h dld_lib.h ../config.h dld_checkbutton.h \
+ dld_checklist.h dld_col.h dld_container.h dld_combobox.h \
+ dld_comboitem.h dld_dialog.h dld_out.h dld_form.h dld_gauge.h \
+ dld_gui.h dld_image.h dld_input.h dld_list.h dld_listitem.h \
+ dld_menu.h dld_parser_yacc.h dld_radiobutton.h dld_radiolist.h \
+ dld_row.h dld_text.h dld_textbox.h
+dldialog.o: dldialog.cc dld_gui.h dld_out.h dld_lib.h ../config.h \
+ dldialog.h dld_parser.h
+
+info-am:
+info: info-recursive
+dvi-am:
+dvi: dvi-recursive
+check-am: all-am
+check: check-recursive
+installcheck-am:
+installcheck: installcheck-recursive
+install-exec-am: install-binPROGRAMS
+install-exec: install-exec-recursive
+
+install-data-am:
+install-data: install-data-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-recursive
+uninstall-am: uninstall-binPROGRAMS
+uninstall: uninstall-recursive
+all-am: Makefile $(PROGRAMS)
+all-redirect: all-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs: installdirs-recursive
+installdirs-am:
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+ -test -z "dld_parser_lexlldld_parser_yacchhdld_parser_yacccc" || rm -f dld_parser_lexll dld_parser_yacchh dld_parser_yacccc
+mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
+ mostlyclean-libtool mostlyclean-tags \
+ mostlyclean-generic
+
+mostlyclean: mostlyclean-recursive
+
+clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \
+ clean-generic mostlyclean-am
+
+clean: clean-recursive
+
+distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \
+ distclean-tags distclean-generic clean-am
+ -rm -f libtool
+
+distclean: distclean-recursive
+
+maintainer-clean-am: maintainer-clean-binPROGRAMS \
+ maintainer-clean-compile maintainer-clean-libtool \
+ maintainer-clean-tags maintainer-clean-generic \
+ distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-recursive
+
+.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
+maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool install-data-recursive \
+uninstall-data-recursive install-exec-recursive \
+uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
+all-recursive check-recursive installcheck-recursive info-recursive \
+dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-am uninstall all-redirect all-am all installdirs-am \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+# .yy.cc:
+
+%.cc: %.yy
+ $(YACC) $(AM_YFLAGS) $(YFLAGS) $< && sed -f parser.sed y.tab.c >$*.cc \
+ && rm -f y.tab.c
+ if test -f y.tab.h; then \
+ if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
+ else :; fi
+
+dld_parser_yacc.h: dld_parser_yacc.cc
+
+dld_parser_yacc.cc: dld_parser_yacc.yy parser.sed
+
+all-recursive: dld_parser_yacc.h dld_parser_yacc.cc
+
+# DLD_TV/libdld_tv.la: all-recursive
+# DLD_QT/libdld_qt.la: all-recursive
+# DLD_GEN/libdld_gen.la: all-recursive
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/dldialog/src/dld_button.h b/dldialog/src/dld_button.h
new file mode 100644
index 0000000..e583821
--- /dev/null
+++ b/dldialog/src/dld_button.h
@@ -0,0 +1,47 @@
+/******************************************************************************
+**
+** $Id: dld_button.h,v 1.2 1999/05/05 14:32:42 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_BUTTON_H
+#define DLD_GUI_BUTTON_H
+
+#include "dld_obj.h"
+
+/**
+ * Abstract Interface
+ * @short Abstract Interface
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_Button : public virtual DLD_Obj {
+public:
+ virtual void set_signature(bool on) {
+ signature = on;
+ };
+
+protected:
+ bool signature;
+};
+#endif
diff --git a/dldialog/src/dld_checkbutton.h b/dldialog/src/dld_checkbutton.h
new file mode 100644
index 0000000..d0bf33d
--- /dev/null
+++ b/dldialog/src/dld_checkbutton.h
@@ -0,0 +1,42 @@
+/******************************************************************************
+**
+** $Id: dld_checkbutton.h,v 1.1 1999/04/18 20:59:34 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_CHECKBUTTON_H
+#define DLD_GUI_CHECKBUTTON_H
+
+#include "dld_obj.h"
+
+/**
+ * The checkbutton.
+ * checkbuttons should be created using DLD_CheckList->checkbutton().
+ *
+ * @short Abstract interface for the checkbutton.
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_CheckButton : public virtual DLD_Obj {
+};
+#endif
diff --git a/dldialog/src/dld_checklist.h b/dldialog/src/dld_checklist.h
new file mode 100644
index 0000000..f332e11
--- /dev/null
+++ b/dldialog/src/dld_checklist.h
@@ -0,0 +1,82 @@
+/******************************************************************************
+**
+** $Id: dld_checklist.h,v 1.1 1999/04/18 20:59:34 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_CHECKLIST_H
+#define DLD_GUI_CHECKLIST_H
+
+#include "dld_obj.h"
+
+class DLD_CheckButton;
+
+/**
+ * The checklist.
+ *
+ * A checklist consists of several checkbuttons.
+ * The user can select several of them.
+ *
+ * At creation time all checkbuttons that have their variables set should be
+ * activated. After that the variable of the checklist itsself takes effect,
+ * but no deactivation should be performed.
+ *
+ * The checkbuttons and the checklist itsself should be 'activate'd
+ * and 'deactivate'd every time the selection changes.
+ *
+ * @short Abstract Interface
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_CheckList : public virtual DLD_Obj {
+public:
+ /** Adds a checkbutton to the checklist.
+ * @param name The text of the item
+ * @return ptr to item
+ */
+ virtual DLD_CheckButton *checkbutton(const string& = 0) = 0;
+
+ /** Indicates the beginning of a new block
+ *
+ * Can be used to reserve space for children.
+ */
+ virtual void open_brace() = 0;
+
+ /** Indicates the end of a block.
+ *
+ * Can be used to collect all children.
+ */
+ virtual void close_brace() = 0;
+
+ /** Compare the assigned variable with a value.
+ * @param _value The value.
+ */
+ virtual bool test_env (const string& _value) {
+ bool ret;
+ varaddflag = true;
+ ret = DLD_Obj::test_env(_value);
+ varaddflag = false;
+ return ret;
+ };
+};
+#endif
diff --git a/dldialog/src/dld_col.h b/dldialog/src/dld_col.h
new file mode 100644
index 0000000..8189f6b
--- /dev/null
+++ b/dldialog/src/dld_col.h
@@ -0,0 +1,40 @@
+/******************************************************************************
+**
+** $Id: dld_col.h,v 1.1 1999/04/18 20:59:34 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_COL_H
+#define DLD_GUI_COL_H
+
+#include "dld_container.h"
+
+/**
+ * Abstract Interface
+ * @short Abstract Interface
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_Col : public virtual DLD_Obj, public virtual DLD_Container {
+};
+#endif
diff --git a/dldialog/src/dld_combobox.h b/dldialog/src/dld_combobox.h
new file mode 100644
index 0000000..9335260
--- /dev/null
+++ b/dldialog/src/dld_combobox.h
@@ -0,0 +1,60 @@
+/******************************************************************************
+**
+** $Id: dld_combobox.h,v 1.1 1999/04/18 20:59:34 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_COMBOBOX_H
+#define DLD_GUI_COMBOBOX_H
+
+#include "dld_obj.h"
+
+class DLD_ComboItem;
+
+/**
+ * Abstract Interface
+ * @short Abstract Interface
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_ComboBox : public virtual DLD_Obj {
+public:
+ /** Adds a comboitem to the combobox.
+ * @param name The text of the item
+ * @return ptr to item
+ */
+ virtual DLD_ComboItem *comboitem(const string& = 0) = 0;
+
+ /** Indicates the beginning of a new block
+ *
+ * Can be used to reserve space for children.
+ */
+ virtual void open_brace() = 0;
+
+ /** Indicates the end of a block.
+ *
+ * Can be used to collect all children.
+ */
+ virtual void close_brace() = 0;
+};
+#endif
diff --git a/dldialog/src/dld_comboitem.h b/dldialog/src/dld_comboitem.h
new file mode 100644
index 0000000..e41c525
--- /dev/null
+++ b/dldialog/src/dld_comboitem.h
@@ -0,0 +1,40 @@
+/******************************************************************************
+**
+** $Id: dld_comboitem.h,v 1.1 1999/04/18 20:59:34 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_COMBOITEM_H
+#define DLD_GUI_COMBOITEM_H
+
+#include "dld_obj.h"
+
+/**
+ * Abstract Interface
+ * @short Abstract Interface
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_ComboItem : public virtual DLD_Obj {
+};
+#endif
diff --git a/dldialog/src/dld_container.h b/dldialog/src/dld_container.h
new file mode 100644
index 0000000..5398e47
--- /dev/null
+++ b/dldialog/src/dld_container.h
@@ -0,0 +1,147 @@
+/******************************************************************************
+**
+** $Id: dld_container.h,v 1.1 1999/04/18 20:59:34 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_CONTAINER_H
+#define DLD_GUI_CONTAINER_H
+
+#include "dld_obj.h"
+
+class DLD_Dialog;
+class DLD_Image;
+class DLD_ListItem;
+class DLD_List;
+class DLD_CheckButton;
+class DLD_CheckList;
+class DLD_RadioButton;
+class DLD_RadioList;
+class DLD_ComboItem;
+class DLD_ComboBox;
+class DLD_Text;
+class DLD_Button;
+class DLD_Gauge;
+class DLD_TextBox;
+class DLD_Input;
+class DLD_Menu;
+class DLD_Form;
+class DLD_Col;
+class DLD_Row;
+
+/**
+ * Abstract Interface for Container.
+ * @short Abstract Interface
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_Container : public virtual DLD_Obj {
+public:
+ /** Add a new dialog to the container.
+ * @param name a string
+ */
+ virtual DLD_Dialog *dialog (const string& name = 0) = 0;
+
+ /** Add a new form to the container.
+ * @param name a string
+ */
+ virtual DLD_Form * form (const string& name = 0) = 0;
+
+ /** Add a new col to the container.
+ * @param name a string
+ */
+ virtual DLD_Col * col (const string& name = 0) = 0;
+
+ /** Add a new row to the container.
+ * @param name a string
+ */
+ virtual DLD_Row * row (const string& name = 0) = 0;
+
+ /** Add a new list to the container.
+ * @param name a string
+ */
+ virtual DLD_List * list (const string& name = 0) = 0;
+
+ /** Add a new checklist to the container.
+ * @param name a string
+ */
+ virtual DLD_CheckList * checklist (const string& name = 0) = 0;
+
+ /** Add a new radiolist to the container.
+ * @param name a string
+ */
+ virtual DLD_RadioList * radiolist (const string& name = 0) = 0;
+
+ /** Add a new combobox to the container.
+ * @param name a string
+ */
+ virtual DLD_ComboBox * combobox (const string& name = 0) = 0;
+
+ /** Add a new text to the container.
+ * @param name a string
+ */
+ virtual DLD_Text * text (const string& name = 0) = 0;
+
+ /** Add a new button to the container.
+ * @param name a string
+ */
+ virtual DLD_Button * button (const string& name = 0) = 0;
+
+ /** Add a new gauge to the container.
+ * @param name a string
+ */
+ virtual DLD_Gauge * gauge (const string& name = 0) = 0;
+
+ /** Add a new textbox to the container.
+ * @param name a string
+ */
+ virtual DLD_TextBox * textbox (const string& name = 0) = 0;
+
+ /** Add a new input to the container.
+ * @param name a string
+ */
+ virtual DLD_Input * input (const string& name = 0) = 0;
+
+ /** Add a new PNG image to the container.
+ * @param name the filename of the image in PNG format
+ */
+ virtual DLD_Image * image (const string& name = 0) = 0;
+
+ /** Add a new menu to the container.
+ * @param name a string
+ */
+ virtual DLD_Menu * menu (const string& name = 0, bool check = false) = 0;
+
+ /** Indicates the beginning of a new block
+ *
+ * Can be used to reserve space for children.
+ */
+ virtual void open_brace() = 0;
+
+ /** Indicates the end of a block.
+ *
+ * Can be used to collect all children.
+ */
+ virtual void close_brace() = 0;
+};
+#endif
diff --git a/dldialog/src/dld_dialog.cc b/dldialog/src/dld_dialog.cc
new file mode 100644
index 0000000..d72b13f
--- /dev/null
+++ b/dldialog/src/dld_dialog.cc
@@ -0,0 +1,211 @@
+/******************************************************************************
+**
+** $Id: dld_dialog.cc,v 1.7 2000/03/15 20:02:15 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#include "dld_dialog.h"
+#include "dld_gui.h"
+
+extern char **environ;
+
+DLD_Dialog::
+DLD_Dialog(DLD_Gui *_parent, const DLD_Out& _out) :
+ out(_out),
+ printvars(false),
+ gui(_parent)
+{
+ set_dialog(this);
+}
+
+void DLD_Dialog::
+set_env (const string& _name, const string& _value, DLD_Obj *_obj)
+{
+ if(!_name.length()) {
+ DLDerr << "set_env with empty _name called" << endl;
+ return;
+ }
+
+#ifdef DEBUG
+ DLDdbg << "Setting " << _name << "=\"" << _value << "\""
+ << endl << flush;
+#endif
+ varmap[_name] = convstr(_value);
+ varowner[_name] = _obj;
+}
+
+void DLD_Dialog::
+del_env (const string& _name, DLD_Obj *_obj)
+{
+ if(!_name.length()) {
+ DLDerr << "del_env with empty _name called" << endl;
+ return;
+ }
+
+ if((varowner[_name] == 0) || (varowner[_name] == _obj)) {
+ DLDdbg << "Erasing " << _name << endl << flush;
+ /* Do not erase it, but set it to an empty string
+// varmap.erase(varmap.find(_name));
+// varowner.erase(varowner.find(_name));
+ */
+
+ set_env(_name, "", _obj);
+ varowner[_name] = 0;
+ }
+}
+
+bool DLD_Dialog::
+test_env (const string& _name, const string& _value, bool substr)
+{
+ VI i;
+
+ // First lookup value in local varmap
+ i = varmap.find(_name);
+
+ if(i == varmap.end()) {
+#ifdef DEBUG
+ DLDdbg << _name << " not found in varmap!" << endl << flush;
+#endif
+ return false;
+ }
+
+ if(substr) {
+ string::size_type j;
+ unsigned int vallen = _value.length();
+ string &str = i->second;
+
+#ifdef DEBUG
+ DLDdbg << "Checking if \"" << str << "\" contains " << _value
+ << endl << flush;
+#endif
+
+ j = str.find(_value);
+
+ if (j == string::npos)
+ return false;
+
+ if ((j == 0) && (str.length() == vallen || str[j+vallen] == ' ')) {
+#ifdef DEBUG
+ DLDdbg << _value << " is the first in the string"
+ << endl << flush;
+#endif
+ return true;
+ }
+
+ if ((str[j-1] == ' ')) {
+#ifdef DEBUG
+ DLDdbg << _value << " is at position " << j
+ << endl << flush;
+#endif
+ if (str.length() == j+vallen) {
+#ifdef DEBUG
+ DLDdbg << _value << " is the last in the string"
+ << endl << flush;
+#endif
+ return true;
+ }
+
+ if ((str[j+vallen] == ' ') && (j+vallen <= str.length())) {
+#ifdef DEBUG
+ DLDdbg << _value << " is in the middle of the string"
+ << endl << flush;
+#endif
+ return true;
+ }
+ }
+
+ return false;
+ }
+ else {
+#ifdef DEBUG
+ DLDdbg << "Checking if \"" << i->second << "\" == " << _value
+ << endl << flush;
+#endif
+
+ return (i->second.compare(_value) == 0);
+ }
+}
+
+void DLD_Dialog::
+set_up_environment()
+{
+ DLDdbg << "Setting up environment" << endl << flush;
+ for(VI i = gui->envmap.begin(); i != gui->envmap.end(); ++i) {
+ setenv(i->first.c_str(), i->second.c_str(), true);
+ DLDdbg << i->first.c_str() << '=' << i->second.c_str() << endl << flush;
+ }
+
+ for(VI i = varmap.begin(); i != varmap.end(); ++i) {
+ setenv(i->first.c_str(), i->second.c_str(), true);
+ DLDdbg << i->first.c_str() << '=' << i->second.c_str() << endl << flush;
+ }
+ DLDdbg << "Environment set up." << endl << flush;
+}
+
+
+string DLD_Dialog::
+get_env (const string& _name)
+{
+ return varmap[_name];
+}
+
+void DLD_Dialog::
+register_var (const string& _name)
+{
+ VI i;
+ // First lookup value in local varmap
+ i = varmap.find(_name);
+
+ if(i == varmap.end()) {
+ varmap[_name] = gui->get_env(_name);
+ }
+}
+
+void DLD_Dialog::
+register_gauge(DLD_Gauge *_gauge, int _fd)
+{
+ gauges.push_back(_gauge);
+ gui->register_gauge(_gauge, _fd);
+}
+
+void DLD_Dialog::
+deregister_gauge(DLD_Gauge *_gauge, int _fd)
+{
+ for(GI i = gauges.begin(); i != gauges.end(); ++i) {
+ if (*i == _gauge) {
+ gauges.erase(i);
+ gui->deregister_gauge(*i);
+ break;
+ }
+ }
+}
+
+DLD_Dialog::
+~DLD_Dialog()
+{
+ close();
+}
+
+void DLD_Dialog::
+close()
+{
+ for(GI i = gauges.begin(); i != gauges.end(); ++i) {
+ gui->deregister_gauge(*i);
+ }
+
+ if(out.out && printvars) {
+ for(VI i = varmap.begin(); i != varmap.end(); ++i) {
+ *(out.out) << i->first << "='" << i->second << "';" << endl;
+ }
+ }
+
+ for(VI i = varmap.begin(); i != varmap.end(); i = varmap.begin())
+ varmap.erase(i);
+
+}
diff --git a/dldialog/src/dld_dialog.h b/dldialog/src/dld_dialog.h
new file mode 100644
index 0000000..d32a2fd
--- /dev/null
+++ b/dldialog/src/dld_dialog.h
@@ -0,0 +1,110 @@
+/******************************************************************************
+**
+** $Id: dld_dialog.h,v 1.4 1999/09/17 14:18:24 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_DIALOG_H
+#define DLD_GUI_DIALOG_H
+
+#include "dld_obj.h"
+#include "dld_container.h"
+#include "dld_out.h"
+
+#include <sys/types.h>
+#include <fstream.h> // for ifstream
+#include <unistd.h>
+#include <string>
+#include <map>
+#include <list>
+
+class DLD_Gui;
+class DLD_Gauge;
+typedef DLD_Gauge *DLD_Gauge_Ptr;
+typedef list<DLD_Gauge_Ptr>::iterator GI;
+typedef list<DLD_Gauge_Ptr> GaugeList;
+
+/**
+ * Abstract Interface
+ * @short Abstract Interface
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_Dialog : public virtual DLD_Obj, public virtual DLD_Container {
+public:
+ DLD_Dialog(DLD_Gui *parent, const DLD_Out& out);
+ virtual ~DLD_Dialog();
+
+ virtual void close();
+
+ /** Set a variable in this environment.
+ * See man setenv(3)
+ * @param _name the name of the variable
+ * @param _value the value to set
+ * @param _obj the object that sets the variable
+ */
+ void set_env (const string& _name, const string& _value,
+ DLD_Obj *_obj);
+
+ /** Delete a variable in this environment.
+ * Deletes the variable if _obj was the one who set it.
+ * @param _name the name of the variable
+ * @param _obj the object that sets the variable
+ */
+ void del_env (const string& _name, DLD_Obj *_obj = 0);
+
+ /** Get the value of a variable in this environment.
+ * See man getenv(3)
+ * @param name the name of the variable
+ * @return a string to the value
+ */
+ string get_env (const string& _name);
+
+ /**
+ */
+ void register_var (const string& _name);
+
+ bool test_env(const string& _name, const string& _value, bool substr=false);
+
+ void register_gauge(DLD_Gauge *_gauge, int _fd);
+ void deregister_gauge(DLD_Gauge *_gauge, int _fd);
+
+ const DLD_Out out;
+
+ void set_up_environment();
+
+protected:
+ bool printvars;
+
+private:
+ map<const string, string> varmap;
+ map<const string, DLD_Obj*> varowner;
+
+ typedef map<const string, string>::iterator VI;
+
+ GaugeList gauges;
+
+ DLD_Gui *gui;
+};
+
+#endif
diff --git a/dldialog/src/dld_form.h b/dldialog/src/dld_form.h
new file mode 100644
index 0000000..b025596
--- /dev/null
+++ b/dldialog/src/dld_form.h
@@ -0,0 +1,40 @@
+/******************************************************************************
+**
+** $Id: dld_form.h,v 1.1 1999/04/18 20:59:34 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_FORM_H
+#define DLD_GUI_FORM_H
+
+#include "dld_container.h"
+
+/**
+ * Abstract Interface for a form widget.
+ * @short Abstract Interface
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_Form : public virtual DLD_Obj, public virtual DLD_Container{
+};
+#endif
diff --git a/dldialog/src/dld_gauge.cc b/dldialog/src/dld_gauge.cc
new file mode 100644
index 0000000..61be0a8
--- /dev/null
+++ b/dldialog/src/dld_gauge.cc
@@ -0,0 +1,106 @@
+#include "dld_gauge.h"
+#include "dld_parser.h"
+#include <sys/wait.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <signal.h>
+
+extern char **environ;
+DLD_Gauge::~DLD_Gauge()
+{
+ in.close();
+ if(gaugefd) {
+ if(dialog)
+ dialog->deregister_gauge(this, gaugefd);
+/* DLD_run--;
+ DLDdbg << "--DLD_run = " << DLD_run << endl << flush;
+*/
+ kill(execpid, SIGTERM);
+ }
+}
+
+void DLD_Gauge::create()
+{
+ if(gaugestr.length()) {
+#ifdef DEBUG
+ DLDdbg << "gauge exec " << gaugestr << endl << flush;
+#endif
+ int pid;
+ int fd[2];
+ pipe (fd);
+
+ if ((pid = fork ()) == 0) {
+ char *argv[4];
+ int i;
+
+ dialog->set_up_environment();
+
+ dup2 (fd[1], STDOUT_FILENO);
+
+ char exec[gaugestr.length()+1];
+ strcpy (exec, gaugestr.c_str());
+
+ for (i = 4; i < 256; i++)
+ close (i);
+
+ exit(system(exec));
+ }
+/* DLD_run++;
+ DLDdbg << "++DLD_run = " << DLD_run << endl << flush;
+*/
+ close (fd[1]);
+ gaugefd = fd[0];
+ in.attach(gaugefd);
+ execpid = pid;
+ dialog->register_gauge(this, gaugefd);
+ }
+}
+
+void DLD_Gauge::parse()
+{
+ if(!gaugefd)
+ return;
+ else {
+ double pro=0.0;
+ string buf;
+// char c;
+
+ fcntl(gaugefd, F_SETFL, O_RDONLY|O_NONBLOCK);
+
+ while(in >> buf) {
+ if(sscanf(buf.c_str(), " %lf", &pro))
+ set_progress((int)pro);
+ }
+
+ fcntl(gaugefd, F_SETFL, O_RDONLY);
+
+ in.clear();
+
+ int status;
+ int exitstatus=0;
+ pid_t pid = waitpid(execpid, &status, WNOHANG);
+ if( pid != 0 )
+ {
+ if(pid > 0 && WIFEXITED(status)) {
+ exitstatus = WEXITSTATUS(status);
+ DLDdbg << "Gauge exited with " << exitstatus << endl << flush;
+ }
+ else if (pid > 0 && WIFSIGNALED(status)) {
+ exitstatus = WTERMSIG(status);
+ DLDdbg << "Gauge killed with signal " << exitstatus << endl << flush;
+ }
+ in.close();
+ dialog->deregister_gauge(this, gaugefd);
+ set_progress(-exitstatus-1);
+ gaugefd = 0;
+/* DLD_run--;
+ DLDdbg << "--DLD_run = " << DLD_run << endl << flush;
+*/
+ }
+ }
+}
+
diff --git a/dldialog/src/dld_gauge.h b/dldialog/src/dld_gauge.h
new file mode 100644
index 0000000..59666c9
--- /dev/null
+++ b/dldialog/src/dld_gauge.h
@@ -0,0 +1,65 @@
+/******************************************************************************
+**
+** $Id: dld_gauge.h,v 1.2 1999/04/19 10:49:47 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_GAUGE_H
+#define DLD_GUI_GAUGE_H
+
+#include "dld_obj.h"
+#include "dld_dialog.h"
+
+/** An assertion function for use with dldialog.
+ * @short An assertion function for use with dldialog
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_Gauge : public virtual DLD_Obj {
+public:
+ DLD_Gauge() : execpid(0), gaugefd(0) {};
+ virtual ~DLD_Gauge();
+ /** Update the progress meter.
+ * @param _p the new percentage from 0..100
+ */
+ virtual void set_progress(int _p) = 0;
+
+ /** Executes the specified executable.
+ *
+ */
+ virtual void create();
+
+ virtual void add_exec (const string& exec_string) {
+ gaugestr = convstr(exec_string);
+ };
+
+ virtual void parse();
+
+ pid_t execpid;
+
+private:
+ string gaugestr;
+ int gaugefd;
+ ifstream in;
+};
+#endif
diff --git a/dldialog/src/dld_gui.cc b/dldialog/src/dld_gui.cc
new file mode 100644
index 0000000..3d2da81
--- /dev/null
+++ b/dldialog/src/dld_gui.cc
@@ -0,0 +1,160 @@
+/******************************************************************************
+**
+** $Id: dld_gui.cc,v 1.4 2000/03/15 20:02:15 harald Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de> - All rights reserved -
+**
+******************************************************************************/
+#include <sys/wait.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/socket.h>
+#include <fcntl.h>
+#include <errno.h>
+/*
+#include "dld_parser.h"
+#include "dldialog.h"
+*/
+#include "dld_lib.h"
+#include "dld_parser.h"
+#include "dldialog.h"
+#include "dld_gui.h"
+#include "dld_gauge.h"
+
+extern char **environ;
+
+ void DLD_Gui::
+set_env (const string& _name, const string& _value)
+{
+ envmap[_name] = convstr(_value);
+}
+
+ string DLD_Gui::
+get_env (const string& _name)
+{
+ return envmap[_name];
+}
+
+ void DLD_Gui::
+clear_env()
+{
+ envmap.erase(envmap.begin(), envmap.end());
+}
+
+ bool DLD_Gui::
+parse(long wait)
+{
+// static int infd = 0;
+
+ if(!DLD_error) {
+ int fd_max=-1;
+ fd_set fdset;
+
+ FD_ZERO(&fdset);
+
+ // Lets wait for incoming sockets
+ FD_SET(sock_in, &fdset);
+ fd_max = max(fd_max, sock_in);
+
+ // Scan all gauge execs
+ for(map<int, DLD_Gauge_Ptr>::iterator i = gaugemap.begin();
+ i != gaugemap.end(); ++i) {
+ FD_SET(i->first, &fdset);
+ fd_max = max(fd_max, i->first);
+ }
+
+ struct timeval timeout = {wait/1000000, wait%1000000};
+
+ if(fd_max != -1 && select(fd_max+1, &fdset, 0, 0, (wait < 0) ? NULL : &timeout) > 0) {
+// if(fd_max != -1 && select(fd_max+1, &fdset, 0, 0, NULL) > 0) {
+ // Look if there are gauges to update...
+ for(map<int, DLD_Gauge_Ptr>::iterator i = gaugemap.begin();
+ i != gaugemap.end(); ++i) {
+ if(FD_ISSET(i->first, &fdset)) {
+ if (i->second)
+ i->second->parse();
+ }
+ }
+
+ if(FD_ISSET(sock_in, &fdset) && DLD_run >= 0) {
+ socklen_t len = sock_len;
+ int fd_in = accept(sock_in, (struct sockaddr *)&sock_addr, &len);
+// fcntl(fd_in, F_SETFL, O_NONBLOCK);
+ if(DLDout.is_open())
+ DLDout.close();
+ DLDout.attach (dup(fd_in));
+
+ if(!yyin)
+ yyin = fdopen(fd_in, "rwb");
+
+ yyparse ();
+ DLDout << flush;
+ close(fd_in);
+ if(DLD_run >= 0 && DLDout.is_open())
+ DLDout.close();
+ }
+ }
+ }
+
+ int status;
+ pid_t pid;
+ do {
+ pid = waitpid(-1, &status, WNOHANG);
+ if (pid > 0) {
+ DLDdbg << "child " << pid << " exited." << endl << flush;
+ map<int, DLD_Gauge_Ptr>::iterator i;
+ for(i = gaugemap.begin(); i != gaugemap.end(); ++i) {
+ if(pid == i->second->execpid)
+ break;
+ }
+ if(i == gaugemap.end()) {
+/*
+ DLDdbg << "--DLD_run = " << DLD_run << endl << flush;
+ DLD_run--;
+*/
+ }
+ else {
+ if (i->second)
+ i->second->parse();
+ }
+ }
+ else if(errno == ECHILD)
+ {
+ map<int, DLD_Gauge_Ptr>::iterator i;
+ for(i = gaugemap.begin(); i != gaugemap.end(); ++i) {
+ if (i->second)
+ i->second->parse();
+ }
+ }
+ } while (pid > 0);
+
+ if((DLD_run >= 0) && !DLD_error)
+ return true;
+ else
+ return false;
+}
+
+ void DLD_Gui::
+register_gauge(DLD_Gauge *_gauge, int _fd)
+{
+ gaugemap[_fd] = _gauge;
+}
+
+ void DLD_Gui::
+deregister_gauge(DLD_Gauge *_gauge)
+{
+ for(map<int, DLD_Gauge_Ptr>::iterator i = gaugemap.begin();
+ i != gaugemap.end(); ++i) {
+ if (i->second == _gauge) {
+ gaugemap.erase(i);
+ close(i->first);
+ break;
+ }
+ }
+}
diff --git a/dldialog/src/dld_gui.h b/dldialog/src/dld_gui.h
new file mode 100644
index 0000000..3dc7bb3
--- /dev/null
+++ b/dldialog/src/dld_gui.h
@@ -0,0 +1,124 @@
+/******************************************************************************
+**
+** $Id: dld_gui.h,v 1.11 1999/02/11 08:43:28 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_H
+#define DLD_GUI_H
+
+#include "dld_out.h"
+#include <string>
+#include <map>
+
+class DLD_Dialog;
+class DLD_Gauge;
+
+/**
+ * Abstract Interface for all GUI modules.
+ *
+ * It provides virtual functions that have to be overwritten by
+ * the GUI modules.
+ *
+ * @short Abstract GUI Interface
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_Gui
+{
+public:
+ /** Virtual Destruktor
+ *
+ */
+ virtual ~DLD_Gui() {};
+
+ /** Create the main dialog for this session
+ * @param name The title of the dialog
+ */
+ virtual DLD_Dialog *dialog (const string& name, const DLD_Out& out) = 0;
+
+ /** Show the dialog and communicate with the user.
+ * If there is a message parsing loop it call DLD_Gui::parse()
+ * if idle
+ * @return 0 if all succeeds
+ * @return >0 if an error occured
+ */
+ virtual int exec () = 0;
+
+ /** Set the name of the GUI module
+ * @param newname The name.
+ * @return a reference to the name
+ */
+ virtual const string& name (const string& newname) = 0;
+
+ /** Get the name of the GUI module
+ * @return a reference to the name
+ */
+ virtual const string& name () = 0;
+
+ /** Display a string
+ * @param txt The text that is displayed to the user
+ * @return 0 on success
+ * @return >0 on error
+ */
+ virtual int print_status (const string& txt) = 0;
+
+ /** Set a variable in this environment.
+ * See man setenv(3)
+ * @param _name the name of the variable
+ * @param _value the value to set
+ */
+ void set_env (const string& _name, const string& _value);
+
+ /** Get the value of a variable in this environment.
+ * See man getenv(3)
+ * @param name the name of the variable
+ * @return a string to the value
+ */
+ string get_env (const string& _name);
+
+ /** Remove all variables that are in this environment
+ */
+ void clear_env ();
+
+ /** Must be called if the gui is idle.
+ * @param microsec the time to wait in microseconds,
+ * if negative wait until input is ready
+ */
+ virtual bool parse(long wait);
+
+ void register_gauge(DLD_Gauge *_gauge, int _fd);
+
+ void deregister_gauge(DLD_Gauge *_gauge);
+
+ map<const string, string> envmap;
+
+private:
+ typedef map<const string, string>::iterator VI;
+
+ typedef DLD_Gauge *DLD_Gauge_Ptr;
+ map<int, DLD_Gauge_Ptr> gaugemap;
+
+};
+
+#endif
diff --git a/dldialog/src/dld_image.h b/dldialog/src/dld_image.h
new file mode 100644
index 0000000..04d7033
--- /dev/null
+++ b/dldialog/src/dld_image.h
@@ -0,0 +1,45 @@
+/******************************************************************************
+**
+** $Id: dld_image.h,v 1.2 1999/05/07 06:50:42 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_IMAGE_H
+#define DLD_GUI_IMAGE_H
+
+#include "dld_obj.h"
+
+/**
+ * The image.
+ *
+ * @short Abstract interface for the listitem object.
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_Image : public virtual DLD_Obj {
+public:
+ void setIsMovie(bool on) {
+ is_movie = on;
+ }
+};
+#endif
diff --git a/dldialog/src/dld_input.h b/dldialog/src/dld_input.h
new file mode 100644
index 0000000..21dade1
--- /dev/null
+++ b/dldialog/src/dld_input.h
@@ -0,0 +1,60 @@
+/******************************************************************************
+**
+** $Id: dld_input.h,v 1.1 1999/04/18 20:59:34 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_INPUT_H
+#define DLD_GUI_INPUT_H
+
+#include "dld_obj.h"
+
+/**
+ * Abstract Interface
+ * @short Abstract Interface
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_Input : public virtual DLD_Obj {
+public:
+ /** Make the input to accept only IP nummers
+ * @param flag true or false
+ */
+ virtual void set_ip(bool flag) = 0;
+
+ /** Make the input invisible
+ * @param flag true or false
+ */
+ virtual void set_passwd(bool flag) = 0;
+
+ /** Set the maximal length of the input field
+ * @param len the length
+ */
+ virtual void set_length(int len) = 0;
+
+ /** Make the input to accept only numeric input
+ * @param flag true or false
+ */
+ virtual void set_numeric(bool flag) = 0;
+};
+#endif
diff --git a/dldialog/src/dld_lib.h b/dldialog/src/dld_lib.h
new file mode 100644
index 0000000..c551075
--- /dev/null
+++ b/dldialog/src/dld_lib.h
@@ -0,0 +1,93 @@
+/******************************************************************************
+**
+** $Id: dld_lib.h,v 1.5 1998/10/13 01:43:27 saturn Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+
+#ifndef DLD_LIB_H
+#define DLD_LIB_H
+
+#include <sys/types.h>
+#include <fstream.h> // for ifstream
+#include <unistd.h>
+#include <string>
+
+class DLD_Gui;
+
+/* IMPORTANT:
+ *
+ * If you change this, you also have to change
+ * func_dld_lib_init in dldialog.cc
+ */
+extern "C" {
+extern DLD_Gui *dld_lib_init (const char *name, int argc, char **argv);
+}
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#define DLD_VERSION_STRING VERSION
+#else
+#error NO CONFIG.H generated
+#endif
+#ifdef HAVE_GETTEXT
+#include <libintl.h>
+#else
+#include "intl/libintl.h"
+#endif
+
+#define _(String) gettext (String)
+
+extern string convstr (const string& str);
+
+/// The global error stream.
+extern ofstream DLDerr;
+/// The global debugging stream.
+extern ofstream DLDdbg;
+/// The corresponding tty values
+extern int tty_fdout, tty_fdin, tty_fderr;
+
+#ifdef DEBUG
+#include <exception>
+
+/** An assertion function for use with dldialog
+ */
+template <class X, class A> inline void DLD_Assert(A assertion,
+ const char *_assert,
+ const char *file, int line)
+{
+ if(!assertion) throw X(_assert, file, line);
+}
+
+/// A generic exception
+class DLD_Exception : public exception {
+public:
+ DLD_Exception(const char *_reason,
+ const char *_file, int _line):
+ reason(_reason),
+ file(_file),
+ line(_line) {};
+
+ string reason;
+ string file;
+ int line;
+};
+
+/// Bad argument exception
+class Bad_arg : public DLD_Exception {
+public:
+ Bad_arg(const char *_assert, const char *_file, int _line):
+ DLD_Exception(_assert, _file, _line) {};
+};
+
+#define Assert(X, A) DLD_Assert<X>(A, #X " " #A, __FILE__, __LINE__);
+#else
+#define Assert(X, A)
+#endif
+#endif
diff --git a/dldialog/src/dld_list.h b/dldialog/src/dld_list.h
new file mode 100644
index 0000000..30bff79
--- /dev/null
+++ b/dldialog/src/dld_list.h
@@ -0,0 +1,92 @@
+/******************************************************************************
+**
+** $Id: dld_list.h,v 1.4 1999/05/04 16:52:35 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_LIST_H
+#define DLD_GUI_LIST_H
+
+#include "dld_obj.h"
+
+class DLD_ListItem;
+
+/**
+ * The list.
+ * A list consists of several listitems. These are displayed one per line.
+ * The user can select one of them or several if set_multi(true) was called.
+ *
+ * At creation time all listitem that have their variables set should be
+ * activated. After that the variable of the list itsself takes effect.
+ *
+ * The listitems and the list itsself should be 'activate'd and 'deactivate'd
+ * every time the selection changes.
+ *
+ * @short Abstract interface for the list object.
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_List : public virtual DLD_Obj {
+public:
+ /** Adds a listitem to the list.
+ * @param name The text of the listitem
+ * @return ptr to DLD_ListItem
+ */
+ virtual DLD_ListItem * listitem (const string& = 0) = 0;
+
+ virtual void set_multi(bool on) { is_multi = on; };
+
+ /** Indicates the beginning of a new block
+ *
+ * Can be used to reserve space for children.
+ */
+ virtual void open_brace() = 0;
+
+ /** Indicates the end of a block.
+ *
+ * Can be used to collect all children.
+ */
+ virtual void close_brace() = 0;
+
+ /** Compare the assigned variable with a value.
+ * @param _value The value.
+ */
+ virtual bool test_env (const string& _value) {
+ bool ret;
+ if(is_multi)
+ varaddflag = true;
+#ifdef DEBUG
+ DLDdbg << "checking " << _value << " varaddflag = " << varaddflag << endl << flush;
+#endif
+ ret = DLD_Obj::test_env(_value);
+ varaddflag = false;
+ return ret;
+ };
+
+protected:
+ /** Indicates that the list is a multiselection list
+ */
+ bool is_multi;
+};
+
+#endif
diff --git a/dldialog/src/dld_listitem.h b/dldialog/src/dld_listitem.h
new file mode 100644
index 0000000..f858d2f
--- /dev/null
+++ b/dldialog/src/dld_listitem.h
@@ -0,0 +1,42 @@
+/******************************************************************************
+**
+** $Id: dld_listitem.h,v 1.1 1999/04/18 20:59:34 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_LISTITEM_H
+#define DLD_GUI_LISTITEM_H
+
+#include "dld_obj.h"
+
+/**
+ * The listitem.
+ * Listitems should only be created using DLD_List->listitem().
+ *
+ * @short Abstract interface for the listitem object.
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_ListItem : public virtual DLD_Obj {
+};
+#endif
diff --git a/dldialog/src/dld_menu.h b/dldialog/src/dld_menu.h
new file mode 100644
index 0000000..8e2d7a7
--- /dev/null
+++ b/dldialog/src/dld_menu.h
@@ -0,0 +1,46 @@
+/******************************************************************************
+**
+** $Id: dld_menu.h,v 1.1 1999/04/18 20:59:34 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_MENU_H
+#define DLD_GUI_MENU_H
+
+#include "dld_obj.h"
+
+/**
+ * Abstract Interface
+ * @short Abstract Interface
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_Menu : public virtual DLD_Obj {
+public:
+ /** Let the menu be a global one
+ * @param flag true or false
+ */
+ virtual void set_global(bool flag) = 0;
+};
+
+#endif
diff --git a/dldialog/src/dld_obj.cc b/dldialog/src/dld_obj.cc
new file mode 100644
index 0000000..5d044a2
--- /dev/null
+++ b/dldialog/src/dld_obj.cc
@@ -0,0 +1,267 @@
+/******************************************************************************
+**
+** $Id: dld_obj.cc,v 1.21 1999/04/19 07:46:01 harald Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#include <unistd.h>
+
+#include "dld_obj.h"
+#include "dld_dialog.h"
+#include "dld_parser.h"
+#include "dldialog.h"
+#include <sys/wait.h>
+#include <errno.h>
+#include <signal.h>
+
+#define inline
+extern char **environ;
+
+DLD_Obj::~DLD_Obj()
+{
+ for(CI i = childlist.begin(); i != childlist.end(); i = childlist.begin()) {
+ delete *i;
+ }
+
+ if(execpid) {
+ int status;
+ int exitstatus=0;
+ pid_t pid = waitpid(execpid, &status, WNOHANG);
+ if( pid != 0 )
+ {
+ if(pid > 0 && WIFEXITED(status)) {
+ exitstatus = WEXITSTATUS(status);
+ DLDdbg << execstr << " exited with " << exitstatus << endl << flush;
+ }
+ else if (pid > 0 && WIFSIGNALED(status)) {
+ exitstatus = WTERMSIG(status);
+ DLDdbg << execstr << " killed with signal " << exitstatus << endl << flush;
+ }
+/*
+ execpid = 0;
+ DLD_run--;
+ DLDdbg << "--DLD_run = " << DLD_run << endl << flush;
+*/
+ } else {
+ if(killchilds)
+ kill(execpid, SIGTERM);
+ }
+ }
+
+ if(parent_obj)
+ parent_obj->del_child(this);
+}
+
+void DLD_Obj::create()
+{
+#ifdef DEBUG
+ DLDdbg << "created object\n";
+#endif
+ is_created = true;
+}
+
+inline void DLD_Obj::
+add_setvar (const string& name, const string val)
+{
+ varname = name;
+ varvalue = val;
+ varaddflag = false;
+ dialog->register_var(name);
+}
+
+inline void DLD_Obj::set_font(const string& fname, const string& fsize )
+{
+ if (fsize == "mini") fontsize = 8;
+ else if (fsize == "small") fontsize = 10;
+ else if (fsize == "normal") fontsize = 12;
+ else if (fsize == "large") fontsize = 14;
+ else if (fsize == "huge") fontsize = 16;
+ else if (fsize == "big") fontsize = 18;
+ else if ((fontsize = atoi(fsize.c_str())) != 0);
+ else fontsize = 12;
+ fontname = fname;
+}
+
+inline void DLD_Obj::set_fg (const string &fg )
+{
+ fg_color = fg;
+}
+
+inline void DLD_Obj::set_bg (const string &bg )
+{
+ bg_color = bg;
+}
+
+
+inline void DLD_Obj::
+add_addvar (const string& name, const string val)
+{
+ varname = name;
+ varvalue = val;
+ varaddflag = true;
+ dialog->register_var(name);
+}
+
+inline void DLD_Obj::
+activate()
+{
+#ifdef DEBUG
+ DLDdbg << "gen_obj activate " << endl << flush;
+#endif
+ if(varname.length()) {
+
+ if(oldvalue.length() == 0)
+ oldvalue = dialog->get_env(varname);
+
+ if(varaddflag) {
+ string newval = dialog->get_env(varname) + " " + varvalue;
+ dialog->set_env(varname, newval, this);
+ }
+ else
+ dialog->set_env(varname, varvalue, this);
+ }
+
+ if(execstr.length()) {
+#ifdef DEBUG
+ DLDdbg << "gen_obj exec " << execstr << endl << flush;
+#endif
+ int pid;
+
+ if ((pid = fork ()) == 0) {
+ char *argv[4];
+ int i;
+
+ dialog->set_up_environment();
+
+ dup2 (tty_fdin, STDIN_FILENO);
+ dup2 (tty_fdout, STDOUT_FILENO);
+ dup2 (fd_err, STDERR_FILENO);
+
+ for (i = 4; i < 256; i++)
+ close (i);
+
+ char exec[execstr.length()+1];
+ strcpy (exec, execstr.c_str());
+
+ exit(system(exec));
+ }
+/* DLD_run++;
+ DLDdbg << "++DLD_run = " << DLD_run << endl << flush;
+*/
+ execpid = pid;
+ }
+}
+
+inline void DLD_Obj::
+deactivate()
+{
+ if(varname.length()) {
+ if (varaddflag)
+ dialog->set_env(varname, oldvalue, this);
+ else
+ dialog->del_env(varname, this);
+ }
+}
+
+inline bool DLD_Obj::test_env (const string& _value)
+{
+ Assert(Bad_arg, dialog);
+#ifdef DEBUG
+ DLDdbg << "checking " << varname << " == " << _value << " varaddflag = " << varaddflag << endl << flush;
+#endif
+ return dialog->test_env(varname, _value, varaddflag);
+}
+
+inline bool DLD_Obj::test_env ()
+{
+ Assert(Bad_arg, dialog);
+ return dialog->test_env(varname, varvalue, varaddflag);
+}
+
+void DLD_Obj::add_child(DLD_Obj *obj)
+{
+ Assert(Bad_arg, obj != NULL);
+
+ childlist.push_back(obj);
+ obj->parent_obj = this;
+}
+
+void DLD_Obj::del_child(DLD_Obj *obj)
+{
+ Assert(Bad_arg, obj != 0);
+
+ for(CI i = childlist.begin(); i != childlist.end(); ++i) {
+ DLD_Obj *childptr = *i;
+ if (childptr == obj) {
+ childlist.erase(i);
+ break;
+ }
+ }
+}
+
+string convstr (const string& _str)
+{
+ const char *str = _str.c_str();
+ char *nstr = new char[_str.length() + 1];
+
+ int p = 0;
+ int q = 0;
+ char c, count;
+
+ while ((c = str[p++]) != '\0') {
+ if (c == '\\') {
+ switch (str[p++]) {
+ case 'a':
+ c = '\a';
+ break;
+ case 'b':
+ c = '\b';
+ break;
+ case 'f':
+ c = '\f';
+ break;
+ case 'n':
+ c = '\n';
+ break;
+ case 'r':
+ c = '\r';
+ break;
+ case 't':
+ c = '\t';
+ break;
+ case 'v':
+ c = '\v';
+ break;
+ case '\\':
+ break; /*
+ * * * * c = '\\'
+ */
+ case '0':
+ c = 0;
+ for (count = 3; (count > 0) && ((unsigned) (str[p] - '0') < 8); count--);
+ c = (c << 3) + (str[p++] - '0');
+ break;
+ default:
+// c = str[p-1];
+ p--;
+ continue;
+ break;
+ }
+ }
+ nstr[q++] = c;
+ }
+
+ nstr[q] = '\0';
+
+ string ret(nstr);
+ delete nstr;
+ return ret;
+}
+
+#undef inline
diff --git a/dldialog/src/dld_obj.h b/dldialog/src/dld_obj.h
new file mode 100644
index 0000000..c4c8bf0
--- /dev/null
+++ b/dldialog/src/dld_obj.h
@@ -0,0 +1,279 @@
+/******************************************************************************
+**
+** $Id: dld_gui.h,v 1.11 1999/02/11 08:43:28 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_OBJ_H
+#define DLD_GUI_OBJ_H
+
+#include "dld_lib.h"
+
+#include <sys/types.h>
+#include <fstream.h> // for ifstream
+#include <unistd.h>
+#include <string>
+#include <list>
+
+class DLD_Dialog;
+class DLD_Container;
+
+/**
+ * Abstract interface for all GUI objects.
+ *
+ * Objects should not be used directly. Instead use the derived interface
+ * classes returned by DLD_Container or other 'parent' objects.
+ *
+ * @short Abstract interface for all GUI objects.
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_Obj {
+public:
+ /** The default constructor.
+ * Should be overloaded by the interface implementation.
+ */
+ DLD_Obj() : dialog(0), parent_obj(0), varaddflag(false), killchilds(true),
+ execpid(0), is_disabled(false), is_movie(false), is_created(false) {};
+
+ /** The default destructor.
+ * Deletes all child objects and calls parent_obj->del_child(this)
+ */
+ virtual ~DLD_Obj();
+
+ /** Sets the parent dialog for this object.
+ * @param parent The parent dialog. Must not be NULL.
+ */
+ virtual void set_dialog(DLD_Dialog *parent) {
+ Assert(Bad_arg, parent != 0);
+ dialog = parent;
+ };
+
+ /** Adds an executable to the object.
+ * This executable will be executed, if the object is activated.
+ * Output will be parsed as a DLDialog program.
+ * @param exec_string This string will be executed using "sh -c exec_string"
+ * @return TRUE on success
+ * @return ENOMEM if no memory for the exec_string could be allocated
+ */
+ virtual void add_exec (const string& exec_string) {
+ execstr = convstr(exec_string);
+ };
+
+ /**
+ */
+ virtual void set_killchild (bool flag) {
+ killchilds = flag;
+ }
+
+ /** Adds an image to the object.
+ * @param image_string The filename of the image.
+ */
+ virtual void add_image (const string& image_string) {
+ imagestr = convstr(image_string);
+ is_movie = false;
+ };
+
+ /** Adds an animated image to the object (gif, png, etc.).
+ * @param image_string The filename of the image.
+ */
+ virtual void add_movie (const string& movie_string) {
+ imagestr = convstr(movie_string);
+ is_movie = true;
+ };
+
+ /** Set/Unset that the dialog should exit if this object is activated.
+ * @param flag true or false.
+ */
+ virtual void set_exit(bool flag) = 0;
+
+ /** Set the width in percent.
+ * @param _w the new width in percent of the parent width.
+ */
+ virtual void widthP (unsigned int _w) = 0;
+
+ /** Set the height in percent.
+ * @param _h the new height in percent of the parent height.
+ */
+ virtual void heightP(unsigned int _h) = 0;
+
+ /** Activate this object.
+ * Sets the assigned variable to varvalue.
+ * Executes a program specified with add_exec.
+ * Exits the dialog if set_exit(true) was set.
+ */
+ virtual void activate();
+
+ /** Deactivates the object.
+ * The function sets assigned variable to the old value.
+ */
+ virtual void deactivate();
+
+ /** Binds an environment variable to the object.
+ * This variable will be set to the value specified, if the object
+ * is activated.
+ * @param name the name of the variable
+ * @param val the value to set
+ */
+ void add_setvar (const string& name, const string val);
+
+ /** Binds an environment variable to the object.
+ * This variable will be set to the value specified, if the object
+ * is activated.
+ * @param name the name of the variable
+ * @param val the value to add
+ * @return TRUE if all succeeded
+ */
+ void add_addvar (const string& name, const string val);
+
+
+ void set_font (const string &, const string &);
+
+ void set_bg (const string &bg );
+
+ void set_fg (const string &fg );
+
+ /** Compare the assigned variable with a value.
+ * @param _value The value.
+ */
+ virtual bool test_env (const string& _value);
+
+ /** Compare the assigned variable with varvalue.
+ */
+ virtual bool test_env ();
+
+ /** Create the Object.
+ * This function should be overloaded with the interface implementation.
+ * It indicates that the object has all of it's parameters set and can
+ * be created and shown.
+ */
+ virtual void create();
+
+ /** Add a child object to the child list.
+ * The child object will be deleted before this object is deleted.
+ * The variable parent_obj of the child is set to this object.
+ * @param child The child object.
+ */
+ virtual void add_child(DLD_Obj *child);
+
+ /** Deletes a child object form the child list.
+ * The child object will only removed from the child list.
+ * child->parent_obj will not be touched
+ * nor will it delete the child itsself.
+ * @param child The child object.
+ */
+ virtual void del_child(DLD_Obj *child);
+
+ /** Disables the object
+ */
+ virtual void disable() { is_disabled = true;};
+
+ /** Indicates that the object was created and is visible
+ */
+ virtual bool was_created() { return is_created; };
+
+
+protected:
+ typedef DLD_Obj *DLD_Obj_Ptr;
+ /** The child list.
+ */
+ list<DLD_Obj_Ptr> childlist;
+ typedef list<DLD_Obj_Ptr>::iterator CI;
+
+ /** The parent dialog the object is in.
+ */
+ DLD_Dialog *dialog;
+
+ /** The parent object, this object is tied to.
+ */
+ DLD_Obj *parent_obj;
+
+ /** The name of the assigned variable.
+ */
+ string varname;
+
+ /** A string that an assigned variable will be set to, if this object
+ * is activated.
+ */
+ string varvalue;
+
+ /** This variable holds the old value of the assigned variable to do an
+ * deactivate.
+ */
+ string oldvalue;
+
+ /** If this bool variable is set true, varvalue will be concatenated to
+ * the assigned variables value.
+ */
+ bool varaddflag;
+
+ /** A string that will be executed using:
+ * /bin/sh -c "execstr"
+ */
+ string execstr;
+
+ /** Flag indicating whether to kill the childs upon exiting r not
+ * true: kill
+ * false: do not kill it
+ */
+ bool killchilds;
+
+ /** The pid of the executed command
+ */
+ pid_t execpid;
+
+ /** An image that will be displayed (currently only in a qt button)
+ */
+ string imagestr;
+
+ /** A fontname for the text in qt list
+ */
+ string fontname;
+
+ /** A backgroungcolor for the text (doesn't work now)
+ */
+ string bg_color;
+
+ /** A foregroungcolor for the text
+ * (at the moment only in button and listitem)
+ */
+ string fg_color;
+
+ /** The fontsize
+ */
+ int fontsize;
+
+ /** Indicates if the object is disabled.
+ */
+ bool is_disabled;
+
+ /** Indicates that the imagestr contains an animated image
+ */
+ bool is_movie;
+
+ /** Indicates that the object was created and is visible
+ */
+ bool is_created;
+
+};
+#endif
diff --git a/dldialog/src/dld_out.cc b/dldialog/src/dld_out.cc
new file mode 100644
index 0000000..e47577b
--- /dev/null
+++ b/dldialog/src/dld_out.cc
@@ -0,0 +1,51 @@
+#include "dld_out.h"
+#include "dld_lib.h"
+
+DLD_Out::DLD_Out(const DLD_Out& cp)
+{
+ init(cp);
+}
+
+DLD_Out::~DLD_Out()
+{
+ DLDdbg << "Out " << path << " destructed" << endl;
+ flush();
+}
+
+DLD_Out::DLD_Out(const string& _path)
+{
+ DLDdbg << "Out " << _path << " constructed" << endl;
+ counter = new int;
+ (*counter) = 1;
+ out = new ofstream;
+ out->open(_path.c_str());
+ path = _path;
+}
+
+void DLD_Out::init(const DLD_Out& cp) const
+{
+ DLD_Out *pThis = const_cast<DLD_Out*>(this);
+ pThis->out = cp.out;
+ pThis->counter = cp.counter;
+ (*pThis->counter)++;
+ pThis->path = cp.path;
+ DLDdbg << "Out " << path << " copied" << endl;
+}
+
+void DLD_Out::flush() const
+{
+ if(counter) {
+ (*counter)--;
+ if((*counter) == 0) {
+ DLD_Out *pThis = const_cast<DLD_Out*>(this);
+ DLDdbg << "Out " << path << " closed" << endl;
+ out->close();
+ unlink(path.c_str());
+ delete out;
+ delete counter;
+ pThis->out = 0;
+ pThis->counter = 0;
+ }
+ }
+}
+
diff --git a/dldialog/src/dld_out.h b/dldialog/src/dld_out.h
new file mode 100644
index 0000000..7921534
--- /dev/null
+++ b/dldialog/src/dld_out.h
@@ -0,0 +1,85 @@
+/******************************************************************************
+**
+** $Id: dld_out.h,v 1.1 1999/04/18 20:59:35 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_OUT_H
+#define DLD_GUI_OUT_H
+
+#include <sys/types.h>
+#include <fstream.h> // for ifstream
+#include <unistd.h>
+#include <string>
+
+/**
+ * Output pipe class.
+ * It opens a pipe and closes it after all copies are deleted.
+ * @short Output pipe class.
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_Out {
+public:
+ /**
+ * Normal Constructor.
+ * @param path The path to the output pipe.
+ */
+ DLD_Out(const string& path);
+
+ /**
+ * Copy Constructor.
+ * @param copy The DLD_Out to create a copy from.
+ */
+ DLD_Out(const DLD_Out & copy);
+
+ /**
+ * Default destructor.
+ * Closes the pipe only if there are no copies and deletes the file.
+ */
+ ~DLD_Out();
+
+ /** Create a copy from another DLD_Out.
+ * @param copy The DLD_Out to create a copy from.
+ */
+ void init(const DLD_Out & copy) const;
+
+ /** Closes the pipe only if there are no copies and deletes the file.
+ */
+ void flush() const;
+
+ /** The output stream.
+ */
+ ofstream *out;
+
+private:
+ /** The internal counter.
+ */
+ int *counter;
+
+ /** The path to the pipe.
+ */
+ string path;
+};
+
+#endif
diff --git a/dldialog/src/dld_parser.h b/dldialog/src/dld_parser.h
new file mode 100644
index 0000000..134ba97
--- /dev/null
+++ b/dldialog/src/dld_parser.h
@@ -0,0 +1,89 @@
+/**-*- C++ -*-*****************************************************************
+**
+** $Id: dld_parser.h,v 1.7 1999/01/29 14:15:25 saturn Exp $
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+
+#ifndef DLD_PARSER_H
+#define DLD_PARSER_H
+
+#include <string>
+
+#undef YYLMAX
+#define YYLMAX (1024*32)
+
+/// store actually read line hier
+extern char DLD_line[YYLMAX];
+
+/// linenumber and position
+extern long DLD_lineno, DLD_linepos;
+
+/// length of line
+extern int yyleng;
+
+/// parse function
+int yyparse (void);
+
+extern int DLD_run;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * C definitions
+ */
+#include <stdio.h>
+ /// lexical analysis
+ int yylex (void);
+
+ /// file id for input
+ extern FILE *yyin;
+
+ /// function to call on a parsing error
+ int yyerror (char *s);
+
+
+#ifdef __cplusplus
+}
+// C++ declarations
+
+#include <iostream.h>
+#include <exception>
+
+/// global dldialog parse function
+int dld_parse ();
+
+/// Internal error variable
+extern int DLD_error;
+
+/**
+ * Parse error exception.
+ * @short Parse error exception.
+ * @author Harald Hoyer <HarryH@Royal.Net>
+ */
+class DLD_Parse_Error : public exception {
+};
+
+/**
+ * Pipe error exception.
+ * @short Pipe error exception.
+ * @author Harald Hoyer <HarryH@Royal.Net>
+ */
+class DLD_Pipe_Error : public exception {
+};
+
+struct YYSTYPE {
+ string dld_string;
+};
+
+#endif
+
+#endif
diff --git a/dldialog/src/dld_parser_lex.cc b/dldialog/src/dld_parser_lex.cc
new file mode 100644
index 0000000..b4678dc
--- /dev/null
+++ b/dldialog/src/dld_parser_lex.cc
@@ -0,0 +1,2504 @@
+/* A lexical scanner generated by flex */
+
+/* Scanner skeleton version:
+ * $Header: /home/harald/cvsroot/dldialog/src/dld_parser_lex.cc,v 1.23 2000/03/15 20:02:15 harald Exp $
+ */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+
+#include <stdio.h>
+
+
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
+#endif
+#endif
+
+
+#ifdef __cplusplus
+
+#include <stdlib.h>
+#include <unistd.h>
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else /* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_PROTOS
+#define YY_USE_CONST
+
+#endif /* __STDC__ */
+#endif /* ! __cplusplus */
+
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index. If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN yy_start = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START ((yy_start - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#define YY_BUF_SIZE 16384
+
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+
+extern int yyleng;
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator). This
+ * avoids problems with code like:
+ *
+ * if ( condition_holds )
+ * yyless( 5 );
+ * else
+ * do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ *yy_cp = yy_hold_char; \
+ YY_RESTORE_YY_MORE_OFFSET \
+ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ } \
+ while ( 0 )
+
+#define unput(c) yyunput( c, yytext_ptr )
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+typedef unsigned int yy_size_t;
+
+
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ yy_size_t yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+ };
+
+static YY_BUFFER_STATE yy_current_buffer = 0;
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ */
+#define YY_CURRENT_BUFFER yy_current_buffer
+
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+
+
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 1; /* whether we need to initialize */
+static int yy_start = 0; /* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart YY_PROTO(( FILE *input_file ));
+
+void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
+void yy_load_buffer_state YY_PROTO(( void ));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
+void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+
+YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
+static void yy_flex_free YY_PROTO(( void * ));
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_is_interactive = is_interactive; \
+ }
+
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_at_bol = at_bol; \
+ }
+
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+
+
+#define YY_USES_REJECT
+typedef unsigned char YY_CHAR;
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+typedef int yy_state_type;
+extern char *yytext;
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state YY_PROTO(( void ));
+static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
+static int yy_get_next_buffer YY_PROTO(( void ));
+static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+ yytext_ptr = yy_bp; \
+ yyleng = (int) (yy_cp - yy_bp); \
+ yy_hold_char = *yy_cp; \
+ *yy_cp = '\0'; \
+ yy_c_buf_p = yy_cp;
+
+#define YY_NUM_RULES 63
+#define YY_END_OF_BUFFER 64
+static yyconst short int yy_acclist[280] =
+ { 0,
+ 64, 62, 63, 56, 62, 63, 57, 63, 62, 63,
+ 62, 63, 62, 63, 62, 63, 58, 62, 63, 59,
+ 62, 63, 62, 63, 60, 62, 63, 61, 62, 63,
+ 62, 63,16407, 62, 63,16407, 62, 63,16407, 62,
+ 63,16407, 62, 63,16407, 62, 63,16407, 62, 63,
+ 16407, 62, 63,16407, 62, 63,16407, 62, 63,16407,
+ 62, 63,16407, 62, 63, 62, 63, 62, 63, 62,
+ 63, 56, 47, 54, 48,16407, 8215,16407,16407,16407,
+ 16407,16407,16407,16407,16407,16407,16407,16407,16407,16407,
+ 16407,16407,16407, 49, 50, 55,16407,16407,16407,16407,
+
+ 16407,16407,16407,16407,16407,16407,16407,16407,16407,16407,
+ 16407,16407,16407,16407, 5, 5,16407,16407,16407,16407,
+ 16407,16407,16407,16407,16407,16407,16407, 4, 4,16407,
+ 44, 45, 33,16407,16407,16407,16407,16407,16407,16407,
+ 3, 3,16407,16407,16407, 10, 10,16407,16407,16407,
+ 16407,16407, 16, 16,16407, 26, 25, 24,16407,16407,
+ 16407,16407,16407,16407,16407,16407,16407, 18, 18, 21,
+ 21, 19, 19,16407,16407,16407, 22, 22,16407,16407,
+ 16407, 27, 30, 38, 42, 28, 41, 43, 17, 17,
+ 16407,16407,16407,16407, 2, 2,16407,16407,16407,16407,
+
+ 16407,16407,16407,16407,16407,16407, 39, 40, 29, 36,
+ 16407,16407,16407,16407,16407,16407,16407,16407,16407,16407,
+ 16407,16407,16407, 20, 20, 31, 37, 35, 34, 52,
+ 16407,16407, 12, 12,16407,16407,16407,16407, 52, 11,
+ 11,16407, 14, 14,16407,16407, 46, 32, 50, 52,
+ 51,16407, 6, 6, 13, 13,16407,16407, 51, 15,
+ 15,16407, 8, 8, 50, 51, 53,16407, 53,16407,
+ 16407, 50, 53, 7, 7, 1, 1, 9, 9
+ } ;
+
+static yyconst short int yy_accept[377] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 2, 4, 7,
+ 9, 11, 13, 15, 17, 20, 23, 25, 28, 31,
+ 34, 37, 40, 43, 46, 49, 52, 55, 58, 61,
+ 64, 66, 68, 70, 72, 73, 73, 74, 74, 74,
+ 75, 75, 76, 76, 76, 76, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
+ 90, 91, 92, 93, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 95, 95, 96, 96, 96, 96, 96, 96, 96, 97,
+ 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
+
+ 107, 108, 109, 110, 111, 112, 113, 113, 113, 113,
+ 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
+ 113, 113, 113, 113, 113, 113, 113, 113, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 131, 132, 132,
+ 132, 132, 133, 133, 133, 133, 133, 133, 133, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 135, 136, 137, 138, 139, 140, 141,
+ 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, 156, 157, 157, 157, 157, 157,
+
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 158, 158, 158, 159, 159, 159, 159, 159, 159, 160,
+ 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
+ 181, 182, 182, 183, 184, 185, 186, 187, 187, 187,
+ 187, 187, 187, 187, 187, 187, 188, 189, 189, 189,
+ 189, 189, 189, 189, 190, 191, 192, 193, 194, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 207, 207, 207, 207, 208, 208, 209, 210, 210,
+ 210, 211, 211, 211, 211, 211, 211, 211, 212, 213,
+
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 226, 227, 228, 229, 229, 230, 230,
+ 230, 230, 230, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 249, 249, 251, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 265, 267, 268, 269, 270, 271, 272, 274, 275,
+ 276, 277, 278, 279, 280, 280
+ } ;
+
+static yyconst int yy_ec[256] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 1, 4, 5, 1, 1, 1, 6, 1,
+ 1, 1, 1, 1, 7, 1, 8, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 1, 10, 1,
+ 11, 1, 1, 1, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 13, 12, 12, 14, 12, 15, 16, 17, 18,
+
+ 19, 20, 21, 22, 23, 12, 24, 25, 26, 27,
+ 28, 29, 12, 30, 31, 32, 33, 34, 35, 36,
+ 12, 37, 38, 1, 39, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1
+ } ;
+
+static yyconst int yy_meta[40] =
+ { 0,
+ 1, 2, 3, 1, 1, 1, 4, 1, 2, 5,
+ 6, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 5, 5
+ } ;
+
+static yyconst short int yy_base[387] =
+ { 0,
+ 0, 38, 77, 0, 116, 155, 887, 1136, 881, 1136,
+ 3, 866, 6, 855, 1136, 1136, 832, 1136, 1136, 11,
+ 12, 167, 48, 19, 13, 126, 49, 168, 169, 18,
+ 183, 813, 217, 255, 818, 48, 1136, 0, 814, 1136,
+ 51, 1136, 0, 812, 782, 56, 127, 1136, 128, 211,
+ 219, 221, 133, 174, 234, 226, 239, 249, 259, 260,
+ 265, 270, 275, 281, 767, 752, 742, 726, 47, 726,
+ 719, 5, 716, 41, 700, 717, 113, 716, 681, 1136,
+ 693, 1136, 675, 674, 125, 164, 161, 683, 1136, 666,
+ 289, 294, 320, 302, 295, 313, 324, 326, 330, 331,
+
+ 341, 346, 351, 352, 366, 369, 641, 375, 612, 126,
+ 379, 608, 145, 603, 596, 600, 384, 587, 561, 567,
+ 536, 529, 524, 170, 524, 530, 40, 169, 382, 388,
+ 213, 1136, 405, 413, 440, 426, 378, 389, 413, 470,
+ 429, 418, 439, 264, 1136, 508, 437, 1136, 523, 509,
+ 480, 1136, 488, 474, 478, 484, 478, 473, 1136, 466,
+ 463, 452, 460, 437, 459, 439, 444, 475, 423, 457,
+ 428, 418, 464, 500, 473, 484, 503, 510, 504, 296,
+ 1136, 530, 540, 542, 359, 1136, 532, 536, 540, 563,
+ 558, 389, 1136, 565, 1136, 427, 584, 588, 597, 601,
+
+ 603, 423, 409, 407, 389, 392, 380, 368, 337, 1136,
+ 606, 615, 1136, 345, 331, 217, 326, 38, 618, 615,
+ 632, 633, 641, 627, 651, 650, 660, 423, 1136, 528,
+ 1136, 559, 1136, 593, 659, 666, 574, 1136, 670, 675,
+ 676, 277, 1136, 1136, 1136, 1136, 1136, 276, 253, 706,
+ 260, 708, 711, 245, 234, 1136, 1136, 717, 108, 201,
+ 225, 209, 205, 586, 1136, 698, 705, 706, 709, 636,
+ 1136, 722, 746, 750, 752, 756, 752, 758, 755, 759,
+ 789, 192, 791, 793, 1136, 795, 1136, 1136, 173, 804,
+ 1136, 300, 121, 363, 28, 4, 806, 793, 804, 816,
+
+ 820, 821, 830, 839, 857, 862, 849, 872, 859, 862,
+ 660, 1136, 882, 1136, 1136, 1136, 895, 1136, 287, 304,
+ 933, 3, 906, 1136, 887, 921, 694, 1136, 927, 895,
+ 921, 939, 732, 757, 1136, 944, 777, 1136, 936, 959,
+ 1136, 1136, 314, 997, 1136, 971, 1136, 974, 800, 1136,
+ 802, 1136, 977, 971, 839, 851, 1136, 977, 875, 1136,
+ 1035, 1136, 1136, 982, 911, 1009, 1015, 1136, 917, 1136,
+ 984, 1136, 1012, 1136, 1136, 1074, 1080, 1086, 1092, 1098,
+ 1103, 1108, 1112, 1117, 1123, 1129
+ } ;
+
+static yyconst short int yy_def[387] =
+ { 0,
+ 376, 376, 375, 3, 377, 377, 375, 375, 375, 375,
+ 378, 379, 380, 375, 375, 375, 375, 375, 375, 381,
+ 381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
+ 375, 382, 383, 383, 375, 378, 375, 384, 379, 375,
+ 380, 375, 385, 386, 375, 375, 381, 375, 381, 381,
+ 381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
+ 381, 381, 381, 381, 375, 375, 375, 375, 375, 375,
+ 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
+ 382, 375, 34, 34, 34, 378, 380, 386, 375, 375,
+ 381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
+
+ 381, 381, 381, 381, 93, 381, 375, 375, 375, 375,
+ 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
+ 375, 375, 375, 375, 375, 375, 34, 375, 381, 381,
+ 375, 375, 381, 381, 381, 93, 135, 135, 135, 93,
+ 135, 135, 135, 375, 375, 93, 375, 375, 375, 375,
+ 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
+ 375, 375, 375, 375, 375, 375, 375, 375, 375, 34,
+ 375, 375, 135, 135, 135, 135, 135, 135, 135, 375,
+ 375, 93, 93, 93, 375, 375, 135, 135, 135, 93,
+ 135, 375, 375, 135, 375, 375, 375, 375, 375, 375,
+
+ 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
+ 375, 375, 375, 375, 34, 34, 375, 375, 93, 135,
+ 135, 135, 135, 93, 135, 135, 135, 375, 375, 375,
+ 375, 375, 375, 135, 135, 135, 375, 375, 135, 135,
+ 135, 375, 375, 375, 375, 375, 375, 375, 375, 375,
+ 375, 375, 375, 375, 375, 375, 375, 375, 34, 34,
+ 375, 375, 375, 375, 375, 135, 135, 135, 135, 375,
+ 375, 135, 381, 381, 381, 381, 135, 135, 135, 135,
+ 93, 375, 375, 375, 375, 375, 375, 375, 375, 375,
+ 375, 34, 34, 34, 375, 375, 375, 135, 135, 93,
+
+ 135, 135, 135, 135, 93, 93, 135, 93, 135, 135,
+ 375, 375, 375, 375, 375, 375, 375, 375, 34, 34,
+ 34, 375, 375, 375, 135, 93, 375, 375, 93, 135,
+ 135, 93, 375, 375, 375, 93, 375, 375, 135, 93,
+ 375, 375, 34, 34, 375, 375, 375, 135, 375, 375,
+ 375, 375, 93, 135, 375, 375, 375, 135, 375, 375,
+ 34, 375, 375, 93, 375, 93, 93, 375, 375, 375,
+ 375, 375, 375, 375, 0, 375, 375, 375, 375, 375,
+ 375, 375, 375, 375, 375, 375
+ } ;
+
+static yyconst short int yy_nxt[1176] =
+ { 0,
+ 375, 9, 10, 11, 12, 13, 37, 14, 375, 15,
+ 16, 42, 46, 46, 46, 38, 375, 17, 43, 46,
+ 46, 48, 48, 48, 49, 49, 49, 56, 48, 48,
+ 116, 49, 49, 117, 346, 323, 64, 18, 19, 9,
+ 10, 11, 12, 13, 50, 14, 55, 15, 16, 46,
+ 46, 37, 262, 170, 322, 17, 42, 46, 48, 48,
+ 38, 49, 49, 43, 83, 263, 48, 111, 119, 112,
+ 53, 59, 54, 120, 113, 18, 19, 8, 9, 10,
+ 11, 12, 13, 8, 14, 8, 15, 16, 20, 20,
+ 20, 20, 21, 22, 23, 20, 24, 25, 20, 26,
+
+ 20, 27, 28, 20, 20, 20, 29, 20, 30, 20,
+ 20, 20, 20, 20, 18, 19, 8, 9, 10, 11,
+ 12, 13, 31, 14, 32, 15, 16, 46, 46, 46,
+ 292, 123, 83, 34, 46, 124, 48, 48, 48, 49,
+ 49, 49, 127, 48, 150, 83, 49, 95, 151, 83,
+ 320, 57, 58, 18, 19, 8, 9, 10, 11, 12,
+ 13, 31, 14, 32, 15, 16, 42, 37, 46, 46,
+ 46, 154, 34, 43, 155, 46, 38, 48, 48, 48,
+ 49, 49, 49, 62, 48, 171, 60, 49, 51, 317,
+ 166, 96, 18, 19, 52, 61, 63, 65, 66, 172,
+
+ 67, 68, 69, 70, 71, 72, 167, 73, 74, 75,
+ 313, 76, 46, 77, 46, 293, 78, 79, 82, 82,
+ 46, 48, 46, 48, 49, 83, 82, 46, 294, 48,
+ 84, 48, 49, 297, 49, 46, 48, 92, 296, 49,
+ 46, 83, 91, 295, 48, 93, 94, 49, 260, 48,
+ 46, 290, 49, 99, 82, 82, 82, 82, 98, 48,
+ 46, 46, 49, 97, 82, 46, 46, 289, 84, 48,
+ 48, 46, 49, 49, 48, 48, 46, 100, 49, 85,
+ 48, 286, 46, 49, 284, 48, 102, 104, 49, 101,
+ 46, 48, 82, 82, 49, 46, 46, 46, 103, 48,
+
+ 283, 282, 49, 46, 48, 48, 48, 49, 49, 105,
+ 130, 83, 48, 343, 46, 49, 106, 133, 319, 134,
+ 129, 131, 132, 48, 83, 46, 135, 46, 83, 132,
+ 48, 46, 46, 49, 48, 344, 48, 49, 83, 49,
+ 48, 48, 46, 49, 49, 361, 137, 46, 261, 136,
+ 138, 48, 46, 46, 49, 259, 48, 132, 132, 49,
+ 46, 48, 48, 139, 49, 49, 258, 144, 145, 48,
+ 46, 255, 140, 142, 143, 145, 148, 148, 141, 48,
+ 152, 152, 49, 46, 148, 159, 159, 83, 152, 46,
+ 46, 321, 48, 159, 47, 49, 182, 254, 48, 48,
+
+ 146, 49, 253, 145, 145, 47, 46, 183, 47, 173,
+ 252, 174, 148, 148, 46, 48, 152, 152, 49, 47,
+ 251, 159, 159, 48, 46, 250, 49, 180, 181, 47,
+ 249, 47, 175, 48, 47, 181, 190, 248, 195, 195,
+ 176, 46, 242, 47, 184, 188, 195, 47, 47, 218,
+ 48, 189, 217, 49, 214, 47, 177, 47, 178, 47,
+ 210, 210, 212, 181, 181, 211, 191, 209, 210, 47,
+ 179, 185, 186, 215, 195, 195, 213, 213, 208, 186,
+ 47, 83, 47, 207, 213, 206, 205, 216, 222, 47,
+ 219, 47, 187, 204, 47, 223, 210, 210, 203, 202,
+
+ 47, 201, 47, 47, 224, 200, 199, 186, 186, 192,
+ 193, 198, 213, 213, 47, 220, 47, 193, 47, 47,
+ 47, 47, 47, 194, 221, 197, 47, 225, 47, 46,
+ 47, 228, 229, 47, 47, 227, 226, 196, 48, 229,
+ 47, 230, 231, 232, 233, 193, 193, 169, 47, 231,
+ 47, 233, 47, 168, 47, 165, 47, 235, 47, 164,
+ 46, 163, 47, 234, 237, 238, 47, 229, 229, 48,
+ 47, 236, 238, 239, 47, 46, 47, 231, 231, 233,
+ 233, 47, 240, 47, 48, 243, 243, 46, 47, 244,
+ 244, 162, 241, 243, 161, 47, 48, 244, 245, 245,
+
+ 238, 238, 246, 246, 247, 247, 245, 256, 256, 47,
+ 246, 276, 247, 160, 158, 256, 257, 257, 157, 264,
+ 265, 243, 243, 47, 257, 244, 244, 265, 270, 271,
+ 156, 47, 153, 47, 245, 245, 271, 46, 246, 246,
+ 247, 247, 149, 256, 256, 47, 48, 266, 47, 47,
+ 47, 47, 257, 257, 267, 265, 265, 47, 147, 47,
+ 268, 46, 47, 47, 271, 271, 47, 47, 47, 47,
+ 48, 47, 269, 272, 274, 47, 47, 277, 47, 128,
+ 47, 47, 47, 273, 278, 89, 47, 275, 47, 47,
+ 47, 47, 47, 47, 47, 46, 47, 280, 83, 83,
+
+ 47, 81, 279, 126, 48, 47, 47, 285, 285, 287,
+ 287, 281, 288, 288, 47, 285, 47, 287, 291, 291,
+ 288, 47, 47, 47, 47, 47, 291, 301, 47, 298,
+ 125, 122, 121, 46, 118, 299, 47, 115, 47, 47,
+ 302, 300, 48, 285, 285, 287, 287, 46, 288, 288,
+ 114, 46, 47, 46, 291, 291, 48, 46, 46, 303,
+ 48, 110, 48, 49, 109, 49, 48, 48, 307, 49,
+ 47, 47, 108, 47, 47, 47, 47, 47, 46, 304,
+ 305, 306, 47, 308, 107, 47, 309, 48, 47, 310,
+ 311, 312, 314, 314, 315, 315, 316, 316, 312, 90,
+
+ 314, 46, 315, 46, 316, 318, 318, 324, 324, 47,
+ 48, 47, 48, 318, 89, 324, 40, 327, 328, 35,
+ 47, 81, 47, 47, 325, 328, 312, 312, 314, 314,
+ 315, 315, 316, 316, 47, 326, 47, 47, 47, 47,
+ 46, 318, 318, 324, 324, 329, 47, 330, 331, 48,
+ 47, 47, 46, 328, 328, 47, 45, 47, 333, 324,
+ 47, 48, 44, 334, 335, 47, 324, 47, 40, 47,
+ 332, 335, 336, 337, 338, 47, 46, 47, 47, 47,
+ 47, 338, 35, 341, 341, 48, 375, 375, 375, 47,
+ 339, 341, 47, 340, 324, 324, 342, 342, 375, 335,
+
+ 335, 375, 375, 47, 342, 47, 375, 347, 347, 338,
+ 338, 47, 46, 47, 348, 347, 375, 47, 46, 341,
+ 341, 48, 349, 350, 375, 47, 353, 48, 351, 352,
+ 350, 375, 342, 342, 345, 345, 352, 47, 375, 47,
+ 355, 347, 345, 347, 347, 356, 357, 354, 347, 375,
+ 375, 47, 47, 357, 47, 375, 375, 83, 350, 350,
+ 359, 360, 375, 358, 352, 352, 47, 375, 360, 375,
+ 345, 345, 363, 363, 375, 375, 347, 347, 365, 363,
+ 363, 357, 357, 369, 370, 46, 363, 47, 366, 47,
+ 47, 370, 47, 47, 48, 47, 360, 360, 362, 362,
+
+ 364, 47, 375, 367, 47, 375, 362, 47, 363, 363,
+ 371, 372, 375, 46, 363, 363, 373, 374, 372, 370,
+ 370, 83, 48, 375, 374, 375, 375, 375, 375, 375,
+ 375, 375, 375, 375, 362, 362, 368, 368, 375, 375,
+ 375, 375, 375, 375, 368, 375, 372, 372, 375, 375,
+ 375, 375, 374, 374, 375, 375, 375, 375, 375, 83,
+ 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
+ 375, 375, 368, 368, 8, 8, 8, 8, 8, 8,
+ 33, 33, 33, 33, 33, 33, 36, 36, 36, 36,
+ 36, 36, 39, 39, 39, 39, 39, 39, 41, 41,
+
+ 41, 41, 41, 41, 47, 375, 47, 375, 47, 80,
+ 80, 375, 80, 83, 83, 83, 83, 86, 86, 375,
+ 86, 86, 86, 87, 87, 375, 87, 87, 87, 88,
+ 88, 88, 88, 88, 88, 7, 375, 375, 375, 375,
+ 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
+ 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
+ 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
+ 375, 375, 375, 375, 375
+ } ;
+
+static yyconst short int yy_chk[1176] =
+ { 0,
+ 0, 1, 1, 1, 1, 1, 11, 1, 0, 1,
+ 1, 13, 20, 21, 25, 11, 0, 1, 13, 30,
+ 24, 20, 21, 25, 20, 21, 25, 25, 30, 24,
+ 72, 30, 24, 72, 322, 296, 30, 1, 1, 2,
+ 2, 2, 2, 2, 21, 2, 24, 2, 2, 23,
+ 27, 36, 218, 127, 295, 2, 41, 46, 23, 27,
+ 36, 23, 27, 41, 127, 218, 46, 69, 74, 69,
+ 23, 27, 23, 74, 69, 2, 2, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 26, 47, 49,
+ 259, 77, 259, 5, 53, 77, 26, 47, 49, 26,
+ 47, 49, 85, 53, 110, 293, 53, 53, 110, 85,
+ 293, 26, 26, 5, 5, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 87, 86, 22, 28,
+ 29, 113, 6, 87, 113, 54, 86, 22, 28, 29,
+ 22, 28, 29, 29, 54, 128, 28, 54, 22, 289,
+ 124, 54, 6, 6, 22, 28, 29, 31, 31, 128,
+
+ 31, 31, 31, 31, 31, 31, 124, 31, 31, 31,
+ 282, 31, 50, 31, 131, 260, 31, 31, 33, 33,
+ 51, 50, 52, 131, 50, 260, 33, 56, 260, 51,
+ 33, 52, 51, 263, 52, 55, 56, 51, 262, 56,
+ 57, 216, 50, 261, 55, 52, 52, 55, 216, 57,
+ 58, 255, 57, 57, 33, 33, 34, 34, 56, 58,
+ 59, 60, 58, 55, 34, 144, 61, 254, 34, 59,
+ 60, 62, 59, 60, 144, 61, 63, 58, 61, 34,
+ 62, 251, 64, 62, 249, 63, 60, 62, 63, 59,
+ 91, 64, 34, 34, 64, 92, 95, 180, 61, 91,
+
+ 248, 242, 91, 94, 92, 95, 180, 92, 95, 63,
+ 92, 319, 94, 319, 96, 94, 64, 94, 292, 95,
+ 91, 93, 93, 96, 292, 97, 96, 98, 320, 93,
+ 93, 99, 100, 93, 97, 320, 98, 97, 343, 98,
+ 99, 100, 101, 99, 100, 343, 98, 102, 217, 97,
+ 99, 101, 103, 104, 101, 215, 102, 93, 93, 102,
+ 185, 103, 104, 100, 103, 104, 214, 105, 105, 185,
+ 106, 209, 101, 103, 104, 105, 108, 108, 102, 106,
+ 111, 111, 106, 129, 108, 117, 117, 294, 111, 130,
+ 192, 294, 129, 117, 137, 129, 137, 208, 130, 192,
+
+ 106, 130, 207, 105, 105, 138, 133, 138, 137, 129,
+ 206, 130, 108, 108, 134, 133, 111, 111, 133, 138,
+ 205, 117, 117, 134, 228, 204, 134, 136, 136, 139,
+ 203, 139, 133, 228, 142, 136, 142, 202, 147, 147,
+ 134, 135, 196, 139, 139, 141, 147, 141, 142, 172,
+ 135, 141, 171, 135, 169, 143, 135, 143, 135, 141,
+ 165, 165, 167, 136, 136, 166, 143, 164, 165, 143,
+ 135, 140, 140, 170, 147, 147, 168, 168, 163, 140,
+ 173, 170, 173, 162, 168, 161, 160, 170, 175, 175,
+ 173, 175, 140, 158, 173, 175, 165, 165, 157, 156,
+
+ 176, 155, 176, 175, 176, 154, 153, 140, 140, 146,
+ 146, 151, 168, 168, 176, 174, 174, 146, 174, 177,
+ 179, 177, 179, 146, 174, 150, 178, 177, 178, 230,
+ 174, 182, 182, 177, 179, 179, 178, 149, 230, 182,
+ 178, 183, 183, 184, 184, 146, 146, 126, 187, 183,
+ 187, 184, 188, 125, 188, 123, 189, 188, 189, 122,
+ 232, 121, 187, 187, 190, 190, 188, 182, 182, 232,
+ 189, 189, 190, 191, 191, 237, 191, 183, 183, 184,
+ 184, 194, 191, 194, 237, 197, 197, 264, 191, 198,
+ 198, 120, 194, 197, 119, 194, 264, 198, 199, 199,
+
+ 190, 190, 200, 200, 201, 201, 199, 211, 211, 234,
+ 200, 234, 201, 118, 116, 211, 212, 212, 115, 219,
+ 219, 197, 197, 234, 212, 198, 198, 219, 224, 224,
+ 114, 220, 112, 220, 199, 199, 224, 270, 200, 200,
+ 201, 201, 109, 211, 211, 220, 270, 220, 221, 222,
+ 221, 222, 212, 212, 221, 219, 219, 223, 107, 223,
+ 222, 311, 221, 222, 224, 224, 226, 225, 226, 225,
+ 311, 223, 223, 225, 227, 235, 227, 235, 227, 90,
+ 226, 225, 236, 226, 236, 88, 239, 227, 239, 235,
+ 227, 240, 241, 240, 241, 327, 236, 240, 84, 83,
+
+ 239, 81, 239, 79, 327, 240, 241, 250, 250, 252,
+ 252, 241, 253, 253, 266, 250, 266, 252, 258, 258,
+ 253, 267, 268, 267, 268, 269, 258, 269, 266, 266,
+ 78, 76, 75, 333, 73, 267, 268, 71, 272, 269,
+ 272, 268, 333, 250, 250, 252, 252, 273, 253, 253,
+ 70, 274, 272, 275, 258, 258, 273, 276, 334, 273,
+ 274, 68, 275, 274, 67, 275, 276, 334, 277, 276,
+ 277, 279, 66, 279, 278, 280, 278, 280, 337, 274,
+ 275, 276, 277, 278, 65, 279, 279, 337, 278, 280,
+ 281, 281, 283, 283, 284, 284, 286, 286, 281, 45,
+
+ 283, 349, 284, 351, 286, 290, 290, 297, 297, 298,
+ 349, 298, 351, 290, 44, 297, 39, 300, 300, 35,
+ 299, 32, 299, 298, 298, 300, 281, 281, 283, 283,
+ 284, 284, 286, 286, 299, 299, 301, 302, 301, 302,
+ 355, 290, 290, 297, 297, 301, 303, 302, 303, 355,
+ 301, 302, 356, 300, 300, 304, 17, 304, 305, 305,
+ 303, 356, 14, 306, 306, 307, 305, 307, 12, 304,
+ 304, 306, 307, 308, 308, 309, 359, 309, 310, 307,
+ 310, 308, 9, 313, 313, 359, 7, 0, 0, 309,
+ 309, 313, 310, 310, 305, 305, 317, 317, 0, 306,
+
+ 306, 0, 0, 325, 317, 325, 0, 323, 323, 308,
+ 308, 330, 365, 330, 325, 323, 0, 325, 369, 313,
+ 313, 365, 326, 326, 0, 330, 330, 369, 329, 329,
+ 326, 0, 317, 317, 321, 321, 329, 331, 0, 331,
+ 332, 332, 321, 323, 323, 336, 336, 331, 332, 0,
+ 0, 331, 339, 336, 339, 0, 0, 321, 326, 326,
+ 340, 340, 0, 339, 329, 329, 339, 0, 340, 0,
+ 321, 321, 346, 346, 0, 0, 332, 332, 353, 353,
+ 346, 336, 336, 364, 364, 371, 353, 354, 354, 354,
+ 348, 364, 348, 358, 371, 358, 340, 340, 344, 344,
+
+ 348, 354, 0, 358, 348, 0, 344, 358, 346, 346,
+ 366, 366, 0, 373, 353, 353, 367, 367, 366, 364,
+ 364, 344, 373, 0, 367, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 344, 344, 361, 361, 0, 0,
+ 0, 0, 0, 0, 361, 0, 366, 366, 0, 0,
+ 0, 0, 367, 367, 0, 0, 0, 0, 0, 361,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 361, 361, 376, 376, 376, 376, 376, 376,
+ 377, 377, 377, 377, 377, 377, 378, 378, 378, 378,
+ 378, 378, 379, 379, 379, 379, 379, 379, 380, 380,
+
+ 380, 380, 380, 380, 381, 0, 381, 0, 381, 382,
+ 382, 0, 382, 383, 383, 383, 383, 384, 384, 0,
+ 384, 384, 384, 385, 385, 0, 385, 385, 385, 386,
+ 386, 386, 386, 386, 386, 375, 375, 375, 375, 375,
+ 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
+ 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
+ 375, 375, 375, 375, 375, 375, 375, 375, 375, 375,
+ 375, 375, 375, 375, 375
+ } ;
+
+static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
+static char *yy_full_match;
+static int yy_lp;
+static int yy_looking_for_trail_begin = 0;
+static int yy_full_lp;
+static int *yy_full_state;
+#define YY_TRAILING_MASK 0x2000
+#define YY_TRAILING_HEAD_MASK 0x4000
+#define REJECT \
+{ \
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
+yy_cp = yy_full_match; /* restore poss. backed-over text */ \
+yy_lp = yy_full_lp; /* restore orig. accepting pos. */ \
+yy_state_ptr = yy_full_state; /* restore orig. state */ \
+yy_current_state = *yy_state_ptr; /* restore curr. state */ \
+++yy_lp; \
+goto find_rule; \
+}
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#line 1 "dld_parser_lex.ll"
+#define INITIAL 0
+#line 2 "dld_parser_lex.ll"
+/******************************************************************************
+**
+** $Id: dld_parser_lex.cc,v 1.23 2000/03/15 20:02:15 harald Exp $
+**
+** The Lex File for DLDialog
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#include <string.h>
+#include <errno.h>
+#include <stdio.h>
+#include <libintl.h>
+#include "dldialog.h"
+#include "dld_lib.h"
+#include "dld_parser.h"
+#include "dld_parser_yacc.h"
+
+#undef YY_BUF_SIZE
+#define YY_BUF_SIZE (YYLMAX-1)
+
+#undef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE (YYLMAX-1)
+
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ if ( yy_current_buffer->yy_is_interactive ) \
+ { \
+ int c = '*', n; \
+ for ( n = 0; n < max_size && \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ buf[n] = (char) c; \
+ if ( c == '\n' ) \
+ buf[n++] = (char) c; \
+ if ( c == EOF && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ result = n; \
+ } \
+ else { \
+ buf[0]=0; \
+ if ( (( fgets( buf, max_size, yyin )) == 0) \
+ && ferror( yyin ) && (errno != EAGAIN) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ } \
+ result = strlen(buf); \
+ strncpy(DLD_line, buf, YY_READ_BUF_SIZE); \
+ DLD_linepos=0; \
+ DLD_lineno++; \
+ DLD_line[YY_READ_BUF_SIZE]=0;
+#endif
+
+#define COMMAND 1
+#define ARGS 2
+
+#line 852 "lex.yy.c"
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap YY_PROTO(( void ));
+#else
+extern int yywrap YY_PROTO(( void ));
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+static void yyunput YY_PROTO(( int c, char *buf_ptr ));
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput YY_PROTO(( void ));
+#else
+static int input YY_PROTO(( void ));
+#endif
+#endif
+
+#if YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
+#endif
+
+#else
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
+#endif
+
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include <stdlib.h>
+#endif
+#else
+/* Just try to get by without declaring the routines. This will fail
+ * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+ * or sizeof(void*) != sizeof(int).
+ */
+#endif
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#endif
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ if ( yy_current_buffer->yy_is_interactive ) \
+ { \
+ int c = '*', n; \
+ for ( n = 0; n < max_size && \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ buf[n] = (char) c; \
+ if ( c == '\n' ) \
+ buf[n++] = (char) c; \
+ if ( c == EOF && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ result = n; \
+ } \
+ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
+ && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" );
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL int yylex YY_PROTO(( void ))
+#endif
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+ YY_USER_ACTION
+
+YY_DECL
+ {
+ register yy_state_type yy_current_state;
+ register char *yy_cp, *yy_bp;
+ register int yy_act;
+
+#line 70 "dld_parser_lex.ll"
+
+
+
+/* Commands for dldialog */
+
+#line 1009 "lex.yy.c"
+
+ if ( yy_init )
+ {
+ yy_init = 0;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! yy_start )
+ yy_start = 1; /* first start state */
+
+ if ( ! yyin )
+ yyin = stdin;
+
+ if ( ! yyout )
+ yyout = stdout;
+
+ if ( ! yy_current_buffer )
+ yy_current_buffer =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_load_buffer_state();
+ }
+
+ while ( 1 ) /* loops until end-of-file is reached */
+ {
+ yy_cp = yy_c_buf_p;
+
+ /* Support of yytext. */
+ *yy_cp = yy_hold_char;
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+ yy_current_state = yy_start;
+ yy_state_ptr = yy_state_buf;
+ *yy_state_ptr++ = yy_current_state;
+yy_match:
+ do
+ {
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 376 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ *yy_state_ptr++ = yy_current_state;
+ ++yy_cp;
+ }
+ while ( yy_base[yy_current_state] != 1136 );
+
+yy_find_action:
+ yy_current_state = *--yy_state_ptr;
+ yy_lp = yy_accept[yy_current_state];
+find_rule: /* we branch to this label when backing up */
+ for ( ; ; ) /* until we find what rule we matched */
+ {
+ if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
+ {
+ yy_act = yy_acclist[yy_lp];
+ if ( yy_act & YY_TRAILING_HEAD_MASK ||
+ yy_looking_for_trail_begin )
+ {
+ if ( yy_act == yy_looking_for_trail_begin )
+ {
+ yy_looking_for_trail_begin = 0;
+ yy_act &= ~YY_TRAILING_HEAD_MASK;
+ break;
+ }
+ }
+ else if ( yy_act & YY_TRAILING_MASK )
+ {
+ yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
+ yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
+ }
+ else
+ {
+ yy_full_match = yy_cp;
+ yy_full_state = yy_state_ptr;
+ yy_full_lp = yy_lp;
+ break;
+ }
+ ++yy_lp;
+ goto find_rule;
+ }
+ --yy_cp;
+ yy_current_state = *--yy_state_ptr;
+ yy_lp = yy_accept[yy_current_state];
+ }
+
+ YY_DO_BEFORE_ACTION;
+
+
+do_action: /* This label is used only to access EOF actions. */
+
+
+ switch ( yy_act )
+ { /* beginning of action switch */
+case 1:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 11;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 75 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return (DLD_ENV_END);}
+ YY_BREAK
+case 2:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 6;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 76 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN ARGS; return(DIALOG);}
+ YY_BREAK
+case 3:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 4;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 78 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN ARGS; return(FORM);}
+ YY_BREAK
+case 4:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 3;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 79 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN ARGS; return(ROW);}
+ YY_BREAK
+case 5:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 3;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 80 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN ARGS; return(COL);}
+ YY_BREAK
+case 6:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 9;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 82 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN ARGS; return(CHECKLIST);}
+ YY_BREAK
+case 7:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 11;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 83 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN ARGS; return(CHECKBUTTON);}
+ YY_BREAK
+case 8:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 9;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 85 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN ARGS; return(RADIOLIST);}
+ YY_BREAK
+case 9:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 11;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 86 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN ARGS; return(RADIOBUTTON);}
+ YY_BREAK
+case 10:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 4;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 88 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN ARGS; return(LIST);}
+ YY_BREAK
+case 11:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 8;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 89 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN ARGS; return(LISTITEM);}
+ YY_BREAK
+case 12:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 8;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 91 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN ARGS; return(COMBOBOX);}
+ YY_BREAK
+case 13:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 9;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 92 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN ARGS; return(COMBOITEM);}
+ YY_BREAK
+case 14:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 8;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 94 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN ARGS; return(MENUITEM);}
+ YY_BREAK
+case 15:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 9;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 95 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN ARGS; return(MENUCHECK);}
+ YY_BREAK
+case 16:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 4;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 97 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN ARGS; return(TEXT);}
+ YY_BREAK
+case 17:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 6;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 98 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN ARGS; return(BUTTON);}
+ YY_BREAK
+case 18:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 5;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 99 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN ARGS; return(GAUGE);}
+ YY_BREAK
+case 19:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 5;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 100 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN ARGS; return(INPUT);}
+ YY_BREAK
+case 20:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 7;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 102 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN ARGS; return(TEXTBOX);}
+ YY_BREAK
+case 21:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 5;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 103 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN ARGS; return(IMAGE);}
+ YY_BREAK
+case 22:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 5;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 104 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN ARGS; return(MOVIE);}
+ YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 106 "dld_parser_lex.ll"
+{
+ DLD_linepos+=yyleng;
+ yylval.dld_string=yytext;
+ return(VARIABLE);
+}
+ YY_BREAK
+
+/* Arguments for the commands */
+
+case 24:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 4;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 115 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(VAR); }
+ YY_BREAK
+case 25:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 4;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 116 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(SET); }
+ YY_BREAK
+case 26:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 4;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 117 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(ADD); }
+ YY_BREAK
+case 27:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 5;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 118 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(EXEC); }
+ YY_BREAK
+case 28:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 5;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 119 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(FORK); }
+ YY_BREAK
+case 29:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 6;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 120 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(MULTI); }
+ YY_BREAK
+case 30:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 5;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 121 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(EXIT); }
+ YY_BREAK
+case 31:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 7;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 122 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(GLOBAL); }
+ YY_BREAK
+case 32:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 8;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 123 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(NUMERIC); }
+ YY_BREAK
+case 33:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 3;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 124 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(IP); }
+ YY_BREAK
+case 34:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 7;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 125 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(PASSWD); }
+ YY_BREAK
+case 35:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 7;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 126 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(LENGTH); }
+ YY_BREAK
+case 36:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 6;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 127 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(WIDTH); }
+ YY_BREAK
+case 37:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 7;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 128 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(HEIGHT); }
+ YY_BREAK
+case 38:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 5;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 129 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(FILEARG); }
+ YY_BREAK
+case 39:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 6;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 130 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(IMAGEFILE); }
+ YY_BREAK
+case 40:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 6;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 131 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(MOVIEFILE); }
+ YY_BREAK
+case 41:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 5;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 132 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(SIGN); }
+ YY_BREAK
+case 42:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 5;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 133 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(FONT); }
+ YY_BREAK
+case 43:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 5;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 134 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(SIZE); }
+ YY_BREAK
+case 44:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 3;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 135 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(BG); }
+ YY_BREAK
+case 45:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 3;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 136 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(FG); }
+ YY_BREAK
+case 46:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 8;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 137 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return(DISABLE); }
+ YY_BREAK
+
+/* Overread everything that is quoted with a backslash */
+
+case 47:
+YY_RULE_SETUP
+#line 142 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng;
+ yytext[yyleng-1]=0;
+ if (strlen(&yytext[1])) {
+ textdomain (PACKAGE"-scripts");
+ yylval.dld_string = gettext(&yytext[1]);
+ textdomain (PACKAGE);
+ }
+ else
+ yylval.dld_string = &yytext[1];
+ return(NAME); }
+ YY_BREAK
+case 48:
+YY_RULE_SETUP
+#line 153 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng;
+ yytext[yyleng-1]=0;
+ if (strlen(&yytext[1])) {
+ textdomain (PACKAGE"-scripts");
+ yylval.dld_string = gettext(&yytext[1]);
+ textdomain (PACKAGE);
+ }
+ else
+ yylval.dld_string = &yytext[1];
+ return(NAME);
+}
+ YY_BREAK
+case 49:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 165 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng;
+ yylval.dld_string = yytext;
+ return(NUMBER); }
+ YY_BREAK
+case 50:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 169 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng;
+ yylval.dld_string = yytext;
+ return(VARNAME); }
+ YY_BREAK
+
+/* client - server communication */
+
+case 51:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 9;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 176 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return (DLD_START);}
+ YY_BREAK
+case 52:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 8;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 177 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return (DLD_STOP);}
+ YY_BREAK
+case 53:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 10;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 178 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; BEGIN COMMAND; return (DLD_CLIENT);}
+ YY_BREAK
+
+/* comments and spaces */
+
+case 54:
+YY_RULE_SETUP
+#line 185 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; }
+ YY_BREAK
+case 55:
+YY_RULE_SETUP
+#line 186 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; }
+ YY_BREAK
+case 56:
+YY_RULE_SETUP
+#line 187 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; }
+ YY_BREAK
+case 57:
+YY_RULE_SETUP
+#line 188 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; }
+ YY_BREAK
+
+/* delimeters */
+
+case 58:
+YY_RULE_SETUP
+#line 194 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng;
+ BEGIN COMMAND; return(';'); }
+ YY_BREAK
+case 59:
+YY_RULE_SETUP
+#line 196 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng;
+ BEGIN ARGS; return('='); }
+ YY_BREAK
+case 60:
+YY_RULE_SETUP
+#line 198 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng;
+ BEGIN COMMAND; return('{'); }
+ YY_BREAK
+case 61:
+YY_RULE_SETUP
+#line 200 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng;
+ BEGIN COMMAND; return('}'); }
+ YY_BREAK
+case 62:
+YY_RULE_SETUP
+#line 203 "dld_parser_lex.ll"
+{ DLD_linepos+=yyleng; return yytext[0]; }
+ YY_BREAK
+case 63:
+YY_RULE_SETUP
+#line 204 "dld_parser_lex.ll"
+ECHO;
+ YY_BREAK
+#line 1624 "lex.yy.c"
+ case YY_STATE_EOF(INITIAL):
+ case YY_STATE_EOF(COMMAND):
+ case YY_STATE_EOF(ARGS):
+ yyterminate();
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = yy_hold_char;
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
+ {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed yyin at a new source and called
+ * yylex(). If so, then we have to assure
+ * consistency between yy_current_buffer and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yy_current_buffer->yy_input_file = yyin;
+ yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
+
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state();
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
+
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+
+ if ( yy_next_state )
+ {
+ /* Consume the NUL. */
+ yy_cp = ++yy_c_buf_p;
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
+
+ else
+ {
+ yy_cp = yy_c_buf_p;
+ goto yy_find_action;
+ }
+ }
+
+ else switch ( yy_get_next_buffer() )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ yy_did_buffer_switch_on_eof = 0;
+
+ if ( yywrap() )
+ {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * yytext, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yy_c_buf_p =
+ yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state();
+
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ yy_c_buf_p =
+ &yy_current_buffer->yy_ch_buf[yy_n_chars];
+
+ yy_current_state = yy_get_previous_state();
+
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+ } /* end of yylex */
+
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+
+static int yy_get_next_buffer()
+ {
+ register char *dest = yy_current_buffer->yy_ch_buf;
+ register char *source = yytext_ptr;
+ register int number_to_move, i;
+ int ret_val;
+
+ if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( yy_current_buffer->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+
+ for ( i = 0; i < number_to_move; ++i )
+ *(dest++) = *(source++);
+
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ yy_current_buffer->yy_n_chars = yy_n_chars = 0;
+
+ else
+ {
+ int num_to_read =
+ yy_current_buffer->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+#ifdef YY_USES_REJECT
+ YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
+
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = yy_current_buffer;
+
+ int yy_c_buf_p_offset =
+ (int) (yy_c_buf_p - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ int new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 )
+ b->yy_buf_size += b->yy_buf_size / 8;
+ else
+ b->yy_buf_size *= 2;
+
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ yy_flex_realloc( (void *) b->yy_ch_buf,
+ b->yy_buf_size + 2 );
+ }
+ else
+ /* Can't grow it, we don't own it. */
+ b->yy_ch_buf = 0;
+
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR(
+ "fatal error - scanner input buffer overflow" );
+
+ yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = yy_current_buffer->yy_buf_size -
+ number_to_move - 1;
+#endif
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+ yy_n_chars, num_to_read );
+
+ yy_current_buffer->yy_n_chars = yy_n_chars;
+ }
+
+ if ( yy_n_chars == 0 )
+ {
+ if ( number_to_move == YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ yyrestart( yyin );
+ }
+
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ yy_current_buffer->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ yy_n_chars += number_to_move;
+ yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+ yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+
+ yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+
+ return ret_val;
+ }
+
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+static yy_state_type yy_get_previous_state()
+ {
+ register yy_state_type yy_current_state;
+ register char *yy_cp;
+
+ yy_current_state = yy_start;
+ yy_state_ptr = yy_state_buf;
+ *yy_state_ptr++ = yy_current_state;
+
+ for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+ {
+ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 376 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ *yy_state_ptr++ = yy_current_state;
+ }
+
+ return yy_current_state;
+ }
+
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ * next_state = yy_try_NUL_trans( current_state );
+ */
+
+#ifdef YY_USE_PROTOS
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
+#else
+static yy_state_type yy_try_NUL_trans( yy_current_state )
+yy_state_type yy_current_state;
+#endif
+ {
+ register int yy_is_jam;
+
+ register YY_CHAR yy_c = 1;
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 376 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_is_jam = (yy_current_state == 375);
+ if ( ! yy_is_jam )
+ *yy_state_ptr++ = yy_current_state;
+
+ return yy_is_jam ? 0 : yy_current_state;
+ }
+
+
+#ifndef YY_NO_UNPUT
+#ifdef YY_USE_PROTOS
+static void yyunput( int c, register char *yy_bp )
+#else
+static void yyunput( c, yy_bp )
+int c;
+register char *yy_bp;
+#endif
+ {
+ register char *yy_cp = yy_c_buf_p;
+
+ /* undo effects of setting up yytext */
+ *yy_cp = yy_hold_char;
+
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ { /* need to shift things up to make room */
+ /* +2 for EOB chars. */
+ register int number_to_move = yy_n_chars + 2;
+ register char *dest = &yy_current_buffer->yy_ch_buf[
+ yy_current_buffer->yy_buf_size + 2];
+ register char *source =
+ &yy_current_buffer->yy_ch_buf[number_to_move];
+
+ while ( source > yy_current_buffer->yy_ch_buf )
+ *--dest = *--source;
+
+ yy_cp += (int) (dest - source);
+ yy_bp += (int) (dest - source);
+ yy_current_buffer->yy_n_chars =
+ yy_n_chars = yy_current_buffer->yy_buf_size;
+
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ YY_FATAL_ERROR( "flex scanner push-back overflow" );
+ }
+
+ *--yy_cp = (char) c;
+
+
+ yytext_ptr = yy_bp;
+ yy_hold_char = *yy_cp;
+ yy_c_buf_p = yy_cp;
+ }
+#endif /* ifndef YY_NO_UNPUT */
+
+
+#ifdef __cplusplus
+static int yyinput()
+#else
+static int input()
+#endif
+ {
+ int c;
+
+ *yy_c_buf_p = yy_hold_char;
+
+ if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+ {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ /* This was really a NUL. */
+ *yy_c_buf_p = '\0';
+
+ else
+ { /* need more input */
+ int offset = yy_c_buf_p - yytext_ptr;
+ ++yy_c_buf_p;
+
+ switch ( yy_get_next_buffer() )
+ {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
+
+ /* Reset buffer status. */
+ yyrestart( yyin );
+
+ /* fall through */
+
+ case EOB_ACT_END_OF_FILE:
+ {
+ if ( yywrap() )
+ return EOF;
+
+ if ( ! yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+#ifdef __cplusplus
+ return yyinput();
+#else
+ return input();
+#endif
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yy_c_buf_p = yytext_ptr + offset;
+ break;
+ }
+ }
+ }
+
+ c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
+ *yy_c_buf_p = '\0'; /* preserve yytext */
+ yy_hold_char = *++yy_c_buf_p;
+
+
+ return c;
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yyrestart( FILE *input_file )
+#else
+void yyrestart( input_file )
+FILE *input_file;
+#endif
+ {
+ if ( ! yy_current_buffer )
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_init_buffer( yy_current_buffer, input_file );
+ yy_load_buffer_state();
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+#else
+void yy_switch_to_buffer( new_buffer )
+YY_BUFFER_STATE new_buffer;
+#endif
+ {
+ if ( yy_current_buffer == new_buffer )
+ return;
+
+ if ( yy_current_buffer )
+ {
+ /* Flush out information for old buffer. */
+ *yy_c_buf_p = yy_hold_char;
+ yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+ yy_current_buffer->yy_n_chars = yy_n_chars;
+ }
+
+ yy_current_buffer = new_buffer;
+ yy_load_buffer_state();
+
+ /* We don't actually know whether we did this switch during
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ yy_did_buffer_switch_on_eof = 1;
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_load_buffer_state( void )
+#else
+void yy_load_buffer_state()
+#endif
+ {
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+ yyin = yy_current_buffer->yy_input_file;
+ yy_hold_char = *yy_c_buf_p;
+ }
+
+
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+#else
+YY_BUFFER_STATE yy_create_buffer( file, size )
+FILE *file;
+int size;
+#endif
+ {
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_is_our_buffer = 1;
+
+ yy_init_buffer( b, file );
+
+ return b;
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_delete_buffer( YY_BUFFER_STATE b )
+#else
+void yy_delete_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+ {
+ if ( ! b )
+ return;
+
+ if ( b == yy_current_buffer )
+ yy_current_buffer = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ yy_flex_free( (void *) b->yy_ch_buf );
+
+ yy_flex_free( (void *) b );
+ }
+
+
+#ifndef YY_ALWAYS_INTERACTIVE
+#ifndef YY_NEVER_INTERACTIVE
+extern int isatty YY_PROTO(( int ));
+#endif
+#endif
+
+#ifdef YY_USE_PROTOS
+void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
+#else
+void yy_init_buffer( b, file )
+YY_BUFFER_STATE b;
+FILE *file;
+#endif
+
+
+ {
+ yy_flush_buffer( b );
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+#if YY_ALWAYS_INTERACTIVE
+ b->yy_is_interactive = 1;
+#else
+#if YY_NEVER_INTERACTIVE
+ b->yy_is_interactive = 0;
+#else
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+#endif
+#endif
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_flush_buffer( YY_BUFFER_STATE b )
+#else
+void yy_flush_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+
+ {
+ if ( ! b )
+ return;
+
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yy_at_bol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == yy_current_buffer )
+ yy_load_buffer_state();
+ }
+
+
+#ifndef YY_NO_SCAN_BUFFER
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+#else
+YY_BUFFER_STATE yy_scan_buffer( base, size )
+char *base;
+yy_size_t size;
+#endif
+ {
+ YY_BUFFER_STATE b;
+
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
+ /* They forgot to leave room for the EOB's. */
+ return 0;
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_pos = b->yy_ch_buf = base;
+ b->yy_is_our_buffer = 0;
+ b->yy_input_file = 0;
+ b->yy_n_chars = b->yy_buf_size;
+ b->yy_is_interactive = 0;
+ b->yy_at_bol = 1;
+ b->yy_fill_buffer = 0;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ yy_switch_to_buffer( b );
+
+ return b;
+ }
+#endif
+
+
+#ifndef YY_NO_SCAN_STRING
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
+#else
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst char *yy_str;
+#endif
+ {
+ int len;
+ for ( len = 0; yy_str[len]; ++len )
+ ;
+
+ return yy_scan_bytes( yy_str, len );
+ }
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
+#else
+YY_BUFFER_STATE yy_scan_bytes( bytes, len )
+yyconst char *bytes;
+int len;
+#endif
+ {
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n;
+ int i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = len + 2;
+ buf = (char *) yy_flex_alloc( n );
+ if ( ! buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+ for ( i = 0; i < len; ++i )
+ buf[i] = bytes[i];
+
+ buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+
+ b = yy_scan_buffer( buf, n );
+ if ( ! b )
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+ /* It's okay to grow etc. this buffer, and we should throw it
+ * away when we're done.
+ */
+ b->yy_is_our_buffer = 1;
+
+ return b;
+ }
+#endif
+
+
+#ifndef YY_NO_PUSH_STATE
+#ifdef YY_USE_PROTOS
+static void yy_push_state( int new_state )
+#else
+static void yy_push_state( new_state )
+int new_state;
+#endif
+ {
+ if ( yy_start_stack_ptr >= yy_start_stack_depth )
+ {
+ yy_size_t new_size;
+
+ yy_start_stack_depth += YY_START_STACK_INCR;
+ new_size = yy_start_stack_depth * sizeof( int );
+
+ if ( ! yy_start_stack )
+ yy_start_stack = (int *) yy_flex_alloc( new_size );
+
+ else
+ yy_start_stack = (int *) yy_flex_realloc(
+ (void *) yy_start_stack, new_size );
+
+ if ( ! yy_start_stack )
+ YY_FATAL_ERROR(
+ "out of memory expanding start-condition stack" );
+ }
+
+ yy_start_stack[yy_start_stack_ptr++] = YY_START;
+
+ BEGIN(new_state);
+ }
+#endif
+
+
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state()
+ {
+ if ( --yy_start_stack_ptr < 0 )
+ YY_FATAL_ERROR( "start-condition stack underflow" );
+
+ BEGIN(yy_start_stack[yy_start_stack_ptr]);
+ }
+#endif
+
+
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state()
+ {
+ return yy_start_stack[yy_start_stack_ptr - 1];
+ }
+#endif
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+#ifdef YY_USE_PROTOS
+static void yy_fatal_error( yyconst char msg[] )
+#else
+static void yy_fatal_error( msg )
+char msg[];
+#endif
+ {
+ (void) fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+ }
+
+
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ yytext[yyleng] = yy_hold_char; \
+ yy_c_buf_p = yytext + n; \
+ yy_hold_char = *yy_c_buf_p; \
+ *yy_c_buf_p = '\0'; \
+ yyleng = n; \
+ } \
+ while ( 0 )
+
+
+/* Internal utility routines. */
+
+#ifndef yytext_ptr
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+ {
+ register int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+ }
+#endif
+
+#ifdef YY_NEED_STRLEN
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+ {
+ register int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+ }
+#endif
+
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+ {
+ return (void *) malloc( size );
+ }
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+ {
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return (void *) realloc( (char *) ptr, size );
+ }
+
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+ {
+ free( ptr );
+ }
+
+#if YY_MAIN
+int main()
+ {
+ yylex();
+ return 0;
+ }
+#endif
+#line 204 "dld_parser_lex.ll"
diff --git a/dldialog/src/dld_parser_lex.ll b/dldialog/src/dld_parser_lex.ll
new file mode 100644
index 0000000..cb9e255
--- /dev/null
+++ b/dldialog/src/dld_parser_lex.ll
@@ -0,0 +1,202 @@
+%{/*-*- C++ -*-*/
+/******************************************************************************
+**
+** $Id: dld_parser_lex.ll,v 1.20 1999/04/18 20:59:35 harald Exp $
+**
+** The Lex File for DLDialog
+**
+** 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.
+**
+** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#include <string.h>
+#include <errno.h>
+#include <stdio.h>
+#include <libintl.h>
+#include "dldialog.h"
+#include "dld_lib.h"
+#include "dld_parser.h"
+#include "dld_parser_yacc.h"
+
+#undef YY_BUF_SIZE
+#define YY_BUF_SIZE (YYLMAX-1)
+
+#undef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE (YYLMAX-1)
+
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ if ( yy_current_buffer->yy_is_interactive ) \
+ { \
+ int c = '*', n; \
+ for ( n = 0; n < max_size && \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ buf[n] = (char) c; \
+ if ( c == '\n' ) \
+ buf[n++] = (char) c; \
+ if ( c == EOF && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ result = n; \
+ } \
+ else { \
+ buf[0]=0; \
+ if ( (( fgets( buf, max_size, yyin )) == 0) \
+ && ferror( yyin ) && (errno != EAGAIN) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ } \
+ result = strlen(buf); \
+ strncpy(DLD_line, buf, YY_READ_BUF_SIZE); \
+ DLD_linepos=0; \
+ DLD_lineno++; \
+ DLD_line[YY_READ_BUF_SIZE]=0;
+#endif
+
+%}
+
+%start COMMAND ARGS
+
+letter [a-zA-z]
+alpha [0-9]
+special [_-]
+varname {letter}({letter}|{alpha}|{special})*
+number {alpha}+
+sep [ \t\n\;\{\}]
+
+%%
+
+%{
+/* Commands for dldialog */
+%}
+<COMMAND>"dld_env_end"/{sep} { DLD_linepos+=yyleng; return (DLD_ENV_END);}
+<COMMAND>"dialog"/{sep} { DLD_linepos+=yyleng; BEGIN ARGS; return(DIALOG);}
+
+<COMMAND>"form"/{sep} { DLD_linepos+=yyleng; BEGIN ARGS; return(FORM);}
+<COMMAND>"row"/{sep} { DLD_linepos+=yyleng; BEGIN ARGS; return(ROW);}
+<COMMAND>"col"/{sep} { DLD_linepos+=yyleng; BEGIN ARGS; return(COL);}
+
+<COMMAND>"checklist"/{sep} { DLD_linepos+=yyleng; BEGIN ARGS; return(CHECKLIST);}
+<COMMAND>"checkbutton"/{sep} { DLD_linepos+=yyleng; BEGIN ARGS; return(CHECKBUTTON);}
+
+<COMMAND>"radiolist"/{sep} { DLD_linepos+=yyleng; BEGIN ARGS; return(RADIOLIST);}
+<COMMAND>"radiobutton"/{sep} { DLD_linepos+=yyleng; BEGIN ARGS; return(RADIOBUTTON);}
+
+<COMMAND>"list"/{sep} { DLD_linepos+=yyleng; BEGIN ARGS; return(LIST);}
+<COMMAND>"listitem"/{sep} { DLD_linepos+=yyleng; BEGIN ARGS; return(LISTITEM);}
+
+<COMMAND>"combobox"/{sep} { DLD_linepos+=yyleng; BEGIN ARGS; return(COMBOBOX);}
+<COMMAND>"comboitem"/{sep} { DLD_linepos+=yyleng; BEGIN ARGS; return(COMBOITEM);}
+
+<COMMAND>"menuitem"/{sep} { DLD_linepos+=yyleng; BEGIN ARGS; return(MENUITEM);}
+<COMMAND>"menucheck"/{sep} { DLD_linepos+=yyleng; BEGIN ARGS; return(MENUCHECK);}
+
+<COMMAND>"text"/{sep} { DLD_linepos+=yyleng; BEGIN ARGS; return(TEXT);}
+<COMMAND>"button"/{sep} { DLD_linepos+=yyleng; BEGIN ARGS; return(BUTTON);}
+<COMMAND>"gauge"/{sep} { DLD_linepos+=yyleng; BEGIN ARGS; return(GAUGE);}
+<COMMAND>"input"/{sep} { DLD_linepos+=yyleng; BEGIN ARGS; return(INPUT);}
+
+<COMMAND>"textbox"/{sep} { DLD_linepos+=yyleng; BEGIN ARGS; return(TEXTBOX);}
+<COMMAND>"image"/{sep} { DLD_linepos+=yyleng; BEGIN ARGS; return(IMAGE);}
+<COMMAND>"movie"/{sep} { DLD_linepos+=yyleng; BEGIN ARGS; return(MOVIE);}
+
+<COMMAND>{varname}/[ \t]*= {
+ DLD_linepos+=yyleng;
+ yylval.dld_string=yytext;
+ return(VARIABLE);
+}
+
+%{
+/* Arguments for the commands */
+%}
+<ARGS>"\-var"/{sep} { DLD_linepos+=yyleng; return(VAR); }
+<ARGS>"\-set"/{sep} { DLD_linepos+=yyleng; return(SET); }
+<ARGS>"\-add"/{sep} { DLD_linepos+=yyleng; return(ADD); }
+<ARGS>"\-exec"/{sep} { DLD_linepos+=yyleng; return(EXEC); }
+<ARGS>"\-fork"/{sep} { DLD_linepos+=yyleng; return(FORK); }
+<ARGS>"\-multi"/{sep} { DLD_linepos+=yyleng; return(MULTI); }
+<ARGS>"\-exit"/{sep} { DLD_linepos+=yyleng; return(EXIT); }
+<ARGS>"\-global"/{sep} { DLD_linepos+=yyleng; return(GLOBAL); }
+<ARGS>"\-numeric"/{sep} { DLD_linepos+=yyleng; return(NUMERIC); }
+<ARGS>"\-ip"/{sep} { DLD_linepos+=yyleng; return(IP); }
+<ARGS>"\-passwd"/{sep} { DLD_linepos+=yyleng; return(PASSWD); }
+<ARGS>"\-length"/{sep} { DLD_linepos+=yyleng; return(LENGTH); }
+<ARGS>"\-width"/{sep} { DLD_linepos+=yyleng; return(WIDTH); }
+<ARGS>"\-height"/{sep} { DLD_linepos+=yyleng; return(HEIGHT); }
+<ARGS>"\-file"/{sep} { DLD_linepos+=yyleng; return(FILEARG); }
+<ARGS>"\-image"/{sep} { DLD_linepos+=yyleng; return(IMAGEFILE); }
+<ARGS>"\-movie"/{sep} { DLD_linepos+=yyleng; return(MOVIEFILE); }
+<ARGS>"\-sign"/{sep} { DLD_linepos+=yyleng; return(SIGN); }
+<ARGS>"\-font"/{sep} { DLD_linepos+=yyleng; return(FONT); }
+<ARGS>"\-size"/{sep} { DLD_linepos+=yyleng; return(SIZE); }
+<ARGS>"\-bg"/{sep} { DLD_linepos+=yyleng; return(BG); }
+<ARGS>"\-fg"/{sep} { DLD_linepos+=yyleng; return(FG); }
+<ARGS>"\-disable"/{sep} { DLD_linepos+=yyleng; return(DISABLE); }
+
+%{
+/* Overread everything that is quoted with a backslash */
+%}
+\"([^\\\"]*(\\.)?)*\" { DLD_linepos+=yyleng;
+ yytext[yyleng-1]=0;
+ if (strlen(&yytext[1])) {
+ textdomain (PACKAGE"-scripts");
+ yylval.dld_string = gettext(&yytext[1]);
+ textdomain (PACKAGE);
+ }
+ else
+ yylval.dld_string = &yytext[1];
+ return(NAME); }
+
+\'([^\\\']*(\\.)?)*\' { DLD_linepos+=yyleng;
+ yytext[yyleng-1]=0;
+ if (strlen(&yytext[1])) {
+ textdomain (PACKAGE"-scripts");
+ yylval.dld_string = gettext(&yytext[1]);
+ textdomain (PACKAGE);
+ }
+ else
+ yylval.dld_string = &yytext[1];
+ return(NAME);
+}
+
+<ARGS>{number}/{sep} { DLD_linepos+=yyleng;
+ yylval.dld_string = yytext;
+ return(NUMBER); }
+
+<ARGS>{varname}/{sep} { DLD_linepos+=yyleng;
+ yylval.dld_string = yytext;
+ return(VARNAME); }
+
+%{
+/* client - server communication */
+%}
+"dld_start"/{sep} { DLD_linepos+=yyleng; return (DLD_START);}
+"dld_stop"/{sep} { DLD_linepos+=yyleng; return (DLD_STOP);}
+"dld_client"/{sep} { DLD_linepos+=yyleng; BEGIN COMMAND; return (DLD_CLIENT);}
+
+
+%{
+/* comments and spaces */
+%}
+
+\#[^\n]*[\n] { DLD_linepos+=yyleng; }
+\/\/[^\n]*[\n] { DLD_linepos+=yyleng; }
+[ \t]+ { DLD_linepos+=yyleng; }
+\n { DLD_linepos+=yyleng; }
+
+%{
+/* delimeters */
+%}
+
+\; { DLD_linepos+=yyleng;
+ BEGIN COMMAND; return(';'); }
+\= { DLD_linepos+=yyleng;
+ BEGIN ARGS; return('='); }
+\{ { DLD_linepos+=yyleng;
+ BEGIN COMMAND; return('{'); }
+\} { DLD_linepos+=yyleng;
+ BEGIN COMMAND; return('}'); }
+
+. { DLD_linepos+=yyleng; return yytext[0]; }
diff --git a/dldialog/src/dld_parser_yacc.cc b/dldialog/src/dld_parser_yacc.cc
new file mode 100644
index 0000000..be2cece
--- /dev/null
+++ b/dldialog/src/dld_parser_yacc.cc
@@ -0,0 +1,1671 @@
+
+/* A Bison parser, made from dld_parser_yacc.yy
+ by GNU Bison version 1.25
+ */
+
+#define YYBISON 1 /* Identify Bison output. */
+
+#define DLD_START 258
+#define DLD_STOP 259
+#define DLD_CLIENT 260
+#define DLD_ENV_END 261
+#define DIALOG 262
+#define FORM 263
+#define LIST 264
+#define ROW 265
+#define COL 266
+#define CHECKLIST 267
+#define RADIOLIST 268
+#define COMBOBOX 269
+#define CHECKBUTTON 270
+#define RADIOBUTTON 271
+#define TEXT 272
+#define BUTTON 273
+#define GAUGE 274
+#define TEXTBOX 275
+#define IMAGE 276
+#define MENUITEM 277
+#define MENUCHECK 278
+#define LISTITEM 279
+#define COMBOITEM 280
+#define INPUT 281
+#define VARIABLE 282
+#define ADD 283
+#define SET 284
+#define VAR 285
+#define EXEC 286
+#define FORK 287
+#define MULTI 288
+#define EXIT 289
+#define GLOBAL 290
+#define IMAGEFILE 291
+#define IP 292
+#define NUMERIC 293
+#define PASSWD 294
+#define LENGTH 295
+#define WIDTH 296
+#define HEIGHT 297
+#define FILEARG 298
+#define SIGN 299
+#define FONT 300
+#define SIZE 301
+#define BG 302
+#define FG 303
+#define DISABLE 304
+#define MOVIE 305
+#define MOVIEFILE 306
+#define NAME 307
+#define VARNAME 308
+#define NUMBER 309
+
+#line 1 "dld_parser_yacc.yy"
+/*-*- c++ -*-*/
+/******************************************************************************
+**
+** $Id: dld_parser_yacc.cc,v 1.20 2000/03/15 20:02:16 harald Exp $
+**
+** The Yacc File for DLDialog
+**
+** 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.
+**
+** (C) 1998 (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#define YYERROR_VERBOSE
+#include "dld_parser.h"
+#include "dldialog.h"
+#include "dld_button.h"
+#include "dld_checkbutton.h"
+#include "dld_checklist.h"
+#include "dld_col.h"
+#include "dld_combobox.h"
+#include "dld_comboitem.h"
+#include "dld_container.h"
+#include "dld_dialog.h"
+#include "dld_form.h"
+#include "dld_gauge.h"
+#include "dld_gui.h"
+#include "dld_image.h"
+#include "dld_button.h"
+#include "dld_input.h"
+#include "dld_lib.h"
+#include "dld_list.h"
+#include "dld_listitem.h"
+#include "dld_menu.h"
+#include "dld_obj.h"
+#include "dld_out.h"
+#include "dld_parser.h"
+#include "dld_parser_yacc.h"
+#include "dld_radiobutton.h"
+#include "dld_radiolist.h"
+#include "dld_row.h"
+#include "dld_text.h"
+#include "dld_textbox.h"
+
+#include <termios.h>
+#include <unistd.h>
+#include <errno.h>
+#include <sys/wait.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <getopt.h>
+#include <dlfcn.h>
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <signal.h>
+#include <stack>
+
+char DLD_line[YYLMAX];
+long DLD_lineno=0, DLD_linepos=0;
+int DLD_run = 0;
+static DLD_Obj *obj;
+static DLD_ComboBox *combobox;
+static DLD_RadioList *radiolist;
+static DLD_CheckList *checklist;
+static DLD_List *listwidget;
+static DLD_Container *container;
+static DLD_Menu *menu;
+static DLD_Image *image;
+static DLD_Input *input;
+static DLD_TextBox *textbox;
+static DLD_Button *button;
+static DLD_Dialog *dialog;
+static stack<DLD_Container *> cont_stack;
+static string DLD_Outpath;
+
+#include <stdio.h>
+
+#ifndef __cplusplus
+#ifndef __STDC__
+#define const
+#endif
+#endif
+
+
+
+#define YYFINAL 244
+#define YYFLAG -32768
+#define YYNTBASE 59
+
+#define YYTRANSLATE(x) ((unsigned)(x) <= 309 ? yytranslate[x] : 128)
+
+static const char yytranslate[] = { 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 57, 2,
+ 58, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 55, 2, 56, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
+ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 50, 51, 52, 53, 54
+};
+
+#if YYDEBUG != 0
+static const short yyprhs[] = { 0,
+ 0, 1, 2, 9, 10, 15, 19, 20, 28, 29,
+ 31, 32, 33, 40, 43, 44, 45, 54, 55, 56,
+ 64, 65, 68, 71, 72, 73, 80, 81, 82, 91,
+ 92, 93, 102, 103, 104, 113, 114, 115, 124, 127,
+ 130, 132, 133, 136, 137, 138, 143, 144, 149, 150,
+ 155, 156, 161, 162, 167, 169, 170, 171, 178, 179,
+ 180, 187, 188, 189, 196, 197, 198, 205, 206, 207,
+ 212, 213, 218, 219, 224, 225, 230, 231, 236, 237,
+ 242, 243, 248, 249, 254, 255, 260, 264, 265, 270,
+ 272, 273, 277, 280, 281, 285, 288, 291, 292, 295,
+ 298, 299, 303, 307, 310, 313, 316, 319, 320, 324,
+ 327, 330, 333, 337, 340, 343, 346, 347, 351, 355,
+ 358, 361, 364, 367, 372, 377, 378, 381, 385, 388,
+ 391, 394, 398, 402, 405, 408, 410, 412, 414, 415,
+ 416, 420, 424, 431, 432, 436, 440, 441
+};
+
+static const short yyrhs[] = { -1,
+ 0, 59, 5, 60, 55, 62, 56, 0, 0, 59,
+ 3, 61, 57, 0, 59, 4, 57, 0, 0, 65,
+ 6, 63, 57, 65, 67, 64, 0, 0, 67, 0,
+ 0, 0, 65, 27, 58, 121, 66, 57, 0, 65,
+ 57, 0, 0, 0, 7, 122, 68, 85, 55, 69,
+ 72, 56, 0, 0, 0, 122, 70, 85, 55, 71,
+ 72, 56, 0, 0, 72, 73, 0, 101, 57, 0,
+ 0, 0, 74, 86, 55, 75, 72, 56, 0, 0,
+ 0, 12, 122, 76, 118, 55, 77, 97, 56, 0,
+ 0, 0, 13, 122, 78, 118, 55, 79, 99, 56,
+ 0, 0, 0, 9, 122, 80, 91, 55, 81, 93,
+ 56, 0, 0, 0, 14, 122, 82, 118, 55, 83,
+ 95, 56, 0, 41, 54, 0, 42, 54, 0, 124,
+ 0, 0, 85, 84, 0, 0, 0, 8, 122, 87,
+ 85, 0, 0, 10, 122, 88, 85, 0, 0, 11,
+ 122, 89, 85, 0, 0, 7, 122, 90, 85, 0,
+ 0, 118, 33, 92, 118, 0, 118, 0, 0, 0,
+ 93, 24, 126, 94, 120, 57, 0, 0, 0, 95,
+ 25, 126, 96, 120, 57, 0, 0, 0, 97, 15,
+ 126, 98, 120, 57, 0, 0, 0, 99, 16, 126,
+ 100, 120, 57, 0, 0, 0, 18, 126, 102, 111,
+ 0, 0, 17, 126, 103, 85, 0, 0, 21, 126,
+ 104, 85, 0, 0, 50, 126, 105, 85, 0, 0,
+ 20, 122, 106, 113, 0, 0, 22, 126, 107, 114,
+ 0, 0, 23, 126, 108, 115, 0, 0, 19, 122,
+ 109, 116, 0, 0, 26, 122, 110, 117, 0, 27,
+ 58, 121, 0, 0, 120, 44, 112, 120, 0, 120,
+ 0, 0, 113, 43, 126, 0, 113, 84, 0, 0,
+ 114, 31, 126, 0, 114, 34, 0, 114, 35, 0,
+ 0, 115, 119, 0, 115, 35, 0, 0, 116, 30,
+ 53, 0, 116, 31, 126, 0, 116, 32, 0, 116,
+ 34, 0, 116, 49, 0, 116, 84, 0, 0, 117,
+ 30, 53, 0, 117, 39, 0, 117, 37, 0, 117,
+ 38, 0, 117, 40, 54, 0, 117, 84, 0, 117,
+ 49, 0, 117, 34, 0, 0, 118, 30, 53, 0,
+ 118, 31, 126, 0, 118, 49, 0, 118, 32, 0,
+ 118, 34, 0, 118, 84, 0, 30, 53, 29, 121,
+ 0, 30, 53, 28, 121, 0, 0, 120, 119, 0,
+ 120, 31, 126, 0, 120, 49, 0, 120, 32, 0,
+ 120, 34, 0, 120, 36, 126, 0, 120, 51, 126,
+ 0, 120, 84, 0, 120, 1, 0, 126, 0, 53,
+ 0, 54, 0, 0, 0, 52, 123, 122, 0, 45,
+ 53, 125, 0, 45, 53, 125, 46, 121, 125, 0,
+ 0, 125, 47, 121, 0, 125, 48, 121, 0, 0,
+ 52, 127, 122, 0
+};
+
+#endif
+
+#if YYDEBUG != 0
+static const short yyrline[] = { 0,
+ 109, 110, 127, 131, 136, 136, 152, 153, 156, 157,
+ 159, 160, 162, 162, 166, 172, 174, 175, 181, 183,
+ 186, 187, 190, 195, 196, 198, 201, 203, 205, 207,
+ 209, 211, 213, 215, 217, 219, 221, 223, 232, 233,
+ 234, 237, 238, 241, 242, 243, 243, 244, 244, 245,
+ 245, 246, 248, 249, 249, 252, 253, 254, 257, 258,
+ 259, 262, 263, 264, 267, 268, 269, 272, 273, 275,
+ 275, 276, 276, 277, 277, 279, 279, 281, 281, 283,
+ 283, 285, 285, 286, 286, 287, 287, 290, 291, 291,
+ 294, 295, 296, 298, 299, 300, 301, 304, 305, 306,
+ 309, 310, 311, 312, 313, 314, 315, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 329, 330, 331, 332,
+ 333, 334, 335, 338, 340, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, 352, 355, 356, 357, 360, 361,
+ 361, 364, 366, 369, 370, 371, 374, 374
+};
+#endif
+
+
+#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
+
+static const char * const yytname[] = { "$","error","$undefined.","DLD_START",
+"DLD_STOP","DLD_CLIENT","DLD_ENV_END","dialog","form","list","row","col","checklist",
+"radiolist","combobox","checkbutton","radiobutton","text","button","gauge","textbox",
+"image","menubox","menucheck","listitem","comboitem","input","a <variable>","-add",
+"-set","-var","-exec","FORK","-multi","-exit","-global","-image","-ip","-numeric",
+"-passwd","-length","-width","-height","-file","-sign","FONT","SIZE","BG","FG",
+"-disable","MOVIE","-movie","a <name>","a name of a variable","a number","'{'","'}'","';'","'='",
+"servermode","@1","@2","a dialog script","@3","mainempty","globalvars","@4","a dialog script",
+"@5","@6","@7","@8","any commands","any commands","@9","@10","@11","@12","@13","@14",
+"@15","@16","@17","@18","-width or -height","-width or -height","form, row, col or dialog","@19","@20","@21",
+"@22","-multi, -width or -height","@23","some listitems","@24","some comboitems","@25","some checkbuttons","@26",
+"some radiobuttons","@27","some simple commands","@28","@29","@30","@31","@32","@33","@34","@35",
+"@36","buttonargs","@37","-file, -width or -height","-exec, -exit or -global","-var or -global","-var, -exec, -exit or -width, -height",
+"-var, -passwd, -ip, -numeric, -length, -exit or -width, -height","-var, -exec, -exit or -width, -height","-var <varname> [-set <value>|-add <value>]","-exec, -exit, -var <varname> [-set <value>|-add <value>] or -width, -height","a <value>","a <name>","@38","fontargs",
+"colourargs","a <string>","@39", NULL
+};
+#endif
+
+static const short yyr1[] = { 0,
+ 59, 60, 59, 61, 59, 59, 63, 62, 64, 64,
+ 65, 66, 65, 65, 68, 69, 67, 70, 71, 67,
+ 72, 72, 73, 74, 75, 73, 76, 77, 73, 78,
+ 79, 73, 80, 81, 73, 82, 83, 73, 84, 84,
+ 84, 85, 85, 86, 87, 86, 88, 86, 89, 86,
+ 90, 86, 92, 91, 91, 93, 94, 93, 95, 96,
+ 95, 97, 98, 97, 99, 100, 99, 101, 102, 101,
+ 103, 101, 104, 101, 105, 101, 106, 101, 107, 101,
+ 108, 101, 109, 101, 110, 101, 101, 112, 111, 111,
+ 113, 113, 113, 114, 114, 114, 114, 115, 115, 115,
+ 116, 116, 116, 116, 116, 116, 116, 117, 117, 117,
+ 117, 117, 117, 117, 117, 117, 118, 118, 118, 118,
+ 118, 118, 118, 119, 119, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 121, 121, 121, 122, 123,
+ 122, 124, 124, 125, 125, 125, 127, 126
+};
+
+static const short yyr2[] = { 0,
+ 0, 0, 6, 0, 4, 3, 0, 7, 0, 1,
+ 0, 0, 6, 2, 0, 0, 8, 0, 0, 7,
+ 0, 2, 2, 0, 0, 6, 0, 0, 8, 0,
+ 0, 8, 0, 0, 8, 0, 0, 8, 2, 2,
+ 1, 0, 2, 0, 0, 4, 0, 4, 0, 4,
+ 0, 4, 0, 4, 1, 0, 0, 6, 0, 0,
+ 6, 0, 0, 6, 0, 0, 6, 0, 0, 4,
+ 0, 4, 0, 4, 0, 4, 0, 4, 0, 4,
+ 0, 4, 0, 4, 0, 4, 3, 0, 4, 1,
+ 0, 3, 2, 0, 3, 2, 2, 0, 2, 2,
+ 0, 3, 3, 2, 2, 2, 2, 0, 3, 2,
+ 2, 2, 3, 2, 2, 2, 0, 3, 3, 2,
+ 2, 2, 2, 4, 4, 0, 2, 3, 2, 2,
+ 2, 3, 3, 2, 2, 1, 1, 1, 0, 0,
+ 3, 3, 6, 0, 3, 3, 0, 3
+};
+
+static const short yydefact[] = { 1,
+ 0, 4, 0, 2, 0, 6, 0, 5, 11, 0,
+ 0, 3, 7, 0, 14, 0, 0, 11, 147, 137,
+ 138, 12, 136, 139, 139, 0, 139, 140, 139, 18,
+ 148, 13, 15, 139, 8, 10, 42, 42, 141, 0,
+ 0, 0, 0, 0, 19, 43, 41, 16, 39, 40,
+ 144, 21, 21, 142, 24, 24, 0, 0, 0, 139,
+ 139, 139, 139, 0, 0, 139, 139, 0, 0, 0,
+ 139, 0, 0, 20, 22, 44, 0, 17, 144, 145,
+ 146, 33, 27, 30, 36, 71, 69, 83, 77, 73,
+ 79, 81, 85, 0, 75, 139, 139, 139, 139, 0,
+ 23, 143, 117, 117, 117, 117, 42, 126, 101, 91,
+ 42, 94, 98, 108, 87, 42, 51, 45, 47, 49,
+ 25, 0, 55, 0, 0, 0, 72, 70, 0, 84,
+ 78, 74, 80, 82, 86, 76, 42, 42, 42, 42,
+ 21, 34, 0, 0, 121, 53, 122, 120, 123, 28,
+ 31, 37, 135, 0, 0, 130, 131, 0, 88, 129,
+ 0, 134, 127, 0, 0, 104, 105, 106, 107, 0,
+ 93, 0, 96, 97, 100, 99, 0, 116, 111, 112,
+ 110, 0, 115, 114, 52, 46, 48, 50, 24, 56,
+ 118, 119, 117, 62, 65, 59, 0, 128, 132, 126,
+ 133, 102, 103, 92, 95, 109, 113, 26, 0, 54,
+ 0, 0, 0, 0, 0, 0, 0, 35, 0, 29,
+ 0, 32, 0, 38, 125, 124, 57, 63, 66, 60,
+ 126, 126, 126, 126, 0, 0, 0, 0, 58, 64,
+ 67, 61, 0, 0
+};
+
+static const short yydefgoto[] = { 1,
+ 7, 5, 10, 16, 35, 11, 26, 29, 38, 53,
+ 37, 52, 55, 75, 76, 141, 104, 194, 105, 195,
+ 103, 190, 106, 196, 46, 40, 100, 138, 139, 140,
+ 137, 122, 193, 209, 231, 213, 234, 211, 232, 212,
+ 233, 77, 108, 107, 111, 116, 110, 112, 113, 109,
+ 114, 128, 200, 131, 133, 134, 130, 135, 123, 163,
+ 129, 22, 30, 34, 47, 54, 23, 25
+};
+
+static const short yypact[] = {-32768,
+ 117,-32768, -50,-32768, -36,-32768, -28,-32768,-32768, -21,
+ 9,-32768,-32768, -4,-32768, -11, -20,-32768,-32768,-32768,
+-32768,-32768,-32768, 13, 15, 4, 15,-32768, 19,-32768,
+-32768,-32768,-32768, 15,-32768,-32768,-32768,-32768,-32768, 27,
+ 44, 30, 34, 21,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768, 64, 283, 299, -20, -20, -20, 15,
+ 15, 15, 15, 29, 29, 15, 15, 29, 29, 29,
+ 15, 35, 29,-32768,-32768, 52, 45,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768, -20,-32768, 15, 15, 15, 15, 71,
+-32768, 48,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768, 77, 414, 343, 348, 374, 96,-32768, 7, 419,
+ 82, 96, 112, 20, 394, 96,-32768,-32768,-32768,-32768,
+-32768,-32768, 66, 29,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768, 89, 29,-32768,-32768, 29,-32768,-32768,
+ 29,-32768,-32768, 95, 29,-32768,-32768,-32768,-32768, 29,
+-32768, 29,-32768,-32768,-32768,-32768, 97,-32768,-32768,-32768,
+-32768, 98,-32768,-32768, 96, 96, 96, 96, 345,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768, 76,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 1, 435,
+ -12, -3, 17, -20, -20, 144, 29,-32768, 29,-32768,
+ 29,-32768, 29,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768, 172, 196, 218, 242,-32768,-32768,
+-32768,-32768, 149,-32768
+};
+
+static const short yypgoto[] = {-32768,
+-32768,-32768,-32768,-32768,-32768, 133,-32768, 125,-32768,-32768,
+-32768,-32768, -51,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768, -107, -24,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -75, 22,
+ -155, -47, 73,-32768,-32768, 79, -64,-32768
+};
+
+
+#define YYLAST 484
+
+
+static const short yytable[] = { 86,
+ 87, 56, 219, 90, 91, 92, 6, 153, 95, 79,
+ 80, 81, 221, 41, 13, 149, 149, 149, 149, 27,
+ 8, 162, 169, 171, 217, 27, 9, 184, 124, 125,
+ 126, 19, 20, 21, 12, 14, 154, 155, 156, 14,
+ 157, 223, 158, 220, 216, 18, 115, 42, 43, 154,
+ 159, 44, 222, 17, 175, 160, 218, 161, 96, 97,
+ 32, 98, 99, -90, 28, 15, 28, 42, 43, 15,
+ 28, 44, 224, 51, -9, 235, 236, 237, 238, 192,
+ 19, 45, 127, 49, 42, 43, 132, 50, 44, 189,
+ 198, 136, 94, 199, 58, 59, 201, 31, 48, 33,
+ 203, 101, 149, 214, 215, 204, 39, 205, 162, 57,
+ 58, 59, 185, 186, 187, 188, 243, 210, 191, 2,
+ 3, 4, 42, 43, 170, 121, 44, 162, 162, 162,
+ 162, 142, 82, 83, 84, 85, 42, 43, 88, 89,
+ 44, 197, 172, 93, 153, 173, 174, 202, 244, 206,
+ 24, 207, 227, 36, 228, 176, 229, 102, 230, 0,
+ 0, 0, 0, 0, 0, 0, 225, 226, 117, 118,
+ 119, 120, 153, 154, 155, 156, 0, 157, 0, 158,
+ 0, 0, 0, 0, 42, 43, 0, 0, 44, 0,
+ 0, 0, 160, 0, 161, 0, 153, 0, 0, 0,
+ -89, 154, 155, 156, 0, 157, 0, 158, 0, 0,
+ 0, 0, 42, 43, 0, 0, 44, 0, 153, 0,
+ 160, 0, 161, 0, 0, 154, 155, 156, 239, 157,
+ 0, 158, 0, 0, 0, 0, 42, 43, 0, 0,
+ 44, 0, 153, 0, 160, 0, 161, 154, 155, 156,
+ 0, 157, 240, 158, 0, 0, 0, 0, 42, 43,
+ 0, 0, 44, 0, 0, 0, 160, 0, 161, 0,
+ 0, 154, 155, 156, 241, 157, 0, 158, 0, 0,
+ 0, 0, 42, 43, 0, 0, 44, 0, 0, 0,
+ 160, 60, 161, 0, 61, 62, 63, 0, 242, 64,
+ 65, 66, 67, 68, 69, 70, 0, 60, 71, 72,
+ 61, 62, 63, 0, 0, 64, 65, 66, 67, 68,
+ 69, 70, 0, 0, 71, 72, 0, 0, 0, 0,
+ 0, 0, 73, 0, 0, 0, 0, 0, 74, -68,
+ 0, 0, 0, 0, 0, 0, 0, 0, 73, 0,
+ 0, 0, 0, 60, 78, -68, 61, 62, 63, 0,
+ 0, 64, 65, 66, 67, 68, 69, 70, 0, 0,
+ 71, 72, 143, 144, 145, 0, 147, 143, 144, 145,
+ 0, 147, 0, 42, 43, 0, 0, 44, 42, 43,
+ 0, 148, 44, 0, 73, 0, 148, 150, 0, 0,
+ 208, -68, 151, 143, 144, 145, 0, 147, 0, 0,
+ 0, 0, 0, 0, 42, 43, 0, 0, 44, 0,
+ 0, 0, 148, 177, 0, 0, 0, 178, 152, 0,
+ 179, 180, 181, 182, 42, 43, 0, 0, 44, 0,
+ 0, 0, 183, 143, 144, 145, 146, 147, 164, 165,
+ 166, 0, 167, 0, 42, 43, 0, 0, 44, 42,
+ 43, 0, 148, 44, 143, 144, 145, 168, 147, 0,
+ 0, 0, 0, 0, 0, 42, 43, 0, 0, 44,
+ 0, 0, 0, 148
+};
+
+static const short yycheck[] = { 64,
+ 65, 53, 15, 68, 69, 70, 57, 1, 73, 57,
+ 58, 59, 16, 38, 6, 123, 124, 125, 126, 7,
+ 57, 129, 130, 131, 24, 7, 55, 135, 104, 105,
+ 106, 52, 53, 54, 56, 27, 30, 31, 32, 27,
+ 34, 25, 36, 56, 200, 57, 94, 41, 42, 30,
+ 44, 45, 56, 58, 35, 49, 56, 51, 7, 8,
+ 57, 10, 11, 57, 52, 57, 52, 41, 42, 57,
+ 52, 45, 56, 53, 56, 231, 232, 233, 234, 144,
+ 52, 55, 107, 54, 41, 42, 111, 54, 45, 141,
+ 155, 116, 58, 158, 47, 48, 161, 25, 55, 27,
+ 165, 57, 210, 28, 29, 170, 34, 172, 216, 46,
+ 47, 48, 137, 138, 139, 140, 0, 193, 53, 3,
+ 4, 5, 41, 42, 43, 55, 45, 235, 236, 237,
+ 238, 55, 60, 61, 62, 63, 41, 42, 66, 67,
+ 45, 53, 31, 71, 1, 34, 35, 53, 0, 53,
+ 18, 54, 217, 29, 219, 134, 221, 79, 223, -1,
+ -1, -1, -1, -1, -1, -1, 214, 215, 96, 97,
+ 98, 99, 1, 30, 31, 32, -1, 34, -1, 36,
+ -1, -1, -1, -1, 41, 42, -1, -1, 45, -1,
+ -1, -1, 49, -1, 51, -1, 1, -1, -1, -1,
+ 57, 30, 31, 32, -1, 34, -1, 36, -1, -1,
+ -1, -1, 41, 42, -1, -1, 45, -1, 1, -1,
+ 49, -1, 51, -1, -1, 30, 31, 32, 57, 34,
+ -1, 36, -1, -1, -1, -1, 41, 42, -1, -1,
+ 45, -1, 1, -1, 49, -1, 51, 30, 31, 32,
+ -1, 34, 57, 36, -1, -1, -1, -1, 41, 42,
+ -1, -1, 45, -1, -1, -1, 49, -1, 51, -1,
+ -1, 30, 31, 32, 57, 34, -1, 36, -1, -1,
+ -1, -1, 41, 42, -1, -1, 45, -1, -1, -1,
+ 49, 9, 51, -1, 12, 13, 14, -1, 57, 17,
+ 18, 19, 20, 21, 22, 23, -1, 9, 26, 27,
+ 12, 13, 14, -1, -1, 17, 18, 19, 20, 21,
+ 22, 23, -1, -1, 26, 27, -1, -1, -1, -1,
+ -1, -1, 50, -1, -1, -1, -1, -1, 56, 57,
+ -1, -1, -1, -1, -1, -1, -1, -1, 50, -1,
+ -1, -1, -1, 9, 56, 57, 12, 13, 14, -1,
+ -1, 17, 18, 19, 20, 21, 22, 23, -1, -1,
+ 26, 27, 30, 31, 32, -1, 34, 30, 31, 32,
+ -1, 34, -1, 41, 42, -1, -1, 45, 41, 42,
+ -1, 49, 45, -1, 50, -1, 49, 55, -1, -1,
+ 56, 57, 55, 30, 31, 32, -1, 34, -1, -1,
+ -1, -1, -1, -1, 41, 42, -1, -1, 45, -1,
+ -1, -1, 49, 30, -1, -1, -1, 34, 55, -1,
+ 37, 38, 39, 40, 41, 42, -1, -1, 45, -1,
+ -1, -1, 49, 30, 31, 32, 33, 34, 30, 31,
+ 32, -1, 34, -1, 41, 42, -1, -1, 45, 41,
+ 42, -1, 49, 45, 30, 31, 32, 49, 34, -1,
+ -1, -1, -1, -1, -1, 41, 42, -1, -1, 45,
+ -1, -1, -1, 49
+};
+/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
+#line 3 "/usr/lib/bison.simple"
+
+/* Skeleton output parser for bison,
+ Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
+
+ 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, 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. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+#ifndef alloca
+#ifdef __GNUC__
+#define alloca __builtin_alloca
+#else /* not GNU C. */
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
+#include <alloca.h>
+#else /* not sparc */
+#if defined (MSDOS) && !defined (__TURBOC__)
+#include <malloc.h>
+#else /* not MSDOS, or __TURBOC__ */
+#if defined(_AIX)
+#include <malloc.h>
+ #pragma alloca
+#else /* not MSDOS, __TURBOC__, or _AIX */
+#ifdef __hpux
+#ifdef __cplusplus
+extern "C" {
+void *alloca (unsigned int);
+};
+#else /* not __cplusplus */
+void *alloca ();
+#endif /* not __cplusplus */
+#endif /* __hpux */
+#endif /* not _AIX */
+#endif /* not MSDOS, or __TURBOC__ */
+#endif /* not sparc. */
+#endif /* not GNU C. */
+#endif /* alloca not defined. */
+
+/* This is the parser code that is written into each bison parser
+ when the %semantic_parser declaration is not specified in the grammar.
+ It was written by Richard Stallman by simplifying the hairy parser
+ used when %semantic_parser is specified. */
+
+/* Note: there must be only one dollar sign in this file.
+ It is replaced by the list of actions, each action
+ as one case of the switch. */
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY -2
+#define YYEOF 0
+#define YYACCEPT return(0)
+#define YYABORT return(1)
+#define YYERROR goto yyerrlab1
+/* Like YYERROR except do call yyerror.
+ This remains here temporarily to ease the
+ transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+#define YYFAIL goto yyerrlab
+#define YYRECOVERING() (!!yyerrstatus)
+#define YYBACKUP(token, value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { yychar = (token), yylval = (value); \
+ yychar1 = YYTRANSLATE (yychar); \
+ YYPOPSTACK; \
+ goto yybackup; \
+ } \
+ else \
+ { yyerror ("syntax error: cannot back up"); YYERROR; } \
+while (0)
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+#ifndef YYPURE
+#define YYLEX yylex()
+#endif
+
+#ifdef YYPURE
+#ifdef YYLSP_NEEDED
+#ifdef YYLEX_PARAM
+#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
+#else
+#define YYLEX yylex(&yylval, &yylloc)
+#endif
+#else /* not YYLSP_NEEDED */
+#ifdef YYLEX_PARAM
+#define YYLEX yylex(&yylval, YYLEX_PARAM)
+#else
+#define YYLEX yylex(&yylval)
+#endif
+#endif /* not YYLSP_NEEDED */
+#endif
+
+/* If nonreentrant, generate the variables here */
+
+#ifndef YYPURE
+
+int yychar; /* the lookahead symbol */
+YYSTYPE yylval; /* the semantic value of the */
+ /* lookahead symbol */
+
+#ifdef YYLSP_NEEDED
+YYLTYPE yylloc; /* location data for the lookahead */
+ /* symbol */
+#endif
+
+int yynerrs; /* number of parse errors so far */
+#endif /* not YYPURE */
+
+#if YYDEBUG != 0
+int yydebug; /* nonzero means print parse trace */
+/* Since this is uninitialized, it does not stop multiple parsers
+ from coexisting. */
+#endif
+
+/* YYINITDEPTH indicates the initial size of the parser's stacks */
+
+#ifndef YYINITDEPTH
+#define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH is the maximum size the stacks can grow to
+ (effective only if the built-in stack extension method is used). */
+
+#if YYMAXDEPTH == 0
+#undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
+#define YYMAXDEPTH 10000
+#endif
+
+/* Prevent warning if -Wstrict-prototypes. */
+#ifdef __GNUC__
+int yyparse (void);
+#endif
+
+#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
+#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
+#else /* not GNU C or C++ */
+#ifndef __cplusplus
+
+/* This is the most reliable way to avoid incompatibilities
+ in available built-in functions on various systems. */
+static void
+__yy_memcpy (to, from, count)
+ char *to;
+ char *from;
+ int count;
+{
+ register char *f = from;
+ register char *t = to;
+ register int i = count;
+
+ while (i-- > 0)
+ *t++ = *f++;
+}
+
+#else /* __cplusplus */
+
+/* This is the most reliable way to avoid incompatibilities
+ in available built-in functions on various systems. */
+static void
+__yy_memcpy (char *to, char *from, int count)
+{
+ register char *f = from;
+ register char *t = to;
+ register int i = count;
+
+ while (i-- > 0)
+ *t++ = *f++;
+}
+
+#endif
+#endif
+
+#line 196 "/usr/lib/bison.simple"
+
+/* The user can define YYPARSE_PARAM as the name of an argument to be passed
+ into yyparse. The argument should have type void *.
+ It should actually point to an object.
+ Grammar actions can access the variable by casting it
+ to the proper pointer type. */
+
+#ifdef YYPARSE_PARAM
+#ifdef __cplusplus
+#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL
+#else /* not __cplusplus */
+#define YYPARSE_PARAM_ARG YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
+#endif /* not __cplusplus */
+#else /* not YYPARSE_PARAM */
+#define YYPARSE_PARAM_ARG
+#define YYPARSE_PARAM_DECL
+#endif /* not YYPARSE_PARAM */
+
+int
+yyparse(YYPARSE_PARAM_ARG)
+ YYPARSE_PARAM_DECL
+{
+ register int yystate;
+ register int yyn;
+ register short *yyssp;
+ register YYSTYPE *yyvsp;
+ int yyerrstatus; /* number of tokens to shift before error messages enabled */
+ int yychar1 = 0; /* lookahead token as an internal (translated) token number */
+
+ short yyssa[YYINITDEPTH]; /* the state stack */
+ YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
+
+ short *yyss = yyssa; /* refer to the stacks thru separate pointers */
+ YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
+
+#ifdef YYLSP_NEEDED
+ YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
+ YYLTYPE *yyls = yylsa;
+ YYLTYPE *yylsp;
+
+#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
+#else
+#define YYPOPSTACK (yyvsp--, yyssp--)
+#endif
+
+ int yystacksize = YYINITDEPTH;
+
+#ifdef YYPURE
+ int yychar;
+ YYSTYPE yylval;
+ int yynerrs;
+#ifdef YYLSP_NEEDED
+ YYLTYPE yylloc;
+#endif
+#endif
+
+ YYSTYPE yyval; /* the variable used to return */
+ /* semantic values from the action */
+ /* routines */
+
+ int yylen;
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Starting parse\n");
+#endif
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+
+ yyssp = yyss - 1;
+ yyvsp = yyvs;
+#ifdef YYLSP_NEEDED
+ yylsp = yyls;
+#endif
+
+/* Push a new state, which is found in yystate . */
+/* In all cases, when you get here, the value and location stacks
+ have just been pushed. so pushing a state here evens the stacks. */
+yynewstate:
+
+ *++yyssp = yystate;
+
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ /* Give user a chance to reallocate the stack */
+ /* Use copies of these so that the &'s don't force the real ones into memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ short *yyss1 = yyss;
+#ifdef YYLSP_NEEDED
+ YYLTYPE *yyls1 = yyls;
+#endif
+
+ /* Get the current used size of the three stacks, in elements. */
+ int size = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ /* Each stack pointer address is followed by the size of
+ the data in use in that stack, in bytes. */
+#ifdef YYLSP_NEEDED
+ /* This used to be a conditional around just the two extra args,
+ but that might be undefined if yyoverflow is a macro. */
+ yyoverflow("parser stack overflow",
+ &yyss1, size * sizeof (*yyssp),
+ &yyvs1, size * sizeof (*yyvsp),
+ &yyls1, size * sizeof (*yylsp),
+ &yystacksize);
+#else
+ yyoverflow("parser stack overflow",
+ &yyss1, size * sizeof (*yyssp),
+ &yyvs1, size * sizeof (*yyvsp),
+ &yystacksize);
+#endif
+
+ yyss = yyss1; yyvs = yyvs1;
+#ifdef YYLSP_NEEDED
+ yyls = yyls1;
+#endif
+#else /* no yyoverflow */
+ /* Extend the stack our own way. */
+ if (yystacksize >= YYMAXDEPTH)
+ {
+ yyerror("parser stack overflow");
+ return 2;
+ }
+ yystacksize *= 2;
+ if (yystacksize > YYMAXDEPTH)
+ yystacksize = YYMAXDEPTH;
+ yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
+ __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
+ yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
+ __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
+#ifdef YYLSP_NEEDED
+ yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
+ __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
+#endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + size - 1;
+ yyvsp = yyvs + size - 1;
+#ifdef YYLSP_NEEDED
+ yylsp = yyls + size - 1;
+#endif
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Stack size increased to %d\n", yystacksize);
+#endif
+
+ if (yyssp >= yyss + yystacksize - 1)
+ YYABORT;
+ }
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Entering state %d\n", yystate);
+#endif
+
+ goto yybackup;
+ yybackup:
+
+/* Do appropriate processing given the current state. */
+/* Read a lookahead token if we need one and don't already have one. */
+/* yyresume: */
+
+ /* First try to decide what to do without reference to lookahead token. */
+
+ yyn = yypact[yystate];
+ if (yyn == YYFLAG)
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* yychar is either YYEMPTY or YYEOF
+ or a valid token in external form. */
+
+ if (yychar == YYEMPTY)
+ {
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Reading a token: ");
+#endif
+ yychar = YYLEX;
+ }
+
+ /* Convert token to internal form (in yychar1) for indexing tables with */
+
+ if (yychar <= 0) /* This means end of input. */
+ {
+ yychar1 = 0;
+ yychar = YYEOF; /* Don't call YYLEX any more */
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Now at end of input.\n");
+#endif
+ }
+ else
+ {
+ yychar1 = YYTRANSLATE(yychar);
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
+ /* Give the individual parser a way to print the precise meaning
+ of a token, for further debugging info. */
+#ifdef YYPRINT
+ YYPRINT (stderr, yychar, yylval);
+#endif
+ fprintf (stderr, ")\n");
+ }
+#endif
+ }
+
+ yyn += yychar1;
+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+ goto yydefault;
+
+ yyn = yytable[yyn];
+
+ /* yyn is what to do for this token type in this state.
+ Negative => reduce, -yyn is rule number.
+ Positive => shift, yyn is new state.
+ New state is final state => don't bother to shift,
+ just return success.
+ 0, or most negative number => error. */
+
+ if (yyn < 0)
+ {
+ if (yyn == YYFLAG)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+ else if (yyn == 0)
+ goto yyerrlab;
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ /* Shift the lookahead token. */
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
+#endif
+
+ /* Discard the token being shifted unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
+
+ *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+ *++yylsp = yylloc;
+#endif
+
+ /* count tokens shifted since error; after three, turn off error status. */
+ if (yyerrstatus) yyerrstatus--;
+
+ yystate = yyn;
+ goto yynewstate;
+
+/* Do the default action for the current state. */
+yydefault:
+
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+
+/* Do a reduction. yyn is the number of a rule to reduce with. */
+yyreduce:
+ yylen = yyr2[yyn];
+ if (yylen > 0)
+ yyval = yyvsp[1-yylen]; /* implement default value of the action */
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ int i;
+
+ fprintf (stderr, "Reducing via rule %d (line %d), ",
+ yyn, yyrline[yyn]);
+
+ /* Print the symbols being reduced, and their result. */
+ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
+ fprintf (stderr, "%s ", yytname[yyrhs[i]]);
+ fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
+ }
+#endif
+
+
+ switch (yyn) {
+
+case 2:
+#line 110 "dld_parser_yacc.yy"
+{
+ // Clear all remaining environment variables
+ DLD_GUI->clear_env();
+ // Generate temporary filename
+ DLD_Outpath = tempnam(indir.c_str(), NULL);
+
+ if (mknod(DLD_Outpath.c_str(),
+ S_IFIFO|S_IRUSR|S_IWUSR, 0) == -1) {
+ // We are unable to produce an output pipe
+ string err("mknod ");
+ err += DLD_Outpath + ':' + ' ';
+ err += strerror(errno);
+ DLDerr << err << endl << flush;
+ throw DLD_Pipe_Error();
+ }
+ // Tell the client where to get the output
+ DLDout << DLD_Outpath << endl << flush;
+ ;
+ break;}
+case 3:
+#line 127 "dld_parser_yacc.yy"
+{
+ DLDdbg << "erasing outpath" << endl << flush;
+ DLD_Outpath.erase();
+ ;
+ break;}
+case 4:
+#line 131 "dld_parser_yacc.yy"
+{
+ DLD_run++;
+ DLDdbg << "++DLD_run = " << DLD_run << endl << flush;
+ DLDout << "ok;" << endl << flush;
+ ;
+ break;}
+case 6:
+#line 136 "dld_parser_yacc.yy"
+{
+ DLD_run--;
+ if (DLD_run <= 0) {
+ DLDdbg << "DLD_run == 0" << endl << flush;
+ DLD_run = -1;
+ // Return from parsing
+ listen(sock_in, 0);
+ YYACCEPT;
+ }
+ else {
+ DLDdbg << "--DLD_run = " << DLD_run << endl << flush;
+ DLDout << "ok;" << endl << flush;
+ }
+ ;
+ break;}
+case 7:
+#line 152 "dld_parser_yacc.yy"
+{ DLD_lineno = 0; ;
+ break;}
+case 12:
+#line 161 "dld_parser_yacc.yy"
+{ DLD_GUI->set_env(yyvsp[-2].dld_string,yyvsp[0].dld_string);;
+ break;}
+case 15:
+#line 167 "dld_parser_yacc.yy"
+{
+ obj = container = dialog
+ = DLD_GUI->dialog(yyvsp[0].dld_string, DLD_Out(DLD_Outpath));
+ ;
+ break;}
+case 16:
+#line 172 "dld_parser_yacc.yy"
+{ container->open_brace();;
+ break;}
+case 17:
+#line 174 "dld_parser_yacc.yy"
+{ container->close_brace(); ;
+ break;}
+case 18:
+#line 176 "dld_parser_yacc.yy"
+{
+ obj = container = dialog
+ = DLD_GUI->dialog(yyvsp[0].dld_string, DLD_Out(DLD_Outpath));
+ ;
+ break;}
+case 19:
+#line 181 "dld_parser_yacc.yy"
+{ container->open_brace();;
+ break;}
+case 20:
+#line 183 "dld_parser_yacc.yy"
+{ container->close_brace(); ;
+ break;}
+case 24:
+#line 195 "dld_parser_yacc.yy"
+{cont_stack.push(container);;
+ break;}
+case 25:
+#line 196 "dld_parser_yacc.yy"
+{container->open_brace();;
+ break;}
+case 26:
+#line 198 "dld_parser_yacc.yy"
+{container->close_brace(); container = cont_stack.top(); cont_stack.pop();;
+ break;}
+case 27:
+#line 201 "dld_parser_yacc.yy"
+{ obj = checklist = container->checklist(yyvsp[0].dld_string);;
+ break;}
+case 28:
+#line 203 "dld_parser_yacc.yy"
+{checklist->open_brace();;
+ break;}
+case 29:
+#line 205 "dld_parser_yacc.yy"
+{checklist->close_brace();;
+ break;}
+case 30:
+#line 207 "dld_parser_yacc.yy"
+{ obj = radiolist = container->radiolist(yyvsp[0].dld_string);;
+ break;}
+case 31:
+#line 209 "dld_parser_yacc.yy"
+{radiolist->open_brace();;
+ break;}
+case 32:
+#line 211 "dld_parser_yacc.yy"
+{radiolist->close_brace(); ;
+ break;}
+case 33:
+#line 213 "dld_parser_yacc.yy"
+{ obj = listwidget = container->list(yyvsp[0].dld_string);;
+ break;}
+case 34:
+#line 215 "dld_parser_yacc.yy"
+{listwidget->open_brace();;
+ break;}
+case 35:
+#line 217 "dld_parser_yacc.yy"
+{listwidget->close_brace(); ;
+ break;}
+case 36:
+#line 219 "dld_parser_yacc.yy"
+{ obj = combobox = container->combobox(yyvsp[0].dld_string);;
+ break;}
+case 37:
+#line 221 "dld_parser_yacc.yy"
+{ combobox->open_brace(); ;
+ break;}
+case 38:
+#line 223 "dld_parser_yacc.yy"
+{ combobox->close_brace(); ;
+ break;}
+case 39:
+#line 232 "dld_parser_yacc.yy"
+{ if(obj)obj->widthP(atoi(yyvsp[0].dld_string.c_str())); ;
+ break;}
+case 40:
+#line 233 "dld_parser_yacc.yy"
+{ if(obj)obj->heightP(atoi(yyvsp[0].dld_string.c_str())); ;
+ break;}
+case 45:
+#line 242 "dld_parser_yacc.yy"
+{obj = container = container->form(yyvsp[0].dld_string);;
+ break;}
+case 47:
+#line 243 "dld_parser_yacc.yy"
+{obj = container = container->row(yyvsp[0].dld_string);;
+ break;}
+case 49:
+#line 244 "dld_parser_yacc.yy"
+{obj = container = container->col(yyvsp[0].dld_string);;
+ break;}
+case 51:
+#line 245 "dld_parser_yacc.yy"
+{obj = container = container->dialog(yyvsp[0].dld_string);;
+ break;}
+case 53:
+#line 248 "dld_parser_yacc.yy"
+{ listwidget->set_multi(true);;
+ break;}
+case 57:
+#line 253 "dld_parser_yacc.yy"
+{ obj = listwidget->listitem(yyvsp[0].dld_string);;
+ break;}
+case 60:
+#line 258 "dld_parser_yacc.yy"
+{ obj = combobox->comboitem(yyvsp[0].dld_string);;
+ break;}
+case 63:
+#line 264 "dld_parser_yacc.yy"
+{ obj = checklist->checkbutton(yyvsp[0].dld_string);;
+ break;}
+case 66:
+#line 268 "dld_parser_yacc.yy"
+{ obj = radiolist->radiobutton(yyvsp[0].dld_string);;
+ break;}
+case 69:
+#line 274 "dld_parser_yacc.yy"
+{ obj = button = container->button(yyvsp[0].dld_string);;
+ break;}
+case 71:
+#line 275 "dld_parser_yacc.yy"
+{ obj = container->text(yyvsp[0].dld_string); ;
+ break;}
+case 73:
+#line 276 "dld_parser_yacc.yy"
+{ obj = container->image(yyvsp[0].dld_string); ;
+ break;}
+case 75:
+#line 277 "dld_parser_yacc.yy"
+{ obj = image = container->image(yyvsp[0].dld_string);
+ if(image)image->setIsMovie(true); ;
+ break;}
+case 77:
+#line 280 "dld_parser_yacc.yy"
+{ obj = textbox = container->textbox(yyvsp[0].dld_string);;
+ break;}
+case 79:
+#line 282 "dld_parser_yacc.yy"
+{ obj = menu = container->menu(yyvsp[0].dld_string,0);;
+ break;}
+case 81:
+#line 284 "dld_parser_yacc.yy"
+{ obj = menu = container->menu(yyvsp[0].dld_string,1);;
+ break;}
+case 83:
+#line 285 "dld_parser_yacc.yy"
+{ obj = container->gauge(yyvsp[0].dld_string); ;
+ break;}
+case 85:
+#line 286 "dld_parser_yacc.yy"
+{ obj = input = container->input(yyvsp[0].dld_string); ;
+ break;}
+case 87:
+#line 287 "dld_parser_yacc.yy"
+{DLD_GUI->set_env(yyvsp[-2].dld_string,yyvsp[0].dld_string);;
+ break;}
+case 88:
+#line 290 "dld_parser_yacc.yy"
+{ button->set_signature(true); ;
+ break;}
+case 92:
+#line 295 "dld_parser_yacc.yy"
+{ textbox->set_filename(yyvsp[0].dld_string);;
+ break;}
+case 95:
+#line 299 "dld_parser_yacc.yy"
+{ menu->add_exec(yyvsp[0].dld_string);;
+ break;}
+case 96:
+#line 300 "dld_parser_yacc.yy"
+{ menu->set_exit(true);;
+ break;}
+case 97:
+#line 301 "dld_parser_yacc.yy"
+{ menu->set_global(true);;
+ break;}
+case 100:
+#line 306 "dld_parser_yacc.yy"
+{ menu->set_global(true);;
+ break;}
+case 102:
+#line 310 "dld_parser_yacc.yy"
+{ if(obj)obj->add_setvar(yyvsp[0].dld_string, "");;
+ break;}
+case 103:
+#line 311 "dld_parser_yacc.yy"
+{ if(obj)obj->add_exec(yyvsp[0].dld_string);;
+ break;}
+case 104:
+#line 312 "dld_parser_yacc.yy"
+{ if(obj)obj->set_killchild(false);;
+ break;}
+case 105:
+#line 313 "dld_parser_yacc.yy"
+{ if(obj)obj->set_exit(true);;
+ break;}
+case 106:
+#line 314 "dld_parser_yacc.yy"
+{ if(obj)obj->disable(); ;
+ break;}
+case 109:
+#line 319 "dld_parser_yacc.yy"
+{ input->add_setvar(yyvsp[0].dld_string, "");;
+ break;}
+case 110:
+#line 320 "dld_parser_yacc.yy"
+{ input->set_passwd(true);;
+ break;}
+case 111:
+#line 321 "dld_parser_yacc.yy"
+{ input->set_ip(true);;
+ break;}
+case 112:
+#line 322 "dld_parser_yacc.yy"
+{ input->set_numeric(true);;
+ break;}
+case 113:
+#line 323 "dld_parser_yacc.yy"
+{ input->set_length(atoi(yyvsp[0].dld_string.c_str()));;
+ break;}
+case 115:
+#line 325 "dld_parser_yacc.yy"
+{ if(obj)obj->disable(); ;
+ break;}
+case 116:
+#line 326 "dld_parser_yacc.yy"
+{ obj->set_exit(true);;
+ break;}
+case 118:
+#line 330 "dld_parser_yacc.yy"
+{ if(obj)obj->add_setvar(yyvsp[0].dld_string, "");;
+ break;}
+case 119:
+#line 331 "dld_parser_yacc.yy"
+{ if(obj)obj->add_exec(yyvsp[0].dld_string);;
+ break;}
+case 120:
+#line 332 "dld_parser_yacc.yy"
+{ if(obj)obj->disable(); ;
+ break;}
+case 121:
+#line 333 "dld_parser_yacc.yy"
+{ if(obj)obj->set_killchild(false);;
+ break;}
+case 122:
+#line 334 "dld_parser_yacc.yy"
+{ if(obj)obj->set_exit(true);;
+ break;}
+case 124:
+#line 339 "dld_parser_yacc.yy"
+{ if(obj)obj->add_setvar(yyvsp[-2].dld_string, yyvsp[0].dld_string);;
+ break;}
+case 125:
+#line 340 "dld_parser_yacc.yy"
+{ if(obj)obj->add_addvar(yyvsp[-2].dld_string, yyvsp[0].dld_string);;
+ break;}
+case 128:
+#line 345 "dld_parser_yacc.yy"
+{ if(obj)obj->add_exec(yyvsp[0].dld_string);;
+ break;}
+case 129:
+#line 346 "dld_parser_yacc.yy"
+{ if(obj)obj->disable(); ;
+ break;}
+case 130:
+#line 347 "dld_parser_yacc.yy"
+{ if(obj)obj->set_killchild(false);;
+ break;}
+case 131:
+#line 348 "dld_parser_yacc.yy"
+{ if(obj)obj->set_exit(true);;
+ break;}
+case 132:
+#line 349 "dld_parser_yacc.yy"
+{ if(obj)obj->add_image(yyvsp[0].dld_string);;
+ break;}
+case 133:
+#line 350 "dld_parser_yacc.yy"
+{ if(obj)obj->add_movie(yyvsp[0].dld_string);;
+ break;}
+case 135:
+#line 352 "dld_parser_yacc.yy"
+{ yyerror("maybe missing ';'"); ;
+ break;}
+case 137:
+#line 356 "dld_parser_yacc.yy"
+{yyval.dld_string=yyvsp[0].dld_string;;
+ break;}
+case 138:
+#line 357 "dld_parser_yacc.yy"
+{yyval.dld_string=yyvsp[0].dld_string;;
+ break;}
+case 139:
+#line 360 "dld_parser_yacc.yy"
+{yyval.dld_string.erase();;
+ break;}
+case 140:
+#line 361 "dld_parser_yacc.yy"
+{yyval.dld_string=yyvsp[0].dld_string;
+ break;}
+case 141:
+#line 361 "dld_parser_yacc.yy"
+{ yyval.dld_string+=yyvsp[0].dld_string; ;
+ break;}
+case 142:
+#line 365 "dld_parser_yacc.yy"
+{ if(obj)obj->set_font(yyvsp[-1].dld_string, "normal");;
+ break;}
+case 143:
+#line 366 "dld_parser_yacc.yy"
+{ if(obj)obj->set_font(yyvsp[-4].dld_string, yyvsp[-1].dld_string);;
+ break;}
+case 145:
+#line 370 "dld_parser_yacc.yy"
+{ if(obj)obj->set_bg(yyvsp[0].dld_string);;
+ break;}
+case 146:
+#line 371 "dld_parser_yacc.yy"
+{ if(obj)obj->set_fg(yyvsp[0].dld_string);;
+ break;}
+case 147:
+#line 374 "dld_parser_yacc.yy"
+{yyval.dld_string=yyvsp[0].dld_string;
+ break;}
+case 148:
+#line 374 "dld_parser_yacc.yy"
+{yyval.dld_string+=yyvsp[0].dld_string; ;
+ break;}
+}
+ /* the action file gets copied in in place of this dollarsign */
+#line 498 "/usr/lib/bison.simple"
+
+ yyvsp -= yylen;
+ yyssp -= yylen;
+#ifdef YYLSP_NEEDED
+ yylsp -= yylen;
+#endif
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ short *ssp1 = yyss - 1;
+ fprintf (stderr, "state stack now");
+ while (ssp1 != yyssp)
+ fprintf (stderr, " %d", *++ssp1);
+ fprintf (stderr, "\n");
+ }
+#endif
+
+ *++yyvsp = yyval;
+
+#ifdef YYLSP_NEEDED
+ yylsp++;
+ if (yylen == 0)
+ {
+ yylsp->first_line = yylloc.first_line;
+ yylsp->first_column = yylloc.first_column;
+ yylsp->last_line = (yylsp-1)->last_line;
+ yylsp->last_column = (yylsp-1)->last_column;
+ yylsp->text = 0;
+ }
+ else
+ {
+ yylsp->last_line = (yylsp+yylen-1)->last_line;
+ yylsp->last_column = (yylsp+yylen-1)->last_column;
+ }
+#endif
+
+ /* Now "shift" the result of the reduction.
+ Determine what state that goes to,
+ based on the state we popped back to
+ and the rule number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
+ if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTBASE];
+
+ goto yynewstate;
+
+yyerrlab: /* here on detecting error */
+
+ if (! yyerrstatus)
+ /* If not already recovering from an error, report this error. */
+ {
+ ++yynerrs;
+
+#ifdef YYERROR_VERBOSE
+ yyn = yypact[yystate];
+
+ if (yyn > YYFLAG && yyn < YYLAST)
+ {
+ int size = 0;
+ char *msg;
+ int x, count;
+
+ count = 0;
+ /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
+ for (x = (yyn < 0 ? -yyn : 0);
+ x < (sizeof(yytname) / sizeof(char *)); x++)
+ if (yycheck[x + yyn] == x)
+ size += strlen(yytname[x]) + 15, count++;
+ msg = (char *) malloc(size + 15);
+ if (msg != 0)
+ {
+ strcpy(msg, "parse error");
+
+ if (count < 5)
+ {
+ count = 0;
+ for (x = (yyn < 0 ? -yyn : 0);
+ x < (sizeof(yytname) / sizeof(char *)); x++)
+ if (yycheck[x + yyn] == x)
+ {
+ strcat(msg, count == 0 ? ", expecting `" : " or `");
+ strcat(msg, yytname[x]);
+ strcat(msg, "'");
+ count++;
+ }
+ }
+ yyerror(msg);
+ free(msg);
+ }
+ else
+ yyerror ("parse error; also virtual memory exceeded");
+ }
+ else
+#endif /* YYERROR_VERBOSE */
+ yyerror("parse error");
+ }
+
+ goto yyerrlab1;
+yyerrlab1: /* here on error raised explicitly by an action */
+
+ if (yyerrstatus == 3)
+ {
+ /* if just tried and failed to reuse lookahead token after an error, discard it. */
+
+ /* return failure if at end of input */
+ if (yychar == YYEOF)
+ YYABORT;
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
+#endif
+
+ yychar = YYEMPTY;
+ }
+
+ /* Else will try to reuse lookahead token
+ after shifting the error token. */
+
+ yyerrstatus = 3; /* Each real token shifted decrements this */
+
+ goto yyerrhandle;
+
+yyerrdefault: /* current state does not do anything special for the error token. */
+
+#if 0
+ /* This is wrong; only states that explicitly want error tokens
+ should shift them. */
+ yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
+ if (yyn) goto yydefault;
+#endif
+
+yyerrpop: /* pop the current state because it cannot handle the error token */
+
+ if (yyssp == yyss) YYABORT;
+ yyvsp--;
+ yystate = *--yyssp;
+#ifdef YYLSP_NEEDED
+ yylsp--;
+#endif
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ short *ssp1 = yyss - 1;
+ fprintf (stderr, "Error: state stack now");
+ while (ssp1 != yyssp)
+ fprintf (stderr, " %d", *++ssp1);
+ fprintf (stderr, "\n");
+ }
+#endif
+
+yyerrhandle:
+
+ yyn = yypact[yystate];
+ if (yyn == YYFLAG)
+ goto yyerrdefault;
+
+ yyn += YYTERROR;
+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
+ goto yyerrdefault;
+
+ yyn = yytable[yyn];
+ if (yyn < 0)
+ {
+ if (yyn == YYFLAG)
+ goto yyerrpop;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+ else if (yyn == 0)
+ goto yyerrpop;
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Shifting error token, ");
+#endif
+
+ *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+ *++yylsp = yylloc;
+#endif
+
+ yystate = yyn;
+ goto yynewstate;
+}
+#line 377 "dld_parser_yacc.yy"
+
+int DLD_error = 0;
+
+int yyerror(char *s)
+{
+ int i;
+
+ DLDerr.form("stdin:%ld:%sstdin:%ld:", DLD_lineno, DLD_line, DLD_lineno);
+ for ( i = 0; i < (DLD_linepos-yyleng); i++ ) {
+ if(isspace(DLD_line[i]))
+ DLDerr << DLD_line[i];
+
+ DLDerr << ' ';
+ }
+
+ DLDerr << "^ " << s << endl << flush;
+ DLD_error = 1;
+
+ if (DLD_GUI)
+ DLD_GUI->print_status ("Error parsing input! ...");
+
+ if(DLD_Outpath.length()) {
+ ofstream out(DLD_Outpath.c_str());
+ out << "error;" << endl << flush;
+ out.close();
+#ifdef DEBUG
+ DLDdbg << "error; --> client" << endl << flush;
+#endif
+ DLD_Outpath.erase();
+ }
+ return 0;
+}
+
+int
+dld_parse ()
+{
+
+ if (DLD_GUI)
+ DLD_GUI->print_status ("Parsing input ...");
+ do
+ {
+ DLD_GUI->exec();
+ } while(DLD_run > 0 && (!DLD_error));
+
+ return DLD_error;
+}
diff --git a/dldialog/src/dld_parser_yacc.h b/dldialog/src/dld_parser_yacc.h
new file mode 100644
index 0000000..c395e63
--- /dev/null
+++ b/dldialog/src/dld_parser_yacc.h
@@ -0,0 +1,55 @@
+#define DLD_START 258
+#define DLD_STOP 259
+#define DLD_CLIENT 260
+#define DLD_ENV_END 261
+#define DIALOG 262
+#define FORM 263
+#define LIST 264
+#define ROW 265
+#define COL 266
+#define CHECKLIST 267
+#define RADIOLIST 268
+#define COMBOBOX 269
+#define CHECKBUTTON 270
+#define RADIOBUTTON 271
+#define TEXT 272
+#define BUTTON 273
+#define GAUGE 274
+#define TEXTBOX 275
+#define IMAGE 276
+#define MENUITEM 277
+#define MENUCHECK 278
+#define LISTITEM 279
+#define COMBOITEM 280
+#define INPUT 281
+#define VARIABLE 282
+#define ADD 283
+#define SET 284
+#define VAR 285
+#define EXEC 286
+#define FORK 287
+#define MULTI 288
+#define EXIT 289
+#define GLOBAL 290
+#define IMAGEFILE 291
+#define IP 292
+#define NUMERIC 293
+#define PASSWD 294
+#define LENGTH 295
+#define WIDTH 296
+#define HEIGHT 297
+#define FILEARG 298
+#define SIGN 299
+#define FONT 300
+#define SIZE 301
+#define BG 302
+#define FG 303
+#define DISABLE 304
+#define MOVIE 305
+#define MOVIEFILE 306
+#define NAME 307
+#define VARNAME 308
+#define NUMBER 309
+
+
+extern YYSTYPE yylval;
diff --git a/dldialog/src/dld_parser_yacc.yy b/dldialog/src/dld_parser_yacc.yy
new file mode 100644
index 0000000..134bfc8
--- /dev/null
+++ b/dldialog/src/dld_parser_yacc.yy
@@ -0,0 +1,421 @@
+%{/*-*- c++ -*-*/
+/******************************************************************************
+**
+** $Id: dld_parser_yacc.yy,v 1.9 1999/01/20 14:46:43 saturn Exp $
+**
+** The Yacc File for DLDialog
+**
+** 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.
+**
+** (C) 1998 (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+#define YYERROR_VERBOSE
+#include "dld_parser.h"
+#include "dldialog.h"
+#include "dld_button.h"
+#include "dld_checkbutton.h"
+#include "dld_checklist.h"
+#include "dld_col.h"
+#include "dld_combobox.h"
+#include "dld_comboitem.h"
+#include "dld_container.h"
+#include "dld_dialog.h"
+#include "dld_form.h"
+#include "dld_gauge.h"
+#include "dld_gui.h"
+#include "dld_image.h"
+#include "dld_button.h"
+#include "dld_input.h"
+#include "dld_lib.h"
+#include "dld_list.h"
+#include "dld_listitem.h"
+#include "dld_menu.h"
+#include "dld_obj.h"
+#include "dld_out.h"
+#include "dld_parser.h"
+#include "dld_parser_yacc.h"
+#include "dld_radiobutton.h"
+#include "dld_radiolist.h"
+#include "dld_row.h"
+#include "dld_text.h"
+#include "dld_textbox.h"
+
+#include <termios.h>
+#include <unistd.h>
+#include <errno.h>
+#include <sys/wait.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <getopt.h>
+#include <dlfcn.h>
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <signal.h>
+#include <stack>
+
+char DLD_line[YYLMAX];
+long DLD_lineno=0, DLD_linepos=0;
+int DLD_run = 0;
+static DLD_Obj *obj;
+static DLD_ComboBox *combobox;
+static DLD_RadioList *radiolist;
+static DLD_CheckList *checklist;
+static DLD_List *listwidget;
+static DLD_Container *container;
+static DLD_Menu *menu;
+static DLD_Image *image;
+static DLD_Input *input;
+static DLD_TextBox *textbox;
+static DLD_Button *button;
+static DLD_Dialog *dialog;
+static stack<DLD_Container *> cont_stack;
+static string DLD_Outpath;
+
+%}
+
+%token DLD_START DLD_STOP DLD_CLIENT DLD_ENV_END
+
+/* parent objects */
+%token DIALOG FORM LIST ROW COL CHECKLIST RADIOLIST COMBOBOX
+
+/* child objects */
+%token CHECKBUTTON RADIOBUTTON TEXT BUTTON GAUGE TEXTBOX IMAGE
+%token MENUITEM MENUCHECK LISTITEM COMBOITEM INPUT
+
+/* other object */
+%token VARIABLE
+
+/* parameters */
+%token ADD SET VAR EXEC FORK MULTI EXIT GLOBAL IMAGEFILE
+%token IP NUMERIC PASSWD LENGTH WIDTH HEIGHT FILEARG
+%token SIGN FONT SIZE BG FG DISABLE MOVIE MOVIEFILE
+
+%token <dld_string> NAME VARNAME NUMBER VARIABLE
+
+%type <dld_string> value constring name
+
+%start servermode
+
+%%
+
+servermode: /* empty */
+ | servermode DLD_CLIENT {
+ // Clear all remaining environment variables
+ DLD_GUI->clear_env();
+ // Generate temporary filename
+ DLD_Outpath = tempnam(indir.c_str(), NULL);
+
+ if (mknod(DLD_Outpath.c_str(),
+ S_IFIFO|S_IRUSR|S_IWUSR, 0) == -1) {
+ // We are unable to produce an output pipe
+ string err("mknod ");
+ err += DLD_Outpath + ':' + ' ';
+ err += strerror(errno);
+ DLDerr << err << endl << flush;
+ throw DLD_Pipe_Error();
+ }
+ // Tell the client where to get the output
+ DLDout << DLD_Outpath << endl << flush;
+ } '{' dialogscript '}' {
+ DLDdbg << "erasing outpath" << endl << flush;
+ DLD_Outpath.erase();
+ }
+ | servermode DLD_START {
+ DLD_run++;
+ DLDdbg << "++DLD_run = " << DLD_run << endl << flush;
+ DLDout << "ok;" << endl << flush;
+ } ';'
+ | servermode DLD_STOP ';' {
+ DLD_run--;
+ if (DLD_run <= 0) {
+ DLDdbg << "DLD_run == 0" << endl << flush;
+ DLD_run = -1;
+ // Return from parsing
+ listen(sock_in, 0);
+ YYACCEPT;
+ }
+ else {
+ DLDdbg << "--DLD_run = " << DLD_run << endl << flush;
+ DLDout << "ok;" << endl << flush;
+ }
+ }
+ ;
+
+dialogscript: globalvars DLD_ENV_END { DLD_lineno = 0; } ';'
+ globalvars maindialog mainempty
+ ;
+
+mainempty: /* empty */
+ | maindialog;
+
+globalvars: /* empty */
+ | globalvars VARIABLE '=' value
+ { DLD_GUI->set_env($2,$4);} ';'
+ | globalvars ';'
+ ;
+
+/* dialog "Dialogtitle" { commands...} */
+maindialog: DIALOG name
+ {
+ obj = container = dialog
+ = DLD_GUI->dialog($2, DLD_Out(DLD_Outpath));
+ }
+ sizeempty
+ '{' { container->open_brace();}
+ blockempty
+ '}' { container->close_brace(); }
+ | name
+ {
+ obj = container = dialog
+ = DLD_GUI->dialog($1, DLD_Out(DLD_Outpath));
+ }
+ sizeempty
+ '{' { container->open_brace();}
+ blockempty
+ '}' { container->close_brace(); }
+ ;
+
+blockempty: /* empty */
+ | blockempty block
+ ;
+
+block :
+ /* common commands */
+ common ';'
+
+ /* common container block */
+ | {cont_stack.push(container);} blockargs
+ '{' {container->open_brace();}
+ blockempty
+ '}' {container->close_brace(); container = cont_stack.top(); cont_stack.pop();}
+
+ /* special container blocks */
+ | CHECKLIST name { obj = checklist = container->checklist($2);}
+ varargs
+ '{' {checklist->open_brace();}
+ checkblock
+ '}' {checklist->close_brace();}
+
+ | RADIOLIST name { obj = radiolist = container->radiolist($2);}
+ varargs
+ '{' {radiolist->open_brace();}
+ radioblock
+ '}' {radiolist->close_brace(); }
+
+ | LIST name { obj = listwidget = container->list($2);}
+ listargs
+ '{' {listwidget->open_brace();}
+ listblock
+ '}' {listwidget->close_brace(); }
+
+ | COMBOBOX name { obj = combobox = container->combobox($2);}
+ varargs
+ '{' { combobox->open_brace(); }
+ comboblock
+ '}' { combobox->close_brace(); }
+
+ /* error handling
+ | error ';' { yyerrok; yyerror("TEST");}
+ | error ';' '}' {container->close_brace(); yyerrok; } block
+ | error '}' {container->close_brace(); yyerrok; } block
+*/
+ ;
+
+sizeargs: WIDTH NUMBER { if(obj)obj->widthP(atoi($2.c_str())); }
+ | HEIGHT NUMBER { if(obj)obj->heightP(atoi($2.c_str())); }
+ | fontargs
+ ;
+
+sizeempty: /* empty */
+ | sizeempty sizeargs
+ ;
+
+blockargs: /* empty */
+ | FORM name {obj = container = container->form($2);} sizeempty
+ | ROW name {obj = container = container->row($2);} sizeempty
+ | COL name {obj = container = container->col($2);} sizeempty
+ | DIALOG name {obj = container = container->dialog($2);} sizeempty
+ ;
+
+listargs: varargs MULTI { listwidget->set_multi(true);} varargs
+ | varargs
+ ;
+
+listblock: /* empty */
+ | listblock LISTITEM constring { obj = listwidget->listitem($3);}
+ args ';'
+ ;
+
+comboblock: /* empty */
+ | comboblock COMBOITEM constring { obj = combobox->comboitem($3);}
+ args ';'
+ ;
+
+checkblock: /* empty */
+ | checkblock CHECKBUTTON constring
+ { obj = checklist->checkbutton($3);} args ';'
+ ;
+
+radioblock: /* empty */
+ | radioblock RADIOBUTTON constring { obj = radiolist->radiobutton($3);}
+ args ';'
+ ;
+
+common: /* empty */
+ | BUTTON constring
+ { obj = button = container->button($2);} buttonargs
+ | TEXT constring { obj = container->text($2); } sizeempty
+ | IMAGE constring { obj = container->image($2); } sizeempty
+ | MOVIE constring { obj = image = container->image($2);
+ if(image)image->setIsMovie(true); } sizeempty
+ | TEXTBOX name
+ { obj = textbox = container->textbox($2);} textboxargs
+ | MENUITEM constring
+ { obj = menu = container->menu($2,0);} menuargs
+ | MENUCHECK constring
+ { obj = menu = container->menu($2,1);} menucheckargs
+ | GAUGE name { obj = container->gauge($2); } gaugeargs
+ | INPUT name { obj = input = container->input($2); } inputargs
+ | VARIABLE '=' value {DLD_GUI->set_env($1,$3);}
+ ;
+
+buttonargs: args SIGN { button->set_signature(true); } args
+ | args
+ ;
+
+textboxargs: /* empty */
+ | textboxargs FILEARG constring { textbox->set_filename($3);}
+ | textboxargs sizeargs
+
+menuargs: /* empty */
+ | menuargs EXEC constring { menu->add_exec($3);}
+ | menuargs EXIT { menu->set_exit(true);}
+ | menuargs GLOBAL { menu->set_global(true);}
+ ;
+
+menucheckargs: /*empty */
+ | menucheckargs varsetaddargs
+ | menucheckargs GLOBAL { menu->set_global(true);}
+ ;
+
+gaugeargs: /* empty */
+ | gaugeargs VAR VARNAME { if(obj)obj->add_setvar($3, "");}
+ | gaugeargs EXEC constring { if(obj)obj->add_exec($3);}
+ | gaugeargs FORK { if(obj)obj->set_killchild(false);}
+ | gaugeargs EXIT { if(obj)obj->set_exit(true);}
+ | gaugeargs DISABLE { if(obj)obj->disable(); }
+ | gaugeargs sizeargs
+ ;
+
+inputargs: /* empty */
+ | inputargs VAR VARNAME { input->add_setvar($3, "");}
+ | inputargs PASSWD { input->set_passwd(true);}
+ | inputargs IP { input->set_ip(true);}
+ | inputargs NUMERIC { input->set_numeric(true);}
+ | inputargs LENGTH NUMBER { input->set_length(atoi($3.c_str()));}
+ | inputargs sizeargs
+ | inputargs DISABLE { if(obj)obj->disable(); }
+ | inputargs EXIT { obj->set_exit(true);}
+ ;
+
+varargs: /* empty */
+ | varargs VAR VARNAME { if(obj)obj->add_setvar($3, "");}
+ | varargs EXEC constring { if(obj)obj->add_exec($3);}
+ | varargs DISABLE { if(obj)obj->disable(); }
+ | varargs FORK { if(obj)obj->set_killchild(false);}
+ | varargs EXIT { if(obj)obj->set_exit(true);}
+ | varargs sizeargs
+ ;
+
+varsetaddargs:
+ VAR VARNAME SET value { if(obj)obj->add_setvar($2, $4);}
+ | VAR VARNAME ADD value { if(obj)obj->add_addvar($2, $4);}
+ ;
+
+args: /* empty */
+ | args varsetaddargs
+ | args EXEC constring { if(obj)obj->add_exec($3);}
+ | args DISABLE { if(obj)obj->disable(); }
+ | args FORK { if(obj)obj->set_killchild(false);}
+ | args EXIT { if(obj)obj->set_exit(true);}
+ | args IMAGEFILE constring { if(obj)obj->add_image($3);}
+ | args MOVIEFILE constring { if(obj)obj->add_movie($3);}
+ | args sizeargs
+ | args error { yyerror("maybe missing ';'"); }
+ ;
+
+value: constring
+ | VARNAME {$$=$1;}
+ | NUMBER {$$=$1;}
+ ;
+
+name: /* empty */ {$$.erase();}
+ | NAME {$$=$1} name { $$+=$3; }
+ ;
+
+fontargs:
+ FONT VARNAME colourargs { if(obj)obj->set_font($2, "normal");}
+ | FONT VARNAME colourargs SIZE value colourargs { if(obj)obj->set_font($2, $5);}
+ ;
+
+colourargs: /* empty */
+ | colourargs BG value { if(obj)obj->set_bg($3);}
+ | colourargs FG value { if(obj)obj->set_fg($3);}
+ ;
+
+constring: NAME {$$=$1} name {$$+=$3; }
+ ;
+
+%%
+int DLD_error = 0;
+
+int yyerror(char *s)
+{
+ int i;
+
+ DLDerr.form("stdin:%ld:%sstdin:%ld:", DLD_lineno, DLD_line, DLD_lineno);
+ for ( i = 0; i < (DLD_linepos-yyleng); i++ ) {
+ if(isspace(DLD_line[i]))
+ DLDerr << DLD_line[i];
+
+ DLDerr << ' ';
+ }
+
+ DLDerr << "^ " << s << endl << flush;
+ DLD_error = 1;
+
+ if (DLD_GUI)
+ DLD_GUI->print_status ("Error parsing input! ...");
+
+ if(DLD_Outpath.length()) {
+ ofstream out(DLD_Outpath.c_str());
+ out << "error;" << endl << flush;
+ out.close();
+#ifdef DEBUG
+ DLDdbg << "error; --> client" << endl << flush;
+#endif
+ DLD_Outpath.erase();
+ }
+ return 0;
+}
+
+int
+dld_parse ()
+{
+
+ if (DLD_GUI)
+ DLD_GUI->print_status ("Parsing input ...");
+ do
+ {
+ DLD_GUI->exec();
+ } while(DLD_run > 0 && (!DLD_error));
+
+ return DLD_error;
+}
diff --git a/dldialog/src/dld_radiobutton.h b/dldialog/src/dld_radiobutton.h
new file mode 100644
index 0000000..43ffe60
--- /dev/null
+++ b/dldialog/src/dld_radiobutton.h
@@ -0,0 +1,40 @@
+/******************************************************************************
+**
+** $Id: dld_radiobutton.h,v 1.1 1999/04/18 20:59:35 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_RADIOBUTTON_H
+#define DLD_GUI_RADIOBUTTON_H
+
+#include "dld_obj.h"
+
+/**
+ * The radiobutton.
+ * @short Abstract interface for the radiobutton.
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_RadioButton : public virtual DLD_Obj {
+};
+#endif
diff --git a/dldialog/src/dld_radiolist.h b/dldialog/src/dld_radiolist.h
new file mode 100644
index 0000000..f11b74b
--- /dev/null
+++ b/dldialog/src/dld_radiolist.h
@@ -0,0 +1,61 @@
+/******************************************************************************
+**
+** $Id: dld_radiolist.h,v 1.1 1999/04/18 20:59:35 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_RADIOLIST_H
+#define DLD_GUI_RADIOLIST_H
+
+#include "dld_obj.h"
+
+class DLD_RadioButton;
+
+/**
+ * Abstract Interface
+ * @short Abstract Interface
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_RadioList : public virtual DLD_Obj {
+public:
+ /** Adds a radiobutton to the radiolist.
+ * @param name The text of the item
+ * @return ptr to item
+ */
+ virtual DLD_RadioButton *radiobutton(const string& = 0) = 0;
+
+ /** Indicates the beginning of a new block
+ *
+ * Can be used to reserve space for children.
+ */
+ virtual void open_brace() = 0;
+
+ /** Indicates the end of a block.
+ *
+ * Can be used to collect all children.
+ */
+ virtual void close_brace() = 0;
+};
+
+#endif
diff --git a/dldialog/src/dld_row.h b/dldialog/src/dld_row.h
new file mode 100644
index 0000000..b15eef5
--- /dev/null
+++ b/dldialog/src/dld_row.h
@@ -0,0 +1,41 @@
+/******************************************************************************
+**
+** $Id: dld_row.h,v 1.1 1999/04/18 20:59:35 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_ROW_H
+#define DLD_GUI_ROW_H
+
+#include "dld_container.h"
+
+/**
+ * Abstract Interface
+ * @short Abstract Interface
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_Row : public virtual DLD_Obj, public virtual DLD_Container {
+};
+
+#endif
diff --git a/dldialog/src/dld_text.h b/dldialog/src/dld_text.h
new file mode 100644
index 0000000..00c1b87
--- /dev/null
+++ b/dldialog/src/dld_text.h
@@ -0,0 +1,41 @@
+/******************************************************************************
+**
+** $Id: dld_text.h,v 1.1 1999/04/18 20:59:35 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+
+#ifndef DLD_GUI_TEXT_H
+#define DLD_GUI_TEXT_H
+
+#include "dld_obj.h"
+
+/**
+ * Abstract Interface
+ * @short Abstract Interface
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_Text : public virtual DLD_Obj {
+};
+
+#endif
diff --git a/dldialog/src/dld_textbox.h b/dldialog/src/dld_textbox.h
new file mode 100644
index 0000000..9d5b7ca
--- /dev/null
+++ b/dldialog/src/dld_textbox.h
@@ -0,0 +1,44 @@
+/******************************************************************************
+**
+** $Id: dld_textbox.h,v 1.1 1999/04/18 20:59:35 harald Exp $
+**
+** 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.
+**
+** by Harald Hoyer (Harald.Hoyer@hot.spotline.de)
+** for delix Computer GmbH (http://www.delix.de)
+**
+******************************************************************************/
+
+/******************************************************************************
+ *
+ * IMPORTANT:
+ * ----------
+ *
+ * If you modify anything of this you have to modify
+ * GUI_VERSION_INFO in configure.in following the guidelines in
+ * README.developers
+ *
+ *****************************************************************************/
+
+#ifndef DLD_GUI_TEXTBOX_H
+#define DLD_GUI_TEXTBOX_H
+
+#include "dld_obj.h"
+
+/**
+ * Abstract Interface
+ * @short Abstract Interface
+ * @author Harald Hoyer <Harald.Hoyer@hot.spotline.de>
+ */
+class DLD_TextBox : public virtual DLD_Obj {
+public:
+ /** Sets the filename of the file that will be printed
+ * @param filename the filepath
+ */
+ virtual void set_filename(const string& filename) = 0;
+};
+
+#endif
diff --git a/dldialog/src/dldialog.cc b/dldialog/src/dldialog.cc
new file mode 100644
index 0000000..07304c3
--- /dev/null
+++ b/dldialog/src/dldialog.cc
@@ -0,0 +1,920 @@
+/*-*- c++ -*-******************************************************************
+**
+** Copyright (C) 1998,1999,2000 Harald Hoyer (HarryH@Royal.Net)
+**
+** $Id: dldialog.cc,v 1.37 1999/04/22 14:37:45 harald Exp $
+**
+** 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+******************************************************************************/
+#include <ansidecl.h>
+#include <ctype.h>
+#include <dirent.h>
+#include <dlfcn.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <getopt.h>
+#include <iostream.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <signal.h>
+#include <string.h>
+#include <stddef.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <sys/file.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <unistd.h>
+#include <fstream>
+#include <strstream>
+#include <dlfcn.h>
+#include <locale.h>
+#include "dld_gui.h"
+#include "dld_lib.h"
+
+#include "dldialog.h"
+#include "dld_parser.h"
+
+extern char **environ;
+
+T_DLD_MODE DLD_Mode = DLD_NONE;
+int fd_out, fd_in, fd_err, sock_in;
+struct sockaddr_un sock_addr;
+socklen_t sock_len;
+DLD_Gui *DLD_GUI;
+int DLD_Debug = 0;
+string inpath;
+string indir;
+fstream DLDout;
+ofstream DLDdbg;
+ofstream DLDerr;
+
+char *my_ttyname = NULL;
+
+char dld_title[1024];
+
+static const char *infifo;
+
+int tty_fdout, tty_fdin, tty_fderr;
+
+DLD_Gui * (*func_dld_lib_init) (const char *name,
+ int argc, char **argv);
+
+static char *tname /*, *lname */ ;
+
+/** Prints the Usage of dldialog.
+ * @param name argv[0]
+ */
+void
+print_usage ( const char *name )
+{
+ cerr << _("Usage: ") << name << _(" [OPTIONS]\n"
+ "\nOPTIONS:\n"
+ "\t-f, --file \tread input from file, rather than from stdin\n")
+#ifdef HAVE_QT
+ << _("\t-q, --qt \tstart with Qt (X11) interface\n")
+#endif
+#ifdef HAVE_TVISION
+ << _("\t-t, --tv \tstart with tvision (terminal) interface\n")
+#endif
+ << _("\t-T, --title \tsets the window title to the next argument\n"
+ "\t-p, --parse \tparse only to check input\n"
+ "\t-b, --start \tstart dldialog server\n"
+ "\t-e, --stop \tstop dldialog server\n"
+ "\t-w, --wait \twait for dldialog server to end\n"
+ "\t-d, --debug \tdisplays debugging output\n"
+ "\t-v, --version \tdisplay version information and exit\n"
+ "\t-h, --help \tdisplay this help and exit\n"
+ "\n");
+}
+
+char *
+dld_mytty ()
+{
+ static CONST char dev[] = "/dev";
+ static char *name = NULL;
+ static size_t namelen = 0;
+ struct stat st;
+ dev_t mydev = 0;
+
+ /*
+ * ino_t myino;
+ */
+ DIR *dirstream;
+ struct dirent *d;
+ int save = errno;
+ int d_namlen;
+ FILE *statfile;
+
+ if ((statfile = fopen ("/proc/self/stat", "r")) != NULL) {
+ int dev;
+
+ fscanf (statfile, "%*d %*s %*c %*d %*d %*d %d", &dev);
+ fclose (statfile);
+ mydev = dev;
+ }
+
+ dirstream = opendir (dev);
+
+ if (dirstream == NULL)
+ return NULL;
+
+ while ((d = readdir (dirstream)) != NULL) {
+ d_namlen = strlen (d->d_name) + 1;
+ if (sizeof (dev) + d_namlen > namelen) {
+ if (name)
+ free (name);
+ namelen = (sizeof (dev) + d_namlen) << 1; /*
+ * * * * Big enough.
+ */
+ name = (char *) malloc (namelen);
+ if (!name)
+ return NULL;
+ (void) memcpy (name, dev, sizeof (dev) - 1);
+ name[sizeof (dev) - 1] = '/';
+ }
+ (void) memcpy (&name[sizeof (dev)], d->d_name,
+ d_namlen);
+ if ((stat (name, &st) == 0)
+ && ((unsigned) st.st_ino == (unsigned) d->d_ino)
+ && S_ISCHR (st.st_mode)
+ && st.st_rdev == mydev) {
+ (void) closedir (dirstream);
+ my_ttyname = name;
+ errno = save;
+ return name;
+ }
+ }
+
+ (void) closedir (dirstream);
+ errno = save;
+ return NULL;
+}
+void fill_sock(socklen_t *len, struct sockaddr_un *ctladdr, const char *path)
+{
+ // Fill sockaddr
+ bzero((char *)ctladdr, sizeof(ctladdr));
+ ctladdr->sun_family = AF_UNIX;
+ strcpy(ctladdr->sun_path, path);
+ *len = sizeof(ctladdr->sun_family) + strlen(path);
+}
+
+void dld_make_fifo(int pid)
+{
+ char *ttyp = strrchr(tname, '/');
+ if(!ttyp)
+ ttyp = tname;
+ else
+ ttyp++;
+
+
+ {
+ char path[PATH_MAX];
+ snprintf(path, PATH_MAX, DLD_SOCKET_DIR "_%s_%d", ttyp, pid);
+ indir = path;
+ mkdir(indir.c_str(), S_IRWXU);
+ }
+
+ {
+ char path[PATH_MAX];
+ snprintf(path, PATH_MAX, "%s/dld_in_%d", indir.c_str(), pid);
+ inpath = path;
+ }
+
+ // Create UNIX socket
+ sock_in = socket(AF_UNIX, SOCK_STREAM, 0);
+
+ // Fill sockaddr
+ fill_sock(&sock_len, &sock_addr, inpath.c_str());
+
+ // Remove evtl. old stale file
+ unlink (inpath.c_str());
+
+ // bind a socket to that address
+ if ( bind(sock_in, (struct sockaddr *)(&sock_addr), sock_len) == -1) {
+ perror("dld_server: bind");
+ cerr << inpath << " used" << endl;
+ exit(1);
+ }
+
+ if ( listen(sock_in, 10) == -1) {
+ perror("dld_server: listen");
+ exit(1);
+ }
+
+
+ setenv("DLDIALOG_INFIFO", inpath.c_str(), true);
+
+ infifo = inpath.c_str();
+}
+
+void dld_cleanup(int)
+{
+ unlink(infifo);
+
+ char *ttyp = strrchr(tname, '/');
+ if(!ttyp)
+ ttyp = tname;
+ else
+ ttyp++;
+
+ rmdir(indir.c_str());
+}
+
+
+int
+dld_main (int argc, char **argv, int pipe_fd)
+{
+ int ret = 0;
+
+ if(!strlen(dld_title))
+ strcpy(dld_title, "DLDialog");
+
+ signal(SIGINT, dld_cleanup);
+ signal(SIGTERM, dld_cleanup);
+ signal(SIGKILL, dld_cleanup);
+ signal(SIGQUIT, dld_cleanup);
+
+ if (func_dld_lib_init &&
+ (DLD_GUI = (*func_dld_lib_init) (dld_title, argc, argv)) != 0) {
+
+ /* Give the waiting client a shot */
+ {
+ ofstream pipeout(pipe_fd);
+ pipeout << "ready!;" << endl << flush;
+ pipeout.close();
+ }
+
+#ifdef DEBUG
+ /* Parse it */
+ try {
+#endif
+ ret = dld_parse ();
+ DLDdbg.flush ();
+ DLDerr.flush ();
+ DLDout.flush ();
+#ifdef DEBUG
+ }
+ catch (DLD_Parse_Error) {
+ }
+ catch (DLD_Pipe_Error) {
+ }
+ catch (Bad_arg& err) {
+ DLDerr << err.file << ":" << err.line << ": "
+ << err.reason << endl
+ << flush;
+
+ if(DLD_GUI) {
+ delete DLD_GUI;
+ DLD_GUI = 0;
+ }
+ }
+#endif
+
+ if(DLD_GUI) {
+ delete DLD_GUI;
+ DLD_GUI = 0;
+ }
+
+ if(DLD_run == 0 && DLDout.is_open()) {
+ // For the last dldialog --end
+ DLDout << "all_ok;" << endl << flush;
+// DLDout.close();
+ }
+ dld_cleanup(0);
+ }
+ return ret;
+}
+
+void dld_start()
+{
+ // Create UNIX socket
+ sock_in = socket(AF_UNIX, SOCK_STREAM, 0);
+
+ // Fill sockaddr
+ fill_sock(&sock_len, &sock_addr, infifo);
+
+ if (connect(sock_in, (struct sockaddr *)&sock_addr, sock_len) == -1 ) {
+ perror("dld_client_start: connect");
+ cerr << infifo << _(" tried!") << endl;
+ exit(1);
+ }
+
+ fstream com(sock_in);
+
+#ifdef DEBUG
+ if(DLD_Debug)
+ cerr << _("Sending start") << endl;
+#endif
+ com << "dld_start;" << endl << flush;
+
+ string dummy;
+#ifdef DEBUG
+ if(DLD_Debug)
+ cerr << _("Waiting for ok") << endl;
+#endif
+
+ while(com >> dummy && dummy != "ok;");
+
+ com.close();
+}
+
+void dld_stop()
+{
+ // Create UNIX socket
+ sock_in = socket(AF_UNIX, SOCK_STREAM, 0);
+
+ // Fill sockaddr
+ fill_sock(&sock_len, &sock_addr, infifo);
+
+ if (connect(sock_in, (struct sockaddr *)&sock_addr, sock_len) == -1 ) {
+ perror("dld_client_stop: connect");
+ cerr << infifo << " tried!" << endl;
+ exit(1);
+ }
+
+ fstream com(sock_in);
+
+#ifdef DEBUG
+ if(DLD_Debug)
+ cerr << _("Sending stop") << endl;
+#endif
+ com << "dld_stop;" << endl;
+
+ string dummy;
+#ifdef DEBUG
+ if(DLD_Debug)
+ cerr << _("Waiting for ok") << endl;
+#endif
+ while((com >> dummy) && (dummy != "ok;") && (dummy != "all_ok;") );
+
+ if(dummy == "all_ok;") {
+ while(com >> dummy);
+ }
+ com.close();
+}
+
+bool dld_send()
+{
+ signal(SIGPIPE, SIG_IGN);
+ // Create UNIX socket
+ sock_in = socket(AF_UNIX, SOCK_STREAM, 0);
+
+ // Fill sockaddr
+ fill_sock(&sock_len, &sock_addr, infifo);
+
+ if (connect(sock_in, (struct sockaddr *)&sock_addr, sock_len) == -1 ) {
+ perror("dld_client_send: connect");
+ cerr << infifo << _(" tried!") << endl;
+ exit(1);
+ }
+
+ fstream com(sock_in);
+
+#ifdef DEBUG
+ if(DLD_Debug)
+ cerr << _("Sending client {") << endl;
+#endif
+ com << "dld_client {" << endl << flush;
+
+ for(int i=0; environ[i] != 0; i++) {
+ char *div = strchr(environ[i], '=');
+ if(div) {
+ char *olddiv = div;
+ *div = 0;
+ div++;
+ com << environ[i] << "=\"";
+ char *esc;
+ while((esc = strchr(div, '\"'))!=0) {
+ *esc = 0;
+ com << div << "\\\"";
+ div = esc+1;
+ }
+ com << div << "\";" << endl;
+ *olddiv = '=';
+ }
+ }
+
+ com << "dld_env_end;" << endl;
+
+
+ com << cin.rdbuf();
+
+ char buf[YYLMAX];
+/*
+ int len;
+ while((len = read(STDIN_FILENO, buf, YYLMAX-1)) && (len > 0)) {
+ buf[len] = 0;
+ com << buf << flush;
+ }
+*/
+
+#ifdef DEBUG
+ if(DLD_Debug)
+ cerr << _("Sending }") << endl;
+#endif
+ com << '}' << endl << flush;
+
+ while(com.getline(buf, 1025) && (strlen(buf) == 0));
+
+ if(!com)
+ return false;
+
+ com.close();
+
+ if(strstr(buf, "error;"))
+ return false;
+
+#ifdef DEBUG
+ if(DLD_Debug)
+ cerr << _("Getting output pipe") << endl;
+#endif
+ {
+ struct stat s_buf;
+ if(stat(buf, &s_buf) == -1) {
+ cerr << buf << _(" is no output pipe") << endl;
+ exit(1);
+ }
+ }
+
+#ifdef DEBUG
+ if(DLD_Debug)
+ cerr << _("Opening output pipe ") << buf << endl;
+#endif
+ string pipepath(buf);
+ ifstream in(buf);
+
+#ifdef DEBUG
+ if(DLD_Debug)
+ cerr << _("Reading output pipe ") << buf << endl << flush;
+#endif
+
+ cout << in.rdbuf();
+
+#ifdef DEBUG
+ if(DLD_Debug)
+ cerr << _("Deleting output pipe ") << buf << endl;
+#endif
+ unlink(pipepath.c_str());
+
+ signal(SIGPIPE, SIG_DFL);
+
+ return true;
+}
+
+int
+dld_server (int argc, char **argv)
+{
+// int box;
+ int c;
+ int curopt;
+ bool startflag = false;
+
+ string dl_dlpath = "libdld_gen.so";
+
+ if (argc > 1) {
+ while (1) {
+ int oi = 0;
+
+ static struct option long_options[] =
+ {
+ {"generic", 0, 0, 'g'},
+ {"qt", 0, 0, 'q'},
+ {"tv", 0, 0, 't'},
+ {"title", 1, 0, 'T'},
+ {"debug", 0, 0, 'd'},
+ {"parse", 0, 0, 'p'},
+ {"reloaded", 0, 0, 'r'},
+ {"file", 1, 0, 'f'},
+ {"help", 0, 0, 'h'},
+ {"version", 0, 0, 'v'},
+ {"start", 0, 0, 'b'},
+ {"stop", 0, 0, 'e'},
+ {0, 0, 0, 0}
+ };
+
+
+ c = getopt_long (argc, argv, "begqtpdf:vhrT:", long_options, &oi);
+ if (c == -1)
+ break;
+
+ curopt = (optind - 1) ? optind -1 : 1;
+
+ switch (c) {
+ case 'h':
+ print_usage (argv[0]);
+ return (0);
+ break;
+
+ case 'v':
+ cout << _("dldialog version ") << VERSION << endl
+ << _("\tby Harald Hoyer (HarryH@Royal.Net)\n"
+ "\tfor delix Computer GmbH (http://www.delix.de)\n");
+ return (0);
+ break;
+
+ case 'g':
+ if (DLD_Mode == DLD_NONE) {
+ char *pre;
+ char *c;
+
+ for(c = argv[curopt]; (c && *c); c++)
+ if(*c == 'g')
+ {
+ *c = 'r';
+ break;
+ }
+ pre = getenv ("DLD_PRELOAD");
+ if (pre) {
+ setenv ("LD_PRELOAD", pre, 1);
+ }
+ else {
+ cerr << _("DLD_PRELOAD not specified!") << endl;
+ }
+ DLD_Mode = DLD_GENERIC;
+ }
+ break;
+
+ case 'q':
+#ifdef HAVE_QT
+ if (DLD_Mode == DLD_NONE) {
+ dl_dlpath = "libdld_qt.so";
+ DLD_Mode = DLD_QT;
+ }
+ else {
+ cerr << _("Another mode was already selected!") << endl;
+ }
+#else
+ cerr << _("QT support not compiled in!") << endl;
+#endif
+ break;
+
+ case 't':
+#ifdef HAVE_TVISION
+ if (DLD_Mode == DLD_NONE) {
+ /*
+ * Lets be the master of the session.
+ * Good for the console.
+ */
+ dl_dlpath = "libdld_tv.so";
+ DLD_Mode = DLD_TV;
+ }
+ else {
+ cerr << _("Another mode was already selected!") << endl;
+ }
+#else
+ cerr << _("TVision support not compiled in!") << endl;
+#endif
+ break;
+
+ case 'p':
+ if (DLD_Mode == DLD_NONE) {
+ dl_dlpath = "libdld_gen.so";
+ DLD_Mode = DLD_PARSE;
+ }
+ else {
+ cerr << _("Another mode was already selected!") << endl;
+ }
+ break;
+
+ case 'd':
+ DLD_Debug = 1;
+ break;
+
+ case 'f':
+ if(freopen (optarg, "rb", stdin)==0) {
+ perror(optarg);
+ return (1);
+ }
+ break;
+
+ case 'T':
+ strncpy(dld_title, optarg, sizeof(dld_title)-1);
+ break;
+
+ case 'b':
+ startflag = true;
+ break;
+
+ default:
+ cout << _("Try `") << argv[0] << " --help'." << endl;
+ return (1);
+ }
+ }
+ }
+
+ if (!(tname = ttyname (STDERR_FILENO))) {
+ tname = dld_mytty ();
+ if(!tname) {
+ tname = "no_tty";
+ }
+ }
+
+ int pipe_fd[2];
+ pipe(pipe_fd);
+
+ int pid;
+ if ((pid = fork ()) == 0) {
+
+ close(pipe_fd[0]);
+
+ pid = getpid();
+
+ struct rlimit RLP;
+ getrlimit (RLIMIT_OFILE, &RLP);
+
+ for (int i = 3; i < RLP.rlim_cur; i++)
+ if(i != pipe_fd[1])
+ close (i);
+
+ dld_make_fifo(pid);
+
+ if(DLD_Mode == DLD_NONE) {
+#ifdef HAVE_TVISION
+ DLD_Mode = DLD_TV;
+ dl_dlpath = "libdld_tv.so";
+#else
+ DLD_Mode = DLD_PARSE;
+ dl_dlpath = "libdld_gen.so";
+#endif
+ }
+
+ fd_err = dup (STDERR_FILENO);
+
+ DLDerr.attach (fd_err);
+
+ if(DLD_Mode == DLD_TV) {
+ if(!tname) {
+ DLDerr << "No terminal!" << endl << flush;
+ return(10);
+ }
+
+ setsid();
+ tty_fderr = open(tname, O_WRONLY);
+
+ if (!isatty (STDIN_FILENO)) {
+ tty_fdin = open (tname, O_RDONLY);
+ }
+ else {
+ tty_fdin = STDIN_FILENO;
+ }
+
+ if (!isatty (STDOUT_FILENO)) {
+ // tty_fdout = open (tname, O_WRONLY);
+ tty_fdout = open(tname, O_WRONLY);
+ }
+ else {
+ tty_fdout = STDOUT_FILENO;
+ }
+ } else {
+ if(tname) {
+ tty_fdin = open (tname, O_RDONLY);
+ tty_fdout = open(tname, O_WRONLY);
+ }
+ else
+ {
+ dup2(STDIN_FILENO, tty_fdin);
+ dup2(STDOUT_FILENO, tty_fdout);
+ }
+// close(STDERR_FILENO);
+ close(STDIN_FILENO);
+ close(STDOUT_FILENO);
+ }
+
+ if (DLD_Debug) {
+ DLDdbg.attach (fd_err);
+ }
+ else {
+ DLDdbg.open ("/dev/null");
+ }
+
+ // Open our library
+ void *dl_handle = dlopen(dl_dlpath.c_str(), RTLD_NOW);
+
+ if(!dl_handle) {
+ DLDerr << "dlopen(" << dl_dlpath << "): ";
+ DLDerr << dlerror() << endl;
+ abort();
+ }
+
+ // Get the entry function
+ func_dld_lib_init = (DLD_Gui *(*)(const char *name,
+ int argc,
+ char **argv))
+ dlsym(dl_handle, "dld_lib_init");
+
+ const char *error = 0;
+
+ if ((error = dlerror()) != NULL) {
+ DLDerr << "dlsym: ";
+ DLDerr << error << endl;
+ abort();
+ }
+
+ // Go for the main loop
+ dld_main(argc, argv, pipe_fd[1]);
+
+
+/* IT IS NOT SAFE TO CLOSE THE LIBRARY DUE TO STATIC OBJECTS in tvision
+ * and a bug in egcs and libdl ....
+#ifdef DEBUG
+ DLDdbg << "Closing library!" << endl << flush;
+#endif
+
+ dlclose(dl_handle);
+
+ if ((error = dlerror()) != NULL) {
+ DLDerr << "dlsym: ";
+ DLDerr << error << endl << flush;
+ abort();
+ }
+*/
+
+ }
+ else /* fork */
+ {
+
+ close(pipe_fd[1]);
+
+ char *ttyp = strrchr(tname, '/');
+ if(!ttyp)
+ ttyp = tname;
+ else ttyp++;
+
+ {
+ char path[PATH_MAX];
+ snprintf(path, PATH_MAX, DLD_SOCKET_DIR "_%s_%d/dld_in_%d", ttyp, pid, pid);
+ inpath = path;
+ }
+
+ setenv("DLDIALOG_INFIFO", inpath.c_str(), true);
+
+ infifo = inpath.c_str();
+
+ {
+ char buf[1025];
+ ifstream ready(pipe_fd[0]);
+ ready.getline(buf, 1025);
+ }
+ close(pipe_fd[0]);
+ /*
+ * We are the first client
+ * Give it a first shot so that an end is needed
+ */
+ dld_start();
+
+ if(!startflag) {
+ // Ok ... there was no --start
+ if(dld_send())
+ dld_stop();
+
+ int status;
+ // Just wait for our small child to exit
+ waitpid(pid, &status, 0);
+ }
+ else {
+ // Give that thing to the outer world
+ cout << "DLDIALOG_INFIFO=\"" << infifo << "\";" << endl;
+ }
+
+ }
+
+ return 0;
+}
+
+int
+dld_client (int argc, char **argv)
+{
+ int c;
+ int curopt;
+
+ if (argc > 1) {
+ while (1) {
+ int oi = 0;
+
+ static struct option long_options[] =
+ {
+ {"generic", 0, 0, 'g'},
+ {"qt", 0, 0, 'q'},
+ {"tv", 0, 0, 't'},
+ {"title", 1, 0, 'T'},
+ {"debug", 0, 0, 'd'},
+ {"file", 1, 0, 'f'},
+ {"help", 0, 0, 'h'},
+ {"version", 0, 0, 'v'},
+ {"start", 0, 0, 'b'},
+ {"stop", 0, 0, 'e'},
+ {"wait", 0, 0, 'w'},
+ {0, 0, 0, 0}
+ };
+
+
+ c = getopt_long (argc, argv, "gqtTdpf:vbew", long_options, &oi);
+ if (c == -1)
+ break;
+
+ curopt = (optind - 1) ? optind -1 : 1;
+
+ switch (c) {
+ case 'h':
+ print_usage (argv[0]);
+ return (0);
+ break;
+
+ case 'v':
+ cout << _("dldialog version ") << DLD_VERSION_STRING << endl
+ << _("\tby Harald Hoyer (HarryH@Royal.Net)\n"
+ "\tfor delix Computer GmbH (http://www.delix.de)\n");
+ return (0);
+ break;
+
+ case 'd':
+ DLD_Debug = 1;
+ break;
+
+ case 'f':
+ if(freopen (optarg, "rb", stdin) == 0) {
+ perror(optarg);
+ return(1);
+ }
+ break;
+
+ case 'b':
+ {
+ dld_start();
+ cout << "DLDIALOG_INFIFO=\"" << infifo << "\";" << endl;
+ return 0;
+ break;
+ }
+ case 'e':
+ {
+ dld_stop();
+ return 0;
+ break;
+ }
+ case 'w':
+ {
+ dld_stop();
+ struct stat s_buf;
+
+ // Scan for infifo
+ while(stat(infifo, &s_buf) != -1)
+ usleep(20000);
+
+ return 0;
+ break;
+ }
+ case 'q':
+ case 't':
+ case 'g':
+ break;
+ default:
+ cout << _("Try `") << argv[0] << "' --help'." << endl;
+ return (1);
+ }
+ }
+ }
+
+ dld_start();
+
+ if(dld_send())
+ dld_stop();
+ else return 1;
+
+ return 0;
+}
+
+int
+main (int argc, char **argv)
+{
+ setlocale (LC_ALL, "");
+// setlocale (LC_MESSAGES, "");
+// setlocale (LC_NUMERIC, "");
+ bindtextdomain (PACKAGE"-scripts", LOCALEDIR);
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
+ infifo = getenv("DLDIALOG_INFIFO");
+
+ if(infifo)
+ return dld_client(argc, argv);
+ else
+ return dld_server(argc, argv);
+}
diff --git a/dldialog/src/dldialog.h b/dldialog/src/dldialog.h
new file mode 100644
index 0000000..3c27ee1
--- /dev/null
+++ b/dldialog/src/dldialog.h
@@ -0,0 +1,57 @@
+/******************************************************************************
+**
+** $Id: dldialog.h,v 1.6 1999/01/20 14:46:43 saturn Exp $
+**
+** 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.
+**
+** (C) (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+**
+******************************************************************************/
+
+#ifndef DLD_DLDIALOG_H
+#define DLD_DLDIALOG_H
+
+#include <fstream>
+#include <string>
+#include <sys/un.h> /* struct sockaddr_un */
+#include <sys/socket.h>
+#define DLD_SOCKET_DIR "/tmp/.dldialog"
+
+/** Interface selection mode.
+ * If you add a new interface you have to specify your
+ * new mode here and set DLD_Mode accordingly.
+ */
+enum T_DLD_MODE {
+ DLD_NONE,
+ DLD_PARSE,
+ DLD_GENERIC,
+ DLD_TV,
+ DLD_QT,
+ DLD_RELOADED
+};
+
+///
+extern T_DLD_MODE DLD_Mode;
+
+///
+extern int fd_out, fd_in, fd_err, sock_in;
+extern struct sockaddr_un sock_addr;
+extern socklen_t sock_len;
+
+extern string inpath, indir;
+char *dld_mytty ();
+void print_usage ( const char *name );
+void dld_make_fifo(int pid);
+
+class DLD_Gui;
+extern DLD_Gui *DLD_GUI;
+extern DLD_Gui * (*func_dld_lib_init) (const char *name,
+ int argc, char **argv);
+extern char dld_title[1024];
+/// The global output stream.
+extern fstream DLDout;
+
+#endif
diff --git a/dldialog/src/parser.sed b/dldialog/src/parser.sed
new file mode 100644
index 0000000..2b06bce
--- /dev/null
+++ b/dldialog/src/parser.sed
@@ -0,0 +1,66 @@
+s/"DIALOG"/"dialog"/g
+s/"FORM"/"form"/g
+s/"LIST"/"list"/g
+s/"ROW"/"row"/g
+s/"COL"/"col"/g
+s/"CHECKLIST"/"checklist"/g
+s/"RADIOLIST"/"radiolist"/g
+s/"COMBOBOX"/"combobox"/g
+s/"CHECKBUTTON"/"checkbutton"/g
+s/"RADIOBUTTON"/"radiobutton"/g
+s/"TEXT"/"text"/g
+s/"BUTTON"/"button"/g
+s/"GAUGE"/"gauge"/g
+s/"TEXTBOX"/"textbox"/g
+s/"MENUITEM"/"menubox"/g
+s/"MENUCHECK"/"menucheck"/g
+s/"LISTITEM"/"listitem"/g
+s/"COMBOITEM"/"comboitem"/g
+s/"INPUT"/"input"/g
+s/"IMAGE"/"image"/g
+s/"VARIABLE"/"a <variable>"/g
+s/"ADD"/"-add"/g
+s/"SET"/"-set"/g
+s/"VAR"/"-var"/g
+s/"EXEC"/"-exec"/g
+s/"MULTI"/"-multi"/g
+s/"EXIT"/"-exit"/g
+s/"GLOBAL"/"-global"/g
+s/"IP"/"-ip"/g
+s/"NUMERIC"/"-numeric"/g
+s/"PASSWD"/"-passwd"/g
+s/"LENGTH"/"-length"/g
+s/"WIDTH"/"-width"/g
+s/"HEIGHT"/"-height"/g
+s/"FILEARG"/"-file"/g
+s/"SIGN"/"-sign"/g
+s/"DISABLE"/"-disable"/g
+s/"IMAGEFILE"/"-image"/g
+s/"MOVIEFILE"/"-movie"/g
+s/"NAME"/"a <name>"/g
+s/"VARNAME"/"a name of a variable"/g
+s/"NUMBER"/"a number"/g
+s/"dialogscript"/"a dialog script"/g
+s/"maindialog"/"a dialog script"/g
+s/"blockempty"/"any commands"/g
+s/"block"/"any commands"/g
+s/"sizeargs"/"-width or -height"/g
+s/"sizeempty"/"-width or -height"/g
+s/"blockargs"/"form, row, col or dialog"/g
+s/"listargs"/"-multi, -width or -height"/g
+s/"listblock"/"some listitems"/g
+s/"comboblock"/"some comboitems"/g
+s/"checkblock"/"some checkbuttons"/g
+s/"radioblock"/"some radiobuttons"/g
+s/"common"/"some simple commands"/g
+s/"textboxargs"/"-file, -width or -height"/g
+s/"menuargs"/"-exec, -exit or -global"/g
+s/"menucheckargs"/"-var or -global"/g
+s/"gaugeargs"/"-var, -exec, -exit or -width, -height"/g
+s/"inputargs"/"-var, -passwd, -ip, -numeric, -length, -exit or -width, -height"/g
+s/"varargs"/"-var, -exec, -exit or -width, -height"/g
+s/"varsetaddargs"/"-var <varname> [-set <value>|-add <value>]"/g
+s/"args"/"-exec, -exit, -var <varname> [-set <value>|-add <value>] or -width, -height"/g
+s/"value"/"a <value>"/g
+s/"name"/"a <name>"/g
+s/"constring"/"a <string>"/g
diff --git a/dldialog/stamp-h.in b/dldialog/stamp-h.in
new file mode 100644
index 0000000..9788f70
--- /dev/null
+++ b/dldialog/stamp-h.in
@@ -0,0 +1 @@
+timestamp
diff --git a/dldialog/tests/DLD-start.xpm b/dldialog/tests/DLD-start.xpm
new file mode 100644
index 0000000..23cfca5
--- /dev/null
+++ b/dldialog/tests/DLD-start.xpm
@@ -0,0 +1,69 @@
+/* XPM */
+static char * dldstart1_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"27 15 48 1",
+/* colors */
+" c None",
+". c #ff9c00",
+"X c #ffbd00",
+"o c #ffde00",
+"O c #8c8cde",
+"+ c #f7adad",
+"@ c #efa5a5",
+"# c #de8c84",
+"$ c #ef4a4a",
+"% c #ef2121",
+"& c #f7ad21",
+"* c #adadff",
+"= c #e7d6ff",
+"- c #4242a5",
+"; c #00007b",
+": c #ffbdbd",
+"> c #ce2121",
+", c #a51808",
+"< c #941010",
+"1 c #bd1018",
+"2 c #6b6bb5",
+"3 c #ffd6ce",
+"4 c #f78484",
+"5 c #f76b6b",
+"6 c #e70000",
+"7 c #9429b5",
+"8 c #9429bd",
+"9 c #e7949c",
+"0 c #de8c39",
+"q c #3939c6",
+"w c #39008c",
+"e c #ef3931",
+"r c #4a00a5",
+"t c #bd3184",
+"y c #ad63e7",
+"u c #c68cef",
+"i c #6b31ad",
+"p c #ad63d6",
+"a c #42088c",
+"s c #7b21b5",
+"d c #100029",
+"f c #21005a",
+"g c #9c42de",
+"h c #8429bd",
+"j c #6318ce",
+"k c black",
+"l c #310063",
+"z c #5a5a5a",
+/* pixels */
+" ..Xooooo ",
+" ..X...XX ",
+" ooooXX. O ",
+" +@@#$%ooXXX&*O=-; ",
+" ::>,<<1.ooX#O===--2 ",
+" %+3:45%6XX&O=****--2 ",
+" 7854945$%60XqqO*****w; ",
+"=*888e$e>666rXtqqO****;; ",
+"y*u77866661rr8iwqqOqqqq; ",
+" u==p77887887788qqqqqarss8 ",
+" uu==u7887788777qwi877877d",
+" uu====u878877887878777f",
+" uuu==****pg8888hrrww",
+" yyyypyy*yygjjkk ",
+" piallz "};
diff --git a/dldialog/tests/DLD.xpm b/dldialog/tests/DLD.xpm
new file mode 100644
index 0000000..842b532
--- /dev/null
+++ b/dldialog/tests/DLD.xpm
@@ -0,0 +1,155 @@
+/* XPM */
+static char * dld52_xpm[] = {
+"26 131 21 1",
+" c blue",
+". c #28A228A2FFFF",
+"X c #38E338E3FFFF",
+"o c #59655965FFFF",
+"O c #D75CD75CFFFF",
+"+ c white",
+"@ c #DF7DDF7DFFFF",
+"# c #79E779E7FFFF",
+"$ c #18611861FFFF",
+"% c #AEBAAEBAFFFF",
+"& c #B6DAB6DAFFFF",
+"* c #9E799E79FFFF",
+"= c #CF3CCF3CFFFF",
+"- c #EFBEEFBEFFFF",
+"; c #96589658FFFF",
+": c #49244924FFFF",
+"> c #71C671C6FFFF",
+", c #BEFBBEFBFFFF",
+"< c #8E388E38FFFF",
+"1 c #30C230C2FFFF",
+"2 c #51445144FFFF",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" . ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" XXX. ",
+" oO+++++@#$ ",
+" %+++++++++O$ ",
+" #+++&###*@++= ",
+" -+O$ ;++. ",
+" .++: -+> ",
+" X++ ,+# ",
+" X++ ,+# ",
+" X++ ,+# ",
+" X++#########@+# ",
+" X+++++++++++++# ",
+" X+++++++++++++# ",
+" $XXXXXXXXXXXXX. ",
+" ",
+" ;,o ",
+" ,+# ",
+" ,+# ",
+" ,+# ",
+" ,+# ",
+" ,+# ",
+" ,+# ",
+" X+++++++++++++# ",
+" X+++++++++++++# ",
+" .,,,,,,,,,,,,,o ",
+" ",
+" ",
+" $<,+++@*1 ",
+" 2+++++++++% ",
+" :+++-,,,@+++; ",
+" @+-o $,++. ",
+" .++o $++o ",
+" X++$ ,+# ",
+" X++ ,+# ",
+" X++ =+# ",
+" X++XXXXXXXXXO+# ",
+" X+++++++++++++# ",
+" X+++++++++++++# ",
+" $#############X ",
+" ",
+" ",
+" ",
+" "};
diff --git a/dldialog/tests/Makefile.am b/dldialog/tests/Makefile.am
new file mode 100644
index 0000000..a8e11e1
--- /dev/null
+++ b/dldialog/tests/Makefile.am
@@ -0,0 +1,28 @@
+#/*****************************************************************************
+#**
+#** $Id: Makefile.am,v 1.18 2000/03/15 20:02:19 harald Exp $
+#**
+#** 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.
+#**
+#** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+#**
+#*****************************************************************************/
+
+TESTS = ${srcdir}/test1 ${srcdir}/test2 ${srcdir}/test8 ${srcdir}/test6
+EXTRA_DIST = test1 test1.cmp test2 test2.cmp test3 test4 \
+ test5 test6 test7 test8 test9 \
+ example1 example2 example3 example4 dldialog_funcs \
+ extractstr.awk dldialog-scripts.po \
+ pnglogo.png DLD.xpm DLD-start.xpm calc
+
+localedir = $(datadir)/locale
+
+po_DATA = dldialog-scripts.mo
+
+podir = $(localedir)/de/LC_MESSAGES
+
+dldialog-scripts.mo: ${srcdir}/dldialog-scripts.po
+ msgfmt -o $@ $<
diff --git a/dldialog/tests/Makefile.in b/dldialog/tests/Makefile.in
new file mode 100644
index 0000000..49c3926
--- /dev/null
+++ b/dldialog/tests/Makefile.in
@@ -0,0 +1,289 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+#/*****************************************************************************
+#**
+#** $Id: Makefile.am,v 1.18 2000/03/15 20:02:19 harald Exp $
+#**
+#** 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.
+#**
+#** (C) 1999,2000 Harald Hoyer <DLDialog@parzelle.de>
+#**
+#*****************************************************************************/
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AS = @AS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CXX = @CXX@
+DATADIRNAME = @DATADIRNAME@
+DLLTOOL = @DLLTOOL@
+GENCAT = @GENCAT@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+GUI_VERSION_INFO = @GUI_VERSION_INFO@
+HAVE_FINAL = @HAVE_FINAL@
+INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INSTOBJEXT = @INSTOBJEXT@
+INTLDEPS = @INTLDEPS@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+KDOC = @KDOC@
+LATEX = @LATEX@
+LEX = @LEX@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIBS = @QT_LIBS@
+RANLIB = @RANLIB@
+SGML2HTML = @SGML2HTML@
+TV_INCLUDES = @TV_INCLUDES@
+TV_LDFLAGS = @TV_LDFLAGS@
+TV_LIBS = @TV_LIBS@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+YACC = @YACC@
+l = @l@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+tv_includes = @tv_includes@
+tv_libraries = @tv_libraries@
+
+TESTS = ${srcdir}/test1 ${srcdir}/test2 ${srcdir}/test8 ${srcdir}/test6
+EXTRA_DIST = test1 test1.cmp test2 test2.cmp test3 test4 test5 test6 test7 test8 test9 example1 example2 example3 example4 dldialog_funcs extractstr.awk dldialog-scripts.po pnglogo.png DLD.xpm DLD-start.xpm calc
+
+
+localedir = $(datadir)/locale
+
+po_DATA = dldialog-scripts.mo
+
+podir = $(localedir)/de/LC_MESSAGES
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+DATA = $(po_DATA)
+
+DIST_COMMON = Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps tests/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+install-poDATA: $(po_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(podir)
+ @list='$(po_DATA)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(podir)/$$p"; \
+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(podir)/$$p; \
+ else if test -f $$p; then \
+ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(podir)/$$p"; \
+ $(INSTALL_DATA) $$p $(DESTDIR)$(podir)/$$p; \
+ fi; fi; \
+ done
+
+uninstall-poDATA:
+ @$(NORMAL_UNINSTALL)
+ list='$(po_DATA)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(podir)/$$p; \
+ done
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = tests
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+check-TESTS: $(TESTS)
+ @failed=0; all=0; \
+ srcdir=$(srcdir); export srcdir; \
+ for tst in $(TESTS); do \
+ if test -f $$tst; then dir=.; \
+ else dir="$(srcdir)"; fi; \
+ if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \
+ all=`expr $$all + 1`; \
+ echo "PASS: $$tst"; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ failed=`expr $$failed + 1`; \
+ echo "FAIL: $$tst"; \
+ fi; \
+ done; \
+ if test "$$failed" -eq 0; then \
+ banner="All $$all tests passed"; \
+ else \
+ banner="$$failed of $$all tests failed"; \
+ fi; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"; \
+ test "$$failed" -eq 0
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-poDATA
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-poDATA
+uninstall: uninstall-am
+all-am: Makefile $(DATA)
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(podir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-generic clean-am
+ -rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-generic distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: uninstall-poDATA install-poDATA tags distdir check-TESTS info-am \
+info dvi-am dvi check check-am installcheck-am installcheck \
+install-exec-am install-exec install-data-am install-data install-am \
+install uninstall-am uninstall all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+dldialog-scripts.mo: ${srcdir}/dldialog-scripts.po
+ msgfmt -o $@ $<
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/dldialog/tests/calc b/dldialog/tests/calc
new file mode 100755
index 0000000..44f04cf
--- /dev/null
+++ b/dldialog/tests/calc
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# Start the server
+result=$(dldialog --start $@)
+eval "$result"
+export DLDIALOG_INFIFO
+
+export OK="0";
+
+while [ "$OK" != "1" ]; do
+
+ result=$(dldialog <<EOF
+ dialog "Maindialog" {
+ hostname="$hostname";
+ domain="$domain";
+ text "";
+ row {
+ col {
+ text "Hostname:";
+ text "Domainname:";
+ }
+ col {
+ input -var hostname -length 20 -exit;
+ input -var domain -length 20;
+ }
+ }
+ button "&OK" -var OK -set "1" -exit;
+ }
+EOF)
+
+ eval "$result"
+
+ if [ -z "$domain" ]; then
+ export domain=`echo $hostname|(IFS='.' read a b;echo $b)`;
+ fi
+
+done
+
+dldialog --stop
diff --git a/dldialog/tests/dldialog-scripts.po b/dldialog/tests/dldialog-scripts.po
new file mode 100644
index 0000000..21fc6d3
--- /dev/null
+++ b/dldialog/tests/dldialog-scripts.po
@@ -0,0 +1,56 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: dldialog-scripts 1.0\n"
+"PO-Revision-Date: 1999-04-12 13:09+02:00\n"
+"Last-Translator: Harald Hoyer <harald@delix.de>\n"
+"Language-Team: de <harald@delix.de>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+msgid "Button"
+msgstr "Knopf"
+
+msgid "All GUI Elements"
+msgstr "Alle GUI Elemente"
+
+msgid "A Row"
+msgstr "Eine Zeile"
+
+msgid "The Lists"
+msgstr "Die Listen"
+
+msgid "A &Radiolist"
+msgstr "Eine &Radioliste"
+
+msgid "Gauges"
+msgstr "Fortschrittsbalken"
+
+msgid " Input:"
+msgstr " Eingabe:"
+
+msgid "bla bla bla"
+msgstr "bla bla bla"
+
+msgid "Passwd:"
+msgstr "Passwort:"
+
+msgid "bla bla bla"
+msgstr "bla bla bla"
+
+msgid " Numeric:"
+msgstr " Numerisch:"
+
+msgid "&Not OK - output is scrambled"
+msgstr "&Nicht OK - Ausgabe ist schlecht"
+
+msgid "&Source"
+msgstr "&Quelltext"
+
+msgid "&OK - seen all"
+msgstr "&OK - Alles gesehen"
+
diff --git a/dldialog/tests/dldialog_funcs b/dldialog/tests/dldialog_funcs
new file mode 100644
index 0000000..6a31330
--- /dev/null
+++ b/dldialog/tests/dldialog_funcs
@@ -0,0 +1,70 @@
+#*-*- sh -*-*
+#
+# Some basic helper functions for shell interactions
+#
+#
+
+if [ -z "$DLDIALOG" ]; then
+ if [ -x ./src/dldialog ]; then
+ export PREF="./src"
+ export LD_LIBRARY_PATH="$PREF/DLD_TV/.libs:$LD_LIBRARY_PATH"
+ export LD_LIBRARY_PATH="$PREF/DLD_GEN/.libs:$LD_LIBRARY_PATH"
+ export LD_LIBRARY_PATH="$PREF/DLD_QT/.libs:$LD_LIBRARY_PATH"
+ export DLDIALOG=$PREF/dldialog
+ elif [ -x ../src/dldialog ]; then
+ export PREF="../src"
+ export LD_LIBRARY_PATH="$PREF/DLD_TV/.libs:$LD_LIBRARY_PATH"
+ export LD_LIBRARY_PATH="$PREF/DLD_GEN/.libs:$LD_LIBRARY_PATH"
+ export LD_LIBRARY_PATH="$PREF/DLD_QT/.libs:$LD_LIBRARY_PATH"
+ export DLDIALOG=$PREF/dldialog
+ elif [ -x `which dldialog` ]; then
+ export DLDIALOG=`which dldialog`
+ export PREF=`dirname "$0"`
+ fi
+fi
+
+set noclobber
+
+if [ -z "$DLDIALOG_INFIFO" ]; then
+ dld_waitforend="yes";
+fi
+
+function dldialog_stop () {
+ if [ -n "$DLDIALOG_INFIFO" ]; then
+ if [ "$dld_waitforend" = "yes" ]; then
+ $DLDIALOG --wait
+ dldirname=`dirname "$DLDIALOG_INFIFO"`
+ if [ -d $dldirname ]; then
+ rm -f "$DLDIALOG_INFIFO"
+ rmdir $dldirname 2>/dev/null
+ fi
+ unset DLDIALOG_INFIFO;
+ else
+ $DLDIALOG --stop
+ fi
+ fi
+}
+
+function dldialog_start () {
+ ret=$($DLDIALOG --start $@)
+ ERR="$?"
+ if [ "$ERR" != "0" ]; then
+ echo Exited with $ERR
+ exit 10;
+ fi
+ eval "$ret"
+ export DLDIALOG_INFIFO
+ trap dldialog_stop EXIT
+ trap dldialog_stop SIGCHLD
+ trap dldialog_stop SIGPIPE
+}
+
+
+function infobox () {
+ $($DLDIALOG <<EOF
+ dialog "Bitte warten... " {
+ text "$1";
+ gauge -exit -exec "$2" ;
+ }
+EOF)
+}
diff --git a/dldialog/tests/example1 b/dldialog/tests/example1
new file mode 100755
index 0000000..e360177
--- /dev/null
+++ b/dldialog/tests/example1
@@ -0,0 +1,55 @@
+#!../src/dldialog -pf
+dialog {col{row{# Comment // Comment
+ checklist "Checkbuttons" -var testcheck{
+ checkbutton "Check 1" -var check_1 -set 1;
+ checkbutton "Check 2" -var check_2 -set 1;
+ checkbutton "Check 3" -var check_3 -set 1;}
+
+# Ein paar Radiobuttons
+ radiolist "Radiobuttons" -var testradio {
+ radiobutton "Radio 1" -var radiobutton -set 1;
+ radiobutton "Radio 2" -var radio -set 2;
+ radiobutton "Radio 3" -var radio -set 3;
+ }
+
+# Eine Auswahlliste
+ col "Multiselection list" {
+ list -multi
+ {
+ listitem "Line 1" -var text -set "kfgääfgöh#öh";
+ listitem "Line 2" -var liste -set 2;
+ listitem "Line 3" -var liste -set 3;
+ listitem "Line 4" -var liste -set 4;
+ }
+ }
+ }
+
+ testvar1=0;row{gauge -var mygauge -exec "gauge.sh";}testvar2="testvalue";
+ gauge -var mygauge -height 40 -exec "gauge.sh" -width 20 -height 20;
+ testvar3="";
+
+# Die obligatorischen Abschlussbuttons
+ row { button "OK" -height 20 -width 80 -var exit -set 0 -exit; //Comment Comment
+ button "Abbrechen" -var valid -set 0 -exit -height 20 -width 80;
+ }
+ }
+ dialog "" {form "testform" {}}
+ combobox{
+ comboitem "rrrr" -var ttt -set "kj" -height 20 -width 80;
+ comboitem "rrrr" -height 20 -width 80;
+ comboitem "rrrr" -var ttt -add "kj" ;
+ }
+ menuitem "&FILE/&EXIT" -exec "rrr" -exit;
+ menuitem "&FILE/&EXIT" -exit;
+ menuitem "&FILE/&EXIT" -exec "rrr";
+ menucheck "&FILE/&EXIT" -var tt -add 1 -global;
+ menucheck "&FILE/&EXIT" -var tt -set 1 -global;
+ input -var TTT -numeric;
+ input -var TTT -ip;
+ input -var TTT;
+ input -var TTT -width 20;
+ input -var TTT -height 40;
+
+
+
+}
diff --git a/dldialog/tests/example2 b/dldialog/tests/example2
new file mode 100755
index 0000000..c073283
--- /dev/null
+++ b/dldialog/tests/example2
@@ -0,0 +1,60 @@
+#!/bin/bash
+ARGS="$@"
+
+. `dirname $0`/dldialog_funcs
+
+dldialog_start $ARGS
+
+export CHECK="1 2 3"
+
+exitbutton="w"
+
+i=0
+
+while [ "$exitbutton" = "w" ]; do
+
+ if [ ! "$CHECK" = "" ]; then
+ TEXT="The checkbutton(s) ${CHECK-nix} should be selected!";
+ else
+ TEXT="No checkbutton should be selected!";
+ fi
+
+ result=$($DLDIALOG << EOF
+ dialog "" {
+ row {
+ col {
+ text "Select and deselect buttons of your choice.";
+ text "Then press <continue>.\n";
+ text "$TEXT";
+ }
+ checklist -var CHECK {
+ checkbutton "Check &1";
+ checkbutton "Check &2";
+ checkbutton "Check &3";
+ }
+ }
+ row
+ {
+ button "&Continue" -var exitbutton -set "w" -exit;
+ text " "; # leerer Platz
+ button "&All correct - Finish" -var exitbutton -set "q" -exit;
+ text " "; # leerer Platz
+ button "&Wrong behaviour - Finish" -var exitbutton -set "f"
+-exit;
+ }
+ }
+EOF)
+
+# echo "$i: $result"
+
+ exitbutton="error"
+
+ CHECK=""
+
+ eval "$result"
+
+done
+
+if [ ! "$exitbutton" = "q" ]; then
+ exit 10;
+fi
diff --git a/dldialog/tests/example3 b/dldialog/tests/example3
new file mode 100755
index 0000000..253c869
--- /dev/null
+++ b/dldialog/tests/example3
@@ -0,0 +1,10 @@
+#!/usr/bin/dldialog -qf
+// A sample dialog
+dialog "Hier das Beispiel Nummer 3" {
+ col {
+ text "example3:";
+ textbox -file "../tests/example3";
+ textbox "Zeile 1\nZeile 2\nZeile 3\n";
+ button "OK" -exit;
+ }
+}
diff --git a/dldialog/tests/example4 b/dldialog/tests/example4
new file mode 100755
index 0000000..ecc684c
--- /dev/null
+++ b/dldialog/tests/example4
@@ -0,0 +1,16 @@
+#!/usr/bin/dldialog -qf
+// A sample dialog
+dialog "Hier das Beispiel Nummer 4" {
+
+ c2="2";
+ row {
+ text "Eine ComboBox";
+ combobox "fkduhg" -var c0{
+ comboitem "Item 1" -var c1 -set 1;
+ comboitem "Item 2" -var c2 -set 2;
+ comboitem "Item 3 ......" -var c3 -set 3;
+ }
+ }
+ textbox -file "../tests/example4";
+ button "OK" -exit;
+}
diff --git a/dldialog/tests/extractstr.awk b/dldialog/tests/extractstr.awk
new file mode 100644
index 0000000..99d7197
--- /dev/null
+++ b/dldialog/tests/extractstr.awk
@@ -0,0 +1,9 @@
+/\"([^\\\"]*(\\.)?)*\"/ {
+ if ((t = index($0, "\"")) != 0) {
+ u = index(substr($0, t + 1), "\"");
+ str = substr($0, t+1, u-1);
+ if (length(str))
+ print "msgid \"" str "\"";
+ print "msgstr \"" str "\"\n";
+ }
+}
diff --git a/dldialog/tests/pnglogo.png b/dldialog/tests/pnglogo.png
new file mode 100644
index 0000000..14aa065
--- /dev/null
+++ b/dldialog/tests/pnglogo.png
Binary files differ
diff --git a/dldialog/tests/test1 b/dldialog/tests/test1
new file mode 100755
index 0000000..70271a0
--- /dev/null
+++ b/dldialog/tests/test1
@@ -0,0 +1,106 @@
+#!/bin/sh
+ARGS="$@"
+
+. `dirname "$0"`/dldialog_funcs
+
+($DLDIALOG -p <<EOF
+dialog "TEST" {col{row{# Comment // Comment
+ checklist "Checkbuttons" -exit -var testcheck -exit{
+ checkbutton "Check 1" -var check_1 -set 1;
+ checkbutton "Check 2" -var check_2 -set 1 -exit;
+ checkbutton "Check 3" -var check_3 -set 1;
+ }
+
+# Ein paar Radiobuttons
+ radiolist "Radiobuttons" -var testradio -exit {
+ radiobutton "Radio 1" -var radiobutton -set 1;
+ radiobutton "Radio 2" -var radio -set 2;
+ radiobutton "Radio 3" -var radio -set 3 -exit;
+ }
+
+# Eine Auswahlliste
+ col "Multiselection list" {
+ list -multi -exit
+ {
+ listitem "Line 1" -var text -set "kfgääfgöh#öh";
+ listitem "Line 2" -var liste -set 2;
+ listitem "Line 3" -var liste -set 3 -exit;
+ listitem "Line 4" -var liste -set 4;
+ }
+ }
+ }
+
+ testvar1=0;row{gauge -var mygauge -exec "gauge.sh";}testvar2="testvalue";
+ gauge -var mygauge -height 40 -exec "gauge.sh" -width 20 -height 20;
+ testvar3="";
+ testvar4 = "";
+# Die obligatorischen Abschlussbuttons
+ row { button "OK" -height 20 -width 80 -var exit -set 0 -exit; //Comment Comment
+ button "Abbrechen" -var valid -set 0 -exit -height 20 -width 80;
+ }
+ }
+ dialog "" {form "testform" {}}
+ combobox -exit{
+ comboitem "rrrr" -var ttt -set "kj" -height 20 -width 80;
+ comboitem "rrrr" -height 20 -width 80 -exit;
+ comboitem "rrrr" -var ttt -add "kj" ;
+ }
+
+ menuitem "&FILE/&EXIT" -exec "rrr" -exit;
+ menuitem "&FILE/&EXIT" -exit;
+ menuitem "&FILE/&EXIT" -exec "rrr";
+ menucheck "&FILE/&EXIT" -var tt -add 1 -global;
+ menucheck "&FILE/&EXIT" -var tt -set 1 -global;
+ input -var TTT -numeric;
+ input -var TTT -numeric -length 10;
+ input -var TTT -ip;
+ input -var TTT -passwd -width 20 ;
+ input -var TTT;
+ input -var TTT -width 20;
+ input -var TTT -height 40;
+ image "TEST.gif";
+ button "TEST" -image "TEST.gif";
+ text "Wählen Sie im Menü 'Directory' den Eintrag 'new' oder klicken Sie auf
+ das Ordnersymbol in der Iconleiste (3. von links).
+ Geben Sie 'Meintest' oder etwas ähnliches ein, aktivieren Sie 'Open
+ after Creation' und drücken Sie 'OK'.
+ Sie sehen jetzt rechts von Ihrem Homeverzeichniss eine fast leere
+ Spalte, das Verzeichniss, das Sie eben erzeugt haben.
+ Wählen Sie im Menü 'File' den Eintrag 'new File' oder klicken Sie auf
+ das Papiersymbol in der Iconleiste (2. v. links).
+ Geben Sie einen beliebigen Namen ein, aktivieren Sie 'Open in Editor'
+ und drücken Sie 'OK'.
+ Jetzt öffnet sich das Fenster des eingebauten Editors und Sie können
+ beliebigen Text eingeben. Speichern Sie diesen Text.
+ Sie sehen den Dateieintrag jetzt in der rechten Spalte.
+ Ein einfacher Klick auf diesen Eintrag zeigt Ihnen in der Fusszeile
+ des Dateimanagers einige Informationen über die Grösse, Eigentums-
+ und Zugriffsrechte der Datei und das Bearbeitungsdatum.
+ Klicken Sie mit der rechten Maustaste auf den Dateieintrag, so öffnet
+ sich ein Menü mit dem Namen der Datei in der obersten Zeile.
+ Klicken Sie darauf, so öffnet sich ein weiteres Menü.
+ Klicken Sie dort auf 'Rename', so können Sie den Dateinamen ändern.
+";
+
+
+}
+EOF
+)>/tmp/test1.out ||exit 10
+
+if [ -z "$srcdir" ]; then
+ srcdir=`dirname $0`
+fi
+
+cmp $srcdir/test1.cmp /tmp/test1.out
+if [ "$?" = 0 ];
+then
+ echo "Output seems ok"
+ rm -f /tmp/test1.out
+ exit 0;
+else
+ echo "Output differs"
+ diff -u $srcdir/test1.cmp /tmp/test1.out
+# rm -f /tmp/test1.out
+ exit 1;
+fi
+
diff --git a/dldialog/tests/test1.cmp b/dldialog/tests/test1.cmp
new file mode 100644
index 0000000..eac5af0
--- /dev/null
+++ b/dldialog/tests/test1.cmp
@@ -0,0 +1,15 @@
+TTT='';
+check_1='';
+check_2='';
+check_3='';
+exit='';
+liste='';
+mygauge='';
+radio='';
+radiobutton='';
+testcheck='';
+testradio='';
+text='';
+tt='';
+ttt='';
+valid='';
diff --git a/dldialog/tests/test2 b/dldialog/tests/test2
new file mode 100755
index 0000000..d991dc9
--- /dev/null
+++ b/dldialog/tests/test2
@@ -0,0 +1,136 @@
+#!/bin/sh
+ARGS="$@"
+
+. `dirname $0`/dldialog_funcs
+
+dldialog_start $ARGS
+export rlist="2" rlist2;
+export clist="2" clist2;
+export EXIT="0";
+
+export rb1 rb2="RB2" rb3
+export cb1 cb2="CB2" cb3
+export line="TESTLINE";
+export li1 li2="LI2" li3;
+export llist="2"
+export llist2;
+export cbox="2"
+export cbox2;
+export cbi1 cbi2="CBI2" cbi3;
+
+($DLDIALOG <<EOF
+dialog "MainDialog" -width 100 {
+ row {
+ col -width 100 {
+ radiolist "Radiobuttons" {
+ radiobutton "Radio 1" -var rb1 -set "RB1";
+ radiobutton "Radio 2" -var rb2 -set "RB2" ;
+ radiobutton "Radio 3" -var rb3 -set "RB3";
+ }
+ radiolist "Radiobuttons" -var rlist {
+ radiobutton "ListRadio 1" ;
+ radiobutton "ListRadio 2" ;
+ radiobutton "ListRadio 3" ;
+ }
+
+ radiolist "Radiobuttons" -var rlist2 {
+ radiobutton "ListRadio 1" ;
+ radiobutton "ListRadio 2" ;
+ radiobutton "ListRadio 3" ;
+ }
+ }
+
+ col -width 100 {
+ checklist {
+ checkbutton "Check 1" -var cb1 -set "CB1";
+ checkbutton "Check 2" -var cb2 -set "CB2" ;
+ checkbutton "Check 3" -var cb3 -set "CB3";
+ }
+
+ checklist -var clist {
+ checkbutton "ListCheck 1" ;
+ checkbutton "ListCheck 2" ;
+ checkbutton "ListCheck 3" ;
+ }
+
+ checklist -var clist2 {
+ checkbutton "ListCheck 1" ;
+ checkbutton "ListCheck 2" ;
+ checkbutton "ListCheck 3" ;
+ }
+
+ }
+ col -width 100 {
+ list -width 100 -height 100 {
+ listitem "Item 1" -var li1 -set "LI1";
+ listitem "Item 2" -var li2 -set "LI2" ;
+ listitem "Item 3" -var li3 -set "LI3";
+ }
+ list -width 100 -height 100 -var llist {
+ listitem "ListItem 1" ;
+ listitem "ListItem 2" ;
+ listitem "ListItem 3" ;
+ }
+
+ list -width 100 -height 100 -var llist2 {
+ listitem "ListItem 1" ;
+ listitem "ListItem 2" ;
+ listitem "ListItem 3" ;
+ }
+ }
+ col -width 100 {
+ combobox {
+ comboitem "Item 1" -var cbi1 -set "CBI1";
+ comboitem "Item 2" -var cbi2 -set "CBI2" ;
+ comboitem "Item 3" -var cbi3 -set "CBI3";
+ }
+ combobox -var cbox {
+ comboitem "Item 1";
+ comboitem "Item 2" ;
+ comboitem "Item 3";
+ }
+ combobox -var cbox2 {
+ comboitem "Item 1";
+ comboitem "Item 2";
+ comboitem "Item 3";
+ }
+ combobox {
+ }
+ llist3="1 2 3";
+ list -width 100 -height 100 -var llist3 -multi {
+ listitem "ListItem 1" ;
+ listitem "ListItem 2" ;
+ listitem "ListItem 3" ;
+ }
+ list -width 100 -height 100 -var llist4 -multi {
+ listitem "ListItem 1" ;
+ listitem "ListItem 2" ;
+ listitem "ListItem 3" ;
+ }
+ }
+ }
+ text "";
+ input -var line -exit;
+ text "";
+ row {
+ button "&Ende" -exit -var EXIT -set "1";
+ }
+}
+EOF
+)>/tmp/test2.out ||exit 10
+
+if [ -z "$srcdir" ]; then
+ srcdir=`dirname $0`
+fi
+
+cmp $srcdir/test2.cmp /tmp/test2.out
+if [ "$?" = 0 ];
+then
+ echo "Output seems ok" >&2
+ rm -f /tmp/test2.out
+ exit 0;
+else
+ echo "Output differs" >&2
+ diff -u $srcdir/test2.cmp /tmp/test2.out
+ exit 1;
+fi
diff --git a/dldialog/tests/test2.cmp b/dldialog/tests/test2.cmp
new file mode 100644
index 0000000..494c8c5
--- /dev/null
+++ b/dldialog/tests/test2.cmp
@@ -0,0 +1,24 @@
+EXIT='1';
+cb1='';
+cb2='CB2';
+cb3='';
+cbi1='';
+cbi2='CBI2';
+cbi3='';
+cbox='2';
+cbox2='1';
+clist='2 ';
+clist2='';
+li1='';
+li2='LI2';
+li3='';
+line='TESTLINE';
+llist='2';
+llist2='1';
+llist3='1 2 3 ';
+llist4='';
+rb1='';
+rb2='RB2';
+rb3='';
+rlist='2';
+rlist2='1';
diff --git a/dldialog/tests/test3 b/dldialog/tests/test3
new file mode 100755
index 0000000..cd9cdd5
--- /dev/null
+++ b/dldialog/tests/test3
@@ -0,0 +1,115 @@
+#!/bin/bash
+ARGS="$@"
+
+. `dirname $0`/dldialog_funcs
+
+ export device
+
+ # set defaults:
+ device=${device:-"bj10e"}
+
+result=$($DLDIALOG $ARGS <<EOF
+ dialog "Treiberauswahl"
+ {
+ text "Um einen Drucker einzurichten, werden einige Informationen\n"
+ "benötigt.\n\n"
+ "Bitte wählen Sie aus der folgenden Liste Ihr Druckermodell.\n"
+ "Ist Ihr Drucker nicht vorhanden, dann drücken Sie bitte\n"
+ "den Knopf 'Manuell'.";
+
+ list "Druckermodell" -height 100
+ {
+ listitem "uniprint Canon BJC 610" -var device -set "uniprint";
+ listitem "bjc600 Canon BJC-210" -var device -set "bjc600";
+ listitem "bjc600 Canon BJC-240" -var device -set "bjc600";
+ listitem "bjc600 Canon BJC-70" -var device -set "bjc600";
+ listitem "bj10e Canon BubbleJet BJ10e" -var device -set "bj10e";
+ listitem "bj200 Canon BubbleJet BJ200" -var device -set "bj200";
+ listitem "bj200 Canon BubbleJet BJC-210" -var device -set "bj200";
+ listitem "bj200 Canon BubbleJet BJC-240" -var device -set "bj200";
+ listitem "bj200 Canon BubbleJet BJC-250" -var device -set "bj200";
+ listitem "bjc600 Canon BubbleJet BJC-4000" -var device -set "bjc600";
+ listitem "bjc600 Canon BubbleJet BJC-4100" -var device -set "bjc600";
+ listitem "bjc600 Canon BubbleJet BJC-4200" -var device -set "bjc600";
+ listitem "bjc600 Canon BubbleJet BJC-4550" -var device -set "bjc600";
+ listitem "bjc600 Canon BubbleJet BJC-600" -var device -set "bjc600";
+ listitem "bjc600 Canon BubbleJet BJC-610" -var device -set "bjc600";
+ listitem "bj200 Canon BubbleJet BJC-70" -var device -set "bj200";
+ listitem "bjc800 Canon BubbleJet BJC-7000" -var device -set "bjc800";
+ listitem "bjc800 Canon BubbleJet BJC-800" -var device -set "bjc800";
+ listitem "bjc600 Canon MultiPASS C2500 colour" -var device -set "bjc600";
+ listitem "eps9high EPSON-Kompatibler 9-Nadel-Drucker" -var device -set "eps9high";
+ listitem "stcolor Epson Stylus 500" -var device -set "stcolor";
+ listitem "stcolor Epson Stylus 600" -var device -set "stcolor";
+ listitem "stcolor Epson Stylus 800" -var device -set "stcolor";
+ listitem "stcolor Epson Stylus Color" -var device -set "stcolor";
+ listitem "uniprint Epson Stylus Color" -var device -set "uniprint";
+ listitem "uniprint Epson Stylus Color 1520" -var device -set "uniprint";
+ listitem "uniprint Epson Stylus Color 500" -var device -set "uniprint";
+ listitem "uniprint Epson Stylus Color 600" -var device -set "uniprint";
+ listitem "uniprint Epson Stylus Color 800" -var device -set "uniprint";
+ listitem "stcolor Epson Stylus Color II" -var device -set "stcolor";
+ listitem "uniprint Epson Stylus Color II" -var device -set "uniprint";
+ listitem "deskjet HP DeskJet" -var device -set "deskjet";
+ listitem "pjxl300 HP DeskJet 1200C" -var device -set "pjxl300";
+ listitem "pjxl300 HP DeskJet 1600C" -var device -set "pjxl300";
+ listitem "cdj500 HP DeskJet 400" -var device -set "cdj500";
+ listitem "djet500 HP DeskJet 500" -var device -set "djet500";
+ listitem "cdj500 HP DeskJet 500C" -var device -set "cdj500";
+ listitem "cdeskjet HP DeskJet 500C" -var device -set "cdeskjet";
+ listitem "cdjmono HP DeskJet 500C" -var device -set "cdjmono";
+ listitem "cdjmono HP DeskJet 510" -var device -set "cdjmono";
+ listitem "cdjmono HP DeskJet 520" -var device -set "cdjmono";
+ listitem "cdj500 HP DeskJet 540C" -var device -set "cdj500";
+ listitem "cdjmono HP DeskJet 540C" -var device -set "cdjmono";
+ listitem "cdj550 HP DeskJet 550C" -var device -set "cdj550";
+ listitem "uniprint HP DeskJet 550C" -var device -set "uniprint";
+ listitem "cdj550 HP DeskJet 560C" -var device -set "cdj550";
+ listitem "cdj550 HP DeskJet 600" -var device -set "cdj550";
+ listitem "lj4dith HP DeskJet 600" -var device -set "lj4dith";
+ listitem "ljet4 HP DeskJet 600" -var device -set "ljet4";
+ listitem "pjxl300 HP DeskJet 600" -var device -set "pjxl300";
+ listitem "cdj550 HP DeskJet 660C" -var device -set "cdj550";
+ listitem "cdj550 HP DeskJet 660C" -var device -set "cdj550";
+ listitem "cdj550 HP DeskJet 682C" -var device -set "cdj550";
+ listitem "cdj550 HP DeskJet 683C" -var device -set "cdj550";
+ listitem "cdj500 HP DeskJet 690C" -var device -set "cdj500";
+ listitem "cdj500 HP DeskJet 693C" -var device -set "cdj500";
+ listitem "cdj550 HP DeskJet 693C" -var device -set "cdj550";
+ listitem "cdjmono HP DeskJet 693C" -var device -set "cdjmono";
+ listitem "cdj550 HP DeskJet 694C" -var device -set "cdj550";
+ listitem "cdj550 HP DeskJet 850" -var device -set "cdj550";
+ listitem "cdj550 HP DeskJet 870Cse" -var device -set "cdj550";
+ listitem "ljet4 HP DeskJet 870Cse" -var device -set "ljet4";
+ listitem "deskjet HP DeskJet Plus" -var device -set "deskjet";
+ listitem "djet500 HP DeskJet Portable" -var device -set "djet500";
+ listitem "ljet4 HP LaserJet 5" -var device -set "ljet4";
+ listitem "ljet4 HP LaserJet 5L" -var device -set "ljet4";
+ listitem "ljet4 HP LaserJet 6L" -var device -set "ljet4";
+ listitem "ljet2p HP LaserJet IIp" -var device -set "ljet2p";
+ listitem "Postscript HP Laserjet 4 MP" -var device -set "Postscript";
+ listitem "pjxl300 HP PaintJet XL300" -var device -set "pjxl300";
+ listitem "ljet3 Mannesmann Tally MT 981" -var device -set "ljet3";
+ listitem "uniprint NEC P2X" -var device -set "uniprint";
+ listitem "ljetplus NEC SuperScript 860" -var device -set "ljetplus";
+ listitem "ljet4 Oki OL410ex LED printer" -var device -set "ljet4";
+ listitem "r4081 Ricoh 4081 laser printer" -var device -set "r4081";
+ listitem "r4081 Ricoh 6000 laser printer" -var device -set "r4081";
+ listitem "uniprint SUN rasterfile" -var device -set "uniprint";
+ listitem "eps9high Star NL-10" -var device -set "eps9high";
+ }
+ row
+ {
+ row { } row { } row { } row { }
+ row { } row { } row { } row { }
+ button "&Manuell..." -var exitbutton -set "m" -exit;
+ }
+ row
+ {
+ button "&Hilfe" -exec "help-dialog add-printer";
+ row { }
+ button "&Weiter >" -var exitbutton -set "w" -exit;
+ button "&Abbruch" -var exitbutton -set "a" -exit;
+ }
+ }
+EOF)
diff --git a/dldialog/tests/test4 b/dldialog/tests/test4
new file mode 100755
index 0000000..d5daedc
--- /dev/null
+++ b/dldialog/tests/test4
@@ -0,0 +1,63 @@
+#!/bin/sh
+ARGS="$@"
+
+. `dirname "$0"`/dldialog_funcs
+
+
+textvar=`/sbin/fdisk -l 2>/dev/null`
+
+listitems=`cat /proc/partitions|(read line;read line;read a b d partition; while [ -n "$partition" ];do echo listitem '"'$partition $a $b $d'" -var part -set "'$partition'";';read a b d partition;done)`
+
+echo "$listitems" >&2
+
+fdiskstr=`/sbin/fdisk -l`;
+export part="no value";
+
+dldialog_start $ARGS
+
+$($DLDIALOG <<EOF
+ dialog "Info" {
+ text "Gleich wird das System etwas machen.";
+ text "";
+ button "OK" -exit;
+ }
+EOF)
+
+function do_it() {
+$DLDIALOG <<EOF
+ dialog "Info zu $part" {
+ text "Blah blah $part";
+ text ""; //Spacer
+ button "OK" -exit;
+ }
+EOF
+}
+
+declare -fx do_it;
+
+result=$($DLDIALOG <<EOF
+ dialog "kldgj" -width 100 -height 100 {
+ row {
+ list "Formatiere" -height 100 {
+ $listitems
+ }
+ textbox "$fdiskstr" -width 100;
+ }
+ row {
+ button "Info" -exec "do_it;";
+ button "Formatieren" -exit;
+ button "OK" -exit;
+ }
+ }
+EOF)
+
+
+eval "$result"
+
+$($DLDIALOG <<EOF
+ dialog "Info" {
+ text "Formatiere $part";
+ text "";
+ button "OK" -exit;
+ }
+EOF)
diff --git a/dldialog/tests/test5 b/dldialog/tests/test5
new file mode 100644
index 0000000..98e3da2
--- /dev/null
+++ b/dldialog/tests/test5
@@ -0,0 +1,29 @@
+#!/bin/sh
+ARGS="$@"
+
+DIRNAME=`pwd`/`dirname "$0"`
+
+. $DIRNAME/dldialog_funcs
+
+dldialog_start $ARGS||exit 10
+
+result=$($DLDIALOG <<EOF
+dialog "TEST2" -width 100 -height 100 {
+ row {
+ button "TEXT";
+ button "TEXT";
+ button "TEXT";
+ }
+ row {
+ button "TEXT";
+ button "TEXT";
+ button "TEXT";
+ }
+ row {
+ button "TEXT";
+ button "TEXT";
+ button "TEXT";
+ }
+}
+EOF
+)
diff --git a/dldialog/tests/test6 b/dldialog/tests/test6
new file mode 100755
index 0000000..2000f95
--- /dev/null
+++ b/dldialog/tests/test6
@@ -0,0 +1,79 @@
+#!/bin/sh
+ARGS="$@"
+
+. `dirname "$0"`/dldialog_funcs||exit 10
+
+dldialog_start $ARGS
+
+export EXIT="NOK"
+
+result=$($DLDIALOG <<EOF
+dialog "Maindialog" {
+ text "This is the main dialog window";
+ button "FORK" -exec "$0";
+ button "HELP" -fork -exec "$DLDIALOG <<EOF
+ dialog \"HELP\" {
+ col {
+ text \"This can display some HELP text\";
+ button \"&OK\" -exit;
+ }
+ }
+EOF";
+ button "&OK" -var EXIT -set "OK" -exit;
+ dialog "TEST2" {
+ text "This is a child dialog";
+ text "";
+ row {
+ col {
+ text "Combo";
+ text "Login:";
+ text "Password:";
+ text "Numeric:";
+ }
+ col {
+ ci=2;
+ combobox -var ci {
+ comboitem "Test1";
+ comboitem "Test2";
+ comboitem "Test3";
+ }
+ input -var login ;
+ input -var passwd -passwd -exit;
+ input -var num -numeric -exit;
+ }
+ }
+ button "&OK" -exit;
+ }
+}
+EOF)
+
+eval "$result"
+
+$DLDIALOG <<EOF
+dialog "Results" {
+ text "Here are the resulting variables:";
+ text "$result";
+ button "&OK" -exit;
+}
+EOF
+
+if [ "$EXIT" = "OK" ]; then
+ export EXIT="Exit Status2: ";
+ result=$($DLDIALOG <<EOF
+ dialog "TEST 2" {
+ text "This is the main dialog window";
+ button "&OK" -var EXIT -add "OK" -exit;
+ }
+EOF)
+ eval "$result"
+
+ $DLDIALOG <<EOF
+ dialog "Results" {
+ text "Here are the resulting variables:";
+ text "$result";
+ button "&OK" -exit;
+ }
+EOF
+fi
+
+
diff --git a/dldialog/tests/test7 b/dldialog/tests/test7
new file mode 100644
index 0000000..52c2685
--- /dev/null
+++ b/dldialog/tests/test7
@@ -0,0 +1,116 @@
+#!/bin/sh
+ARGS="$@"
+
+. `dirname "$0"`/dldialog_funcs||exit 10
+
+dldialog_start $ARGS
+
+export EXIT="NOK"
+
+result=$($DLDIALOG <<EOF
+dialog "TEST1" {
+ EXIT="ESCAPE!";
+ col {
+ col -height 50 -width 100 {
+ checklist "&CheckButtons" -var mainc {
+ checkbutton "Button &1" -var cmbutt1 -set 1;
+ checkbutton "Button &2" -var cmbutt2 -set 2;
+ checkbutton "Button &3" -var cmbutt3 -set 3;
+ checkbutton "Button &4" -var cmbutt4 -set 4;
+ }
+ text "TEST";
+ text "12345678901234567890\n"
+ "1\t\t\tZeile 2\n"
+ "kdlfgjd\t\t\tZeile 3\n"
+ "dfklgjdfklg\t\t\tZeile 4\n" ;
+ }
+ row {
+ button "&Ok" -var EXIT -add "OK" -exit;
+ button "&Abbrechen" -var EXIT -add "Abbrechen" -exit;
+ }
+ }
+
+ EXIT="AFTER ";
+ dialog "Options" {
+ row -height 50 -width 100 {
+ button "&Ok" -exit;
+ button "&Abbrechen" -exit;
+ }
+ button "&Ok" -width 1 -var EXIT -add "Options" -exit;
+ }
+
+ dialog "Options3" {
+ checklist "&CheckButtons" -height 100 -width 100 -var checkvar {
+ checkbutton "Button &1" -var cbutt -set 1;
+ checkbutton "Button &2" -var cbutt -set 2;
+ checkbutton "Button &3" -var cbutt -set 3;
+ checkbutton "Button &4" -var cbutt -set 4;
+ checkbutton "Button &5" -var cbutt -set 5;
+ checkbutton "Button &6" -var cbutt -set 6;
+ }
+ row "TESTROW" {
+ radiolist "&RadioButtons" -var radiovar {
+ radiobutton "Button &1";
+ radiobutton "Button &2";
+ radiobutton "Button &3";
+ radiobutton "Button &4";
+ }
+ radiolist "&RadioButtons" {
+ radiobutton "TEST Button &1" -var rbutt -set 1;
+ radiobutton "TEST Button &2" -var rbutt -set 2;
+ radiobutton "TEST Button &3" -var rbutt -set 3;
+ radiobutton "TEST Button &4" -var rbutt -set 4;
+ }
+ }
+ }
+ dialog "Options 2" {
+ col -height 100 -width 100 {
+ row "ROW" -height 20 -width 100 {
+ col "COL" -height 1 -width 20 {
+ button "&OK" -exit;
+ button "&Abbrechen" -exit;
+ }
+ col "COL" -height 50 -width 30 {
+ button "&OK" -exit;
+ button "&Abbrechen" -exit;
+ }
+ col "COL" -height 100 -width 50 {
+ button "&OK" -exit;
+ button "&Abbrechen" -exit;
+ }
+ }
+ row "ROW" -height 30 {
+ col "COL" -height 1 -width 20 {
+ button "&OK" -exit;
+ button "&Abbrechen" -exit;
+ }
+ col "COL" -height 50 -width 30 {
+ button "&OK" -exit;
+ button "&Abbrechen" -exit;
+ }
+ col "COL" -height 100 -width 50 {
+ button "&OK" -exit;
+ button "&Abbrechen" -exit;
+ }
+ }
+ row "ROW" -height 50 {
+ col "COL" -height 1 -width 20 {
+ button "&OK" -exit;
+ button "&Abbrechen" -exit;
+ }
+ col "COL" -height 50 -width 30 {
+ button "&OK" -exit;
+ button "&Abbrechen" -exit;
+ }
+ col "COL" -height 100 -width 50 {
+ button "&OK" -exit;
+ button "&Abbrechen" -exit;
+ }
+ }
+ }
+ }
+}
+EOF)
+
+eval "$result"
+echo $result
diff --git a/dldialog/tests/test8 b/dldialog/tests/test8
new file mode 100755
index 0000000..1c60098
--- /dev/null
+++ b/dldialog/tests/test8
@@ -0,0 +1,115 @@
+#!/bin/sh
+ARGS="$@"
+
+DIRNAME=`pwd`/`dirname "$0"`
+
+
+. $DIRNAME/dldialog_funcs
+
+dldialog_start $ARGS||exit 10
+
+result=$($DLDIALOG <<EOF
+dialog "All GUI Elements" -width 100 {
+# button "Here you see a png Image in a button \"\" -sign -image \"\"" -sign -image "$DIRNAME/ani.gif";
+ button "Here (in qt-mode) you see a png Image in a button \"\" -sign -image \"\"" -sign -image "$DIRNAME/pnglogo.png";
+ row -width 100 {
+ image "$DIRNAME/DLD.xpm";
+ row "The Lists" -width 100 {
+ lv="2 3";
+ #li="2";
+ list "A &List" -width 100 -font Times -size huge -var lv {
+ listitem "1. Listitem" -image "$DIRNAME/tick.xpm" -var li -set 1 -exit;
+ listitem "2. Listitem" -image "$DIRNAME/tick.xpm" -var li -set 2 -exit;
+ listitem "3. Listitem" -var li -set 3 -image "$DIRNAME/weiter.xpm";
+ listitem "4. Listitem" -font Courier -fg "#bf0f38" -var li -set 4;
+ listitem "5. Listitem" -font Italic -size mini -fg darkgreen -var li -set 5;
+ listitem "6. Listitem"-font Roman -size mini -var li -set 6;
+ }
+
+ text " "; //Spacer
+
+ checkvar="1 3";
+ checklist "A &Checklist" -var checkvar {
+# checklist -var checkvar {
+ checkbutton "&1. checkbutton" -var cb -set 1;
+ checkbutton "&2. checkbutton" -var cb -set 2 -exit;
+ }
+
+ text " "; //Spacer
+
+ radiovar="3";
+
+ radiolist "A &Radiolist" -var radiovar {
+# radiolist -var radiovar {
+ radiobutton "&1. radiobutton" -var rb -set 1;
+ radiobutton "&2. radiobutton" -var rb -set 2 -exit;
+ }
+ }
+ }
+
+ STATIC_GAUGE="50";
+ text "Gauges";
+ row {
+ gauge -exec "echo 0; sleep 1; echo 50; sleep 1;""for i in \`seq 1 100\`;do echo \$i;sleep 0;done";
+ gauge -var STATIC_GAUGE;
+ }
+ row {
+ text "ComboBox:";
+# ci="1";
+ combobox -var cobo {
+ comboitem "Item 2" -var ci -set "2";
+ comboitem "Item 1" -var ci -set "1";
+ comboitem "Item 3" -var ci -set "3" -exit;
+ }
+
+ text " Input:";
+ iv="bla bla bla";
+ input -var iv -width 100;
+ }
+
+ row -width 100 {
+ text "Passwd:";
+ iv="bla bla bla";
+ input -var iv -passwd -length 10;
+
+ text " Numeric:";
+ ivn="1234567890";
+ input -var ivn -numeric -length 10 -exit;
+
+ text " IP:";
+ ivi="123.123.123.123";
+ input -var ivi -ip;
+ }
+
+ text "ÄÖÜaöüß"; //Spacer
+
+ row -width 100 {
+ button "&Not OK - output is scrambled" -font OldEnglish -size small -var OK -set 0 -exit;
+ button "&Source" -font Serif -size big -exec "$DLDIALOG <<EOF
+ dialog \"Source\" -width 100 -height 100 {
+ text \"The source of the file:\n$0\" -font Courier;
+ textbox \"A TextBox\" -font Courier -file \"$0\" -width 100 ;
+ text \"\"; //Spacer
+ button \"OK\" -exit;
+ }
+EOF";
+ button "&OK - seen all" -image "$DIRNAME/tick.xpm" -font Serif -fg "#ff0000" -var OK -set 1 -exit;
+ }
+# }
+}
+EOF
+)
+
+eval "$result"
+echo $result
+echo LV = $lv
+
+if [ "$OK" = "1" ];
+then
+ echo "All right"
+ exit 0;
+else
+ echo "Output is scrambled ... for best results use rxvt or linux console"
+ exit 1;
+fi
+
diff --git a/dldialog/tests/test9 b/dldialog/tests/test9
new file mode 100644
index 0000000..7230b54
--- /dev/null
+++ b/dldialog/tests/test9
@@ -0,0 +1,11 @@
+dialog "TEST" -width 100 -height 100 {
+
+ textbox "test9" -file "../tests/test9" -width 100 -height 100;
+
+ text ""; // Spacer
+
+ row {
+ button "&OK" -exit -var STATUS -add "OK";
+ button "&Cancel" -exit -var STATUS -add "NOK";
+ }
+}