1.0 Introduction This document describes version 1.04 of UW/WIN. This application was designed to run on IBM PC and compatible computers running Windows 3.x. Note that standard or enhanced mode windows is required, UW/WIN does not run under real mode. This program was inspired by UW/PC, written by Rhys Weatherley. This program is entirely independent from UW/PC, and bears no resemblance to UW/PC other than its basic functionality. UW in general is based upon a program written for the Apple Macin- tosh® by John Bruner, and uses the same UW server. It provides for up to seven separate login sessions on a remote UNIX machine. A UW server must be running on the remote UNIX machine for the advanced features to work. The source code for the UW server is available separately as described later in this document. 1.1 Important Note In order to be less "similar" to UW/PC, some of the UW commands have been changed from previous versions of UW/WIN. In particular, the "New" command (ALT-N, creates a new UW session and windows), has been changed to "Create" (ALT-C). "Kill" (ALT-K, kills the current window) has been changed to "Remove" (ALT-R), and "Exit" (ALT-E, exits the UW procotol) has been changed to "Protocol 0" (ALT-0). 1.2 Caveats Version 1.04 is the third version released to the public so far, and comments are welcome. This version implements the UW protocols 0 and 1. Protocol 0 is a simple dumb terminal interface to allow connection to the UNIX host to start up the UW server. Protocol 1 implements the advanced features described in the document allowing multiple login ses- sions. The UW server also supports a protocol 2, which has more control over window management, however this has not been implemented in UW/WIN. This may be sup- ported in a future release. Note that the documentation for the server states that it will probably not compile on any- thing but BSD based UNIX systems (eg SunOS, DEC Ultrix). It will not work on System V. There have been difficulties reported under Sys Vr4 as well. There have been reports of the server being implemented on VAX/VMS and AIX. Contact the author for details on these ports. As was previously mentioned, UW/WIN will run under Windows 3.x standard or enhanced mode only. Real mode is not supported. UW/WIN is Windows 3.1 "aware" in that it supports the higher baud rates that Windows 3.1 supports and uses the common dia- log box look and feel from wINDOWS 3.1. If run under Windows 3.0, baud rates above 19200 are not allowed, however the common dialog box is still used by virtue of the com- mdlg.dll file provided with this package. UW/WIN is distributed in the hopes that it will be found useful. If you like the program, a contribution os $20 (or whatever you feel the program is worth) would be appreciated and will help to insure that enhancements and future products become available. With any con- tribution, you will receive notification of new versions. With any contribution of $10 or more, you will receive this beautiful bound manual. Feel free to distribute this program as you wish, so long as the contents, and the notices contained within the archive are not changed. Note, however, that the UW server is copyrighted by John Bruner, and is not covered under these terms. The UW server has its own terms and conditions contained within its documentation. For that reason, the server is not bundled with this package, but must be obtained separately. 1.3 Where to get UW/WIN UW/WIN is available on some ftp sites. Most notably it is available from "ftp.cica.indi- ana.edu" [129.79.20.22] in "pub/pc/win3/util" or its mirror site "wuarchive.wustl.edu" in the "mirrors/win3/util". The file name is "uwwin104.zip". Also available alongside is the source code for the server as the file "uwserver.zip". I have been asked why the server source is packaged as a zip file, seeing as how it is meant to be unpacked on the UNIX machine. There are a couple of reasons. First is that the ftp site where it is located pretty much is standardized on zip. Second, zip seems to give superior compression over tar/compress, and it is done in a single operation as opposed to tar/compress. Third, "zip" and "unzip" are freely available on UNIX. For those that cannot unzip the server, the source, along with the Macintosh® binaries are available from "wuarchive.wustl.edu" as "mirrors/unix-c/macintosh/uw42.tar-z". Also available is a DOS based version written by Rhys Weatherly, "uwpc201.zip" in the "mirrors/msdos/modem" directory of "wuarvhive.wustl.edu". 1.4 Authors and Contacts Questions/problems concerning the above mentioned products are welcome. 1.4.1 UW/WIN - Russ Poffenberger Internet : poffen@San-Jose.ate.slb.com UUCP : {uunet,decwrl,amdahl}!sjsca4!poffen CIS : 72401,276 US Mail : Russ Poffenberger 2084 Cypress Point Byron, Ca. 94514 1.4.2 UW/PC - Rhys Weatherley Internet : rhys@cs.uq.oz.au 1.4.3UW Server - John Bruner Arpanet : jdb@mordor.s1.gov UUCP : {lll-crg,decwrl,caip}!mordor!jdb US Mail : John Bruner Lawerence Livermore National Laboratory P.O.Box 5503, L-276 Livermore, Ca. 94550 1.5 Files The following files make up the entire UW/WIN archive. UWWIN.EXE The actual Windows 3.x executable. UWLOG.EXE The executable for the logging module. RZ.EXE The executable for the X/Y/Zmodem download module. VT100.FON A set of VT100 fonts that may be used with UW/WIN. FONTREAD.ME Copyright notice for the VT100.FON file. UWWIN.DOC The text version of the documentation. DEFAULT.UW AN example configuration file. README.UWW Last minute changes and information. HISTORY.UWW The revision history of UW/WIN. UWWIN.HLP A windows 3.x compatible online help file. COMMDLG.DLL Common dialog box for Windows 3.0 users. 2.0 Using UW/WIN. This section describes how to use UW/WIN 2.1 Starting UW/WIN. UW/WIN is started by executing the program "uwwin.exe". Under windows, there are several ways that this can be done. From the file manager, simply double-click the file name. From program manager, you may bring down the "File" menu and select "Run". Specify the file name "uwwin.exe" if it is on your path, or provide a full path to its location. The best way is to add an icon to one of your program manager groups. You can then start UW/WIN simply by double-clicking on the icon. Once started, UW/WIN creates a window with a client area, then brings up the "File | Open" dialog box, allowing you to select a configuration file. You may navigate the direc- tories/disks to find the desired file. Double-clicking the file will load the parameters spec- ified. You may also select "Cancel" to not load any configuration file, such as might be the case for the first time you are running UW/WIN. You may specify the name of a configuration file on the command line. In this case, the opening dialog is skipped, and the configuration file is read in directly. This allows you to setup file manager associations, or specify the file for the program manager icon using the "Properties" dialog of program manager. The latter allows for multiple setups in the case that you may have more than one site to contact using UW/WIN. 2.2 Working with UW/WIN. Once you have selected a valid configuration file, or picked a com port to use from the "Setup | Comm" menu, UW/WIN enters "protocol 0", which is equivalent to the dumb ter- minal emulations available in many other communication programs. If a terminal emula- tion mode is not specified, or changed in the "Setup | Emulation"dialog, then the default used is adm31. A number of special keystrokes are available in protocol 0. o Alt-B Sends a line break over the serial line. o Alt-D Sends the string defined by the "dial" configuration variable to the modem. See "Configuring UW/WIN". o Alt-H Causes UW/WIN to hangup the modem. First it tries dropping the DTR line. If this fails, then the attention string "+++" is sent, followed by the hangup string "ATH0". o Alt-I This sends the modem initialization string. o Alt-U Send the "UW" startup string. Normally it is simply "uw" which will execute the UW server on the UNIX host. The UW server must be compiled and installed on the UNIX host first. o Alt-Q Quit the program. All windows will be destroyed, and UW/WIN will exit. You will be prompted before quitting. These functions may also be accessed via the "UW" menu. 2.2.1 Starting the UW Protocol. The purpose of protocol 0 is to allow you to make the inital connection to the UNIX host in the normal fashion. When you are ready to use the multiple window mode of UW/WIN, you execute the UW server by typing its command name (usuall ’uw’). If the UW com- mand string has been properly setup, you may press Alt-U, or select from the "UW" menu. When the UW server starts, it uses special characters, embedded within the serial stream to begin the protocol with UW/WIN. The current window now becomes window 1. At this point, up to six more login windows, each its own separate process, may be started, either by using the Alt-C key, or using "UW | Create". Once protocol 1 is started, some of the functions under the UW menu become available, while others may become unavailable. For functions that are unavailable, pressing their Alt- code has no effect. Under protocol 1, the following UW commands are valid. o Alt-0 Exit the UW session and enter protocol 0. You will be prompted for verification first. If you opt to continue with shutdown of protocol 0, then all windows (except for window 1) will be destroyed. o Alt-R Remove just the currently active window. o Alt-C Create a new window. A new login session will be spawned on the UNIX host to service it. If there are no more windows available (ie, all seven are open), then this command has no effect. o Alt-n Where ‘n’ is a digit between 1 and 7. This makes window ‘n’ the active window. All keyboard input is directed to the UNIX process associated with that window. Output from other windows will continue to update in their respective windows. You may also use the mouse to click in the client area, or on the title bar, of any UW window to make it the active window. Usually, if you exit the UNIX shell for a window, that window will be removed automati- cally. If you exit window 1, then ALL other windows will be killed, and UW/WIN will return to protocol 0. Each window contains a status bar at the top. This bar contains information about the win- dow, such as window number, screen size (columns X rows), and which protocol is in force. The screen size information is useful to set the UNIX terminal characteristics cor- rectly (usually using "stty". Refer to your UNIX system documentation for specific infor- mation.) after changing the window size. When a window is iconified, its title is shortened to avoid cluttering your Windows desktop. 2.2.2 Terminal Emulations. There are several adjustments you may want to make to affect the behavior of UW on the UNIX system. The UW server usually defaults to using adm31 emulation whenever it creates a new win- dow. You may wish to use some other form of emulation for your windows. This can be accomplished with the following code in your .cshrc if using the bourne shell. This will detect if the current TERM entry is adm31, and change it to SS, where SS is the desired terminal type. case $TERM in adm31) eval ‘tset -s SS‘;; esac Use the following if you are running csh, or one of its derivatives. if ($?TERM) then if ($TERM == adm31) then unsetenv TERMCAP setenv TERM vt100 endif endif You may find it necessary to "unsetenv TERMCAP" on some systems. This is because the UW server also places in TERMCAP, a "broken" implementation of a termcap entry for adm31. By "broken", I mean that it is minimally functional, and causes problems on some systems. Its existence may also interfere with the proper use of the desired emulation. If you use adm31, and your system lacks a built-in adm31 emulation, then you may have to leave the TERMCAP setting. UW/WIN allows for two different emulations to be used automatically. You may set pro- tocol 0 emulation (through the "Setup | Emulation" dialog) to be something simple, like vt52. When protocol 1 is entered, all windows will then use the emulation specified for protocol 1 as defined in the dialog. 2.3 File menu This menu provides access to dialog boxes for saving and loading configuration files, and the session logging option. 2.3.1 Loading configuration files. Select "File | Open" to bring up the dialog box which allows you to browse through the filesystem, and load a ".UW" configuration file. 2.3.2 Saving configurations. Select "File | Save" to save the current configuration to the same file. Use "File | Save As" to select a new file name. See See section 3.0 on page 8 for more information on configu- ration files. 2.3.3 Logging You may log all screen output (including terminal emulation control characters) to a file by selecting the "File | Log" menu item. Upon selecting this option, you will get a dialog box allowing you to select the file name to log the characters to. Upon selecting a file, all characters that go to that window also go in the file. Selecting "File | Log" again (while it is active, a check mark appears next to the menu item), will stop logging and close the file. 2.4 Edit Menu and Editing Controls UW/WIN works with the standard Windows clipboard and follows the standard Windows paradigm for editing functions, plus some enhance|ments. You may select text within the window by clicking and dragging the left mouse button. The selected text becomes highlighted. The text may be copied to the clipboard by either selecting "Edit | Copy", or by pressing Ctrl+Ins. You may paste text into a UW window (the text basically gets sent over the modem) by selecting "Edit | Paste", clicking the right mouse button, or using Shift+Ins. An additional function is "Edit | Copy then Paste" which will copy the selected text and paste it in in one operation. Useful for repeating previous commands. This may be per- formed by simply clicking the right mouse button. 2.5 Setup Menu There are four items in the setup menu. 2.5.1 Setup Comm This function brings up a dialog box allowing you to specify the communications parame- ters for the session. In Windows 3.0, the maximum baud rate is 19200 baud, where it is 56K in Windows 3.1. 2.5.2 Setup Initialization Selecting this menu item brings up a dialog box that allows you to specify several initial- ization strings. The first is "Dial Prefix" This is the prefix to send to your modem for dial- ing. Usually it is "atdt". The second is "Modem Init String". This is the string to send to the modem when the ".UW" file is loaded, and can also be sent via the "UW | Init" menu. You would put in specific modem setups here, like protocol settings, etc. The third field under Init is the "UW Command String" which specifies the string to send to start the "UW" server, normally this is "uw^m". The last field sets the vt100 answerback string that theUW/WIN will send when using vt100 emulation and it receives the request to send the answerback string (^E). 2.5.3 Setup Emulation Selecting this menu item brings up a dialog box allowing you to select the desired emula- tion to use for both protocol 0 and protocol 1. 2.5.4 Setup Preferences Selecting this menu item brings up a dialog box allowing you to select some default pref- erences, including default font and screen size. The "Batch Scroll" option may be useful when using slow graphics cards by allowing the system to batch invalid regions before repainting. When using accelerated video cards, this should be off (unchecked). The VT100 answerback message is sent to the host in response to a ^E from the host (in vt100 emulation). 2.6 Dial Menu The Dial menu has two items related to dialing. 2.6.1 Number This brings up the dial dialog allowing you to enter the phone number, and initiate dialing. Once connected, the connection speed is displayed, and the dialog box disappears. If no connection is made in the dial timeout, the dialog box resets. If UW/WIN was unable to initialize the modem, a message box is brought up allowing you to "Abort, Retry, or Ignore". Selecting "Retry" will attempt to communicate with the modem again. Ignore will bypass initialization and go to dialing. Abort will stop the dialing process. If the number is busy, UW/WIN will count down the redial delay that can be setup in the "Setup | Comm" dialog, and redial the number again. Press cancel to abort re-dialing. If the redial delay is 0, redial is disabled. 2.6.2 Hangup This will cause the modem to hangup, first by dropping DTR, and if that fails, it will use the standard ‘+++’ escape string followed by "ath0" to hangup. 2.7 Function Keys and Key Mapping There are several customizations that you may make to the way the keyboard behaves. In addition, you may program custom strings for each of the 10 standard functions keys. These features may be programmed via the "Keys" menu item. Under this menu are two items, "Function" and "Mappings". Each one will bring up as dialog box allowing you to make changes to the behavior. In the "Function" dialog, you select which function key to view/modify by selecting the appropriate radio button. You may edit the text, using the ‘^’ character in combination with other ASCII characters to specify a control character. For example, the character combination "^m" will be translated to the carriage return character when you press that function key. After modifying the string for a particular function key, you must press the "Save" button for the change to be recorded. In the "Mappings" dialog, there is currently only one selection, "BS=DEL". When this check box is checked, the backspace key will output the DEL code (0x7f) rather than the BS code (0x08). 2.8 UW Menu The UW menu provides a menu interface to common UW functions. 2.8.1 Quit - Quit UW/WIN. You will be prompted before quitting. 2.8.2 Protocol-0 - Exit the UW protocol, killing all but window 1. You are prompted first. 2.8.3 Break - Send a serial line break. Usually used to get the attention of the remote syste. 2.8.4 Create - Create a new window (protocol 1 only). 2.8.5 Remove - Remove the window (protocol 1 only). 2.8.6 Init - Send the Initialization string. 2.8.7 Start UW - Send the UW string to start the UW server. 2.8.8 Upload - (Not yet implemented) 2.8.9 Download - Begin a file download. See chapter 3.1 on downloading. This menu pulls right to reveal three choices, Xmodem, Ymodem, and Zmodem. 2.9 Fonts Menu This menu has two selections. "Default" selects the default font (the one specified in "Setup | Preferences".), and "Select", which bring up a font selection dialog box. The font selected has immediate effect for the current window. 2.10 Help Menu Use this to access the help file. 3.0 Config File Format This section describes the meanings of the various settings that may appear in the ".UW" config file. The syntax is "KEYWORD=value". o Fn_KEY : Where n is a number between 1 and 12. Defines the string to assign to the function key ‘n’. All characters up to the end of the line make up the string. o DEFAULT_FONT: Specifies the font specification for the default font. Generally this is non-sensical and it is not recommended that this be modified manually. Selecting the default font from the "Setup | Preferences" and saving the config file will save the proper syntax. o MODEMINIT : Specifies the string for modem initialization. Set via the "Setup | Init" dialog. o DIALPREFIX : Specifies the dial string for the modem. Set via the "Setup | Init" dialog. o UWCOMMAND : Specifies the command to start the UW server. Set via the "Setup | Init" dialog. o PHONENUMBER : The default phone number to dial. This is the last number entered in the "Dial | Number" dialog before saving. o P0EMULATION o P1EMULATION : Selects the terminal emulation for the specified protocol (0 or 1). o BAUDRATE : Sets the comm port baud rate. Set via the "Setup | Comm" dialog. Valid values are 300, 1200, 2400, 4800, 9600, 19200, 38400, and 57600. o DATASIZE : Sets the data width for the comm port. Set via the "Setup | Comm" dialog. Valid values are 7 or 8. o FLOWCONTROL : Sets the flow control type. Set via the "Setup | Comm" dialog. Valid values are HARDWARE and SOFTWARE. o PARITY : Specifies the type of parity for the comm port. Set via the "Setup | Comm" dialog. Valid values are EVEN, MARK, SPACE, NONE and ODD. o BSKEY_MAP : If set to 1, then the Backspace key generates the "DEL" code (0x7f) instead of the "BS" code (0x8). This can be set in the "Keys | Mappings" dialog. o BATCH_SCROLL : If set, then invalid regions in the client area uncovered by scrolling are batched together for a later repaint. This can be specified in the "Setup | Preferences" dialog. o WINDOW_WIDTH : o WINDOW_HEIGHT : Specifies the default window size in characters. This can be set in the "Setup | Preferences" dialog. o COMPORT : Specifies the comm port to use. This is selected via the "Setup | Comm" dialog. o REDIALDELAY : Set the delay before the number is re-dialed if busy. If set to 0, then redial is disabled. This is set in the "Setup | Comm" dialog. o ANSWERBACK : Sets the vt100 answerback message that UW/WIN will respond with if in vt100 emulation, and a ‘^E’ is received. This can be set via the "Setup | Init" dialog. o CONNECTDELAY : Sets the time to wait during dialing for a modem response (NO CARRIER, etc) before aborting the connection. Can be set in the "Setup | Comm" dialog. o HISTORYLINES : Sets the number of lines for the scrollback buffer. This can only be set via the config file. o MULTIPLE_QUERY : When downloading files using Ymodem or Zmodem, hav- ing this set (1) will prompt for continuation between multiple files. When reset (0), confirmation is only asked for the first file of a multiple file transfer. 4.0 File Downloading UW/WIN has the capability to download files from the UNIX host using popular proto- cols. Three protocols are currently implemented, Xmodem, Ymodem, and Zmodem. Zmo- dem is by far the fastest and most popular. Using UW’s unique modem multiplexing, it is possible to download in more than one window at a time in protocol 1. To perform downloads, a companion protocol program must be used on the UNIX host. The most popular is Chuck Forsbergs rzsz package, available from many ftp sites. UW/ WIN works reliably in testing with version 3.18. In order to achieve reliable file transfers, you MUST have a solid modem connection with error correction (MNP4 or V.42) using hardware flow control. Zmodem transfers (sz) are detected automatically by UW/WIN which will pop the file download dialog box with no manual interaction. Use the dialog box to navigate the disk directories to select a directory to download into. Note that the rzsz package has a timeout of 60 seconds, so you must make your selection promptly. Xmodem and Ymodem is not detected automatically, so after issuing the send command on the UNIX host (sx or sb), you must select "UW | Download -> [XY]modem". When using Zmodem or Ymodem, the file name is sent by the sender, all you need do is pick the directory. Non DOS file names (8.3) are truncated and massaged to conform. Xmodem requires you to enter a destination filename as well. There are some options available for downloading, the first, Multiple Query, is only valid with Zmodem and Ymodem. When set, if multiple files are being sent by the sender, then the user is prompted to click the "Start" button for each file. When unchecked, all files will be transferred with no further interaction required. The other option pertains to Xmodem transfers and selects whether CRC or Checksum error detection is to be used. As the file is transferred, status windows indicate progress, including size and % complete (Zmodem and Ymodem only), received bytes, and transfer rate. Note that when downloading in protocol 1, transfer rates will likely be less than under pro- tocol 0, especially for binary files. This is because the UW protocol escapes some control characters, and characters above 127. This adds to the modem overhead. It does have the advantage of running over 7 bit lines though, where other comm programs cannot. 5.0 Emulation UW/WIN supports three different types of emulation, adm31, vt52, and vt100. Vt100 emulation is the most widely supported, and is the focus of this chapter. The features in vt100 emulation have been verified using "vttest" version 1.7b. This test is available by request from me, or from various ftp sites. 5.1 VT100 Support UW/WIN vt100 emulation supports the full functionality of a vt102 terminal with some minor restrictions. In order to get the most functionality from vt100 emulation, you must use the supplied font file, vt100.fon, and have one of the vt100 fonts selected. Normally, you should use the VT100 font. The other fonts are selected automatically depending on the various modes, like 132 column, bold, line drawing, etc. 5.2 Terminal Reports In response to the "What Are You" report request, UW/WIN will respond with the sequence "ESC[?1;2c" which means VT100 with AVO (Advanced Video Option) or VT102. When asked to report terminal parameters, UW/WIN will report the xmit and recv speed as 19200 if the actual baud rate setting is 19200 or greater. Thevt100 spec has no provision for reporting baud rates greater than 19200. In response to the "Report Terminal Status" request, UW/WIN will always respond with "ESC[0n" which means terminal OK. 5.3 Colors UW/WIN uses the following colors designation. You can change the colors by using the system control panel to bring up the color dialog o Window Background color for the text background. o Window Text color for the text. o Highlight Text for the color of text highlighted by the mouse. 5.4 Limitations There are some aspects of vt100 emulation that are not supported due to technical difficul- ties in the Windows environment, and are rarely used. If these are very important to you, contact me, and if enough interest is shown, I may consider adding some support. The features not supported are. o Smooth Scroll - This rarely used feature would provide a smooth pixel by pixel scroll instead of the usual line by line scroll. This feature is very slow, and difficult to implement. o Double Wide/Double High characters - This is not supported. o Blinking characters - Blinking text is not practical in Windows. This attribute is emu- lated by using a strikethrough font. All other features of vt100 and vt102 are supported including ANSI delete and insert char- acter. Escape codes for the unsupported features are recognized, but ignored.