home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 January / CHIPCD1_98.iso / software / tipsy / zoc / install.fil / SCRIPT / MINIHOST.ZRX < prev    next >
Text File  |  1997-04-22  |  21KB  |  663 lines

  1. /*******************************************************************
  2. *   REXX program to simulate a simple host                         *
  3. *                                                                  *
  4. *   Features:                                                      *
  5. *   + Simple user list (see below)                                 *
  6. *   + Two user levels (admin and normal)                           *
  7. *   + Change of directories (admin only)                           *
  8. *   + Up-/Downloads                                                *
  9. *                                                                  *
  10. *******************************************************************/
  11.  
  12.     /* uncomment the TRACE A command to debug this program */
  13.  
  14.     /* TRACE A  */
  15.  
  16.  
  17.     /***********************************/
  18.     /* below is the list of users      */
  19.     /***********************************/
  20.  
  21.     curdrive= "C:"       /* Work drive for all users */
  22.  
  23.     user.1= "ADMIN"      /* user name */
  24.     pass.1= "SECRET"     /* password for user */
  25.     home.1= "\"          /* start directory */
  26.     mode.1= 1            /* 1=superuser, 0=normal */
  27.                          /* (normal cannot search files, change dirs) */
  28.  
  29.     user.2= "GUEST"
  30.     pass.2= "GUEST"
  31.     home.2= "HOST\GUEST"
  32.     mode.2= 0
  33.  
  34.     user.3= "USERNAME1"
  35.     pass.3= "PASSWORD1"
  36.     home.3= "HOST\USER1"
  37.     mode.3= 0
  38.  
  39.     user.4= "USERNAME2"
  40.     pass.4= "PASSWORD2"
  41.     home.4= "HOST\USER2"
  42.     mode.4= 0
  43.  
  44.     user.5= "USERNAME3"
  45.     pass.5= "PASSWORD3"
  46.     home.5= "HOST\USER3"
  47.     mode.5= 0
  48.  
  49.  
  50.     /***********************************/
  51.     /* here's the beef                 */
  52.     /***********************************/
  53.  
  54.     /* ask operator for localmode */
  55.     localmode= 0
  56.     x= ZocRequest("Do you want to run MINIHOST in localmode?", "Yes", "No")
  57.     x= TRANSLATE(x)
  58.     SELECT 
  59.         WHEN x="YES" THEN localmode= 1
  60.         WHEN x="NO" THEN localmode= 0
  61.         WHEN x="##CANCEL##" THEN exit
  62.         OTHERWISE NOP
  63.     END /* SELECT */
  64.  
  65.  
  66.     /* intercept Misc->REXX-Abort (from menu) */
  67.     SIGNAL ON HALT NAME shutdown2
  68.  
  69.  
  70.     /* variable for use as new-line (carriage-return-line-feed) */
  71.     CrLf= "^M^J"
  72.     
  73.     /* clear screen */
  74.     CALL ZocCls
  75.  
  76.     /* check, whether valid cd option is set */
  77.     IF checkcarrier()=="##UNKNOWN##" THEN
  78.     DO
  79.         CALL ZocWrite "Please enable CD Valid in the device options"||CrLf||CrLf
  80.         EXIT
  81.     END
  82.  
  83.     /* no modem echo to host side */
  84.     say "Just a moment ..."
  85.     CALL ZocSetOption "Host=no"
  86.  
  87.     IF localmode=0 THEN DO
  88.         CALL ZocSetAutoAnswer 0    
  89.         CALL ZocDelay 3
  90.     END
  91.     ELSE DO
  92.         CALL ZocMsgBox "You can try ADMIN/SECRET as username/password "||,
  93.                     "or check the help file for a detailed description "||,
  94.                     "of the host mode (search for keyword MINIHOST)."
  95.     END
  96.  
  97.  
  98. /* -------------------------------------------------------------- */
  99. /* wait for connect, receive call and check password              */
  100. /* -------------------------------------------------------------- */
  101. allover:
  102.     /***********************************/
  103.     /* wait for connect                */
  104.     /***********************************/
  105.  
  106.     IF localmode=1 THEN     /* no need to wait for CONNECT in localmode */
  107.         SIGNAL welcome
  108.  
  109.     /* use a timeout of 60 for any input */
  110.     CALL ZocTimeout 60
  111.  
  112.     /* answer calls */
  113.     CALL ZocSetAutoAnswer 1
  114.  
  115.     /* put infos on screen */
  116.     CALL ZocCls
  117.     CALL ZocWrite "Waiting for CALL ...^M^J^M^J"
  118.  
  119.     
  120.     /* now wait for modem, isdn or fax connect */
  121.     found= ZocWaitMux("CONNECT","+FCON")
  122.     DO WHILE found = 640
  123.         found= ZocWaitMux("CONNECT","+FCON")
  124.     END
  125.  
  126.     /* check and handle FAX call (not really handled in this program) */
  127.     IF found=1 THEN DO          /* found=1 => FAX Call */
  128.         CALL handle_fax_call    /* this is currently a dummy */
  129.         signal allover          /* restart after receiving the FAX */
  130.     END
  131.  
  132.     /* eat data-connect message */
  133.     CALL ZocWait "^M"
  134.     
  135.  
  136.  
  137.     /***********************************/
  138.     /* wait for backspace from remote  */
  139.     /***********************************/
  140.     
  141.     CALL ZocTimeout 20
  142.     CALL wsend "^[[2J^[[1H"
  143.     CALL wsend "Please select ANSI and Zmodem in your comm program,"||CrLf
  144.     CALL wsend "then press BACKSPACE key to start host ..."||CrLf
  145.     result= ZocWait("^H")
  146.     
  147.     /* make sure carrier is still active */
  148.     IF checkcarrier()=="##NO##" | result\=0 THEN 
  149.         SIGNAL endit    /* doit again IF carrier lost or BS not pressed */
  150.  
  151. welcome:
  152.     /***********************************/
  153.     /* show welcome screen             */
  154.     /***********************************/
  155.     CALL wsend "^[[2J^[[1H"
  156.     CALL welcome_screen
  157.  
  158.  
  159.     /***********************************/
  160.     /* read and check username/passwrd */
  161.     /***********************************/
  162.     CALL ZocTimeout 60
  163.  
  164.     CALL ZocSetOption "Host=yes"    /* show echo for username */
  165.     CALL wsend CrLf
  166.     username= input("Username: ")
  167.     username= STRIP(username)
  168.  
  169.     IF username="##CANCEL##" THEN DO
  170.         SIGNAL shutdown2
  171.     END
  172.     ELSE DO
  173.         CALL ZocSetOption "Host=no"        /* don't show echo for password */
  174.         CALL wsend CrLf
  175.         password= input("Password: ")
  176.         password= STRIP(password)
  177.     END
  178.  
  179.     /* check for username and password (handles Carrier-Lost also) */
  180.     usridx= verify_user()
  181.     IF usridx=0 THEN DO        /* user not found or password error */
  182.         CALL wsend CrLf||CrLf
  183.         CALL wsend "Sorry, authorization failed !"
  184.         CALL wsend CrLf||CrLf
  185.         SIGNAL endit
  186.     END
  187.     ELSE DO                    /* user #useridx found */
  188.         IF mode.usridx=1 THEN
  189.             status= "admin"
  190.         ELSE
  191.             status= "guest"
  192.  
  193.         curdir= home.usridx
  194.     END
  195.  
  196.  
  197.     /***********************************/
  198.     /* show the main menu              */ 
  199.     /***********************************/
  200. menu:
  201.     /* now give the other side an echo */
  202.     CALL ZocSetOption "Host=yes"
  203.     choice= " "
  204.  
  205.     CALL showmenu
  206.     CALL wsend "^[[0m"
  207.  
  208.     /***********************************/
  209.     /* read choice and do stuff        */ 
  210.     /***********************************/
  211. menuask:
  212.     CALL wsend "^[[19;12H"
  213.     IF status= "admin" THEN
  214.         choice_msg= "Your Choice (C/F/S/T/U/D/H/G): "
  215.     ELSE
  216.         choice_msg= "Your Choice (F/T/U/D/G): "
  217.  
  218.     result= input(choice_msg)
  219.  
  220.     /* If the carrier was lost, restart the whole story */
  221.     IF checkcarrier()="##NO##" THEN 
  222.         SIGNAL endit
  223.  
  224.  
  225.     /***********************************/
  226.     /* CALL sub according to choice    */ 
  227.     /***********************************/
  228.  
  229.     /* text cosmetics for user input string */
  230.     choice= TRANSLATE(STRIP(result))
  231.  
  232.     SELECT 
  233.         /* show files in directory */
  234.         WHEN choice="F" THEN 
  235.             CALL showdir ddir
  236.  
  237.         /* type file */
  238.         WHEN choice="T" THEN 
  239.             CALL type
  240.  
  241.         /* zmodem upload */
  242.         WHEN choice="U" THEN 
  243.             CALL upload
  244.  
  245.         /* zmodem download */
  246.         WHEN choice="D" THEN 
  247.             CALL download
  248.  
  249.         /* search for entry (superuser only) */
  250.         WHEN choice="S" THEN 
  251.             CALL search
  252.  
  253.         /* change directory (superuser only) */
  254.         WHEN choice="C" THEN 
  255.             CALL changedir
  256.  
  257.         /* shutdown host (superuser only) */
  258.         WHEN choice="H" THEN 
  259.             CALL shutdown
  260.  
  261.         /* goodbye */
  262.         WHEN choice="G" THEN DO
  263.             CALL wsend "^[[21;12H"
  264.             CALL wsend "Have a nice day ..."||CrLf
  265.             SIGNAL endit
  266.         END
  267.  
  268.         OTHERWISE SIGNAL menuask /* unknown command, try again */
  269.     END /* SELECT */
  270.     
  271.     SIGNAL menu
  272.  
  273.  
  274. endit:
  275.     CALL wsend "^[[22;12H"
  276.     CALL wsend "Restarting ..."
  277.     CALL ZocSetOption "Host=no"
  278.     CALL ZocHangup
  279.     CALL ZocDelay 5    /* some time for modem hangup */
  280.     CALL ZocSetAutoAnswer 0
  281.     CALL ZocDelay 5    /* some time for auto-answer */
  282.     SIGNAL allover
  283.  
  284.  
  285.  
  286. /* ============================================================== */
  287. /*                                                                */
  288. /*   SUBROUTINES (HOST FUNCTIONS)                                 */
  289. /*                                                                */
  290. /* ============================================================== */
  291.  
  292. /* -------------------------------------------------------------- */
  293. /* change current directory                                       */
  294. /* -------------------------------------------------------------- */
  295. changedir:
  296.     IF status\= "admin" THEN
  297.         RETURN
  298.  
  299.     CALL wsend "^[[21;12H"
  300.     result= input("Enter full path (drive and dir): ")
  301.  
  302.     IF result\="##TIMEOUT##" THEN
  303.     DO
  304.         curdir= result
  305.         IF RIGHT(curdir, 1) \= "\" THEN curdir= curdir"\"
  306.         IF SUBSTR(curdir, 2, 1) = ":" THEN
  307.         DO
  308.             curdrive= SUBSTR(curdir, 1, 2)
  309.             curdir= RIGHT(curdir, length(curdir)-2)
  310.         END
  311.         IF SUBSTR(curdir, 1, 1) \= "\" THEN curdir= "\"curdir
  312.     END
  313.     
  314.     RETURN
  315.  
  316.  
  317. /* -------------------------------------------------------------- */
  318. /* show current directory                                         */
  319. /* -------------------------------------------------------------- */
  320. showdir: 
  321.     ADDRESS CMD "dir /-P "curdrive||curdir" >shellout.tmp"
  322.     CALL sendfile "shellout.tmp"
  323.     RETURN
  324.  
  325.  
  326. /* -------------------------------------------------------------- */
  327. /* search on current drive                                        */
  328. /* -------------------------------------------------------------- */
  329. search: 
  330.     IF status\="admin" THEN
  331.         RETURN
  332.  
  333.     CALL wsend "^[[21;12H"
  334.     result= input("Enter filename to search on drive "||curdrive)
  335.     
  336.     IF result\="##TIMEOUT##" THEN
  337.     DO
  338.         sname= result
  339.         sname= STRIP(sname)
  340.     END
  341.     ELSE
  342.         RETURN
  343.     
  344.     CALL wsend "^[[22;12H"
  345.     CALL wsend "Searching on drive "||curdrive||", please wait ..."
  346.     ADDRESS CMD "dir /-P "curdrive"\"sname" /s >shellout.tmp"
  347.     CALL sendfile "shellout.tmp"
  348.     RETURN
  349.  
  350.  
  351. /* -------------------------------------------------------------- */
  352. /* type file                                                      */
  353. /* -------------------------------------------------------------- */
  354. type: 
  355.     CALL wsend "^[[21;12H"
  356.     result= input("Enter filename to type: "||curdrive||curdir)
  357.     
  358.     IF result\="##TIMEOUT##" THEN
  359.     DO
  360.         sname= result
  361.         sname= STRIP(sname)
  362.     END
  363.     ELSE
  364.         RETURN
  365.     
  366.     ADDRESS CMD "type "curdrive||curdir||sname" >shellout.tmp"
  367.     CALL sendfile "shellout.tmp"
  368.     RETURN
  369.  
  370.  
  371. /* -------------------------------------------------------------- */
  372. /* upload file                                                    */
  373. /* -------------------------------------------------------------- */
  374. upload:
  375.     CALL wsend "^[[21;12H"
  376.     CALL wsend "Please start your Zmodem upload"
  377.     CALL wsend "^[[22;12H"
  378.     
  379.     IF localmode=0 THEN
  380.         CALL ZocDownload "ZMODEM", curdrive||curdir 
  381.      ELSE
  382.         CALL ZocMsgBox "Upload not available locally"
  383.     RETURN
  384.  
  385.  
  386. /* -------------------------------------------------------------- */
  387. /* download file                                                  */
  388. /* -------------------------------------------------------------- */
  389. download:
  390.     CALL wsend "^[[21;12H"
  391.     file= input("Enter filename to receive: "||curdrive||curdir)
  392.     CALL wsend "^[[22;12H"
  393.  
  394.     TRACE i
  395.  
  396.      IF localmode=0 THEN DO    
  397.         IF file\="##TIMEOUT##" THEN DO
  398.             file= STRIP(file)
  399.             IF file \= "" THEN
  400.                 CALL ZocUpload "ZMODEM", curdrive||curdir||file
  401.         END
  402.     END
  403.     ELSE
  404.         CALL ZocMsgBox "Download not available locally"
  405.  
  406.     RETURN
  407.  
  408.  
  409. /* -------------------------------------------------------------- */
  410. /* Shutdown host                                                  */
  411. /* -------------------------------------------------------------- */
  412. shutdown:
  413.     IF status\="admin" THEN
  414.         RETURN
  415.  
  416. shutdown2:
  417.     CALL wsend "^[[22;0H"
  418.     CALL wsend "Closing MINIHOST ... "
  419.     CALL ZocSetOption "Host=no"
  420.     CALL ZocHangup
  421.     CALL ZocDelay 3
  422.     CALL ZocSetAutoAnswer 0
  423.     CALL wsend "done!"||CrLf
  424.     EXIT
  425.  
  426.  
  427. /* -------------------------------------------------------------- */
  428. /* Verify user entry                                              */
  429. /* -------------------------------------------------------------- */
  430. verify_user: 
  431.     
  432.     ok= 0
  433.     IF username\="##TIMEOUT##" & password\="##TIMEOUT##" THEN DO
  434.         i= 1
  435.         DO WHILE user.i\="USER."||i   /* loop to end of list */
  436.             IF translate(username)=translate(user.i) & ,
  437.                 translate(password)=translate(pass.i) then do
  438.                 ok= i
  439.                 LEAVE
  440.             END
  441.  
  442.             i= i+1
  443.         END
  444.     END
  445.  
  446.     RETURN ok
  447.  
  448.  
  449. /* ============================================================== */
  450. /*                                                                */
  451. /*    SUBROUTINES (AUXILIARY FUNCTIONS)                           */
  452. /*                                                                */
  453. /* ============================================================== */
  454.  
  455. /* -------------------------------------------------------------- */
  456. /* draw one menu-point with ARG(line, col, shortcut, name)        */
  457. /* -------------------------------------------------------------- */
  458. menuitem: PROCEDURE EXPOSE localmode
  459.     
  460.     CALL wsend "^[["ARG(1)";"ARG(2)"H"
  461.     CALL wsend "^[[1;37;47m┌───^[[0;30;47m┐"
  462.     CALL wsend "^[[1;37m┌────────────────────^[[0;30;47m┐^[[40m"
  463.  
  464.     CALL wsend "^[["ARG(1)+1";"ARG(2)"H"
  465.     CALL wsend "^[[1;37;47m│ ^[[0;34;47m"ARG(3)" ^[[30m│"
  466.     CALL wsend "^[[1;37m│^[[0;30;47m"ARG(4)"│^[[40m"
  467.  
  468.     CALL wsend "^[["ARG(1)+2";"ARG(2)"H"
  469.     CALL wsend "^[[1;37;47m└^[[0;30;47m───┘"
  470.     CALL wsend "^[[1;37m└^[[0;30;47m────────────────────┘^[[40m"
  471.  
  472.     RETURN
  473.  
  474.  
  475. /* -------------------------------------------------------------- */
  476. /* draw one info-item  with ARG(line, col, text)                  */
  477. /* -------------------------------------------------------------- */
  478. infoitem: PROCEDURE EXPOSE localmode
  479.     
  480.     CALL wsend "^[["ARG(1)";"ARG(2)"H"
  481.     CALL wsend "^[[1;37;47m┌──────────────────────────────────"
  482.     CALL wsend "──────────────────────────^[[0;30;47m┐"
  483.  
  484.     CALL wsend "^[["ARG(1)+1";"ARG(2)"H"
  485.     CALL wsend "^[[1;37;47m│ ^[[0;30;47m"ARG(3)" ^[[30m│"
  486.     
  487.     CALL wsend "^[["ARG(1)+2";"ARG(2)"H"
  488.     CALL wsend "^[[1;37;47m└^[[0;30;47m────────────────────────"
  489.     CALL wsend "────────────────────────────────────┘"
  490.  
  491.     RETURN
  492.  
  493.  
  494. /* -------------------------------------------------------------- */
  495. /* draw the whole menu with all menu- and info-items              */
  496. /* -------------------------------------------------------------- */
  497. SHOWMENU: 
  498.     CALL wsend "^[[2J^[[1H"
  499.  
  500.     IF status= "admin" THEN
  501.     DO
  502.         CALL menuitem 2,  10, "C", " (C)hange directory "
  503.         CALL menuitem 5,  10, "F", " List (F)iles       " 
  504.         CALL menuitem 8,  10, "S", " (S)earch a file    "
  505.         CALL menuitem 11, 10, "T", " (T)ype a file      " 
  506.         CALL menuitem 2,  45, "U", " (U)pload a file    "
  507.         CALL menuitem 5,  45, "D", " (D)ownload a file  "
  508.         CALL menuitem 8,  45, "H", " Shutdown (H)ost    "
  509.         CALL menuitem 11, 45, "G", " (G)oodbye          "
  510.     END
  511.     ELSE
  512.     DO
  513.         CALL menuitem 3,  10, "F", " List (F)iles       " 
  514.         CALL menuitem 6,  10, "T", " (T)ype a file      " 
  515.         CALL menuitem 3,  45, "U", " (U)pload a file    "
  516.         CALL menuitem 6,  45, "D", " (D)ownload a file  "
  517.         CALL menuitem 10, 27, "G", " (G)oodbye          "
  518.     END
  519.     
  520.     curpath= curdrive||curdir
  521.     CALL infoitem 15, 10, "^[[0;34;47mCurrent Dir:^[[30m  "overlay(curpath,"                                            ")
  522.     RETURN
  523.  
  524.  
  525. /* -------------------------------------------------------------- */
  526. /* draw beginning text                                            */
  527. /* -------------------------------------------------------------- */
  528. welcome_screen: PROCEDURE EXPOSE localmode
  529.     CrLf= "^M^J"
  530.     CALL wsend ""||CrLf
  531.     CALL wsend " ___  ___ ___    "||CrLf
  532.     CALL wsend "|__ || _ | __|   "||CrLf
  533.     CALL wsend " / /_||_|| |_     ZOC MiniHost-Script V3.0"||CrLf
  534.     CALL wsend "|____|___|___|   "||CrLf||CrLf||CrLf
  535.  
  536.     RETURN
  537.  
  538.  
  539. /* -------------------------------------------------------------- */
  540. /* send and show locally at the same time                         */
  541. /* -------------------------------------------------------------- */
  542. wsend: PROCEDURE EXPOSE localmode
  543.  
  544.     IF localmode=0 THEN
  545.         CALL ZocSend ARG(1)
  546.  
  547.     CALL ZocWrite ARG(1)
  548.  
  549.     RETURN
  550.  
  551.  
  552. /* -------------------------------------------------------------- */
  553. /* show the contents of a file to remote or local user            */
  554. /* -------------------------------------------------------------- */
  555. sendfile: PROCEDURE EXPOSE localmode
  556.     file= ARG(1)
  557.     CrLf= "^M^J"
  558.  
  559.     IF localmode=0 THEN DO         /* send file to remote */
  560.         CALL wsend "^[[2J^[[1H"
  561.         CALL ZocUpload "ASCII:1+0", file 
  562.         ADDRESS CMD "del "file
  563.         CALL wsend CrLf||CrLf
  564.     END
  565.     ELSE DO                        /* show the file locally */
  566.         x= linein(file)
  567.         DO WHILE stream(file, "S")="READY" 
  568.             SAY x
  569.             x= linein(file)
  570.         END /* WHILE */
  571.         CALL stream file, "C", "CLOSE"
  572.         ADDRESS CMD "del "file
  573.     END
  574.  
  575.     CALL input "Press Enter to continue ..."
  576.  
  577.     RETURN
  578.  
  579.  
  580. /* -------------------------------------------------------------- */
  581. /* read input from local or remote user                           */
  582. /* -------------------------------------------------------------- */
  583. input: PROCEDURE EXPOSE localmode
  584.  
  585.     IF localmode=0 THEN DO         /* get input from remote */
  586.         CALL wsend arg(1)
  587.         result= "##TIMEOUT##"
  588.         IF checkcarrier()\="##NO##" THEN DO
  589.             res= ZocWait("^M")
  590.             IF res\=640 THEN
  591.                 result= ZocLastline()
  592.         END
  593.     END
  594.     ELSE DO                        /* get input locally */                
  595.         result= ZocAsk("°"||ARG(1)) /* '°' moves window to right bottom */
  596.     END
  597.  
  598.     RETURN result
  599.  
  600.  
  601. /* -------------------------------------------------------------- */
  602. /* return carrier detect state (assume CARRIER in localmode)      */
  603. /* -------------------------------------------------------------- */
  604. checkcarrier: PROCEDURE EXPOSE localmode
  605.     IF localmode=1 THEN 
  606.         result= "##YES##"
  607.     ELSE 
  608.         result= ZocGetInfo("ONLINE")
  609.  
  610.     RETURN result
  611.  
  612.  
  613. /**************************************************************************/
  614. /* END OF REXX-MODULE                                                     */
  615. /**************************************************************************/
  616.  
  617.  
  618.  
  619. /**************************************************************************/
  620. /*                                                                        */
  621. /*  THE CODE BELOW IS NOT ACTUALLY CALLED                                 */
  622. /*                                                                        */
  623. /**************************************************************************/
  624.  
  625. /* -------------------------------------------------------------- */
  626. /* init a FAX class 2 modem for adaptive CALLing                  */
  627. /* -------------------------------------------------------------- */
  628. set_fax_answer_mode:
  629.     Cr = "^M"
  630.     TIMEOUT 2
  631.     CALL ZocSend "AT+fclass= 2"||Cr
  632.     result= ZocWait("OK")
  633.     IF result=0 THEN 
  634.     DO 
  635.         CALL ZocSend "AT+FCR=1"||Cr
  636.         CALL ZocWait "OK"
  637.  
  638.         CALL ZocSend "AT+FDCC=1,5,0,2,0,0,0,0"||Cr
  639.         CALL ZocWait "OK"
  640.  
  641.         CALL ZocSend "AT+FCQ=0"||Cr
  642.         CALL ZocWait "OK"
  643.  
  644.         CALL ZocSend "AT+FAA=1"||Cr
  645.         CALL ZocWait "OK"
  646.  
  647.         CALL ZocWrite Cr||"FAX-MODE SET ..."||Crlf
  648.     END
  649.  
  650.     TIMEOUT 60
  651.     RETURN
  652.  
  653.  
  654. /* -------------------------------------------------------------- */
  655. /* forward a fax CALL to a fax program                            */
  656. /* -------------------------------------------------------------- */
  657. handle_fax_call:
  658.     /* the code in here would depend on your fax program */
  659.     /* as we have none, we just hangup                   */
  660.     CALL ZocHangup
  661.     RETURN
  662.  
  663.