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 / uucp.h < prev    next >
Text File  |  1994-09-28  |  10KB  |  257 lines

  1. /*  uucp.h    Main header file for UUCPbb package.
  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. /* Rick Adams' original header with additions.  Changes to code labeled 'REB'
  26.    were made by Bob Billson  */
  27.  
  28. #include <stdio.h>                                          /* Added --REB */
  29.  
  30.  /**************************\
  31.  * Compiler specific macros *
  32.  \**************************/
  33.  
  34. #ifdef _UCC                    /* Ultra C compiler */       /* Added --BGP */
  35. #undef USE_INDEX
  36. #include <string.h>
  37. #else                          /* all other C compilers */
  38. #define USE_INDEX 1
  39. #define strchr(a,b) index(a,b)
  40. #define strrchr(a,b) rindex(a,b)
  41. #include <strings.h>
  42. #endif
  43.  
  44. #include "os_misc.h"                                        /* Added --REB */
  45.  
  46.  /***************************************************
  47.   ***************************************************
  48.   *******   DO NOT change the #defines in the  ******
  49.   *******   section immediately below.         ******
  50.   ***************************************************
  51.   ***************************************************/
  52.  
  53. #ifdef MAIN
  54. #define EXTERN
  55. QQ char *version = "2.1";                /* current software version --REB */
  56. #else
  57. #define EXTERN extern
  58. EXTERN QQ char *version;
  59. #endif
  60.  
  61. #define VERDATE   "94Sep30"
  62. #define MAXTRY       3               /* number of retries to get a packet */
  63.  
  64.  /*******************************************************************
  65.   *******************************************************************
  66.   *******  User can modify the next section  to customize for *******
  67.   *******  their system.  Be sure to leave double quotes (")  *******
  68.   *******  around any strings that already have them.         *******
  69.   *******************************************************************
  70.   *******************************************************************/
  71.  
  72. /* For modems using compression (MNP, etc.) hardware rather than software
  73.    (XON/XOFF) flow control often must be used.  Make the following #define
  74.    TRUE if you use hardware (CTS/RTS) flow control.  Make it FALSE if your
  75.    modem does NOT use compression or you use software flow control.
  76.  
  77.    -->NOTE<---  Bruce Isted's replacement for ACIAPAK (SACIA/DACIA) is needed.
  78.                 on the CoCo.  Also Eddie Kuns update of the Clock module
  79.                 (Edition #9) is highly recommended.  If you still are using
  80.                 ACIAPAK (you shouldn't be :-), make the #define FALSE  */
  81.  
  82. #define RTSFLOW    TRUE
  83.  
  84. /* Time (in ticks) to pause between sending modem commands.  If this is too
  85.    fast for your modem try any value up to 60 (== 1 second on the CoCo 3).
  86.    The default values represent a 1/4 second delay.  */
  87.  
  88. #ifdef _OSK
  89. #define MODEMDELAY 0x80000040                       /* OSK */
  90. #else
  91. #define MODEMDELAY  15                              /* OS9/6809 */
  92. #endif
  93.  
  94. /* Time in seconds UUCICO waits for the remote modem answer (when calling 
  95.    out), detect a carrier and your modem sends its CONNECT message.  If your
  96.    remote's modem takes longer to answer and send a carrer, try increasing the
  97.    value of CNCTIME.  */
  98.  
  99. #define CNCTIME     40
  100.  
  101. /* Time in seconds UUCICO waits for the remote to send its first login prompt.
  102.    If your modem connects but UUCICO times out before getting the login
  103.    prompt, try increasing this value. */
  104.  
  105. #define LOGTIME      5
  106.  
  107. /* Maximum number of times UUCICO will attempt to login during a single call.
  108.    It should rarely be necessary to change this value. */
  109.  
  110. #define MAXLOGTRY    3
  111.  
  112. /* Number of minutes UUCICO waits before calling a system again after a call
  113.    fails.  This default time can be overridden with the -i option. */
  114.  
  115. #define NAPTIME     2
  116.  
  117. /* If UUCICO gives you lots of aborts due to checksum errors, try replacing
  118.    MAXTRY below with a higher number.  (MAXTRY is set for a value of 3 at the
  119.    beginning of this file.)  25 might be a good starting value to try.
  120.    ==DO NOT== change the value of MAXTRY to fix checksum error aborts.
  121.    Increasing GET_TRY may also be useful when running 9600 bps on the Coco. */
  122.  
  123. #define GET_TRY  MAXTRY
  124.  
  125. /* Various directories and #defines used by the package.   You can change the
  126.    directories to suit your system, but do not change the file names.  Other
  127.    directories are set in the /DD/SYS/UUCP/Parameters file or environment
  128.    variables. */
  129.  
  130. /* file paths */
  131. #define DEVICES    "/DD/SYS/UUCP/Devices"
  132. #define DIALERS    "/DD/SYS/UUCP/Dialers"
  133. #define SYSTEMS    "/DD/SYS/UUCP/Systems"
  134. #define NGROUPS    "/DD/SYS/UUCP/active"
  135. #define UUCPSYS    "/DD/SYS/UUCP"
  136. #define NEWSEQ     "/DD/SYS/UUCP/sequence.news"
  137. #define MAILSEQ    "/DD/SYS/UUCP/sequence.mail"
  138. #define GENSEQ     "/DD/SYS/UUCP/sequence.spool"
  139.  
  140. /* Name of your RAM disk.  The RAM disk should be of a reasonable size;
  141.    especially if you will use it for temporary storage when composing mail.
  142.    A suggested size is at least 80K.  If you do not have a RAM disk on your
  143.    system or want the RAM disk to never be used, leave the RAMDISK #define
  144.    below unchanged and change RAMDSIZE to 0. */
  145.  
  146. #define RAMDISK    "/R0"
  147.  
  148. /* Maximum free space on your RAM disk */
  149. #define RAMDSIZE   80000
  150.  
  151. /* our bit bucket */
  152. #define NIL        "/nil"
  153.  
  154. /* default user directory; used by adduser.c --REB */
  155. #define USERDIR     "/DD/USR"
  156.  
  157. /* default data and execution directories; used by login.c --REB */
  158. #define DEFWORKDIR  "/DD/USR/GUEST"
  159. #define DEFEXECDIR  "/DD/CMDS"
  160.  
  161. /* Readnews news help file */
  162. #define NEWSHELP    "/DD/SYS/UUCP/newshelp"
  163.  
  164. /* If the environment variable LOGDIR is undefined.  The logging directory
  165.    where the login and UUCP log files are kept defaults to this one. */
  166.  
  167. #define LOGDIR      "/DD/LOG"
  168.  
  169. /* These are the maximum number of Usenet news groups you expect to received
  170.    on your system.  While there is no real limit under OSK, there in on the
  171.    CoCo.  If you set the number too high, UUCPbb may not compile.  If it
  172.    does, the news software may not work properly, if at all.  This is a
  173.    memory limitation of the CoCo. */
  174.  
  175. #ifdef _OSK
  176. #define MAXNEWSGROUPS  100                      /* max OSK newsgroups */
  177. #else
  178. #define MAXNEWSGROUPS  50                       /* max CoCo newsgroups */
  179. #endif
  180.  
  181.  /*---------> End User Changeable Section <---------*/
  182.  
  183.  
  184.  /***************************************************************
  185.   ***************************************************************
  186.   *******  WARNING: Gremlin Zone!!                         ******
  187.   *******           Do not mess with anything below here.  ******
  188.   ***************************************************************
  189.   ***************************************************************/
  190.  
  191.  
  192. /* Pointer to directory where login and uucico's log files are kept */
  193. EXTERN QQ char *logdir;
  194.  
  195. #ifdef MAIN
  196. /* Directory in user's home directory where aliases, newsrc, mailrc,
  197.    signature, alt.signature, organization, forward, etc. files are kept
  198.    on the CoCo. */
  199.  
  200. QQ char *uudir = "UUCP";
  201. #else
  202. extern QQ char *uudir;
  203. #endif
  204.  
  205. /* outgoing/incoming mail/news files */
  206. EXTERN QQ char *spooldir;
  207.  
  208. /* where news articles are kept */
  209. EXTERN QQ char *newsdir;
  210.  
  211. /* where files (other than news/mail) transferred by uucp program get put */
  212. EXTERN QQ char *pubdir;
  213.  
  214. /* names of various files in ./<HOMEDIR>/<USER>/UUCP directory (CoCo)
  215.                         or   ./<HOMEDIR>/<USER>      directory (OSK)  */
  216. #ifndef _OSK
  217. #define _NEWSRC   "newsrc"                       /* CoCo */
  218. #define _MAILRC   "mailrc"
  219. #define _FRWRD    "forward"
  220. #else
  221. #define _NEWSRC   ".newsrc"                      /* OSK */
  222. #define _MAILRC   ".mailrc"
  223. #define _FRWRD    ".forward"
  224. #endif
  225.  
  226. /* these are environment variables HOME and MAIL */
  227. EXTERN QQ char *maildir;          /* mailbox directory for user's mail */
  228. EXTERN QQ char *homedir;          /* user's login data directory */
  229.  
  230. /* Comment lines start with #, <space>, <tab> or <cr> */
  231. #define ISCOMMENT(c) ((c) == '#' || (c) == ' ' || (c) == '\t' || (c) == '\0')
  232.  
  233. /* active file structure */
  234. struct active {
  235.          char newsgroup[50];  /* Newsgroup name    */
  236.          int index,           /* Lowest article #  */
  237.              seq;             /* Highest article # */
  238.       };
  239.  
  240. /* Newsrc file structure (Capital on purpose!) */
  241. struct Newsrc {
  242.          char newsgroup[50];  /* Newsgroup name       */
  243.          int  index;          /* Highest article read */
  244.          flag sub;            /* 1=subscribed 0=not   */
  245.       };
  246.  
  247. #define SUBSCRIBED    ':'
  248. #define UNSUBSCRIBED  '!'
  249. #define NEWGROUP      '\0'
  250. #define SYSLINE       160         /* max size of line in Systems file */
  251. #define MAXPARAM       20         /* max params in Parameters file */
  252. #define MAXDISTRIB     10         /* max number of news distributations */
  253. #define ABORT           9
  254. #define FATAL          10
  255. #define OK             11
  256. #define TIMEDOUT       -1
  257.