home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / mmdf / mmdf-IIb.43 / lib / dial / d_dglobals.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-02-28  |  2.9 KB  |  111 lines

  1. # include  "util.h"
  2. #ifdef SYS5
  3. # include <termio.h>
  4. #else
  5. # include  <sgtty.h>
  6. #endif SYS5
  7. # include  "d_proto.h"
  8. # include  <stdio.h>
  9. # include  "d_structs.h"
  10.  
  11.  
  12.  
  13. struct dialports  *d_prtpt;    /*  pointer to currently user port in  */
  14.                 /*  'd_prts'                          */
  15.  
  16. struct directlines  *d_ptline;  /*  pointer to currently used line in  */
  17.                                 /*  'd_lines'                          */
  18. FILE    *d_prtfp = (FILE *) EOF; /*  port stdio file pointer  */
  19.  
  20. int  d_lckfd = -1,             /*  lock file descriptor  */
  21.      d_baudrate,                /*  index of baud rate for this connection  */
  22.      d_didial,                  /*  set to non-zero if this is a dial-up  */
  23.                                 /*  connection.                           */
  24.      d_errno;                   /*  error code  */
  25.  
  26. char  d_uname[10],           /*  login name of user  */
  27.       d_upath[50];           /*  login directory path name of user  */
  28.  
  29.  
  30. /*
  31.  *     this structure defines the baud rate strings that will be accpeted
  32.  *     in phone number specifications.
  33.  */
  34.  
  35. struct speedtab  d_spdtab[] =
  36.   {
  37.   "0",       B0,
  38.   "50",      B50,
  39.   "75",      B75,
  40.   "110",     B110,
  41.   "134.5",   B134,
  42.   "134",     B134,
  43.   "150",     B150,
  44.   "200",     B200,
  45.   "300",     B300,
  46.   "600",     B600,
  47.   "1200",    B1200,
  48.   "1800",    B1800,
  49.   "2400",    B2400,
  50.   "4800",    B4800,
  51. #ifdef SYS5
  52. #ifndef M_XENIX
  53. #ifdef B7200
  54.   "7200",    B7200,
  55. #endif /* B7200 */
  56. #endif /* M_XENIX */
  57. #endif /* SYS5 */
  58.   "9600",    B9600,
  59. #ifdef B19200
  60.   "19200",   B19200,
  61. #else
  62.   "19200",   EXTA,
  63. #endif /* B19200 */
  64.   "EXTA",    EXTA,
  65.   "exta",    EXTA,
  66.   "38400",   EXTB,
  67.   "EXTB",    EXTB,
  68.   "extb",    EXTB,
  69.   0,         0,
  70.   };
  71.  
  72.  
  73.  
  74.  
  75. /*
  76.  *     array of ascii baud rate names indexed by the speed.  used to print
  77.  *     understandable diagnostics.
  78.  */
  79.  
  80. int d_xretry = NSENDTRY;     /*  Init # of retries to make  */
  81. int d_toack = DACKWAIT;      /*  Init time out time for ack */
  82. int d_todata = DATAWAIT;     /*  Init time out for data  */
  83.  
  84. #ifdef SYS5
  85. unsigned short d_prbitc = PORTPONC;    /* terminal protocol bit on */
  86. unsigned short d_prbiti = PORTPONI;
  87. unsigned short d_prbito = PORTPONO;
  88. unsigned short d_prbitl = PORTPONL;
  89.  
  90. unsigned short d_scbitc = PORTSONC;    /* terminal script bits on */
  91. unsigned short d_scbiti = PORTSONI;
  92. unsigned short d_scbito = PORTSONO;
  93. unsigned short d_scbitl = PORTSONL;
  94.  
  95. #else
  96.  
  97. int d_pron = PORTPON;       /*  terminal protocol bit on  */
  98. int d_proff = PORTPOFF;     /*  terminal protocal bit off */
  99. int d_scon = PORTSON;       /*  terminal script bits on   */
  100. int d_scoff = PORTSOFF;     /*  terminal script bits off  */
  101.  
  102. #endif SYS5
  103.  
  104. int d_nbuff = 1;        /*  The number of messages to send out before
  105.                  *  requiring an ACK.  Initially, get an ACK
  106.                  *  immediately.
  107.                  */
  108. int d_wpack;            /*  Non-zero if the window specification
  109.                  *  packet should be sent.
  110.                  */
  111.