x3270 3.2 New Features
Author: Paul Mattes

# New Features in x3270 3.2

x3270 3.2 is a reorganization of x3270 3.1, with some significant enhancements. It is intended to be the future development platform for x3270, with x3270 3.1 continued only with bug fixes.

## Changes in x3270 3.2.20, 14. February 2003

- Bug Fixes:
  - Removed compiler warnings when building on Solaris 2 with gcc, and on Linux.
  - Now pass port number to pr3287.
  - Removed suprious saving of '@base' in the keymap.
- New Features:
  - Added per-host resource definitions (x3270.host.hostname.resourcename). Per-host resources are used for the idle command (see below) and the printer session LU.
  - Character set definitions are now sent to pr3287 sessions.
  - XFree86 now uses the 'alt' keymap by default.
  - The scripting prompt now includes the previous command's execution time.
  - Can now specify action(s) to perform when a session has been idle for some period of time.
  - Added definitions of Shift-F1..Shift-F12 as PF13..PF24 to the base keymap, and removed them from the other keymaps.
  - Added ^C/^V definitions for clipboard cut/paste to the base keymap.

## Changes in x3270 3.2.19, 1. May 2002

- Bug Fixes:
  - Corrected the definition of the 6 key in the base 3270 keymap.
  - Corrected the behavior of the Delete action on an unformatted screen.
  - Removed junk that appears on the screen during CUT-mode file transfers, and sped them up a bit.
  - Send script errors back to the script, rather than displaying it on x3270's stderr.
  - Corrected the Transfer action. Numeric arguments always failed, and the crlf option was being passed to the host even for binary transfers.
  - Corrected the display of TN3270E mode names in data stream traces.
  - Corrected the font-selection behavior when the host returns fonts with wild-card font registries.
  - Removed use of the memccpy() library function, which is apparently broken on some platforms and causes malformed Query Reply messages to be generated.
  - Corrected the trace display of events with modifier bits 2 through 5 set.
  - Fixed an infinite loop in the SysReq action in TN3270E mode.
  - Corrected the CGCSGIDs for Euro host chararacter sets.
- Enhancements:
  - CR/LF conversion can now be applied to binary file transfers.
  - Removed the association between the -E suffix on the model number and the -E transmitted with the terminal name on the telnet session. A -e will now be silently ignored in the model number value; the -E> transmitted with the telnet terminal type string (indicating support for the 3270 Extended Data Stream) is now controlled by the x3270.extended resource (which defaults to true), or by the presence of an s: prefix on the hostname, which turns off the -E when connecting to that host.
  - Allow CR/LF translation on binary transfers. Also made the File Transfer dialog box a bit more readable.
  - Added support for ISO_BackTab and EuroSign keysyms to the Default action.
  - Allow ASCII files that already contain CR/LF sequences to be transferred to the host.
  - Added bold Euro fonts (courtesy of systematics.de).
  - Added the LU name to the status line.
  - Changed the font list generation logic so that fonts wild-carded from the display character set are listed only if there is no emulatorFontList resource defined, or none of the fonts on that list are found.
  - If using the ISO 8859-1 display character set, and no 3270 fonts are found, use the fixed character set, instead of trying to select from all of the ISO 8859-1 fonts on the server.
  - Added simulation of /dev/fd/ for trace files.
  - Updated to autoconf 2.53.
  - Added strtok_r() definition for systems that don't have it.
  - Added a Toggle action.
  - Added a crosshair toggle, to display a crosshair over the cursor. These lines, extending to the height and width of the screen, make it much easier to see the cursor.
  - Moved the mapping of the 'notsign' (assumed to be above the '6' key) into a separate keymap, not. This corrects some unexpected behavior with non-U.S. keyboards.
  - Added a -printerlu option and printerLu resource to automatically start a pr3287 printer session.

## Changes in x3270 3.2.18, 31. December 2001

- Bug Fixes:
  - Corrected install rules for manual pages.
  - Corrected crashes associated with the Display Current Keymap pop-up.
  - Corrected a problem with selecting NULL characters (they were suppressed instead of being converted to spaces).
  - Restored the missing definitions for Ctrl-U and Ctrl-W in the base 3270-mode keymap.
  - Added better error detection to full-table character set definitions.
  - Changed Shift-6 back to the notsign (¬).
  - Fixed a scripting problem with percent "%" characters on the screen.
- Enhancements:
  - Included the autoconf `configure.in` file, so that users can run a newer or customized autoconf on it.
  - Added a color8 resource. When set to true, x3270 will only do a Query Reply report on 8 colors. The default of 16 seems to confuse some hosts.
  - Included test files for file transfer: all.chars and print.chars.
  - Tied character sets to particular fonts.
  - Added Silicon Graphics to the recognized X servers, using the alt keymap.
  - Added Euro symbol support, using ISO 8859-15 fonts and additional 3270 fonts.
  - Removed the obsolete highlightSelect resource.
  - Changed visualSelect to apply only to unhighlighted fields.
  - Added an onlcr resource to control Newline-to-CR/LF expansion in NVT line mode.
  - Vastly improved the use of non-Latin-1 character sets, and non-constant-spaced fonts.
  - Got rid of the separate menuFontList and FontList resources, replacing them with a single emulatorFontList resource per display character set.
  - Reordered the Hebrew font (3270h) to make it compatible with ISO Hebrew fonts.
  - Tweaked the Greek font (3270gr) and host character set definition to make it compatible with ISO Greek fonts.
  - Added a traceFileSize resource and -tracefilesize option to limit the size of trace files. Replaced the obsolete traceCommand resource with a new traceMonitor resource; if set to false it disables creation of the trace monitor window.

## Changes in x3270 3.2.17, 25. June 2001

- Installation Changes:
  - Moved the feature disable logic (turning off NVT mode, file transfers, etc.) to `configure --disable` options.
  - Files shared with other non-X11 3270 applications (the `ibm_hosts` file, pr3287 and x3270if) are now installed in under the autoconf "prefix" directory (which defaults to `/usr/local`), rather than under the system's X11 directory. The previous behavior can be restored with `configure --with-all-xinstall`. Conversely, all files can be installed under the autoconf "prefix" directory with the command `make install.byprefix`. [Incompatible change]
  - Allowed the location of the configuration directory (where the `ibm_hosts` and character set files are) to be set with a new resource: `x3270.confDir`.
  - Removed the `xmkmf` step from the build procedure.
  - Added consistent DESTDIR support.
- Bug Fixes:
  - Verified that x3270 builds with all permutations of disabled features.
  - Fixed a problem with 3270 Modify Field orders that specify no attributes.
  - Fixed a typo in the base keymap definition, which disabled the last three key mappings.
  - Fixed a problem with misinterpreting skipped 3270 field attributes.
  - Removed the redundant localhost entry from the default `ibm_hosts` file. Changed the rules for accessing `ibm_hosts` -- now it is accessed only when the supplied hostname has no qualifiers.
  - Compatibility changes for Cygwin.
  - Fixed the behavior of the `-xrm` option when there is a conflict with the `.x3270pro` file. The command-line options were supposed to be the final definitions; now they are.
  - Improved the performance of DFT file transfers.
  - Prevented Display Current Keymap from popping up twice.
  - Corrected the selection of NULL characters -- they are now treated as spaces, except at the ends of lines and at the end of the selection area.
- Character Set Improvements:
  - Added support for other 8-bit character sets (Latin-5, etc.), using standard X fonts. Strengthened the rules for the character sets implemented by the emulator font.
  - Added support for Turkish, ISO Hebrew, Russian, Thai and Brazilian character sets.
  - Added support for file-based character sets, in the `charset` subdirectory of the configuration directory.
  - Added support for specifying an entire character set translation table, rather than listing the exceptions from ISO 8859-1.
  - Added support for file transfer character sets (a definition of how the host translates EBCDIC to ASCII for file transfers).
- Other Improvements:
  - Added support for BackTab in String actions, via the `\T` sequence.
  - Added support for 3270-mode keymaps (like NVT-mode keymaps). Changed the base and alt keymaps to have default and 3270-only components. Changed the interpretation of NVT-mode keymaps so they augment the default, rather than replacing it. [Incompatible Change]
  - Allow IPv6-style square-bracket-delimited hostnames, and tightened the rules for port numbers.
  - Nearly all error messages and output from scripts is now captured in pop-ups. The only exceptions are fatal errors which prevent x3270 from creating its windows.

## Changes in x3270 3.2.16, 28. February 2001

- Added a timeout parameter to the scripting Wait action.
- Added Snap(Wait Output).
- Fixed the MAKEFLAGS/MFLAGS problems in the Imakefile template.
- Added a `--without-pr3287` option to the configure script, to avoid building pr3287.
- Added a `--with-fontdir=xxx` option to the configure script, to specify a different font installation directory.
- Resolved some build problems on HP/UX.
- Added an Italian character set.
- Corrected the behavior of the start-extend action (usually bound to Btn3Down) when doing rectangular selections.
- Added KybdSelect and Unselect actions to allow the keyboard to be used to control selections. KybdSelect is mapped to the Shifted cursor keys.
- Removed the mapping of the "^ key to "¬" in 3270 mode, replacing it with an unconditional mapping of Meta-"^" to "¬".
- Replaced the MoveCursorSelect action with the MouseSelect action, and corrected the behavior of pen selections in general.
- Corrected the mapping of the mouse cursor location to character cells when processing selections, select-pen emulation, and cursor movement.
- Stopped locking the keyboard for invalid select-pen operations.
- Changed the default visualSelect color to 6 (yellow).
- Save the emulator font in response to a WM_SAVE_YOURSELF message.
- Fixed a kybd.c build problem on X11R5.
- Added translations ASCII file transfers, so square brackets, pipe characters and anything from the upper half of the IOS 8859-1 character set stand a better chance of coming through correctly.
- Corrected a subtle problem in TN3270E option negotiation.
- Improved SSCP-LU support.
- Restored the operation of CUT-mode file transfer. (It had been disabled early in the 3.2 development cycle.)

## Changes in x3270 3.2.15, 26. December 2000

- Improved documentation formatting.
- Fixed a problem with `user` keymaps being ignored.
- Fixed a problem with disconnecting from hosts when they send illegal commands in non-TN3270E mode.
- Allow, but ignore, Create Partition structured fields.

## Changes in x3270 3.2.14, 15. November 2000

Use GNU autoconf now.
Fixed a crash when -reconnect is used and x3270.menuBar is False.
Added documentation on how to get square brackets to display properly.
Added recent-connect list and connectFileName resource to control it.
Put accidental command output into a pop-up window.
Updated the man pages and synchronized the HTML versions.
Added NVT-mode keymaps via x3270.keymap.name.nvt.
Fixed a memory corruption problem associated with printer session termination.
Improved the behavior of the -reconnect option, when a host connection fails.
Allow separate app-defaults file to be built again, via `configure --enable-app-defaults`.

## Changes in x3270 3.2.13, 24. September 2000

Integrated pr3287 into the x3270 release.
Rewrote the screen resizing logic. It now functions correctly on window managers like icewm and under KDE, and would rather leave the screen the wrong size than exit.
Changed the greenScreen color scheme to be really green.
Fixed the display of red text when the highlightBold option is set.
Fixed the block cursor display when the -mono option is used on a color display.

## Changes in x3270 3.2.12, 7. September 2000

Fixed a problem with exiting whenever the window was resized.
Added a complete interface library for use with expect, `x3270_glue.expect`.
Fixed problems with selecting blanks and NULLs on the screen -- real blanks at the end of a line are now included in the selection, and NULLs are not.
Allow `none` to be specified as a trace file name, causing a pipe to be used instead.
In secure mode, use pipe-based data stream and event tracing, and disallow screen tracing.
Added a No File button to the data stream and event tracing dialog.
Added traceFile and screenTraceFile resources, and a -tracefile option, to specify file names for tracing.
Corrected the documentation of the script prompt status fields (there are only 11 of them).
Added CMS logon example scripts, `Examples/cms_login.bash` and `Examples/cms_logon.sh`.
Added a tutorial for creating custom keymaps, `html/Keymap.html`.
Added support for 3287 printer sessions via new menu options and a new Printer() action.
Set x3270.disconnectClear to True when x3270.secure is True.
Fixed several problems when windows do not fit on the screen.

## Changes in x3270 3.2.11, 31. July 2000

Expanded the Default() action to better diagnose keymap problems.
Added default support for X11 `XK_3270_xxx` and APL keysyms.
Fixed a core dump when the emulator font can't be found.
Improved Trace Keyboard/Mouse Events display, to make it more directly applicable to creating keymaps.
Removed many compiler warnings generated when additional gcc warnings are enabled.
Changed the trace window kill signal to SIGKILL. SIGTERM didn't always do the job.
Send the correct codepage in Query Reply when using non-US character sets.
Send information about a second character set only if we have one.
Request the first LU name only once.
Added a `highlightBold` resource to display highlighted fields in bold.
Fixed a core dump from editing the Print Window Bitmap command.

## Changes in x3270 3.2.10, 5. July 2000

Added an n: prefix to hostnames to selectively disable TN3270E.
Changed the reported CSCSGID to `X'02B90025'` (English-U.S.).
Fixed the Attn() action to send TELNET IP, per RFC 2355.
Removed the explicit `$(BINDIR)` from the `Imakefile`; it bothered XFree86 4.0.
Announce which font we're using when we can't find the one the user asked for.
Fixed the problem of ignoring keyboard input when the window manager uses a click-to-focus policy and the mouse cursor is outside the x3270 window.
When processing `WM_SAVE_YOURSELF` ICCM messages, save toggles before saving the hostname.
Added a new MoveCursorSelect() action, to emulate light pen selection with the mouse. The default mapping is `Ctrl Shift <Btn1Down>`.
Added a highlightSelect resource (default True) to control whether highlighted fields are selectable via the CursorSelect() and MoveCursorSelect().
Added visualSelect and visualSelectColor resources to optionally display light pen selectable fields in a different color.
Allow spaces in font names.
Removed `XtSpecificationRelease` dependencies.
Added AIX "`@@for`" problem workaround to the build instructions.
Restored the ability to disable most components in `parts.h`, and made TN3270E mode a configurable component.
Removed old `ARGSUSED` lint hints.

## Changes in x3270 3.2.9, 26. June 2000

Fixed requesting the wrong LU after switching between TN3270E and TN3270 modes.
Changed the resource file format back to using "x3270" as a consistent prefix. Changed x3270.fontList to x3270.fontMenuList to avoid conflicts.
Fixed a typo in the `sun_k5` keymap.
Added a new Snap() action for scripts.
Added new Wait(Disconnect) and Wait(Output) actions for scripts.
Changed Wait() to Wait(InputField), Wait(3270) to Wait(3270Mode) and Wait(ansi) to Wait(NVTMode). The old names are still supported for backwards-compatibility.
Fixed a problem with parameter processing in the Transfer() action.
Improved script tracing.
Added stricter enforcement of user-specified LUs.
Fixed a nit in tracing Query Reply options.

## Changes in x3270 3.2.8, 1. June 2000

Fixed a problem with initial host connection negotation, when using a script (x3270 -script, s3270 or tcl3270) and talking to a non-TN3270E host.
Added lefttack and righttack definitions to the apl keymap.
Added support for IND$FILE file transfers in scripts, via the new Transfer action.
Added a disconnectClear resource to control clearing the screen after a host disconnect.

## Changes in x3270 3.2.7, 30. May 2000

Fixed a problem with compiling kybd.c on X11R5.
Fixed a problem with the util library on Solaris and AIX.
Fixed several problems with TN3270E SSCP-LU mode: garbled input to the host, echoed input being overwritten by host output, and keyboard locking inconsistencies.
Fixed repetition of the contents of the `ibm_hosts` file in the Connect menu.
Removed the accidental substitution of the symbolic host name with the resolved hostname in the Connect menu and the window title.
Removed a spurious error on AIX about not being able to find the `rs6000` keymap.
Added the file `localdefs.h`, to better isolate X11 dependencies for s3270 and tcl3270.

## Changes in x3270 3.2.6, 19. May 2000

Fixed a problem with displaying TN3270E options in the "About" pop-up, even if TN3270E mode had not been negotiated.
Added Sharp APL characters dieresisjot, dieresiscircle, commabar and euro, as well as names for the APL-specific versions of braceleft and braceright.
Added cut-and-paste of EBCDIC DUP and FM characters.
Changed x3270.man.html to x3270-man.html.

## Changes in x3270 3.2.5, 15. May 2000

Fixed a problem with scripts hanging in TN3270E SSCP-LU mode.

## Changes in x3270 3.2.4, 8. May 2000

Functionally identical to x3270 3.2A3.

## Changes in x3270 3.2A3, 2. May 2000

Added support for the Greek character set and a Greek font, 3270gr.
Fixed problems with font and color scheme checkboxes not being updated in the menu bar.
Fixed compiler warnings from not using `time_t`'s properly.
Fixed a problem with the status line improperly reporting disconnections during certain TN3270E mode switches.
Added TN3270E state to the data stream trace data.

## Changes in x3270 3.2A2, 27. April 2000

Due to problems with servers that do not support basic TN3270E, added support for TN3270E options RESPONSES, SYSREQ and BIND-IMAGE.
Removed disconnect logic when an invalid TN3270E message is received.
Fixed a problem with ignoring the `ibm_hosts` file.

## Changes in x3270 3.2A1, 9. December 1999

Added basic TN3270E support.

## Changes in x3270 3.2A0, 15. March 1999

### Internal Changes

The primary focus of the reorganzation is modularity. For example, through the new `parts.h` header file, it is now possible to build subsets of x3270, excluding one or more of the following features:

- Tracing
- ANSI mode
- Scripting
- Menu bar
- Pop-up keypad
- APL support
- X display

This can make for a much smaller footprint for limited applications, as well as new applications based on components of x3270. For example, a new program, s3270, is now available, which consists of only the 3270 protocol engine and the scripting facility, allowing x3270 scripts to be run without an X display.

The code is also reorganized to reduce the amount of explicit coupling between modules. An event registration mechanism is used to propagate state changes, instead of explicit calls from one module to another.

The code is now written in ANSI C, using function prototypes and `const` where appropriate.

Support for X11R4 and K&R C compilers has been dropped.

### External Changes

Basic TN3270E is now supported. TN3270E printers are not supported.

On systems that support the forkpty() library call (such as BSD-derived systems and Linux), x3270 supports local processes. A local process is a Unix process such as a shell which is connected to x3270 with a pty. In this way, x3270 will function as a local terminal emulator like xterm.

All operating modes can now be changed at runtime via menus, including extended data stream mode, and 3277/3278/3279 emulation.

The "Trace X Events" option has been replaced with a "Trace Keyboard and Mouse Events" option, which reports only X events which can be mapped with keymaps. It also reports the keymap that was used to map each action, making keymap debug much easier.

A menu option allows the current keymap to be displayed.

A new `base` keymap is defined, containing the default keyboard mappings. This keymap can be modified at will, without interfering with the basic operation of x3270, or the processing of X events not related to the keyboard or mouse (as was the case with the previous default translations resource).

Default keymaps are defined for several well-known keyboards. These keymaps are automatically used when x3270 recognizes the vendor string for the associated X server.

Several x3270 bugs, which were in the "impossible to fix" category (because of basic code organization problems) have finally been fixed.