home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / CK5A188S.ZIP / ckoker.bwr < prev    next >
Text File  |  1992-11-23  |  13KB  |  314 lines

  1. CKOKER.BWR          "Beware File" for C-Kermit Version 5A        -*- text -*-
  2.  
  3.                  OS/2 VERSION
  4.  
  5. Applies to version 5A(188)
  6.  
  7. Last update: Mon Nov 23 03:29:41 1992
  8.  
  9. Authors: Frank da Cruz, Christine M. Gianone, Columbia University.
  10.  
  11.   Copyright (C) 1985, 1992, Trustees of Columbia University in the City of New
  12.   York.  Permission is granted to any individual or institution to use this
  13.   software as long as it is not sold for profit.  This copyright notice must be
  14.   retained.  This software may not be included in commercial products without
  15.   written permission of Columbia University.
  16.  
  17. Report problems, suggestions, fixes, etc, to Frank da Cruz:
  18.  
  19.   Internet: fdc@watsun.cc.columbia.edu  (or)  fdc@columbia.edu
  20.   BITNET/EARN: FDCCU@CUVMA
  21.  
  22. Columbia University Center for Computing Activities
  23. 612 West 115th Street, New York, NY  10025  USA
  24.  
  25.  
  26. DOCUMENTATION
  27.  
  28. C-Kermit 5A is documented in the book "Using C-Kermit" by Frank da Cruz
  29. and Christine M. Gianone, Digital Press, Burlington, MA, USA.  Digital
  30. Press ISBN: 1-55558-108-0; Prentice-Hall ISBN: 0-13-037490-3.  Price: US
  31. $34.95.  In USA, call DECdirect at 1-800-344-4825, refer to order number
  32. EY-J896E-DP.  Available: January 1993.
  33.  
  34.  
  35. THE 16-BIT AND 32-BIT VERSIONS
  36.  
  37. OS/2 C-Kermit can be built in a 16-bit version, which works under both OS/2
  38. 1.x and 2.0, and in a 32-bit version, which works only under OS/2 2.0 and
  39. later.  The SHOW FEATURES command tells you which version you have.
  40.  
  41. The 16-bit version might run out of stack space and crash under certain
  42. conditions (the OS/2 message will be "Stack Overflow").  This is a limitation
  43. of the Microsoft C 6.00 development system it was built with, and of the
  44. underlying 16-bit architecture.
  45.  
  46. The 32-bit version does not (should not) crash, but it can't be used under
  47. OS/2 1.x.  So use the 32-bit version under OS/2 2.00 and later.
  48.  
  49. BUT... the 32-bit version built with IBM C Set/2 lacks a working popen()
  50. routine, thus the OS/2 C-Kermit server fails to respond to REMOTE HOST, REMOTE
  51. DIRECTORY, REMOTE TYPE, etc.  The 16-bit version, however, responds correctly.
  52. The behavior of the 32-bit version built with GCC is unknown.  (However, the
  53. GCC is not distributed, because it requires Dynamically Linked Libaries
  54. (DLLs), which are not available except on systems that have the appropriate
  55. development environment installed.)
  56.  
  57.  
  58. GENERAL LIMITATIONS AND PROBLEMS
  59.  
  60. In general, OS/2 is not as fast as DOS, so don't expect OS/2 C-Kermit to be
  61. as fast as MS-DOS Kermit is under DOS.
  62.  
  63. If you refer to a disk drive that is not ready, or to a file on such a disk
  64. drive, the OS/2 critical error handler pops up and requires action from
  65. keyboard.  This can put a halt to unattended, scripted operations, and it also
  66. stops the operation of the OS/2 C-Kermit server if there is no human in
  67. attendance.  To work around: add the line "AUTOFAIL=YES" to CONFIG.SYS.  This
  68. eliminates the "hard error box", but it applies system-wide, not just to
  69. C-Kermit.
  70.  
  71. The free disk space reported by the SPACE command, and by the OS/2 C-Kermit
  72. server in response to a REMOTE SPACE command, is somewhat smaller than the
  73. free space reported by the OS/2 directory command, probably because of the
  74. disk cluster size.
  75.  
  76. The OS/2 C-Kermit server does not respond correctly to REMOTE CD commands
  77. that include only a disk letter, e.g. "REMOTE CD A:".  To change disks,
  78. include the disk letter and directory, for example "REMOTE CD A:/".
  79.  
  80. Certain commands that rely on underlying CMD.EXE services, including DELETE
  81. and TYPE, do not accept full pathnames (or, at least they do not pass them
  82. correctly to CMD.EXE).
  83.  
  84. If the PUSH command, and related commands, do not work for you, check the
  85. definition of your OS/2 COMSPEC environment variable.
  86.  
  87. There is no way to change the OS/2 code page after you have started Kermit.
  88. RUN CHCP doesn't do it because it only affects the CMD.EXE process below,
  89. which, of course, exits immediately after running CHCP.
  90.  
  91. Reportedly (by some, but denied by others), if you make your window longer
  92. than 25 lines, scrolling can interfere with the screen colors during terminal
  93. emulation.
  94.  
  95. Printer support.  The good news:
  96.  
  97.  . The PRINT command works.
  98.  . Files can be transferred to PRN in the 32-bit version only.
  99.  . LOG SESSION PRN works in the 32-bit version.
  100.  . The Print-Screen key prints the current terminal emulation screen in the
  101.    32-bit version (not tested in the 16-bit version).
  102.  . Host-initiated transparent print operations work correctly in the 32-bit
  103.    version. 
  104.  
  105. The bad news:
  106.  
  107.  . There is no Print item in the C-Kermit window menu because C-Kermit
  108.    is a character-mode (VIO), rather than Presentation Manager (PM),
  109.    application. 
  110.  . Ctrl-Print-Screen has no effect.
  111.  . Host-initiated print operations are presently ignored by the 16-bit
  112.    version (because if they are not ignored, they cause a stack overflow).
  113.  . The following host-initiated print operations are not supported:
  114.    - ESC [ 0 i    (print current screen)   
  115.    - ESC [ 1 i    (print current line)
  116.    - ESC [ ? 5 i  (autoprint is treated like transparent print)
  117.  . Print operations, when attempted on an OS/2 system that has no printer
  118.    installed, can hang the Kermit program.
  119.  
  120. Wish list:
  121.  
  122.  . Make screen rollback instantaneous, as in MS-DOS Kermit.
  123.  . Add TCP/IP, LAN Manager, and other network support.
  124.  . 132-column mode for VT102 emulator, using horizontal scrolling if
  125.    graphics adapter does not support 132 columns.
  126.  . VT-320 emulation
  127.  . Tektronix emulation
  128.  
  129.  
  130. COMMUNICATIONS AND DIALING
  131.  
  132. Unless you have a very fast machine (say, 25-50 MHz), OS/2 and its serial port
  133. drivers are not fast enough to keep up with serial input at 19200 bps unless
  134. you have configured your connection for the optimum type of flow control,
  135. preferably RTS/CTS.  Symptoms of lost data include fractured terminal screens
  136. during CONNECT and packet retransmissions during file transfer.
  137.  
  138. As of edit 184, "SET PORT 1" through "SET PORT 4" refer to COM1-COM4, *not* to
  139. file handles 1-4 as in previous edits.  If you want to specify a numeric file
  140. handle, you have to give it on the command line, e.g. "ckermit -l 4".  SET
  141. PORT { COM1..COM4, 1..4 } is now parsed using a keyword table, so "COM1" and
  142. "1", "COM2" and "2", etc, are synonyms.  The file handle argument is designed
  143. to be used from other programs that open communication channels and then run
  144. C-Kermit on them.  A sample program appears at the end of this file.
  145.  
  146. Unless you use the MODE command to change it, the OS/2 communication port
  147. device driver requires DSR and CTS from the modem.  If your modem or
  148. communication device does not provide these signals, you can enable
  149. communication by telling the communication port driver not to require them,
  150. before starting C-Kermit (or in your CKERMIT.CMD file).  For example:
  151.  
  152.   MODE COM2 IDSR=OFF,ODSR=OFF,OCTS=OFF
  153.  
  154. On some machines, C-Kermit may appear to work even though DSR and CTS are
  155. not connected to anything, nor disabled using MODE.  This is because
  156. unconnected input lines tend to "float high".  Although this situation may not
  157. cause any problems, for safety's sake you should still disable these signals,
  158. if they are not legitimate, with the MODE command
  159.  
  160.  
  161. TERMINAL EMULATION
  162.  
  163. Various VT102 terminal features are not supported, including:
  164.  
  165.  . Blink
  166.  . Smooth scroll
  167.  . Switching between 80- and 132-column mode
  168.  
  169. and others are simulated:
  170.  
  171.  . Double-width and double-height lines
  172.  . Underlining
  173.  
  174. Scrolling is slow in an OS/2 Window.  This is because OS/2 is operating in
  175. graphics mode and must draw each dot (pixel) individually.  (Reportedly, IBM
  176. will be improving the speed in a forthcoming update of the screen manager --
  177. the new "graphics engine" that will be part of OS/2 2.00.1.)  Scrolling is
  178. fast if you run C-Kermit fullscreen, which uses character mode rather than
  179. graphics mode.  But when running C-Kermit fullscreen you lose the ability to
  180. cut and paste.
  181.  
  182. The cursor disappears briefly while the screen is being updated and appears
  183. again within a few milliseconds after screen activity stops.  This can be
  184. somewhat disconcerting, but increases the speed of screen updates.
  185.  
  186. SET FLOW XON/XOFF prevents you from transmitting Ctrl-S and Ctrl-Q characters
  187. to the host.  These characters are commands (Search and Quote) in EMACS.
  188.  
  189. If the host sends the escape sequence to put the terminal into 132-column
  190. mode, and subsequently sends data that would appear in the rightmost 52
  191. columns, this may interfere with existing data on the screen.  If C-Kermit is
  192. started in an OS/2 132-column fullscreen session under OS/2 2.0 (only possible
  193. on certain video adapters), it will display such data correctly but will
  194. always be in 132-column mode, even if only 80-column mode is used.
  195.  
  196. Key scan codes are not the same as in MS-DOS Kermit.  Most ordinary keys have
  197. the same codes, but not as many keys are differentiated.  For example, all
  198. combinations of Ctrl, Shift, and Alt with a particular key do not necessarily
  199. produce different scan codes.  Also, there are no \Kverbs as in MS-DOS Kermit.
  200.  
  201. Shift-in/Shift-Out works only if you SET TERMINAL LOCKING-SHIFT ON.
  202.  
  203. The uparrow key, when used under certain circumstances in the VAX EVE
  204. editor, can cause portions of the screen to scroll, rather than simply
  205. moving the cursor (however, redrawing the screen shows that EVE received
  206. the uparrow code correctly and positioned the cursor correctly).  (This
  207. should be fixed in edit 185.)
  208.  
  209. There is presently no way to disable the answerback sequence ("OS/2 C-Kermit").
  210.  
  211.  
  212. FILE TRANSFER
  213.  
  214. There is no way send the complete contents of a file in text mode if the file
  215. contains a Ctrl-Z character that is not the last character in the file.  In
  216. other words, Ctrl-Z is always treated as end-of-file when the FILE TYPE is set
  217. to TEXT.  There should be a SET EOF {CTRLZ, NOCTRLZ} command as in MS-DOS
  218. Kermit to control the treatment of Ctrl-Z characters in text files.
  219.  
  220. Be sure to activate the appropriate type of flow control before transferring
  221. files, especially if you are using long packets:
  222.  
  223.   SET FLOW RTS/CTS
  224.     Preferred, if the device your PC is immediately connected to supports it.
  225.  
  226.   SET FLOW XON/XOFF
  227.     Used end-to-end, but subject to noise corruption, propogation delays, etc.
  228.  
  229. By default OS/2 C-Kermit uses whatever flow control is already configured
  230. for the communications port driver at the time you started C-Kermit.
  231.  
  232.  
  233. HINTS and TIPS:  INVOKING C-KERMIT FROM ANOTHER PROGRAM
  234.  
  235. If you are writing a communications program and wish to incorporate the Kermit
  236. protocol within it, one way is to use the OS/2 function call DosExecPgm to
  237. call up C-Kermit.  You would supply the instructions for Kermit using
  238. command-line options, and Kermit would do the transfer, returning back to your
  239. program when it had finished.
  240.  
  241. The only problem with this scenario is that you might already have opened up
  242. the COM port within your program, so that when Kermit tries to do the same it
  243. gets an error code back from DosOpen.  The -l command line option gets round
  244. this problem.  It uses the fact that a child process inherits the open file
  245. handles of its parent.  -l takes one numeric parameter which is the handle of
  246. the COM port in question, and it must occur in front of any other command-line
  247. parameter which accesses the COM port.  The following is a complete C program
  248. written using the Microsoft C compiler version 5.1 and the Microsoft OS/2
  249. Software Development Toolkit, which illustrates how to use the -l command-line
  250. option.
  251.  
  252. #define    INCL_BASE
  253. #include <os2.h>
  254. /*
  255.  *    Example of how to use the C-Kermit -l option to invoke
  256.  *    Kermit from another program under OS/2.
  257.  *      By Kai Uwe Rommel, Technical University of Munich, Germany.
  258.  */
  259. main(int argc, char *argv[]) {
  260. HFILE    ttyfd;
  261. USHORT    action;
  262. int    err,i;
  263. char    failname[80];
  264. char    args[80];
  265. RESULTCODES    res;
  266. struct dcb {            /* Device control block */
  267.     USHORT write_timeout;
  268.     USHORT read_timeout;
  269.     BYTE flags1, flags2, flags3;
  270.     BYTE error_replacement;
  271.     BYTE break_replacement;
  272.     BYTE xon_char;
  273.     BYTE xoff_char;
  274. } ttydcb;
  275.  
  276.     /*** Open a file ***/
  277.     if (err=DosOpen(argv[1],&ttyfd,&action,0L,0,1,0x0012,0L)) {
  278.         printf("Error %d opening %s\n",err,argv[1]);
  279.         exit(1);
  280.     }
  281.     if (err=DosDevIOCtl(&ttydcb,NULL,0x0073,1,ttyfd)) {
  282.         printf("Error %d from IOCTL on %s\n",err,argv[1]);
  283.             exit(1);
  284.     }
  285.     ttydcb.flags3 &= 0xF9;
  286.     ttydcb.flags3 |= 0x04;    /* Read "some" data from line */
  287.     DosDevIOCtl(NULL,&ttydcb,0x0053,1,ttyfd);
  288.  
  289.     /*** Call kermit ***/
  290.     strcpy(args,"ckermit");
  291.     i = strlen(args);
  292.     args[i++]=0;
  293.     sprintf(&args[i],"-l %d -q -s test.c",ttyfd);
  294.     i += strlen(&args[i]);
  295.     args[i++]=0;
  296.     args[i++]=0;
  297.     if (err=DosExecPgm(failname,80,EXEC_SYNC,args,NULL,&res,
  298.                             "CKERMIT.EXE")) {
  299.         printf("Error %d executing Kermit\n",err);
  300.         exit(1);
  301.     }
  302.     
  303.     /*** Print out return code ***/
  304.     printf("Termination code %d\n",res.codeTerminate);
  305.     printf("Result code %d\n",res.codeResult);
  306.  
  307.     /*** Close the file ***/
  308.     if (err=DosClose(ttyfd)) {
  309.         printf("Error %d closing %s\n",err,argv[1]);
  310.     }
  311. }
  312.  
  313. (End of CKOKER.BWR)
  314.