home *** CD-ROM | disk | FTP | other *** search
/ Shareware Supreme Volume 6 #1 / swsii.zip / swsii / 151 / IMDEV.ZIP / I / CTL.INC < prev    next >
Text File  |  1993-04-28  |  34KB  |  716 lines

  1. {---------------------------------------------------------------------------
  2.     InterMail Control file
  3.  
  4.     Copyright 1986-93 Peter Stewart & InterZone Software, Inc.
  5.     All rights reserved
  6. ---------------------------------------------------------------------------}
  7.  
  8. { Mailer ----------------------------------------------------------------- }
  9.  
  10. { --- Loglevels }
  11.  
  12. CONST
  13.   LOGFATAL   = $0001;                 { !    Fatal errors                  }
  14.   LOGERROR   = $0002;                 { ?    Errors                        }
  15.   LOGBRIEF   = $0004;                 { +    Major changes in action       }
  16.   LOGACCT    = $0008;                 { $    Accounting information        }
  17.   LOGXFER    = $0010;                 { *    Sent/Received files           }
  18.   LOGTRIVIAL = $0020;                 { -    Minor changes in action       }
  19.   LOGEFF     = $0040;                 { %    Transfer efficiencies         }
  20.   LOGMODEM   = $0080;                 { =    Modem activities / resp.      }
  21.   LOGROUTING = $0100;                 { :    Rerouting of messages etc.    }
  22.   LOGSESSION = $0200;                 { ~    Session info, SysOp, etc.     }
  23.   LOGDEBUG   = $8000;                 {      All loglevels enabled         }
  24.  
  25. { --- Miscellaneous MAILER flags }
  26.  
  27.   NOUNLISTED      = $00000001;        { Don't allow unlisted systems       }
  28.   CREATE_BATCH    = $00000002;        { Create batchfile when BBS caller   }
  29.   TERMONLY        = $00000004;        { Running as Terminal-Only           }
  30.   DTR_HANGUP      = $00000008;        { Use DTR to hangup                  }
  31.   DTR_DIAL        = $00000010;        { Toggle DTR prior to dialing        }
  32.   DTR_BUSY        = $00000020;        { Use DTR to signal BUSY             }
  33.   MANUAL_ANSWER   = $00000040;        { Use manual answer                  }
  34.   CONNECT_RESET   = $00000080;        { Reset modem to connect speed       }
  35.   MODEM_FIXED     = $00000100;        { Use constant speed against modem   }
  36.   NOMAIL_NOPWD    = $00000200;        { No mail from unsecured systems     }
  37.   DELAYFIRST      = $00000400;        { Delay before first call            }
  38.   CLOCK           = $00000800;        { Display clock                      }
  39.   KILLNULL        = $00001000;        { Remove messages with no text       }
  40.   MAILONLY        = $00002000;        { Don't allow human callers          }
  41.   LIMITED_ANSWER  = $00004000;        { Limited hours to answer            }
  42.   EXIT_NETMAIL    = $00008000;        { Exit when netmail received         }
  43.   ZONE_ADAPTION   = $00010000;        { Adopt called/calling zone          }
  44.   PRINTNEWMSGS    = $00020000;        { Print received messages            }
  45.   NOUNKNOWNPOINTS = $00040000;        { Don't accept unlisted points       }
  46.  {FORCEDCARRIER   = $00080000;}       { Carrier is forced. Ring required   }
  47.  {NULLMODEM       = $00100000;}       { Initiate session when CD high      }
  48.   MAILER43LINES   = $00200000;        { Use 43/50 line mode in mailer      }
  49.   SWAPTOEMSDISK   = $00400000;        { Swap file to LIM/EMS/DISK w/shell  }
  50.   MAILEREMSOK     = $00800000;        { Swap to EMS if available           }
  51.   PRESENTAKAS     = $01000000;        { Present all our AKAs to remote?    }
  52.   NOBLINKMAIL     = $02000000;        { Don't flash the mail waiting sign  }
  53.   EXITONANYFILE   = $04000000;        { Exit after any files has been rcvd }
  54.  
  55. { --- Audible flags }
  56.  
  57.   CLOCKNOISE      = $0001;            { Tic-tac-tic-tac-tic-tac            }
  58.   INMAILNOISE     = $0002;            { Unpacked any mail                  }
  59.   INCRASHNOISE    = $0004;            { Unpacked crash or immediate mail   }
  60.   INCONNECTNOISE  = $0008;            { Incoming MAIL call (connect)       }
  61.   INCALLERNOISE   = $0010;            { Incoming human caller passed >BBS  }
  62.   MAILWAITING     = $0020;            { Mail is waiting                    }
  63.   OUTMAILNOISE    = $0040;            { Sent mail (after session)          }
  64.   OUTCONNECTNOISE = $0080;            { Outgoing MAIL call (connect)       }
  65.   ERRORNOISE      = $0100;            { S.O.S.                             }
  66.  
  67. { --- Request types }
  68.  
  69.   REQALL          = $01;              { Anybody can request                }
  70.   REQNONE         = $02;              { No one can request                 }
  71.   REQLISTED       = $04;              { Only listed systems and their pts  }
  72.   REQLIMITED      = $08;              { Limited hours                      }
  73.  
  74. { --- Modem connect flags }
  75.  
  76.   MODEM_ARQ = $01;
  77. {-----------------------------------------------------------------------------}
  78.   MAXKEY    = 24;
  79.  
  80. TYPE
  81.   PrefixType = array[0..10] of array[1..31] of Char;
  82.   arr5 = array[1..5] of char;
  83.  
  84. mailrec = record
  85.     {-------------------------------------------------------------------}
  86.     { LOG      - PATHNAME FOR LOGFILE                                   }
  87.     {-------------------------------------------------------------------}
  88.     log  : array[1..71] of Char;  {* NO LONGER USED! Moved to MAILER.001 etc. *}
  89.     loglevel : word;
  90.  
  91.     {-------------------------------------------------------------------}
  92.     { PREFIXES ARE ADDED TO NUMBERS TO BE DIALED. PREFIXES 1-10 ARE USED}
  93.     { WHEN COMPILING THE NODELIST. PREFIX[0] IS DIALED BEFORE EVERY     }
  94.     { DIALED NUMBER. POSTFIX IS ADDED TO DIALED NUMBER (APPENDED)       }
  95.     {-------------------------------------------------------------------}
  96.     prefix : Prefixtype;
  97.     postfix : array[1..31] of Char;
  98.  
  99.     flags          : longint;              { See --- Miscellaneous flags    }
  100.     flags_reserved : longint;
  101.     audio          : word;                 { See --- Audio flags            }
  102.     synchtimer     : byte;                 { Number of seconds for sync M/O }
  103.  
  104.     {-------------------------------------------------------------------}
  105.     { CRASHEXIT - ERRORLEVEL FOR EXIT AFTER CRASHMAIL RECEIVED          }
  106.     {-------------------------------------------------------------------}
  107.     crashexit : Byte;
  108.     {-------------------------------------------------------------------}
  109.     { ERRORLEVELS TO EXIT WITH AT DIFFERENT CONNECT SPEEDS              }
  110.     {-------------------------------------------------------------------}
  111.        bbs300 : Byte;             { if any field contains 0 the speed }
  112.       bbs1200 : Byte;             { should be EXCLUDED for HUMANS     }
  113.       bbs1275 : Byte;             { NO LONGER USED!                   }
  114.       bbs2400 : Byte;             { Moved to MODEM.001 .002 etc.      }
  115.       bbs4800 : Byte;
  116.       bbs9600 : Byte;
  117.      bbs19200 : Byte;
  118.      bbs38400 : Byte;
  119.  
  120.   {-------------------------------------------------------------------}
  121.     { MISC MODEM SETTINGS. MODEMFIXED MEANS USE CONSTANT SPEED AGAINST  }
  122.     { MODEM.  MODEMPORT IS COM PORT 1-4                                 }
  123.     {-------------------------------------------------------------------}
  124.       modembaud : word;                     { Maxbaud modem supports }
  125.       modemport : Byte;                             { COM Port (1-4) }
  126.       modemdelay : byte;         { Moved to MODEM.001 .002 etc.      }
  127.  
  128.     {-------------------------------------------------------------------}
  129.     { MODEM RESPONSECODES (NUMERICAL) AND ACTION/COMMAND STRINGS        }
  130.     {-------------------------------------------------------------------}
  131.       modemmsg : array[1..16] of array[1..16] of Char;
  132.  
  133.         { No longer used: Moved to MODEM.001 .002 etc.      }
  134.     {1}    { Result msg for CONNECT 300    }
  135.     {2}    { Result msg for CONNECT 1200    }
  136.     {3}    { Result msg for CONNECT 1275    }
  137.     {4}    { Result msg for CONNECT 2400    }
  138.     {5}    { Result msg for CONNECT 4800    }
  139.     {6}    { Result msg for CONNECT 9600    }
  140.     {7}    { Result msg for CONNECT 19200    }
  141.     {8}    { Result msg for CONNECT 38400    }
  142.     {9}    { Result msg for ERROR        }
  143.     {10}{ Result msg for BUSY        }
  144.     {11}{ Result msg for NO CARRIER    }
  145.     {12}{ Result msg for OK        }
  146.     {13}{ Result msg for RING        }
  147.     {14}{ Result msg for NO DIALTONE    }
  148.     {15}{ Result msg for NO ANSWER    }
  149.     {16}{ Result msg for VOICE        }
  150.  
  151.       modemescape    : array[1..11] of Char; { Moved to MODEM.001 .002 etc.      }
  152.       modemoffhook   : array[1..11] of Char;
  153.       modemreconnect : array[1..11] of Char;
  154.       modeminit1     : array[1..50] of Char;
  155.       modeminit2     : array[1..50] of Char;
  156.       modeminit3     : array[1..50] of Char;
  157.       modemreset     : array[1..50] of Char;
  158.       modemdown      : array[1..50] of Char;
  159.       modemhangup    : array[1..11] of Char;
  160.       modemdial      : array[1..11] of Char;
  161.     {-------------------------------------------------------------------}
  162.     { String for making the modem answer the phone                      }
  163.     {-------------------------------------------------------------------}
  164.     modemanswer : array[1..11] of Char; { Moved to MODEM.001 .002 etc.      }
  165.  
  166.     {-------------------------------------------------------------------}
  167.     { Delay before sending modem answer string                          }
  168.     {-------------------------------------------------------------------}
  169.     answerdelay : byte;  { Moved to MODEM.001 .002 etc.      }
  170.         {-------------------------------------------------------------------}
  171.         {  Limited answer start and end times                               }
  172.         {-------------------------------------------------------------------}
  173.     beginhour,
  174.     beginmin,
  175.     endhour,
  176.     endmin      : byte;
  177.     {-------------------------------------------------------------------}
  178.     { CALLRETRY - HOW MANY TIMES DO WE ATTEMPT SUCCESSFUL CONNECTION?   }
  179.     {                                                                   }
  180.     { BUSY   - BUMPED ON BUSY RECEIVED                                  }
  181.     { RESEND - CONNECTED, BUT NEVER FINISHED                            }
  182.     { DELAY  - DELAY BETWEEN RE-TRIES                                   }
  183.     {-------------------------------------------------------------------}
  184.     callretry : record
  185.                   busy,
  186.                   resend,
  187.                   delay : Byte;
  188.                 end;
  189.         {-------------------------------------------------------------------}
  190.         {  File request control                                             }
  191.         {-------------------------------------------------------------------}
  192.     reqlist    : array[1..71] of char; { List to scan for reqable dirs      }
  193.     reqalias   : array[1..71] of char; { Magic filenames            }
  194.     reqmessage : array[1..71] of char; { Appended to FAILED REQUEST message }
  195.     {-------------------------------------------------------------------}
  196.     { PICKUP ACCESS - DEFINES WHOM OR WHAT MAY INITIATE A FILE REQUEST  }
  197.     { TYP (BYTE) CAN BE 1, 2 OR 3 AS DEFINED BELOW                      }
  198.     {                                                                   }
  199.     { ALL - 1 == ANYONE MAY REQUEST FILE(S)                             }
  200.     { NO  - 2 == NO FILE REQUESTS ACCEPTED OR HONORED                   }
  201.     { LST - 3 == Only nodes listed in nodelist can request files        }
  202.     {-------------------------------------------------------------------}
  203.     reqtype    : byte;               { Bit field                          }
  204.     reqmaxfiles: byte;                 { Max number of files to send on 1 req - 0=unlimited}
  205.     reqmaxtime : word;                 { Maximum number of minutes for req  }
  206.     reqmaxsize : word;                 { Maximum size (in KB) for req         }
  207.     reqminbaud : word;                 { Minimum baudrate for req         }
  208.     reqstarthr : byte;                 { Start time for file requests, can be }
  209.     reqstartmin: byte;                 { combined with the reqdays field.   }
  210.     reqendhr   : byte;
  211.     reqendmin  : byte;
  212.     reqdays    : byte;              { 7 6 5 4 3 2 1 0x80==All days
  213.                                        - - - - - - -
  214.                                        │ │ │ │ │ │ │
  215.                                        │ │ │ │ │ │ └─── Saturday
  216.                                        │ │ │ │ │ └───── Friday
  217.                                        │ │ │ │ └─────── Thursday
  218.                                        │ │ │ └───────── Wednesday
  219.                                        │ │ └─────────── Tuesday
  220.                                        │ └───────────── Monday
  221.                                        └─────────────── Sunday                }
  222.  
  223.     {-------------------------------------------------------------------}
  224.     { FILE TO USE FOR BANNER WHEN HUMAN CALLER CALLS UP AND ARE LET THRU}
  225.     {-------------------------------------------------------------------}
  226.       bbsname : array[1..11] of char;
  227.       banner  : array[1..71] of Char;
  228.  
  229.     {-------------------------------------------------------------------}
  230.     { USER INSTALLABLE KEYS FROM THE MAILER CONSOLE (ALT + FKEY)        }
  231.     {-------------------------------------------------------------------}
  232.       key : array[1..MAXKEY] of record                    { Function key }
  233.               cmd      : array[1..61] of Char;
  234.               title    : array[1..26] of Char;
  235.               behavior : byte;
  236.             end;
  237.  
  238.     {-------------------------------------------------------------------}
  239.     { Colors                                                            }
  240.     {-------------------------------------------------------------------}
  241.     col : record
  242.             head,                               {  1 = header        }
  243.             hitext,                             {  2 = highlight    }
  244.             clock,                              {  3 = clock        }
  245.             entry,                              {  4 = data entry    }
  246.             error,                              {  5 = error        }
  247.             normtext,                           {  6 = normal text    }
  248.             frame,                              {  7 = frame        }
  249.             wtext,                              {  8 = window text    }
  250.             wframe,                             {  9 = window frame    }
  251.             wbar,                               { 10 = window select    }
  252.             whigh : Byte;                       { 11 = window highlght    }
  253.     end;
  254.  
  255.     { Number of days to keep entries in history files }
  256.  
  257.     keep_history : byte;
  258.  
  259.     { IMServer password, if none given, server is INactive }
  260.  
  261.     slavepwd : array[1..21] of char;
  262.  
  263.     { File displayed to users when system is in event for no callers }
  264.  
  265.     ineventfile : array [1..71] of char;
  266.  
  267.     { File displayed when human callers are seen on mail-only system }
  268.  
  269.     mailonlyfile : array[1..71] of char;
  270.  
  271.     { External programs to run on certain "wake-up" strings }
  272.  
  273.     externmail : array[1..10] of record
  274.                     wakeupstr  : array[1..40] of char;
  275.                     errorlevel : byte;
  276.                   end;
  277.  
  278.         {-------------------------------------------------------------------}
  279.         {  Limited noise start and end times                                }
  280.         {-------------------------------------------------------------------}
  281.     audio_beginhour,
  282.     audio_beginmin,
  283.     audio_endhour,
  284.     audio_endmin      : byte;
  285.  
  286.         min_undial_cost        : word;
  287.  
  288.     { RESERVED FIELD }
  289.  
  290.     RESERVERAT: array[1..957] of char;
  291.     modemtype : array[1..61] of char;
  292.   END;  {record mailrec}
  293. { Editor ----------------------------------------------------------------- }
  294.  
  295. CONST
  296.   EDITOR43LINES  = $00000001;
  297.   SHOWHARDCRS    = $00000002;
  298.   EDITORSWAP     = $00000004;              { Swap file to LIM/EMS/DISK w/shell}
  299.   EDITOREMSOK    = $00000008;
  300.  
  301. { Netmail folder behavior }
  302.  
  303.   RESTRICTED     = $00000001;
  304.   EXPORTOK       = $00000004;
  305.   USEXLATTABLES  = $00000008;
  306.   EDREADONLY     = $00000020;
  307.  
  308.   MAXORIGIN      = 20;
  309.  
  310. TYPE
  311.  
  312. {---------------------------------------------------------------------------}
  313. { EDITOR STRUCTURE                                                          }
  314. {---------------------------------------------------------------------------}
  315.  editrec = record
  316.     {-------------------------------------------------------------------}
  317.     { MACRO KEYS IN EDITOR. ALT + 'KEY' TO ACTIVATE. | = CR             }
  318.     {-------------------------------------------------------------------}
  319.     macro : array[1..MAXKEY] of
  320.           array[1..61] of Char;              { Macro definition  }
  321.  
  322.     {-------------------------------------------------------------------}
  323.     { Right margin in editor, defaults to 65                            }
  324.     {-------------------------------------------------------------------}
  325.       margin      : Byte;
  326.  
  327.     {-------------------------------------------------------------------}
  328.     { Default message attribute in editor                               }
  329.     {-------------------------------------------------------------------}
  330.       msgbits     : Word;
  331.  
  332.   {-------------------------------------------------------------------}
  333.   {  Miscellaneous settings                                           }
  334.   {-------------------------------------------------------------------}
  335.       flags  : longint;
  336.  
  337.     {-------------------------------------------------------------------}
  338.     { Origin lines                                                      }
  339.     {-------------------------------------------------------------------}
  340.       origin : array[1..MAXORIGIN] of array[1..61] of Char;
  341.  
  342.     {-------------------------------------------------------------------}
  343.     { Colors                                                            }
  344.     {-------------------------------------------------------------------}
  345.       col : record
  346.                 topline,                        { 1 = top line on screen  }
  347.                 status,                         { 2 = statusline          }
  348.                 error,                          { 3 = error               }
  349.                 text,                           { 4 = normal text         }
  350.                 textquotes,                     { 5 = quotes              }
  351.                 textreverse,                    { 6 = reversed text       }
  352.                 texthardCRs,                    { 7 = hard CRs            }
  353.                 header,                         { 8 = message header      }
  354.                 headerdata,                     { 9 = header data         }
  355.                 headerdatahilite,               {10 = hilite for header   }
  356.                 entry,                          {11 = data entry fields   }
  357.                 wframe,                         {12 = window frame        }
  358.                 wtext,                          {13 = window text            }
  359.                 wbar,                           {14 = window select       }
  360.                 whigh : Byte;                   {15 = window hghlght      }
  361.               end;
  362.  
  363.     NetBehave : LongInt;
  364.  
  365.     {-------------------------------------------------------------------}
  366.     { Translate tables from and to disk                                 }
  367.     {-------------------------------------------------------------------}
  368.     transin  : array[0..255] of Char;
  369.     transout : array[0..255] of Char;
  370.  
  371.     qbbsdir  : array[1..71] of Char;    { Hudson format message files }
  372.  
  373.     Reserved : array[1..1024] of Byte;
  374.  
  375.   END;  {record editrec}
  376.  
  377. { Shared data ------------------------------------------------------------- }
  378.  
  379. CONST
  380.   FASTKEY    = $00000001;
  381.   FLICKER    = $00000002;
  382.   BLACKSCR   = $00000004;
  383.   HAVEXKBD   = $00000008;
  384.   FORCE24HR  = $00000010;
  385.  
  386.   SUPERUSER  = $00000001;            { User flags                        }
  387.   ADMINUSER  = $00000002;
  388.   USER       = $00000004;
  389.   BYPASSRO   = $00010000;
  390.   BYPASSEXP  = $00020000;
  391.  
  392.   OLDMAXAKA  = 10;
  393.   MAXAKA     = 20;
  394.   MAXUSER    = 10;
  395.   MAXLANUSER = 255;
  396.  
  397.   PROTECT_MEXIT   = $00000001;
  398.   PROTECT_MSHELL  = $00000002;
  399.   PROTECT_MKEYS   = $00000004;
  400.   PROTECT_MFREQ   = $00000008;
  401.   PROTECT_MXMIT   = $00000010;
  402.   PROTECT_MSEND   = $00000020;
  403.   PROTECT_MPOLL   = $00000040;
  404.   PROTECT_MNCOMP  = $00000080;
  405.   PROTECT_MQUE    = $00000100;
  406.   PROTECT_MPRN    = $00000200;
  407.  
  408. TYPE
  409.  
  410. {---------------------------------------------------------------------------}
  411. { SHARED record STRUCTURE                                                   }
  412. {---------------------------------------------------------------------------}
  413.   shrdrec = record
  414.  
  415.     {-------------------------------------------------------------------}
  416.     { SYSTEM FILE PATH. SOURCE/COMPILED NODELIST, etc etc               }
  417.     {-------------------------------------------------------------------}
  418.       system : array[0..70] of Char;
  419.  
  420.     {-------------------------------------------------------------------}
  421.     {        MAILPATH - INCOMING MESSAGES ARE UNPACKED AND STORED HERE  }
  422.     {                   AS WELL AS OUTGOING MESSAGES BEFORE GETTING     }
  423.     {                   'BUNDLED'. THIS IS ALSO REFERED TO AS FOLDER 0  }
  424.     {-------------------------------------------------------------------}
  425.       mailpath : array[0..70] of Char;
  426.       swappath : array[0..70] of char;
  427.  
  428.     {-------------------------------------------------------------------}
  429.     { MISCELANEOUS PATH NAMES (BUT STILL VITAL)                         }
  430.     {                                                                   }
  431.     {        FILEPATH - INCOMING FILES ARE STORED HERE                  }
  432.     {                                                                   }
  433.     {        PACKETS  - TEMPORARY 'BUNDLE' AREA FOR OUTGOING PACKETS    }
  434.     {-------------------------------------------------------------------}
  435.       semaphore       : array[1..71] of char;
  436.       securefiledir   : array[1..71] of char;
  437.       filepath        : array[1..71] of Char;
  438.       packets         : array[1..71] of Char;
  439.       NodeDir         : array[1..71] of char;
  440.  
  441.     {-------------------------------------------------------------------}
  442.     { COUNTRY CODE (DOS)                                                }
  443.     {-------------------------------------------------------------------}
  444.      country : Word;
  445.  
  446.     {-------------------------------------------------------------------}
  447.     { AKAS ARE ALTERNATE NET ADDRESSES: ZONE:NET/NODE.POINT             }
  448.     {-------------------------------------------------------------------}
  449.      aka : array[0..OLDMAXAKA] of record  { NO LONGER USED, but still }
  450.               zone,                       { maintained by IMSetup     }
  451.               net,                        { see below!                }
  452.               node,
  453.               point    : Word;
  454.             end;
  455.  
  456.      flags          : longint;
  457.      blackout_time  : byte;
  458.  
  459.      user : array[1..MAXUSER] of record
  460.                name    : array[1..37] of Char;
  461.                pwdcrc  : longint;
  462.                flags   : longint
  463.              end;
  464.  
  465.      exitpwdcrc     : longint;
  466.      exitflags      : longint;
  467.      filler         : array[1..120] of byte;
  468.      domstuff       : array[1..20] of record
  469.                         gate : word;
  470.                         junk : word;
  471.                         name : array[1..28] of char;
  472.                       end;
  473.      systemname    : array[1..50] of char;
  474.      systemloc     : array[1..40] of char;
  475.      systemphone   : array[1..24] of char;
  476.      fill          : word;
  477.      xtra          : longint; 
  478.      systemflags   : array[1..20] of char;
  479.      systemcountry : array[1..26] of char;
  480.      serial        : array[1..14] of char;
  481.      Reserved      : array[1..72] of Byte;
  482.   END;  {record shrdrec}
  483.  
  484.  
  485. { Terminal --------------------------------------------------------------- }
  486.  
  487. CONST
  488.   CONNECT_NOISE   = $00000001;
  489.   TRANSFER_NOISE  = $00000002;
  490.   USE_TRANSLATE   = $00000004;
  491.   USE_43LINES     = $00000008;
  492.   AUTOZMODEM      = $00000010;
  493.   NOWRAPAROUND    = $00000020;
  494.   LOCALECHO       = $00000040;
  495.   NOAVATAR        = $00000080;
  496.  
  497. TYPE
  498.   termrec = record
  499.     {-------------------------------------------------------------------}
  500.     { Modem init strings for terminal mode                              }
  501.     {-------------------------------------------------------------------}
  502.     initstring : array[1..41] of Char;
  503.  
  504.     scrollsize : word;  { scroll buffer size }
  505.  
  506.     {-------------------------------------------------------------------}
  507.     { Default emulation                                                 }
  508.     {-------------------------------------------------------------------}
  509.     Defemulation : Byte;    { 1 = TTY, 2 = VT100 }
  510.  
  511.     {-------------------------------------------------------------------}
  512.     { Default protocol                                                  }
  513.     {-------------------------------------------------------------------}
  514.     protocol : Byte;     { T=Telink, X=xmodem, y=xmodem/1K, s=SEAlink, z=xmodem }
  515.  
  516.     {-------------------------------------------------------------------}
  517.     { Macro keys in terminal                                            }
  518.     {-------------------------------------------------------------------}
  519.     shiftkey : array[1..12] of array[1..31] of char;
  520.     ctrlkey  : array[1..12] of array[1..31] of char;
  521.     {-------------------------------------------------------------------}
  522.     { Where to put downloaded files                                     }
  523.     {-------------------------------------------------------------------}
  524.     downloadpath : array[1..60] of char;
  525.     uploadpath   : array[1..60] of char;
  526.  
  527.     {-------------------------------------------------------------------}
  528.     { Translate tables for incoming and outgoing characters             }
  529.     {-------------------------------------------------------------------}
  530.     translatein  : array[0..255] of Char;
  531.     translateout : array[0..255] of Char;
  532.  
  533.     {-------------------------------------------------------------------}
  534.     { Time to wait between redial attempts                              }
  535.     {-------------------------------------------------------------------}
  536.     retrywait : Byte;
  537.  
  538.     {-------------------------------------------------------------------}
  539.     { Behavior and miscellaneous options such as noise.. etc.           }
  540.     {-------------------------------------------------------------------}
  541.     behavior     : longint;
  542.  
  543.     directorypwd : longint;
  544.  
  545.     editor    : array[1..60] of char;  { Invoked with Alt-I }
  546.  
  547.     reserved : array[1..796] of byte;
  548.  
  549.     newaka : array[0..MAXAKA] of record  { location of new AKA list!!! }
  550.               zone,
  551.               net,
  552.               node,
  553.               point    : Word
  554.             end
  555.   end;
  556.  
  557. { Printer ---------------------------------------------------------------- }
  558.   CONST
  559.     PAGE_FORMAT   = $00000001;
  560.     PAGE_FFEED    = $00000002;
  561.     EJECT         = $00000004;
  562.     MANUAL_PAPER  = $00000008;
  563.     HIDE_KLUDGE   = $00000010;
  564.     CONTINUOUS    = $00000020;
  565.  
  566.     {-------------------------------------------------------------------}
  567.     { Printer control                             }
  568.     {-------------------------------------------------------------------}
  569.   TYPE
  570.     printrec = record
  571.       port      : Byte;    { 0-2 = LPT1 - LPT3, 3-4 = COM1, COM2 }
  572.       baud      : Byte;    { 0=9600, 1=4800, 2=2400, 3=1200 }
  573.       stopbits  : Byte;  { 0=1, 1=2.....! }
  574.       databits  : Byte;    { 0=7, 1=8     }
  575.       parity    : Byte;    { 0=even, 1=odd, 2=none }
  576.       pglength  : Byte;
  577.       behavior  : LongInt;
  578.       init      : array[1..71] of char;
  579.       reset     : array[1..71] of char;
  580.       boldon    : array[1..31] of char;
  581.       boldoff   : array[1..31] of char;
  582.       underon   : array[1..31] of char;
  583.       underoff  : array[1..31] of char;
  584.       italon    : array[1..31] of char;
  585.       italoff   : array[1..31] of char;
  586.       pagewidth : Byte;
  587.       leftmarg  : Byte;
  588.       botmargin : Byte;
  589.       topmargin : Byte;
  590.       translate : array[char] of char;
  591.       reserved  : array[1..39] of char;
  592.       printtype : array[1..61] of char;
  593.     end;
  594.  
  595. { Global control file ------------------------------------------------------
  596.  
  597.  Don't use ANY of the data in the file if the CRC values are NOT correct.
  598. ----------------------------------------------------------------------------}
  599.  
  600. CONST
  601.   THISREV = $0100;
  602.  
  603. type
  604.   ctlrec = record
  605.     fingerprint : arr5;     { 'JoHo'#0  }    { TosScan needs this... }
  606.     sysrev      : word;     { = thisrev }
  607.     ctlcrc      : longint;  { crc32 of record except first 11 & last 4 bytes }
  608.     _m          : mailrec;
  609.     _e          : editrec;
  610.     _s          : shrdrec;
  611.     imsignature : longint;  { = $0000fd0b }
  612.     _t          : termrec;
  613.     _p          : printrec;
  614.     ctlcrc2     : longint;  { crc32 of record except last 4 bytes }
  615.   end; {ctlrec}
  616.  
  617. {
  618.   crc calculation, assuming:
  619.     var
  620.       ctl : ctlrec;
  621.  
  622.      ctl.ctlcrc := crc32(ctl._m, sizeof(ctl._m) + sizeof(ctl._e)
  623.             + sizeof(ctl._s) + 4 + sizeof(ctl._t) + sizeof(ctl._p), -1);
  624.  
  625.      ctl.ctlcrc2 := crc32(ctl, sizeof(ctl)-4, -1);
  626.  
  627.     Use standard CCITT 32 bit Cyclic Redundancy Check algorithm,
  628.     with -1 as the seed value.
  629.  
  630. }
  631. {---------------------------------------------------------------------------}
  632. { User record for LAN version                                               }
  633. {---------------------------------------------------------------------------}
  634.     userstruc = array[1..MAXLANUSER] of record
  635.                   name  : String[36];
  636.                   pwd   : longint;
  637.                   flags : longint
  638.                 end;
  639. {---------------------------------------------------------------------------}
  640. { Control structure for mailer node file:  MAILER.0##                       }
  641. {---------------------------------------------------------------------------}
  642.   mailinfrec = record
  643.                  pkdir    : array[0..70] of char; { packet directory }
  644.                  logfile  : array[0..70] of char; { log file name    }
  645.                  systname : array[0..49] of char; { system name      }
  646.                  systloc  : array[0..39] of char; { system location  }
  647.                  systcount: array[0..25] of char; { country          }
  648.                  systphone: array[0..23] of char; { phone number     }
  649.                  systflags: array[0..19] of char  { nodelist flags   }
  650.                end;
  651. {---------------------------------------------------------------------------}
  652. {---------------------------------------------------------------------------}
  653. { Control structure for modem info, file:  MODEM.0##                        }
  654. {---------------------------------------------------------------------------}
  655.     modem_ctl = record
  656.                   flags         : longint;
  657.                   modemport     : byte;
  658.                   modembaud     : word;
  659.                   modemdelay    : byte;   { delay between strings to modem }
  660.                   answerdelay   : byte;   { delay before answer string is sent }
  661.  
  662.                   begin_hour    : byte;   { for limited hours }
  663.                   begin_minute  : byte;
  664.                   end_hour      : byte;
  665.                   end_minute    : byte;
  666.                   escapestr     : array [1..11] of char;
  667.                   offhookstr    : array [1..11] of char;
  668.                   reconnectstr  : array [1..11] of char;
  669.                   init1         : array [1..50] of char;
  670.                   init2         : array [1..50] of char;
  671.                   init3         : array [1..50] of char;
  672.                   resetstr      : array [1..50] of char;
  673.                   downstr       : array [1..50] of char;
  674.                   hangupstr     : array [1..11] of char;
  675.                   dialstr       : array [1..11] of char;
  676.                   modemanswer   : array [1..11] of char;
  677.                   prefix        : array [1..31] of char;
  678.                   postfix       : array [1..31] of char;
  679.  
  680.                   errormsg      : array [1..16] of char; { modem messages }
  681.                   busymsg       : array [1..16] of char;
  682.                   carriermsg    : array [1..16] of char;
  683.                   okmsg         : array [1..16] of char;
  684.                   ringmsg       : array [1..16] of char;
  685.                   nodialmsg     : array [1..16] of char;
  686.                   noanswmsg     : array [1..16] of char;
  687.                   voicemsg      : array [1..16] of char;
  688.                   reserved1     : array [1..128] of char;
  689.                   modemname     : array [1..51] of char;
  690.                   modem_msgs    : word;  { number of modem msgs following }
  691.                   dialfile      : array [1..13] of char;
  692.                   reserved2     : array [1..106] of char; { for future use }
  693.                 end; {modem_ctl}
  694.  
  695. {---------------------------------------------------------------------------}
  696. { modem connect message struct, a number specified in "modem_msgs"          }
  697. { of these follow the above struct                                          }
  698. {---------------------------------------------------------------------------}
  699.      msrec = record
  700.                ms        : array[1..41] of char;
  701.                reserv    : array[1..8] of byte;
  702.                bbsexit   : byte;              { errorlevel for bbs exit   }
  703.                termlevel : byte;              { terminate with errorlevel }
  704.                bps       : longint;           { speed of connection       }
  705.                flags     : longint;
  706.              end;
  707. {---------------------------------------------------------------------------}
  708. { Flags affecting modem behavior, stored in MODEM.0##                       }
  709. {---------------------------------------------------------------------------}
  710.   const
  711.     modem_mask = DTR_HANGUP + DTR_DIAL + DTR_BUSY + MANUAL_ANSWER
  712.                + CONNECT_RESET + MODEM_FIXED + LIMITED_ANSWER
  713.                + FORCEDCARRIER + NULLMODEM;
  714.  
  715.  
  716.