Commit 56ed56a0 authored by Carey Evans's avatar Carey Evans
Browse files

- Change autogen.sh to simply run autoreconf.

- Add "uninhibited" flag to Tn5250Display, for automatic release of Input
  Inhibited state when movement keys and functions keys are used.
  Defaults to false for compatibility with previous versions.
- Fix option parsing in xt5250.
parent d9c6f718
2005-11-21 Carey Evans <carey.evans@gmail.com>
- Change autogen.sh to simply run autoreconf.
- Add "uninhibited" flag to Tn5250Display, for automatic release of Input
Inhibited state when movement keys and functions keys are used.
Defaults to false for compatibility with previous versions.
- Fix option parsing in xt5250.
2005-08-31 Carey Evans <carey.evans@gmail.com>
- Update the ROBODoc command to ROBODoc 4, moving it to the html
target in doc/Makefile.am, and generating a single HTML file.
......
......@@ -4,15 +4,4 @@
# repository.
#
aclocal || exit $?
autoconf || autoconf || exit $?
autoheader || autoheader || exit $?
libtoolize --automake --force || exit $?
#
# Sometimes we need to run automake twice, as it will fail the first time when
# installing ltconfig/ltmain.sh even though it successfully installs the files.
#
automake --add-missing --include-deps \
|| automake --add-missing --include-deps \
|| exit $?
autoreconf -i "$@"
......@@ -172,6 +172,10 @@ option.
.BI beep_command= COMMAND
If present, will run the supplied command instead of using the terminal beep.
.TP
.BR + / \-uninhibited
If enabled, automatically resets the input inhibited state when cursor
movement keys or function keys are pressed. The default is disabled.
.TP
.BI env. VARIABLE = VALUE
Set any other environment variables controlling the terminal session.
A list of relevant variables is given in section 5 of
......
......@@ -63,6 +63,7 @@ tn5250_display_new ()
This->indicators_dirty = 0;
This->pending_insert = 0;
This->sign_key_hack = 1;
This->uninhibited = 0;
This->session = NULL;
This->key_queue_head = This->key_queue_tail = 0;
This->saved_msg_line = NULL;
......@@ -152,6 +153,12 @@ tn5250_display_config (Tn5250Display * This, Tn5250Config * config)
This->sign_key_hack = tn5250_config_get_bool (config, "sign_key_hack");
}
/* check if Input Inhibited should be cleared automatically */
if (tn5250_config_get (config, "uninhibited"))
{
This->uninhibited = tn5250_config_get_bool (config, "uninhibited");
}
/* Set a terminal type if necessary */
termtype = tn5250_config_get (config, "env.TERM");
......@@ -1519,7 +1526,16 @@ tn5250_display_do_key (Tn5250Display * This, int key)
}
break;
case TN5250_KEYSTATE_POSTHELP:
if (key != K_RESET && key != K_ATTENTION)
if (This->uninhibited
&& (key == K_ENTER || key == K_TAB || key == K_BACKTAB
|| key == K_ROLLDN || key == K_ROLLUP
|| (key >= K_FIRST_SPECIAL && key <= K_F24)))
{
TN5250_LOG (("Resetting posthelp state for key %d.\n", key));
tn5250_display_uninhibit (This);
This->keystate = TN5250_KEYSTATE_UNLOCKED;
}
else if (key != K_RESET && key != K_ATTENTION)
{
TN5250_LOG (("Denying key %d in posthelp state.\n", key));
tn5250_display_beep (This);
......@@ -1529,9 +1545,9 @@ tn5250_display_do_key (Tn5250Display * This, int key)
}
/* In the case we are in the field exit required state, we inhibit on
* everything except left arrow, backspace, field exit, field+, and
* field- */
/* In the case we are in the field exit required state, we inhibit
* on everything except left arrow, backspace, field exit, field+,
* field- and help. */
if ((tn5250_display_indicators (This) & TN5250_DISPLAY_IND_FER) != 0)
{
switch (key)
......@@ -1554,15 +1570,24 @@ tn5250_display_do_key (Tn5250Display * This, int key)
case K_TAB:
case K_BACKTAB:
case K_RESET:
case K_HELP:
pre_FER_clear = 1;
break;
default:
This->keystate = TN5250_KEYSTATE_PREHELP;
This->keySRC = TN5250_KBDSRC_FER;
tn5250_display_inhibit (This);
TN5250_LOG (("Denying key %d in FER state.\n", key));
return;
if (This->uninhibited && key >= K_F1 && key <= K_F24)
{
pre_FER_clear = 1;
}
else
{
This->keystate = TN5250_KEYSTATE_PREHELP;
This->keySRC = TN5250_KBDSRC_FER;
tn5250_display_inhibit (This);
TN5250_LOG (("Denying key %d in FER state.\n", key));
return;
}
break;
}
}
......
......@@ -80,6 +80,7 @@ struct _Tn5250Display {
int indicators_dirty : 1;
int pending_insert : 1;
int sign_key_hack : 1;
int uninhibited : 1;
};
typedef struct _Tn5250Display Tn5250Display;
......
......@@ -21,14 +21,11 @@ get_host () {
XT5250_HOST=""
while [ $# -ne 0 ] ; do
case "$1" in
-h|--help)
--help)
exec "$bindir/tn5250";;
-V|--version)
exec "$bindir/tn5250" -V;;
-m|-s|-t|-y)
shift
;;
-*)
-version)
exec "$bindir/tn5250" -version;;
-*|+*|*=*)
;;
*)
if [ -z "$XT5250_HOST" ] ; then XT5250_HOST="$1" ; fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment