home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / program / c / bts310b5 / com.h < prev    next >
C/C++ Source or Header  |  1992-04-19  |  4KB  |  118 lines

  1. #ifndef H_COM
  2. #define H_COM
  3. /*--------------------------------------------------------------------------*/
  4. /*                                                                            */
  5. /*                                                                            */
  6. /*        ------------         Bit-Bucket Software, Co.                        */
  7. /*        \ 10001101 /         Writers and Distributors of                    */
  8. /*         \ 011110 /          Freely Available<tm> Software.                 */
  9. /*          \ 1011 /                                                            */
  10. /*           ------                                                            */
  11. /*                                                                            */
  12. /*    (C) Copyright 1987-90, Bit Bucket Software Co., a Delaware Corporation. */
  13. /*                                                                            */
  14. /*                                                                            */
  15. /*                  Communications definitions for BinkleyTerm                */
  16. /*                                                                            */
  17. /*                                                                            */
  18. /*      For complete    details  of the licensing restrictions, please refer    */
  19. /*      to the License  agreement,  which  is published in its entirety in    */
  20. /*      the MAKEFILE and BT.C, and also contained in the file LICENSE.240.    */
  21. /*                                                                            */
  22. /*      USE  OF THIS FILE IS SUBJECT TO THE  RESTRICTIONS CONTAINED IN THE    */
  23. /*      BINKLEYTERM  LICENSING  AGREEMENT.  IF YOU DO NOT FIND THE TEXT OF    */
  24. /*      THIS    AGREEMENT IN ANY OF THE  AFOREMENTIONED FILES,    OR IF YOU DO    */
  25. /*      NOT HAVE THESE FILES,  YOU  SHOULD  IMMEDIATELY CONTACT BIT BUCKET    */
  26. /*      SOFTWARE CO.    AT ONE OF THE  ADDRESSES  LISTED BELOW.  IN NO EVENT    */
  27. /*      SHOULD YOU  PROCEED TO USE THIS FILE    WITHOUT HAVING    ACCEPTED THE    */
  28. /*      TERMS  OF  THE  BINKLEYTERM  LICENSING  AGREEMENT,  OR  SUCH OTHER    */
  29. /*      AGREEMENT AS YOU ARE ABLE TO REACH WITH BIT BUCKET SOFTWARE, CO.        */
  30. /*                                                                            */
  31. /*                                                                            */
  32. /* You can contact Bit Bucket Software Co. at any one of the following        */
  33. /* addresses:                                                                */
  34. /*                                                                            */
  35. /* Bit Bucket Software Co.          FidoNet  1:104/501, 1:132/491, 1:141/491    */
  36. /* P.O. Box 460398                  AlterNet 7:491/0                            */
  37. /* Aurora, CO 80046               BBS-Net  86:2030/1                        */
  38. /*                                  Internet f491.n132.z1.fidonet.org         */
  39. /*                                                                            */
  40. /* Please feel free to contact us at any time to share your comments about    */
  41. /* our software and/or licensing policies.                                    */
  42. /*                                                                            */
  43. /*--------------------------------------------------------------------------*/
  44.  
  45. #if defined(ATARIST)
  46.  
  47. #include "com_st.h"
  48.  
  49. #else
  50.  
  51. /* This is PC specific!!!!!!!!!! */
  52.  
  53. #define BITS_7            0x02
  54. #define BITS_8            0x03
  55. #define STOP_1             0x00
  56. #define STOP_2             0x04
  57. #define ODD_PARITY        0x08
  58. #define EVEN_PARITY     0x18
  59. #define NO_PARITY        0x00
  60.  
  61. #ifdef OS_2
  62. #define BAUD_300        300
  63. #define BAUD_1200        1200
  64. #define BAUD_2400        2400
  65. #define BAUD_4800        4800
  66. #define BAUD_9600        9600
  67. #define BAUD_19200        19200
  68. #define BAUD_38400        38400
  69. #else
  70. #define BAUD_300        0x040
  71. #define BAUD_1200        0x080
  72. #define BAUD_2400        0x0A0
  73. #define BAUD_4800        0x0C0
  74. #define BAUD_9600        0x0E0
  75. #define BAUD_19200        0x000
  76. #define BAUD_38400        0x020
  77. #endif
  78.  
  79. /* Bit definitions for the Line Status Register */
  80.  
  81. #define DATA_READY        0x0100
  82. #define OVERRUN_ERR        0x0200
  83. #define PARITY_ERR        0x0400
  84. #define FRAMING_ERR        0x0800
  85. #define BREAK_INT        0x1000
  86. #define TX_HOLD_EMPTY    0x2000
  87. #define TX_SHIFT_EMPTY    0x4000
  88.  
  89. /* Bit definitions for the driver flags */
  90.  
  91. #define USE_XON            0x01
  92. #define USE_CTS            0x02
  93. #define USE_DSR            0x04
  94. #define OTHER_XON            0x08
  95.  
  96. #define BRK             0x01
  97. #define MDM             0x02
  98.  
  99. #if defined(OS_2)
  100. #include "com_os2.h"
  101. #else  /* OS_2 */
  102. #include "com_dos.h"
  103. #endif /* OS_2 */
  104.  
  105. #endif /* ATARIST */
  106.  
  107. /* A few odd defines */
  108.  
  109. #define CLEAR_IOERR() errno = 0
  110.  
  111. #define wait_for_clear() while (!OUT_EMPTY())
  112. #define TIMED_READ(a) (int) com_getc(a)
  113.  
  114.  
  115. #endif    /* H_COM */
  116. /* END OF FILE: com.h */
  117.  
  118.