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

  1. /****************************************************************************
  2. *    Language     :    Turbo C 2.0                                                *
  3. *    Logfile        :    sz.h                                                    *
  4. *    Project        :    Comms library.                                            *
  5. *    Date         :    24 Jan 90                                                *
  6. *    Revision     :    1.1        GT    Originate.                                    *
  7. *    25 Oct 92    :    1.2        GT    KA9Q mods.                                    *
  8. *****************************************************************************
  9. *    Purpose        :    Prototypes for sz.c.                                    *
  10. *    $Id: sz.h 1.2 93/02/07 05:14:51 ROOT_DOS Exp $
  11. ****************************************************************************/
  12.  
  13. #ifndef    SZ_H
  14. #define    SZ_H
  15.  
  16. /****************************************************************************
  17. *    Definitions.                                                            *
  18. ****************************************************************************/
  19.  
  20. #define    LOGFILE        "zmodem.log"
  21.  
  22. #define PATHLEN        64                    /* MesS-DOS maximum                    */
  23. #define OK            0
  24. #define FALSE        0
  25. #define TRUE        1
  26. #define ERROR        (-1)
  27.  
  28. /* Ward Christensen / CP/M parameters - Don't change these! */
  29.  
  30. #define ENQ            005
  31. #define CAN            ('X' & 037)
  32. #define XOFF        ('s' & 037)
  33. #define XON            ('q' & 037)
  34. #define SOH            1
  35. #define STX            2
  36. #define EOT            4
  37. #define ACK            6
  38. #define NAK            025
  39. #define CPMEOF        032
  40. #define WANTCRC        0103        /* send C not NAK to get crc not checksum */
  41. #define WANTG        0107        /* Send G not NAK to get nonstop batch xmsn */
  42. #define ZTIMEOUT        (-2)
  43. #define RCDO        (-3)
  44. #define ERRORMAX    5
  45. #define RETRYMAX    10
  46. #define WCEOT        (-10)
  47. #define SECSIZ        128            /* cp/m's Magic Number record size */
  48. #define KSIZE        1024
  49.  
  50.  
  51. /****************************************************************************
  52. *    Function prototypes.                                                    *
  53. ****************************************************************************/
  54.  
  55. /****************************************************************************
  56. *    _sendfile                                                                *
  57. *    Send file(s).  Returns 0 if successful.                                    *
  58. ****************************************************************************/
  59.  
  60. int _sendfile (int s, char protocol, char *options, char *filenames[],
  61.                void (*reporter) (int type, void *data));
  62.  
  63. /****************************************************************************
  64. *    _getfile (in rz.c)                                                        *
  65. *    Receives file(s).  Returns 0 if successful.                                *
  66. ****************************************************************************/
  67.  
  68. int _getfile (int s, char protocol, char *options, char *filename,
  69.               void (*reporter) (int type, void *data));
  70.  
  71. /****************************************************************************
  72. *    _no_carrier                                                                *
  73. *    Tests to see if CD still present, exits if not.                            *
  74. ****************************************************************************/
  75.  
  76. void _no_carrier (void);
  77.  
  78. /****************************************************************************
  79. *    _sendline and _xsendline                                                *
  80. *    Send a character to remote.                                                *
  81. ****************************************************************************/
  82.  
  83. void _sendline (int c);
  84.  
  85. void _xsendline (int c);
  86.  
  87. /****************************************************************************
  88. *    _flushmo                                                                *
  89. *    Flush the output channel.                                                *
  90. ****************************************************************************/
  91.  
  92. void _flushmo (void);
  93.  
  94. /****************************************************************************
  95. *    _stbnb                                                                    *
  96. *    Skip to blank then skip to nonblank.                                    *
  97. ****************************************************************************/
  98.  
  99. char *_stbnb (char *cp);
  100.  
  101. /****************************************************************************
  102. *    _vfile                                                                    *
  103. *    Print debugging message.                                                *
  104. ****************************************************************************/
  105.  
  106. void _vfile (char *f, ...);
  107.  
  108. /****************************************************************************
  109. *    _say                                                                    *
  110. *    Report something unconditionally.                                        *
  111. ****************************************************************************/
  112.  
  113. void _say (char *f, ...);
  114.  
  115. /****************************************************************************
  116. *    _canit                                                                    *
  117. *    Send cancel string to get the other end to shut up.                        *
  118. ****************************************************************************/
  119.  
  120. void _canit (void);
  121.  
  122. /****************************************************************************
  123. *    _zperr_                                                                    *
  124. *    Log an error.                                                            *
  125. ****************************************************************************/
  126.  
  127. void _zperr_ (char *s, ...);
  128.  
  129. /****************************************************************************
  130. *    _zperr                                                                    *
  131. *    Default progress report function.                                        *
  132. ****************************************************************************/
  133.  
  134. void _zperr (int type, void *data);
  135.  
  136. /****************************************************************************
  137. *    _substr                                                                    *
  138. *    Searches for <token> in string <s>.  Returns pointer to token within     *
  139. *    string if found, NULL otherwise.                                        *
  140. ****************************************************************************/
  141.  
  142. char *_substr (char *s, char *t);
  143.  
  144. /****************************************************************************
  145. *    _bttyout                                                                *
  146. *    Local screen character display function.                                *
  147. ****************************************************************************/
  148.     
  149. void _bttyout (int c);
  150.  
  151. /****************************************************************************
  152. *    _readline (in rz.c)                                                        *
  153. *    This version of _readline is reasonably well suited for reading many     *
  154. *    characters (except, currently, for the Regulus version!).  Timeout is    *
  155. *    in tenths of seconds.                                                    *
  156. ****************************************************************************/
  157.  
  158. int _readline (int timeout);
  159.  
  160. /****************************************************************************
  161. *    Global data.                                                            *
  162. ****************************************************************************/
  163.  
  164. extern int _firstsec;
  165. extern int _sending;
  166. extern jmp_buf _tohere;
  167. extern jmp_buf _nocarrier;
  168. extern unsigned _Baud_z;
  169. extern int _Crcflg;
  170. extern int _errors;
  171. extern int _Lastrx;
  172. extern char _Lzmanag;
  173. extern int _Nozmodem;
  174. extern int _Quiet;
  175. extern int _Verbose;
  176. extern int _Wcsmask;
  177. extern char _zconv;
  178. extern int _Zctlesc;
  179. extern char _zmanag;
  180. extern int _Zmodem;
  181. extern int _Zrwindow;
  182. extern char _ztrans;
  183. extern void (*_do_report) (int type, void *data);
  184. extern int _zperr_handle;
  185.  
  186. #endif
  187. /* ~. */
  188.