home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR3 / KA9Q212.ZIP / ZM.H < prev    next >
C/C++ Source or Header  |  1993-02-07  |  3KB  |  84 lines

  1. /****************************************************************************
  2. *    Language     :    Turbo C 2.0                                                *
  3. *    Logfile        :    zm.h                                                    *
  4. *    Project        :    Comms Library.                                            *
  5. *    Date         :    26 Jan 90                                                *
  6. *    Revision     :    1.1        GT    Originate.                                    *
  7. *    25 Oct 92    :    1.2        GT    KA9Q mods.                                    *
  8. *****************************************************************************
  9. *    Purpose        :    ZMODEM protocol primitives prototypes.                    *
  10. *    $Id: zm.h 1.1 93/01/16 18:37:35 ROOT_DOS Exp $
  11. ****************************************************************************/
  12.  
  13. #ifndef    ZM_H
  14. #define    ZM_H
  15.  
  16. /****************************************************************************
  17. *    _zsbhdr                                                                    *
  18. *    Send ZMODEM binary header <hdr> of type <type>.                            *
  19. ****************************************************************************/
  20.  
  21. void _zsbhdr (int type, char *hdr);
  22.  
  23. /****************************************************************************
  24. *    _zshhdr                                                                    *
  25. *    Send ZMODEM HEX header <hdr> of type <type>.                            *
  26. ****************************************************************************/
  27.  
  28. void _zshhdr (int type, char *hdr);
  29.  
  30. /****************************************************************************
  31. *    _zsdata                                                                    *
  32. *    Send binary array <buf> of length <length>, with ending ZDLE sequence     *
  33. *    <frameend>.                                                                *
  34. ****************************************************************************/
  35.  
  36. void _zsdata (char *buf, int length, int frameend);
  37.  
  38. /****************************************************************************
  39. *    _zrdata                                                                    *
  40. *    Receive array <buf> of max <length> with ending ZDLE sequence and CRC.    *
  41. *    Returns the ending character or error code.  NB: On errors may store     *
  42. *    <length> + 1 bytes!                                                        *
  43. ****************************************************************************/
  44.  
  45. int _zrdata (char *buf, int length);
  46.  
  47. /****************************************************************************
  48. *    _zgethdr                                                                    *
  49. *    Read a ZMODEM header to <hdr>, either binary or hex.  <eflag> controls    *
  50. *    local display of non zmodem characters:                                    *
  51. *    0:  no display                                                            *
  52. *    1:  display printing characters only                                    *
  53. *    2:  display all non ZMODEM characters                                    *
  54. *     On success, set Zmodem to 1, set _Rxpos and return type of header.        *
  55. *    Otherwise return negative on error.                                        *
  56. *    Return ERROR instantly if ZCRCW sequence, for fast error recovery.        *
  57. ****************************************************************************/
  58.  
  59. int _zgethdr (char *hdr, int eflag);
  60.  
  61. /****************************************************************************
  62. *    _stohdr                                                                    *
  63. *    Store long integer pos in _Txhdr.                                        *
  64. ****************************************************************************/
  65.  
  66. void _stohdr (long pos);
  67.  
  68. /****************************************************************************
  69. *    _rclhdr                                                                    *
  70. *    Recover a long integer from a header.                                    *
  71. ****************************************************************************/
  72.  
  73. long _rclhdr (char *hdr);
  74.  
  75.  
  76. /****************************************************************************
  77. *    Global data.                                                            *
  78. ****************************************************************************/
  79.  
  80. extern int _Znulls;
  81. extern int _Rxtimeout;
  82.  
  83. #endif
  84.