home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / k95 / hostcom.ksc < prev    next >
Text File  |  2020-01-01  |  2KB  |  65 lines

  1. ; Kermit 95 host mode for direct serial connections.
  2. ;
  3.  
  4. ; The following code was added to accomodate the new Windows multi-user
  5. ; friendly directory layouts introduced with version 1.1.21.  We have
  6. ; check several locations for the directories that hostmode uses and
  7. ; create them in \v(appdata) if the do not exist at all.
  8.  
  9. if directory \v(exedir)USERS {
  10.     asg _hostroot \v(exedir)
  11.     forward FOUNDDIRS
  12. }
  13. if directory \v(startup)INCOMING {
  14.     asg _hostroot \v(startup)
  15.     forward FOUNDDIRS
  16. }
  17.  
  18. if directory \v(appdata)USERS {
  19.     asg _hostroot \v(appdata)
  20. }
  21.  
  22. :FOUNDDIRS
  23.  
  24. asg _configfile \freplace(\m(_hostroot)host.cfg,/,\\)
  25.  
  26. def MAKEVAR2 if def \%2 _assign \%1 \%2, else _assign \%1
  27.  
  28. def MAKEVAR -
  29.   if = \findex(=,\%1,1) 0 end, -
  30.   asg \%9 _\freplace(\%1,=,\32), -
  31.   makevar2 \%9
  32.  
  33. open read \m(_configfile)
  34. if fail forward noconfig
  35. while true { read \%a, if fail break, makevar \%a }
  36.  
  37. :NOCONFIG
  38.  
  39. set modem type none
  40. xif def _commport { -
  41.   set port \m(_commport),-
  42.   if fail stop 1 "\m(_commport)" - Invalid port -
  43. }
  44. xif def _comspeed { -
  45.   set speed \m(_comspeed), -
  46.   if fail stop 1 "\m(_comspeed)" - Invalid speed -
  47. }
  48. if not eq "\v(connection)" "serial" -
  49.   fail stop 1 -
  50.   "\v(line)" - Inappropriate connection type: "\v(connection)"
  51.  
  52. set carrier off
  53. set flow rts/cts
  54. take host.ksc
  55. ;
  56. ; There's no point in looping on direct connections, since you are probably
  57. ; in the same room with both computers and can set up the connection any
  58. ; time you want it.  Since we don't wait on carrier, issuing the prompt when
  59. ; there is nothing on the other end results in lost data, "getty babble", or
  60. ; worse.
  61. ;
  62. ;; goto loop
  63.  
  64. end
  65.