home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / TELECOM / UUCPbb_2_1_src.lzh / UUCPBB21 / os_misc.h < prev    next >
Text File  |  1994-08-03  |  3KB  |  136 lines

  1. /*  os_misc.h   Miscellaneous and system dependent defs and macros.
  2.     Copyright (C) 1990, 1993  Rick Adams and Bob Billson
  3.  
  4.     This file is part of the OS-9 UUCP package, UUCPbb.
  5.  
  6.     This program is free software; you can redistribute it and/or modify
  7.     it under the terms of the GNU General Public License as published by
  8.     the Free Software Foundation; either version 2 of the License, or
  9.     (at your option) any later version.
  10.  
  11.     This program is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.     GNU General Public License for more details.
  15.  
  16.     You should have received a copy of the GNU General Public License
  17.     along with this program; if not, write to the Free Software
  18.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20.     The author of UUCPbb, Bob Billson, can be contacted at:
  21.     bob@kc2wz.bubble.org  or  uunet!kc2wz!bob  or  by snail mail:
  22.     21 Bates Way, Westfield, NJ 07090
  23. */
  24.  
  25. /* Miscellaneous and system dependent defs for UUCPbb package to keep uucp.h
  26.    from becoming huge.  Also includes non-standard Cish stuff unique to
  27.    OS-9/6809, OS-9/68K and OS-9000. */
  28.  
  29. #include "proto.h"
  30. #include <errno.h>
  31.  
  32.  /***************************\
  33.  * CoCo specific defs/macros *
  34.  \***************************/
  35.  
  36. #ifndef _OSK
  37. #define PORTSLEEP 15                   /* 1/4 second worth of ticks */
  38. #define PORTMODE  S_IREAD+S_IWRITE
  39. #endif
  40.  
  41.  
  42.  /**************************\
  43.  * OSK specific defs/macros *
  44.  \**************************/
  45.  
  46. #ifdef _OSK
  47. #define PORTSLEEP 0x80000040           /* 1/4 second worth of ticks */
  48. #define PORTMODE  S_ISHARE+S_IREAD+S_IWRITE
  49. #endif
  50.  
  51.  
  52.  /******************************\
  53.  * OS-9000 specific defs/macros *
  54.  \******************************/
  55.  
  56. #ifdef _OS9K
  57. #define PORTSLEEP   0x80000040           /* 1/4 second worth of ticks */
  58. #define fileno(x)   _fileno(x)
  59. #define PORTMODE  S_ISHARE+S_IREAD+S_IWRITE
  60. #endif
  61.  
  62.  
  63.  /*=========== miscellaneous defines/macros applies to everyone ===========*/
  64.  
  65. /* Define a common name for the non sharable error which is different
  66.  * between OS-9/6809 and OSK systems
  67.  */
  68. #ifndef _OSK
  69. #define NONSHARE E_DEVBSY        /* OS-9/6809 */
  70. #else
  71. #define NONSHARE E_SHARE
  72. #endif
  73.  
  74. /* Define the maximum priority of the system */
  75. #ifdef _OSK
  76. #define MAXPRIORITY 65535
  77. #else
  78. #define MAXPRIORITY 255
  79. #endif
  80.  
  81. /* Adds NUL to end of s1 if n < strlen (s2) */
  82. #define strncpy0(s1,s2,n)  {strncpy (s1,s2,n); s1[n-1] = '\0';}
  83.  
  84. #ifdef  SS_SIZE                    /* this is what Level 1 called it */
  85. #define SS_SIZE   SS_SIZ           /* this is what Level 2 calls it */
  86. #endif
  87.  
  88. #ifndef SS_SCSIZ                   /* just in case */
  89. #define SS_SCSIZ  0x26
  90. #endif
  91.  
  92. #ifndef SS_SIZ                     /* ...ditto... */
  93. #define SS_SIZ    0x02
  94. #endif
  95.  
  96. #ifndef SS_HNGUP
  97. #define SS_HNGUP  0x02             /* drop DTR to hang up modem */
  98. #endif
  99.  
  100. #ifndef ERROR                      /* ...ditto... */
  101. #define ERROR    (-1)
  102. #endif
  103.  
  104. #ifndef TRUE                       /* ...ditto.. */
  105. #define TRUE      1
  106. #endif
  107.  
  108. #ifndef FALSE                      /* ...one more time */
  109. #define FALSE     0
  110. #endif
  111.  
  112.  
  113. #ifndef STDIN                      /* Added -- BGP */
  114. #define STDIN     0
  115. #endif
  116.  
  117. #ifndef STDOUT
  118. #define STDOUT    1
  119. #endif
  120.  
  121. #ifndef STDERR
  122. #define STDERR    2
  123. #endif
  124.  
  125. #ifndef READ
  126. #define READ      1
  127. #endif
  128.  
  129. #ifndef WRITE
  130. #define WRITE     2
  131. #endif
  132.  
  133. #ifndef FRONT
  134. #define FRONT     0
  135. #endif
  136.