home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / pibterm / pibt41s1.arc / GETZMODE.MOD < prev    next >
Text File  |  1988-02-21  |  2KB  |  45 lines

  1. (*----------------------------------------------------------------------*)
  2. (*         Get_Zmodem_Type --- Finds which user protocol is Zmodem      *)
  3. (*----------------------------------------------------------------------*)
  4.  
  5. FUNCTION Get_Zmodem_Type : Transfer_Type;
  6.  
  7. (*----------------------------------------------------------------------*)
  8. (*                                                                      *)
  9. (*     Function:   Get_Zmodem_Type                                      *)
  10. (*                                                                      *)
  11. (*     Purpose:    Finds which external protocol (if any) is Zmodem.    *)
  12. (*                                                                      *)
  13. (*     Calling Sequence:                                                *)
  14. (*                                                                      *)
  15. (*        ZmodemT := Get_Zmodem_Type : Transfer_Type;                   *)
  16. (*                                                                      *)
  17. (*           ZmodemT --- external protocol type corresponding to        *)
  18. (*                       Zmodem, or None if not external protocol       *)
  19. (*                       seems to be Zmodem.                            *)
  20. (*                                                                      *)
  21. (*     Remarks:                                                         *)
  22. (*                                                                      *)
  23. (*        The check is based upon the Zmodem protocol having the        *)
  24. (*        abbreviation 'ZM'.                                            *)
  25. (*                                                                      *)
  26. (*----------------------------------------------------------------------*)
  27.  
  28. VAR
  29.    T : Transfer_Type;
  30.  
  31. BEGIN (* Get_Zmodem_Type *)
  32.                                    (* Assume Zmodem not found *)
  33.    Get_Zmodem_Type := None;
  34.                                    (* Search external defs for 'ZM' *)
  35.    FOR T := PUser1 TO Puser10 DO
  36.       BEGIN
  37.          IF ( Trans_Type_Name[T] = 'ZM' ) THEN
  38.             BEGIN
  39.                Get_Zmodem_Type := T;
  40.                EXIT;
  41.             END;
  42.       END;
  43.  
  44. END   (* Get_Zmodem_Type *);
  45.