home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / BBS / MISC / EZY101_3.ZIP / STRUCTC.101 < prev    next >
Encoding:
Text File  |  1992-05-20  |  56.8 KB  |  1,368 lines

  1. /********************************************************************
  2.  * EzyCom structures converted to C format
  3.  * by Colin Berg (Fido 3:635/500)
  4.  * last updated : 12/Feb/1992
  5.  *              : 09/May/1992 (for use with Ezycom v1.01)
  6.  *
  7.  * These structures may ONLY be used in accordance with those
  8.  * agreements laid out in the Official Ezycom Structures.
  9.  * Colin Berg and Peter Davies take no responsibility whatsoever
  10.  * for the correctness of these structures.
  11.  *
  12.  * The following programs are currently in development.
  13.  * Check with Colin Berg at Fido 3:635/500 for further information.
  14.  *
  15.  * ECDOOR v1.00 : Fully functional door developers lib in C (Turbo/Borland).
  16.  *              : Other formats as soon as I can afford the languages.
  17.  *
  18.  * ECTICK v1.00 : An EzyCom Specific Tick/Hatch "compatible" utility.
  19.  *              : Provides all the functionality of Tick, Hatch, Raid,
  20.  *              : Inter, & Ticket in the one utility suite.
  21.  *
  22.  * ECOMS  v1.00 : An EzyCom offline Mail Packer/Tosser and Reader System.
  23.  *
  24.  * EZYUP  v1.00 : A Standalone Sysop File Upload Utility.
  25.  *
  26.  * ECHARD v1.00 : Utility to Print Hardcopy of ALL EzyCom Config Files.
  27.  *
  28.  * ECCOS  v1.00 : Co-Sysop Maintenance Door.
  29.  *
  30.  * ECBBS  v1.00 : BBS List Door.
  31.  ********************************************************************/
  32.  
  33. #define  EZYVER     "1.01"
  34. #define  PRODNAME   "Ezycom"
  35. #define  COPYRIGHT  "Peter Davies"
  36. #define  EZYVERHI     1
  37. #define  EZYVERLO    01
  38. #define  MAXFREE    685
  39. #define  USERFREE    35
  40. #define  MAXNODES   128
  41. #define  MAXAKA      16
  42. #define  MAXMESS    400
  43. #define  MAXMESSALL 500
  44. #define  MAXFILES   400
  45.  
  46. /****** Take Note ********************************************************
  47. Boolean can be defined as a Char value under C or as an enum with a
  48. true/false value under C++ (if compiled with enum to char switch)
  49. WARNING: Make sure that you don't have another header which defines Boolean
  50. **************************************************************************/
  51. /* typedef char Boolean; */
  52.  
  53. /* The following can also be defined as enum under C++ */
  54. typedef char AskType;          /* 0=yes, 1=no, 2=ask */
  55. typedef char PhoneType;        /* 0=business, 1=data, 2=nophone */
  56. typedef char MsgType;          /* 0=localmail, 1=netmail, 2=echomail, 3=passthru, 4=waitthru, 5=allmail */
  57. typedef char MsgKindsType;     /* 0=public, 1=private, 2=private or public */
  58. typedef char ShowFileSizeType; /* 0=nosize, 1=size in bytes, 2=size in kbytes */
  59.  
  60. /* Swapping Types : 0=None, 1=Ems, 2=Xms, 3=Disk, 4=EmsXms, 5=XmsEms */
  61.  
  62. typedef unsigned char MaxStr[256];
  63. typedef unsigned char UserString[36];
  64. typedef unsigned char Date[9];
  65. /* typedef unsigned char Str3[4]; */
  66. /* typedef unsigned char Str8[9]; */
  67. /* typedef unsigned char Str30[31]; */
  68. typedef unsigned char File8[9];
  69. typedef unsigned char FlagType[4];
  70. typedef unsigned char PathString[61];
  71.  
  72. /*************************************************************************
  73.  * Datetime record as defined under Turbo Pascal
  74.  *************************************************************************/
  75. typedef struct DATETIME
  76. {
  77.     unsigned int year,
  78.                  month,
  79.                  day,
  80.                  hour,
  81.                  min,
  82.                  sec;
  83. }DATETIME;
  84.  
  85. typedef struct DATERECORD
  86. {
  87.     unsigned int  year;
  88.     unsigned char month,
  89.                   day;
  90. }DATERECORD;
  91.  
  92. typedef struct SECURITYRECORD
  93. {
  94.     unsigned int  security;
  95.     FlagType      onflags;
  96.     FlagType      offflags;
  97. }SECURITYRECORD;
  98.  
  99. typedef struct NETRECORD
  100. {
  101.     unsigned int  zone,
  102.                   net,
  103.                   node,
  104.                   point;
  105. }NETRECORD;
  106.  
  107. /********************************************************************
  108.  * USERS.BBS record structure
  109.  *
  110.  *     attribute bit 0 : deleted
  111.  *               bit 1 : clear screen
  112.  *               bit 2 : more prompt
  113.  *               bit 3 : ansi capable
  114.  *               bit 4 : don't kill user
  115.  *               bit 5 : file points ignore
  116.  *               bit 6 : full screen ed
  117.  *               bit 7 : quiet mode
  118.  *
  119.  *    attribute2 bit 0 : ignore file ratios
  120.  *               bit 1 : extended ibm characters
  121.  *               bit 2 : on = mmddyy off = ddmmyy
  122.  *               bit 3 : ignore paging hours
  123.  *               bit 4 : exclude user
  124.  *               bit 5 : avatar capable
  125.  *               bit 6 : ignore menu time restrictions
  126.  *               bit 7 : ignore message ratios
  127.  *
  128.  *    attribute3 bit 0 : do not sound page
  129.  *                   1 : page on logon
  130.  *                   2 : hold mailbox
  131.  *                3..7 : Reserved
  132.  *
  133.  *    attribute4 bit 0..7 reserved
  134.  ********************************************************************/
  135. typedef struct USERSRECORD
  136. {
  137.     UserString    name,                   /* Users Name */
  138.                   alias;                  /* Users Alias */
  139.     unsigned char password[16];           /* Users Password */
  140.     unsigned int  security;               /* Users SecLvl */
  141.     unsigned char attribute,              /* See Type Comment */
  142.                   attribute2,             /* See Type Comment */
  143.                   attribute3,             /* See Type Comment */
  144.                   attribute4;             /* See Type Comment */
  145.     FlagType      flags;                  /* Users Access Flags */
  146.     unsigned char dataphone[15],          /* Users Data Phone No: */
  147.                   voicephone[15];         /* Users Voice Phone No: */
  148. } USERSRECORD;
  149.  
  150.  
  151. /********************************************************************
  152.  * USERSEXT.BBS record structure
  153.  *
  154.  * colour?_? : To retrieve the first colour  " && 15 "
  155.  *             To retrieve the second colour " >> 4  "
  156.  ********************************************************************/
  157. typedef struct USERSEXTRARECORD
  158. {
  159.     unsigned char location[26];              /* Users Location */
  160.     long int      lasttimedate;              /* (Dos packed) Last Login Date Time */
  161.     unsigned int  credit,                    /* Netmail Credit */
  162.                   pending;                   /* Netmail Points Pending */
  163.     unsigned int  msgsposted,                /* Msgs posted */
  164.                   nocalls,                   /* Times Called */
  165.                   uploads,                   /* Users Uploads (Files) */
  166.                   todayk,                    /* K's Downloaded today */
  167.                   timeused,                  /* Time Used today */
  168.                   downloads;                 /* Users Downloads (Files) */
  169.     long int      uploadsk,                  /* Kilobytes Uploaded */
  170.                   downloadsk;                /* Kilobytes Downloaded */
  171.     unsigned char screenlength,              /* Users Screen Length */
  172.                   lastpwdchange;             /* Logons since password last changed */
  173.     unsigned int  timebanked,                /* Time banked by user */
  174.                   ksbanked,                  /* Kilobytes banked by user */
  175.                   filepoints;                /* Filepoints remaining */
  176.     unsigned char qwkcompression,            /* QWK Compression Type */
  177.                   qwkdaysold;                /* QWK Days old to pack mail */
  178.     unsigned char comment[41];               /* Sysops comment about user */
  179.     unsigned char colour1_2,                 /* Message\File area colors */
  180.                   colour3_4,                 /* Message\File area colors */
  181.                   colour5_6,                 /* Message\File area colors */
  182.                   colour7_8,                 /* Message\File area colors */
  183.                   bkcolour;                  /* Message\File area colors */
  184.     unsigned char sessionfailures;           /* Number of Session Failures */
  185.     Str8          topmenu;                   /* Name of Top Menu to show to user */
  186.     unsigned int  filepointsgiven;           /* File Points given since last session */
  187.     DATERECORD    dateofbirth;               /* Users date of birth */
  188.     unsigned char groups[4];                 /* Currently unused */
  189.     unsigned int  regodate,                  /* Users Registration date */
  190.                   firstdate,                 /* Date of first logon */
  191.                   lastfiledate;              /* Date of last New files listing */
  192.     char          defprotocol;               /* Blank = NO protocol defined */
  193.     unsigned int  timeleft;                  /* Users time left today */
  194.     unsigned int  filearea;                  /* Last file area accessed by user */
  195.     unsigned int  messarea;                  /* Last message area access by user */
  196.     long int      usernumbermsb,             /* Unique user number MSB */
  197.                   usernumberlsb;             /* Unique user number LSB */
  198.     long int      qwkmaxmsgs;                /* Maximum Msgs for QWK Pkt */
  199.     unsigned char qwkmaxmsgsperarea;         /* Maximum Msgs per area */
  200.     char          extraspace[USERFREE];      /* For future expansion */
  201. } USERSEXTRARECORD;
  202.  
  203. /********************************************************************
  204.  * LASTCOMB.BBS record structure
  205.  * This file grows and shrinks for EACH User depending on the
  206.  * number of message areas defined in the configuration
  207.  ********************************************************************/
  208. typedef struct USERSLASTRECORD
  209. {
  210.     unsigned int  combinedinfo;
  211.     unsigned int  lastreadinfo[16];
  212. } USERSLASTRECORD;
  213.  
  214. /********************************************************************
  215.  * *.MNU record structure
  216.  *
  217.  * attribute bit 0 : test ratio kb's
  218.  *           bit 1 : test message/call ratio
  219.  *           bit 2 : test age <config age> and over
  220.  *           bit 3 : test ratio files
  221.  *            4..7 : [ reserved ]
  222.  ********************************************************************/
  223. typedef struct MNURECORD
  224. {
  225.     unsigned char typ;              /* Menu option number */
  226.     unsigned int  security;         /* SecLvl required to access option */
  227.     FlagType      flags;            /* Flags required to access option */
  228.     unsigned char display[91];      /* String to display to user, ";" = no display */
  229.     char          hotkey;           /* Ctrl-A means Automatic Option */
  230.     unsigned char miscdata[91];     /* Misc data field */
  231.     unsigned char foreground,       /* Display foreground color */
  232.                   background;       /* Display background color */
  233.     unsigned char timeonline;       /* Minutes before user can access option */
  234.     unsigned int  timestart;        /* Time for option to become active */
  235.     unsigned int  timeend;          /* Time option is no longer active */
  236.     unsigned char attribute;        /* See Type Comment */
  237.     unsigned char node;             /* Nodes which can access option (0=All) */
  238. } MNURECORD;
  239.  
  240. /********************************************************************
  241.  * PROTOCOL.EZY record structure
  242.  *
  243.  * attribute bit 0 : enable/disable
  244.  *           bit 1 : batch protocol
  245.  *           bit 2 : [ reserved ]
  246.  *           bit 3 : both directions
  247.  *           bit 4 : up/down
  248.  *           bit 5 : bidirectional (ONLY Works on Uploads)
  249.  *            6..7 : [ reserved ]
  250.  ********************************************************************/
  251. typedef struct PROTOCOLRECORD
  252. {
  253.     unsigned char name[16];                /* Protocol name to be displayed */
  254.     char          activekey;               /* Hotkey which selects protocol */
  255.     unsigned char attribute;               /* See Type Comments */
  256.     PathString    logfilename,             /* eg: Dsz logfile */
  257.                   ctlfilename,             /* Protocol control file name */
  258.                   dnctlstring;             /* String used by prot to indicate batch list */
  259.     unsigned char dncmdstring[101],        /* Download command string */
  260.                   upcmdstring[101];        /* Upload command string */
  261.     unsigned char uplogkeyword[11],        /* Upload Key in Log */
  262.                   dnlogkeyword[11],        /* Download Key in Log */
  263.                   uperrkeyword[11],        /* Upload Error Key in Log */
  264.                   dnerrkeyword[11],        /* Download Error Key in Log */
  265.                   uperr2keyword[11],       /**/
  266.                   dnerr2keyword[11];       /**/
  267.     unsigned char xfernamewordnum,         /**/
  268.                   xfercpswordnum;          /**/
  269.     unsigned int  security;                /* SecLvl required to use this protocol */
  270.     FlagType      flags;                   /* Flags required to use this protocol */
  271.     unsigned char efficiency;              /* Protocols efficiency percentage */
  272. } PROTOCOLRECORD;
  273.  
  274. /********************************************************************
  275.  * CONFIG.<EZY or NODE> structure
  276.  *
  277.  * unknownarea = 0 - kill messages
  278.  *               1 - make a new echomail area
  279.  *               2 - make a new passthru area
  280.  *
  281.  * tossattr2 = bit 0 - [ reserved ]
  282.  *                 1 - [ reserved ]
  283.  *                 2 - kill bad archives
  284.  *                 3 - arcmail 0.6 compat
  285.  *
  286.  * autodetect = bit 0 - Auto Detect Ansi
  287.  *                  1 - Ansi Detect for New User
  288.  *                  2 - Auto Detect Emsi
  289.  *                  3 - auto detect emsi & for newuser
  290.  *
  291.  * tossattr = bit 0 : [reserved]
  292.  *                1 : [reserved]
  293.  *                2 : [reserved]
  294.  *                3 : dupe detection
  295.  *                4 : delete netmail on import
  296.  *                5 : keep echoarea node receipts
  297.  *                6 : allow message rescan
  298.  *                7 : [reserved]
  299.  *
  300.  * multitasker = 0 = do not detect or use any multitasker
  301.  *               1 = auto-detect
  302.  *               2 = desqview (or compatiable)
  303.  *               3 = double dos
  304.  *               4 = OS.2
  305.  *               5 = multidos plus
  306.  *               6 = Taskview
  307.  *               7 = Topview
  308.  *               8 = PC MOS
  309.  *               9..255 [reserved]
  310.  *
  311.  * printerport = 0 = LPT1
  312.  *               1 = LPT2
  313.  *               2 = LPT3
  314.  *               3 = COM1
  315.  *               4 = COM2
  316.  *               5 = COM3
  317.  *               6 = COM4
  318.  ********************************************************************/
  319. typedef struct CONFIGRECORD
  320. {
  321.     unsigned char ezyver[9];              /* Ezycom Version Number */
  322.     unsigned char bbsname[41];            /* Your BBS's Name */
  323.     UserString    sysopname;              /* Sysops Name */
  324.     PathString    logpath,                /* Path to system logfile */
  325.                   textpath,               /* Path to textfiles, *.Ans */
  326.                   menupath,               /* Path to *.Mnu files */
  327.                   mnurampath,             /* Path to *.Mnu area 2 */
  328.                   netmailpath,            /* Path to Netmail directory */
  329.                   nodelistpath,           /* Path to Nodelist files */
  330.                   msgpath,                /* Path to Message area datafiles */
  331.                   filepath,               /* Path to File area datafiles */
  332.                   editorpath,             /**/
  333.                   bipath,                 /* Path to BiModem directory */
  334.                   temppath,               /* Path to Temp processing directory */
  335.                   userbasepath,           /* Path to Userbase files */
  336.                   avatarpath,             /* Path to *.Avt files */
  337.                   ascpath,                /* Path to *.Asc files */
  338.                   asclowpath,             /* Path to *.Asl files */
  339.                   filemaint,              /* Path to Maint*.* files */
  340.                   fileattachpath,         /* Currently unused */
  341.                   soundpath,              /* Path to *.Voc files */
  342.                   fastindexpath;          /* Path to Fast File Index database */
  343.  
  344.     unsigned char systempwd[16],          /* Pwd to logon system */
  345.                   sysoppwd[16],           /* Pwd to sysop functions */
  346.                   newuserpwd[16];         /* Pwd for new user */
  347.     Str8          newtopmenu;             /* Top menu to show new users */
  348.     unsigned char freespace1[4];          /* Currently unused */
  349.  
  350.     PathString    inboundmail,            /* Path to Inbound network bundles */
  351.                   outboundmail,           /* Path to store Outbound mail bundles */
  352.                   uploadpath,             /* Path to Temp Upload directory */
  353.                   swapfile,               /* Path to store swap files */
  354.                   multipath;              /* Path to Multiline System directory */
  355.     unsigned char brackets[3];            /* Brackets used to enclose files count */
  356.     unsigned char inactivitytime,         /* Max user inactivity time */
  357.                   minmesscheck,           /**/
  358.                   maxlogintime;           /* Max time allowed to complete a logon */
  359.              char multiline;              /* (B) Is this a multinode system */
  360.     unsigned char answerdelay;            /* Time to delay before modem answers */
  361.              char shellswap,              /* (B) */
  362.                   highbit,                /* (B) Are Hibit chars allowed */
  363.                   disppass,               /* (B) Display users Pwd to sysop at logon */
  364.                   asklocalpass,           /* (B) Ask for Pwd when local login */
  365.                   fastlogon,              /* (B) Use fast logins when local */
  366.                   sysopremote,            /* (B) Allow sysop to logon from remote */
  367.                   printerlog,             /* (B) Log activity to printer */
  368.                   phone1ask,              /* (B) */
  369.                   colourask,              /* (B) New user color setup */
  370.                   aliasask,               /* (B) New user ask alias */
  371.                   dobask,                 /* (B) New user DOB ask */
  372.                   phoneforce,             /* (B) Force phone number format */
  373.                   direct_video,           /* (B) Use direct video writes */
  374.                   snow_check;             /* (B) Check for snow */
  375.     unsigned char swaponezymail;          /* (B) Swap out for ezymail */
  376.     unsigned char screen_blank;           /* (B) Screen Blanking */
  377.              char oneword;                /* (B) Are one word names allowed */
  378.     AskType       checkmail,              /* Check mail at login */
  379.                   checkfile,              /* Check New files at login */
  380.                   ansiask,                /* New user ansii option */
  381.                   fullscreenask,          /* New user FSE option */
  382.                   clearask,               /* New user clearscreen */
  383.                   moreask,                /* New user more prompt */
  384.                   avatarask,              /* New user avatar option */
  385.                   extendask,              /**/
  386.                   usdateask;              /**/
  387.     unsigned char phone2ask;              /* (B) Phone 2 ask */
  388.     unsigned char phoneformat[15];        /* Phone number format */
  389.     unsigned char nameprompt[61],         /* Displayed when user asked Name */
  390.                   pwdprompt[61],          /* Displayed when user asked Password */
  391.                   shellprompt[61],        /* Displayed when system shells */
  392.                   shell2prompt[61],       /* Displayed when system returns from shell */
  393.                   enterprompt[61],        /* Displayed when user is required to press enter */
  394.                   chatprompt[61],         /**/
  395.                   listprompt[61],         /**/
  396.                   graphicprompt[61],      /* Displayed when user asked if IBM Graphics supported */
  397.                   fseprompt[61],          /* Displayed when user asked if FSE required */
  398.                   moreprompt[61],         /* Displayed when user asked if More prompt required */
  399.                   waitphone[61],          /**/
  400.                   chat2prompt[61],        /**/
  401.                   screenlengthprompt[61], /* Displayed when user asked Screen length */
  402.                   screenclearprompt[61],  /* Displayed when user asked if Screenclearing required */
  403.                   locationprompt[61],     /* Displayed when user asked for Location */
  404.                   userscanprompt[61],     /**/
  405.                   loadprompt[61],         /* Displayed when Door is being loaded */
  406.                   avatarprompt[61],       /* Displayed when user asked if Avatar */
  407.                   aliasprompt[61];        /* Displayed when user asked for Alias */
  408.     unsigned int  security,               /**/
  409.                   logonsecurity;          /**/
  410.     FlagType      flags;                  /**/
  411.     unsigned char minpasslength,          /* Minimum user Pwd length */
  412.                   dispfwind,              /**/
  413.                   dispbwind,              /**/
  414.                   disppopupf,             /* Popup Forground */
  415.                   disppopupborder,        /* Popup Border */
  416.                   disppopupb,             /* Popup Background */
  417.                   dispf,                  /**/
  418.                   newusercol1,            /**/
  419.                   comport,                /* Serial port to be used */
  420.                   passlogons;             /* Times user can logon before forced Pwd change */
  421.              char doblogon;               /* (B) */
  422.     unsigned char printerport,            /* Printer port to be used */
  423.                   passtries;              /* Max attempts to enter Pwd */
  424.     unsigned char topmenu[9];             /* Name of First menu user shown */
  425.     unsigned int  maxtimebank,            /* Max time that user can bank */
  426.                   maxksbank,              /* Max kilobytes user can bank */
  427.                   watchmess,              /* Securrity watchdog message area */
  428.                   netmailcredit,          /* New user netmail credit */
  429.                   ansiminbaud,            /* Min baudrate for ansi use */
  430.                   fileminbaud,            /* Min baudrate to access file areas */
  431.                   slowbaud,               /**/
  432.                   minloginbaud;           /* Min baudrate allowed for login */
  433.     unsigned int  lowsecuritystart,       /**/
  434.                   lowsecurityend,         /**/
  435.                   slowstart,              /**/
  436.                   slowend;                /**/
  437.     unsigned char quotestring[6];         /* Used by editor when quoting a message */
  438.     unsigned char unknownarea;            /**/
  439.     unsigned char SBIrq;                  /* Soundblaster IRQ location */
  440.     unsigned int  forcecrashmail,         /**/
  441.                   optioncrashmail,        /**/
  442.                   netmailfileattach;      /**/
  443.     unsigned char popuphighlight;         /**/
  444.     unsigned char tossattr2;              /**/
  445.     unsigned char maxpages,               /* Max time user can page sysop */
  446.                   maxpagefiles,           /* Number of page files for random selection */
  447.                   pagelength;             /* Max length of page */
  448.     unsigned int  pagestart[7];           /* 0 .. 6 */
  449.     unsigned int  pagemessboard,          /* Message board for paging, 0=Not in use */
  450.                   localfattachsec,        /**/
  451.                   sectouploadmess,        /**/
  452.                   sectoupdateusers,       /**/
  453.                   readsecnewecho,         /**/
  454.                   writesecnewecho,        /**/
  455.                   sysopsecnewecho,        /**/
  456.                   secreplyvianetmail;     /**/
  457.     AskType       netmailkillsent;        /**/
  458.              char swaponarchive;          /* (B) */
  459.     unsigned char freespace2[9];          /**/
  460.     unsigned char popuptext;              /**/
  461.     unsigned int  pageend[7];             /**/
  462.              char newareagroup[16];       /* 1 .. 16 */
  463.         long int  freespace3;             /**/
  464.     unsigned int  badmsgboard,            /* Area bad messages tossed */
  465.                   incomingcallstart,      /* */
  466.                   incomingcallend;        /* */
  467.     unsigned int  SBhex;                  /* Soundblaster Hex Address */
  468.     unsigned char altf[10][61];           /* Sysop defined function keys */
  469.     unsigned char ctrlf[10][41];          /* Sysop defined function keys */
  470.     unsigned int  maxmess,                /* Max number of message areas */
  471.                   maxfile,                /* Max number of file areas */
  472.                   fp_credit;              /**/
  473.     unsigned char ks_per_fp,              /**/
  474.                   fp_upload,              /**/
  475.                   rego_warn_1,            /**/
  476.                   rego_warn_2;            /**/
  477.     unsigned int  badpwdmsgboard;         /* Bad Logon Msg Board To Sysop */
  478.     unsigned int  min_space_1;            /**/
  479.              char swapbimodem,            /* (B) */
  480.                   modembusy,              /* Toggle DTR or ATH1 */
  481.                   scrheight;              /* (B) 25/43/50 line modes */
  482.     unsigned char msgtmptype;             /* (B) True=Msgtmp, False=Msgtmp.<Node> */
  483.              char swapupload;             /* (B) */
  484.              char phonelogon,             /**/
  485.                   mailcheckfast;          /* (B) Fast mail checks */
  486.     unsigned char freespace6;             /**/
  487.     unsigned char max_descrip;            /* Max file description length */
  488.     unsigned char min_descrip;            /* Min file description length */
  489.     unsigned int  requestreceipt;         /* */
  490.              char ushowdate;              /* (B) Show filedate in User filelist */
  491.     ShowFileSizeType ufilesizek;          /**/
  492.              char uuploader,              /* (B) Show uploaders name in user filelist */
  493.                   udownloadcount,         /* (B) Show times downloaded in user filelist */
  494.                   freespace11,            /* current unused */
  495.                   ushowsecurity,          /* (B) Show if file secured in user filelist */
  496.                   sshowdate;              /* (B) Show filedate in Sysop filelist */
  497.     ShowFileSizeType sfilesizek;          /**/
  498.              char suploader,              /* (B) Show uploader name in Sysop filelist */
  499.                   sdownloadcount,         /* (B) Show times downloaded in Sysop filelist */
  500.                   freespace10,            /* currently unused */
  501.                   sshowsecurity,          /* (B) Show if file secured in sysop filelist */
  502.                   ushowtime,              /* (B) Show time required to download in user filelist */
  503.                   ushowfp,                /* (B) Show filepoints in user filelist */
  504.                   sshowtime,              /* (B) Show time required to download in sysop filelist */
  505.                   sshowfp;                /* (B) Show filepoints in sysop filelist */
  506.     unsigned int  fp_percent;             /**/
  507.     unsigned char autodetect;             /**/
  508.              char dispsecurityfile,       /* (B) */
  509.                   askforpagereason,       /* (B) Ask user for page reason */
  510.                   delincompletefiles,     /* (B) Delete incomplete uploads */
  511.                   externalconvert,        /* (B) */
  512.                   swaponfeditview;        /* */
  513.     char          freespace13,            /* current unused */
  514.                   secfileschar,           /* Char used to indicate Secured file in listings */
  515.                   passchar,               /* Char used to indicate file passworded */
  516.                   highbitchar;            /* Char to be used in Hibit replacement */
  517.     unsigned char conversiononmaster;     /* Currently Unused */
  518.     unsigned char leftbracket[2];         /**/
  519.     unsigned char rightbracket[2];        /**/
  520.     unsigned int  ignorefp;               /* (B) */
  521.     unsigned char menuminage;             /* Minimum age for Age Check options */
  522.              char killnullnetmail;        /* (B) */
  523.     unsigned int  modemeff[11];           /**/
  524.     unsigned int  modembaud[11];          /**/
  525.     unsigned char modemconnect[11][16];   /**/
  526.     unsigned char modemerr[11];           /**/
  527.     unsigned char tossattr;               /**/
  528.     unsigned char usercol1_2,             /**/
  529.                   usercol3_4,             /**/
  530.                   usercol5_6,             /**/
  531.                   usercol7_8;             /**/
  532.     unsigned char userbkcol;              /**/
  533.     unsigned char newusercol2;            /**/
  534.     unsigned char chstatcol;              /**/
  535.     unsigned char getentercol;            /**/
  536.              char usdateforsysop;         /* (B) */
  537.     PathString    ezyovrpath;             /* Path to ezy.Ovl file */
  538.     UserString    sysopalias;             /* Sysops alias */
  539.              char ovrems;                 /* (B) Store overlay in EMS */
  540.     unsigned char swapezy;                /**/
  541.     PathString    filesecpath;            /**/
  542.              char scanvirus;              /* (B) */
  543.     unsigned char multitasker;            /* See Type Comment */
  544.     unsigned int  maxbaud;                /* Max baudrate modem supports */
  545.              char lockedport;             /* (B) Is Fossil locked */
  546.     unsigned int  filereqsec;             /**/
  547.              char autoanswer;             /* (B) Should Ezycom answer phone */
  548.     unsigned char initresponse[11];       /**/
  549.     unsigned char ringstring[11];         /**/
  550.     unsigned char inittries;              /**/
  551.     unsigned char initstring1[61];        /**/
  552.     unsigned char initstring2[61];        /**/
  553.     unsigned char busystring[21];         /**/
  554.     unsigned char answerstring[21];       /**/
  555.     unsigned char mailerstring[61];       /**/
  556.     unsigned int  modemstart;             /**/
  557.     unsigned int  modemend;               /**/
  558.     unsigned char modemdelay;             /**/
  559.              char sendbreak;              /* (B) Send break sequence to modem */
  560.     PathString    externaleditor;         /**/
  561.     unsigned char defaultorigin[51];      /* Default echo\netmail origin line */
  562.     unsigned int  newareastmess[16];      /* New area start msg board */
  563.     unsigned int  uploadcredit;           /* Upload credit percentage */
  564.     unsigned char systemlocation[36];     /* */
  565.     unsigned char shownewfileschar;       /* Show new files character or not */
  566.     unsigned int  zone[16];               /**/
  567.     unsigned int  net[16];                /**/
  568.     unsigned int  node[16];               /**/
  569.     unsigned int  point[16];              /**/
  570.     unsigned int  netmailboard[16];       /* Netmail area numbers */
  571.     unsigned char domain[16][21];         /**/
  572.     unsigned char nocarrierstring[21];    /**/
  573.     unsigned char guestaccount[36];       /* Guest Account username */
  574.     unsigned char freespace8[MAXFREE];    /**/
  575. }CONFIGRECORD;
  576.  
  577.  
  578. /********************************************************************
  579.  * STRINGS.EZY record structure
  580.  ********************************************************************/
  581. typedef struct COMPRESSRECORD
  582. {
  583.     unsigned char echounarccmd[6][13];
  584.     unsigned char echounarcpar[6][19];
  585.     unsigned char echoarccmd[7][13];
  586.     unsigned char echoarcpar[7][19];
  587. } COMPRESSRECORD;
  588.  
  589. typedef struct STRINGRECORD
  590. {
  591.     COMPRESSRECORD compress;
  592. } STRINGRECORD;
  593.  
  594.  
  595. /********************************************************************
  596.  * LIMITS.EZY record structure
  597.  ********************************************************************/
  598. typedef struct LIMITSRECORD
  599. {
  600.     unsigned int  security;
  601.     unsigned int  time;
  602.     unsigned int  limit[11];
  603.     unsigned char ratio;
  604.     unsigned int  credit;
  605.     unsigned char ratiok;
  606.     unsigned int  creditk;
  607.     unsigned int  regodays;
  608.     unsigned int  creditmess;
  609.     unsigned int  mess;
  610.     unsigned int  timerpercall;
  611.     unsigned char callsperday;
  612.     unsigned char freespace;
  613. } LIMITSRECORD;
  614.  
  615.  
  616. /********************************************************************
  617.  * FILEPATH.EZY record structure
  618.  *
  619.  * attribute = bit 0 : cd rom path
  620.  *                 1 : show as not found
  621.  *                 2 : free downloads
  622.  *                 3 : age check (config age or over)
  623.  *              4..7 : reserved
  624.  ********************************************************************/
  625. typedef struct FILEPATHRECORD
  626. {
  627.     PathString    filepath;
  628.     unsigned int  security;
  629.     FlagType      flags;
  630.     unsigned int  uploadarea;
  631.     unsigned char password[9];
  632.     unsigned char attribute;
  633. } FILEPATHRECORD;
  634.  
  635.  
  636. /********************************************************************
  637.  * FILESEC.EZY structure
  638.  *
  639.  * attribute = bit 0 : [ reserved ]
  640.  *                 1 : show as not found
  641.  *                 2 : free downloads
  642.  *                 3 : age check (config age or over)
  643.  *              4..7 : [ reserved ]
  644.  *
  645.  ********************************************************************/
  646. typedef struct FILESECRECORD
  647. {
  648.     unsigned char filename[13];
  649.     unsigned int  security;
  650.     FlagType      flags;
  651.     unsigned char password[9];
  652.     unsigned char attribute;
  653. } FILESECRECORD;
  654.  
  655.  
  656. /*****************************************************************
  657.  * FILExxx.EZY record structure
  658.  *
  659.  * attribute = bit 0 : checked
  660.  *                 1 : reserved
  661.  *                 2 : offline
  662.  *                 3 : reserved
  663.  *                 4 : private
  664.  *                 5 : deleted
  665.  *                 6 : reserved
  666.  *                 7 : security
  667.  *
  668.  *****************************************************************/
  669. typedef struct FILELISTRECORD
  670. {
  671.     unsigned char filename[13];
  672.     unsigned char description[51];
  673.     long int      fsize;             /* Shown in Bytes */
  674.     unsigned int  fdate;
  675.     unsigned char attribute;
  676.     unsigned char attribute2;       /* reserved */
  677.     UserString    uploader;
  678.     unsigned int  downloads;
  679. } FILELISTRECORD;
  680.  
  681.  
  682. /**************************************************************
  683.  * FILES.EZY structure
  684.  *
  685.  * attribute = bit 0 : keep files offline
  686.  *             bit 1 : offline allowed
  687.  *             bit 2 : sortby date
  688.  *             bit 3 : sortby alpha
  689.  *             bit 4 : master list
  690.  *             bit 5 : age testing using < age in config
  691.  *              6..7 : [ reserved ]
  692.  *
  693.  *   convert = 0 : none
  694.  *             1 : zip
  695.  *             2 : lzh
  696.  *             3 : arj
  697.  *             4 : pak
  698.  *             5 : arc
  699.  *             6 : zoo
  700.  *        7..255 : [ reserved ]
  701.  *
  702.  **************************************************************/
  703. typedef struct FILERECORD
  704. {
  705.     unsigned char name[31];
  706.     unsigned char attribute,
  707.                   convert;
  708.              char filegroup;
  709.     unsigned int  uptemplate,
  710.                   upfilepath;
  711.     long int      freespace;
  712.     unsigned int  security;
  713.     FlagType      flags;
  714.     unsigned int  syssecurity;
  715.     FlagType      sysflags;
  716. } FILERECORD;
  717.  
  718.  
  719. /*************************************************************
  720.  * EZYDOWN.<NODE> record structure  (Pre-Download)
  721.  *************************************************************/
  722. typedef struct PREDOWNLOADRECORD
  723. {
  724.     unsigned char filename[13];     /* */
  725.     MaxStr        locationfile;     /* */
  726.     long int      fsize;            /* File Size in kilobytes */
  727.     char          freedown;         /* (B) */
  728.     long int      timetodown;       /* download time in Seconds */
  729.     char          deleted;          /* (B) */
  730. } PREDOWNLOADRECORD;
  731.  
  732.  
  733. /*************************************************************
  734.  * EZYUP.<NODE> record structure (Pre-Upload)
  735.  *************************************************************/
  736. typedef struct PREUPLOADRECORD
  737. {
  738.     unsigned char filename[13];     /* */
  739.     unsigned char description[51];  /* */
  740.     char          isdupe;           /* (B) */
  741. } PREUPLOADRECORD;
  742.  
  743.  
  744. /*************************************************************
  745.  * MAINT1.BBS - MAINT2.BBS record structures
  746.  *************************************************************/
  747. typedef struct MAINT_RECORD
  748. {
  749.     unsigned char filename[13];
  750.     unsigned int  filepoint;
  751.     UserString    downloader,
  752.                   uploader;
  753. } MAINT_RECORD;
  754.  
  755.  
  756. /*************************************************************
  757.  * Fast Find Index record structures
  758.  * Information Below Explains how to fill the FASTINDEXRECORD.name Field
  759.  * Filenames are PADDED to fill out the fields as follows.
  760.  * Filename = 8 bytes
  761.  * FileExt  = 4 bytes consisting of a .(Period) + 3 Alpha/Numeric chars
  762.  * Length Byte Precedes the string in Pascal and is replaced with
  763.  * a NULL or Terminating char under C.
  764.  * If at anytime Filename or FileExt do not fill their fields
  765.  * they are to be padded with spaces.
  766.  * eg: DUMMY.LZH = "DUMMY   .LZH", or, DUMMY.L = "DUMMY   .L  "
  767.  *
  768.  * An easy way to achieve this under Turbo or Borland C follows.
  769.  *
  770.  * fnsplit(filename,drv,pth,fnm,ext);
  771.  * sprintf(FASTINDEXRECORD.name,"%-8.8s%-4.4s",fnm,ext);
  772.  *************************************************************/
  773. typedef long int FastPointerRecord[730];  /* FFPTR.EZY */
  774. typedef struct FASTINDEXRECORD    /* FFIDX.EZY */
  775. {
  776.     unsigned char name[13];
  777.     unsigned int  template;        /* directory of file 1 -> */
  778.     char          deleted;         /* boolean */
  779. } FASTINDEXRECORD;
  780.  
  781.  
  782. /*************************************************************
  783.  * ONLINE.BBS record structure
  784.  *
  785.  * status =   0: active
  786.  *            1: reserved
  787.  *            2: downloading
  788.  *            3: uploading
  789.  *            4: bimodem transfer
  790.  *            5: message browsing
  791.  *            6: door/outside
  792.  *            7: in chat with sysop
  793.  *            8: in chat with other users - channel 000
  794.  *          ???: in chat with other users - channel ???
  795.  *          207: in chat with other users - channel 199
  796.  *      208-252: [reserved]
  797.  *          253: node not active in any way
  798.  *          254: user in login process
  799.  *          255: waiting for caller
  800.  *************************************************************/
  801.  typedef struct ONLINERECORD
  802.  {
  803.     UserString    name,            /* Should Blank if NO user online */
  804.                   alias;
  805.     unsigned char status;
  806.     unsigned char attribute;
  807.     long int      baud;
  808.     unsigned char location[26];
  809. } ONLINERECORD;
  810.  
  811. /*************************************************************
  812.  * MESSNODE.<NODE> record structure
  813.  *************************************************************/
  814. typedef struct MULTIMESSAGERECORD
  815. {
  816.     UserString    from;         /* From Username */
  817.     unsigned char message[81];
  818.     char          private;      /* boolean */
  819. } MULTIMESSAGERECORD;
  820.  
  821. /*************************************************************
  822.  * BESTSTAT.BBS record structure
  823.  *
  824.  *    bestname[0] is for bestmessages
  825.  *    bestname[1] is for bestcalls
  826.  *    .....
  827.  *    bestname[6] is for bestdownk
  828.  *
  829.  *************************************************************/
  830. typedef struct BESTUSERRECORD
  831. {
  832.     unsigned char bestname[7][36];
  833.     unsigned int  bestmessages,
  834.                   bestcalls,
  835.                   bestups,
  836.                   bestdns,
  837.                   bestfps;
  838.     long int      bestupk,
  839.                   bestdownk;
  840. } BESTUSERRECORD;
  841.  
  842.  
  843. /*************************************************************
  844.  * MSGHxxx.BBS record structure
  845.  *
  846.  * msgattr = bit 0    deleted
  847.  *               1    netmail pending export
  848.  *               2    [reserved]
  849.  *               3    private
  850.  *               4    received
  851.  *               5    echomail pending export
  852.  *               6    locally generated msg
  853.  *               7    do not kill message
  854.  *
  855.  * netattr = bit 0     kill/sent
  856.  *               1     sent
  857.  *               2     file attach
  858.  *               3     crash
  859.  *               4     file req
  860.  *               5     request reciept
  861.  *               6     audit request
  862.  *               7     is a return reciept
  863.  *
  864.  * extattr =  bit 0-7   [reserved]
  865.  *
  866.  *************************************************************/
  867. typedef struct MSGHDRRECORD
  868. {
  869.     unsigned int  prevreply,
  870.                   nextreply;            /* 0=No Reply Chain */
  871.     long int      startposition,        /* Byte Offset of Text in MSGTxxx.BBS */
  872.                   messagelength;        /* Length of msg including Null terminator */
  873.     unsigned int  destzone;
  874.     unsigned int  destnet,
  875.                   destnode,
  876.                   destpoint,
  877.                   origzone,
  878.                   orignet,
  879.                   orignode,
  880.                   origpoint;
  881.     unsigned int  cost;
  882.     unsigned char msgattr;
  883.     unsigned char netattr;
  884.     unsigned char extattr;
  885.     long int      posttimedate;         /* Dos format packed time & date */
  886.     long int      recvtimedate;         /* Dos format packed time & date */
  887.     UserString    whoto,
  888.                   whofrom;
  889.     unsigned char subject[73];
  890. } MSGHDRRECORD;
  891.  
  892.  
  893. /*************************************************************
  894.  * MSGFAST.BBS record structure
  895.  *************************************************************/
  896. typedef struct MSGFASTRECORD
  897. {
  898.     long     int  whoto;       /* 32 bit CRC on WhoTo in MSGHxxx.BBS */
  899.     unsigned int  msgboard,
  900.                   msgnumber;
  901. } MSGFASTRECORD;
  902.  
  903.  
  904. /*************************************************************
  905.  * MSGEXPRT.BBS
  906.  * file of maxmess records defining if area needs echo/netmail scan
  907.  *************************************************************/
  908. typedef char NeedScan;  /* boolean */
  909.  
  910.  
  911. /*************************************************************
  912.  * MSGTxxx.BBS structure definition (No Predefined Rec Size)
  913.  *
  914.  * Each text part of a message starts at "Startposition" and
  915.  * continues until a NULL terminator is found, or EOF is reached.
  916.  * Msg Text length is limited to 16Meg as defined by Turbo Pascal
  917.  * The messagelength MUST be the same length as the message text
  918.  * including the NULL terminator, as MSGCOMP uses this field for
  919.  * speed and for kilobyte deletion
  920.  *************************************************************/
  921.  
  922.  
  923. /*************************************************************
  924.  * MESSAGES.EZY record structure
  925.  *
  926.  * attribute = bit 0 : allow aliases
  927.  *                 1 : use alias
  928.  *                 2 : use alias, ask for aliases
  929.  *                 3 : test age as defined in config.xx
  930.  *                 4 : combined area access
  931.  *                 5 : local file attaches
  932.  *                 6 : strip private bit on incoming echomail
  933.  *                 7 : [reserved]
  934.  *
  935.  * attribute2 = bit 0 : show seenby lines
  936.  *                  1 : [reserved]
  937.  *                  2 : strip forward seenbys
  938.  *               3..4 : [reserved]
  939.  *                  5 : areafix info visible
  940.  *                  6 : initial combined area access
  941.  *                  7 : [reserved]
  942.  *
  943.  * attribute3 = [Reserved]
  944.  *
  945.  * destnode = nodes  1 to  8 - destnode[1]
  946.  *            nodes  9 to 16 - destnode[2]
  947.  *            nodes 17 to 24 - destnode[3]
  948.  *            etc, etc, etc.
  949.  *
  950.  *************************************************************/
  951. typedef struct MESSAGERECORD
  952. {
  953.     unsigned char name[31];
  954.     unsigned char areatag[31];
  955.     MsgType       typ;              /* msgtype */
  956.     MsgKindsType  msgkinds;         /* msgkinds type */
  957.     unsigned char attribute,
  958.                   attribute2,
  959.                   attribute3;
  960.     unsigned char dayskill,
  961.                   recvkill;
  962.     unsigned int  countkill,
  963.                   kilobytekill,
  964.                   readsecurity;
  965.     FlagType      readflags;    /* Flagtype */
  966.     unsigned int  writesecurity;
  967.     FlagType      writeflags;      /* Flagtype */
  968.     unsigned int  sysopsecurity;
  969.     FlagType      sysopflags;      /* Flagtype */
  970.     unsigned char originline[51];
  971.     unsigned char originaddress;
  972.     unsigned char seenby[MAXAKA/8];
  973.     char          areagroup,
  974.                   messgroup;
  975.     unsigned char destnodes[MAXNODES/8];
  976.     unsigned char echomailfeed;           /* 0=No Uplink */
  977. } MESSAGERECORD;
  978.  
  979.  
  980. /*************************************************************
  981.  * ECHOMGR.EZY record structure ( 1 to 128 records )
  982.  *
  983.  * compress = 0 : compress to zip
  984.  *            1 : compress to lzh
  985.  *            2 : compress to arj
  986.  *            3 : compress to arc
  987.  *            4 : compress to pak
  988.  *            5 : compress to zoo
  989.  *            6 : compress to lzh (use lha old -lh1- method )
  990.  *
  991.  * attribute = bit 0 : node active
  992.  *                 1 : crash mail
  993.  *                 2 : hold mail
  994.  *                 3 : node can create new echos
  995.  *                 4 : add node to export on new echo creation
  996.  *               5-7 : [reserved]
  997.  *
  998.  * sendpkttype = 0 : type 2
  999.  *               1 : type 2+
  1000.  *               2-255 [reserved]
  1001.  *
  1002.  *************************************************************/
  1003. typedef struct ECHOMGRRECORD
  1004. {
  1005.     unsigned int  destpoint,
  1006.                   destnode,
  1007.                   destnet,
  1008.                   destzone;
  1009.     unsigned char groups[27];
  1010.     unsigned char compress;
  1011.     unsigned char attribute;
  1012.     unsigned char passwordto[21],
  1013.                   passwordfr[21];
  1014.     unsigned char dayshold,
  1015.                   sendpkttype;
  1016. } ECHOMGRRECORD;
  1017.  
  1018.  
  1019. /*************************************************************
  1020.  * EVENTS.EZY record structure
  1021.  *
  1022.  * attribute = bit 0 : enabled
  1023.  *              1..7 : [reserved]
  1024.  *
  1025.  * days = bit 0 : sunday
  1026.  *            1 : monday
  1027.  *            ...
  1028.  *            6 : saturday
  1029.  *            7 : [reserved]
  1030.  *
  1031.  *************************************************************/
  1032. typedef struct EVENTRECORD
  1033. {
  1034.     unsigned char attribute;
  1035.     unsigned int  starttime;     /* msb=Hour, lsb=Minutes */
  1036.     unsigned char errorlevel;
  1037.     unsigned char days;
  1038.     unsigned int  lasttimerun;
  1039. } EVENTRECORD;
  1040.  
  1041.  
  1042. /*************************************************************
  1043.  * TODAY.BBS & YESTER.BBS record structure
  1044.  *
  1045.  * didwhat = bit 0 : (n) new user
  1046.  *               1 : (u) upload
  1047.  *               2 : (d) download
  1048.  *               3 : (r) read mail
  1049.  *               4 : (s) sent mail
  1050.  *               5 : (o) door/outside
  1051.  *               6 : (c) chat
  1052.  *               7 : (p) paged sysop
  1053.  *
  1054.  *************************************************************/
  1055. typedef struct ONTODAYRECORD
  1056. {
  1057.     unsigned char line;
  1058.     UserString    name,
  1059.                   alias;
  1060.     unsigned char location[26];
  1061.     unsigned int  baudrate;
  1062.     unsigned int  logontime;
  1063.     unsigned int  logofftime;
  1064.     unsigned char didwhat;
  1065. } ONTODAYRECORD;
  1066.  
  1067.  
  1068. /*************************************************************
  1069.  * system usage record structure
  1070.  *************************************************************/
  1071. typedef struct USEAGERECORD
  1072. {
  1073.     unsigned int  startdate;
  1074.     long int      busyperhour[24];  /* Minutes Used */
  1075.     long int      busyperday[7];    /* Minutes Used */
  1076. } USEAGERECORD;
  1077.  
  1078.  
  1079. /*************************************************************
  1080.  * MSGINFO.<Node>
  1081.  * Created when external FSE called
  1082.  *
  1083.  * returnstatus = 0 = FSE Record Not Used
  1084.  *                1 = Message Saved
  1085.  *                2 = Message Aborted
  1086.  *                3 = User Inactivity
  1087.  *                4 = User Hungup
  1088.  *                5 = Sysop Hungup
  1089.  *
  1090.  * attribute = bit 0 : can change subject
  1091.  *                 1 : can change whoto
  1092.  *                 2 : can change private
  1093.  *                 3 : private message
  1094.  *                 4 : is message forwarded (false = quoted)
  1095.  *                 5 : netmail message
  1096.  *                 6 : reserved
  1097.  *                 7 : echomail message
  1098.  *************************************************************/
  1099. typedef struct FSERECORD
  1100. {
  1101.     UserString    whofrom;
  1102.     NETRECORD     orignet;
  1103.     UserString    whoto;
  1104.     NETRECORD     destnet;
  1105.     unsigned char subject[73];
  1106.     unsigned char returnstatus;
  1107.     unsigned char attribute;
  1108. } FSERECORD;
  1109.  
  1110.  
  1111. /*************************************************************
  1112.  * Used in ExitInfo record (Could be used as Union under C)
  1113.  *************************************************************/
  1114. typedef struct TIMERECORD
  1115. {
  1116.     unsigned char hour,
  1117.                   min;
  1118. } TIMERECORD;
  1119.  
  1120.  
  1121. /*************************************************************
  1122.  * EXITINFO.<node> record structure
  1123.  *
  1124.  * iemsi_req1 = bit 0 : News
  1125.  *                  1 : Mail
  1126.  *                  2 : File
  1127.  *                  3 : ClrScr
  1128.  *                  4 : Quiet
  1129.  *                  5 : More
  1130.  *                  6 : FSE
  1131.  *                  7 : [Reserved]
  1132.  *
  1133.  * iemsi_scrlen : Screen Length for current session Only.  If NO Iemsi
  1134.  *                session, this is set to users Normal screen length.
  1135.  *
  1136.  * iemsi_prot = bit 0 : ZModem
  1137.  *                  1 : SEAlink
  1138.  *                  2 : Kermit
  1139.  *               3..7 : [reserved]
  1140.  *
  1141.  * iemsi_crt  = 0 : TTY
  1142.  *              1 : ANSI
  1143.  *              2 : AVT0+
  1144.  *              3 : VT100
  1145.  *              4 : VT52
  1146.  *         5..255 : [reserved]
  1147.  *
  1148.  * iemsi_cap  = bit 0 : CHT
  1149.  *                  1 : MNU
  1150.  *                  2 : TAB
  1151.  *                  3 : ASCII
  1152.  *               4..7 : [reserved]
  1153.  *
  1154.  *************************************************************/
  1155. typedef struct EXITINFORECORD
  1156. {
  1157.     unsigned int  baud,                 /* Speed between Modem<->Modem */
  1158.                   lockedbaud;           /* Speed between Modem<->PC */
  1159.     unsigned char comport;              /* Com1=1 Com2=2 etc etc */
  1160.     unsigned int  efficiency;           /* Baud rate efficiency */
  1161.     unsigned int  userrecnum;           /* User Record Number, 0=User_1 */
  1162.     USERSRECORD   userinfo;
  1163.     USERSEXTRARECORD userextra;
  1164.     UserString    sysopname,            /* Sysops Name as defined in Config.xxx */
  1165.                   sysopalias;           /* Sysops Alias as defined in Config.xxx */
  1166.     unsigned char system[41];           /* System Name as defined in Config.xxx */
  1167.     unsigned int  downloadlimit;        /* */
  1168.     unsigned int  timelimit;
  1169.     unsigned int  timetakenevent;         /* Number of Minutes taken from user due to event */
  1170.     long int      timecreated;            /* Number of seconds since Midnight */
  1171.     long int      timeofnextevent;        /* Number of seconds from midnight */
  1172.     unsigned int  timetillnextevent;      /* Number of seconds After timecreated */
  1173.     unsigned char dayofnextevent;         /* 0=Sun, 6=Sat, 7=NoEvent */
  1174.     unsigned char errorlevelofnextevent;  /* Errorlevel to return from next event */
  1175.     unsigned char ratio;
  1176.     unsigned int  credit;
  1177.     unsigned char ratiok;
  1178.     unsigned int  creditk,
  1179.                   regodays,
  1180.                   creditmess;
  1181.     unsigned int  mess;
  1182.     DATETIME      logintimedate;
  1183.     unsigned char stack[20][9];           /* Menu Stack */
  1184.     unsigned char stackpos;               /* Menu Stack Position, 0 = No Stack */
  1185.     Str8          curmenu;                /* FileName of Current Menu */
  1186.     unsigned char oldpassword[16];
  1187.     unsigned int  limitrecnum;            /* Limits Record being used */
  1188.     unsigned char baudrecnum;             /* BaudRate record being used */
  1189.     char          hibitreplace;           /* HiBit replacement char */
  1190.     unsigned char maxpages;               /* Times user can page sysop */
  1191.     unsigned char pagedsysop;             /* Times user has paged sysop */
  1192.     char          wantchat;               /* boolean */
  1193.     long int      pagestart,
  1194.                   pageend;                /* Seconds since midnight */
  1195.     unsigned char pagelength;
  1196.     char          echoentered,            /* boolean */
  1197.                   netentered,
  1198.                   nextsysop;
  1199.     unsigned char inactivitytime;         /* Seconds */
  1200.     char          protrecnum;             /* Default Protocol record number, 0=NoDefault */
  1201.     unsigned char protname[16];           /* Default Protocol Name */
  1202.     unsigned char didwhat;                /* Did what flag for Todays callers */
  1203.     unsigned char pagereason[61];
  1204.     unsigned char mtasker;                /* 0=No Multitasker, 1=[Reserved] */
  1205.              char iemsi_session; /* boolean */
  1206.     unsigned char iemsi_req1,
  1207.                   iemsi_req2,
  1208.                   iemsi_scrlen;
  1209.     unsigned char iemsi_prot,
  1210.                   iemsi_crt,
  1211.                   iemsi_cap;
  1212.     char          pagesound;              /* (B) */
  1213.     unsigned char freespace[99];
  1214. } EXITINFORECORD;
  1215.  
  1216.  
  1217. /*************************************************************
  1218.  * sysinfo record structure
  1219.  *************************************************************/
  1220. typedef struct SYSINFORECORD
  1221. {
  1222.     long int      callcount;
  1223.     UserString    lastcaller;
  1224.     long int      filesizek;           /* Updated by EzyFF -C */
  1225.     unsigned int  newusers,
  1226.                   newfiles,
  1227.                   newmessages;         /* Does not include Inbound Echomail */
  1228.     UserString    lastalias;
  1229.     unsigned int  laststarttime;
  1230.     unsigned char extraspace[80];
  1231. } SYSINFORECORD;
  1232.  
  1233.  
  1234. /*************************************************************************/
  1235. /* Some sample C Src to replicate most of the functions shown in the     */
  1236. /* Pascal version of the EzyCom Structures  (Turbo/Borland)              */
  1237. /*************************************************************************/
  1238.  
  1239. /**********************************************************
  1240.  * Determine if a file or path exists.
  1241.  * Returns 1 if true and 0 if false.
  1242.  * To check a path do NOT include the trailing backslash.
  1243.  * Note: You could use "findfirst()" for this also.
  1244.  *
  1245.  * eg: if(exists(filepath)) do_something(); else is_error();
  1246.  **********************************************************/
  1247. int exists(char *filepath)
  1248. {
  1249.     return( access( filepath, 0 ) == 0 );
  1250. }
  1251.  
  1252. /**********************************************************
  1253.  * Check if file path has a trailing backslash.
  1254.  * It is assumed you won't be stupid enough to pass a NULL
  1255.  * length string.
  1256.  *
  1257.  * eg: fixslash(pathstring);
  1258.  **********************************************************/
  1259. void fixslash(char *s)
  1260. {
  1261.     while(*s) s++;                       /* Move to EOS */
  1262.     if (*(--s) == '\\') return;          /* If Ok return */
  1263.     *(++s) = '\\';                       /* Else Add Slash */
  1264.     *(++s) = '\0';                       /* Terminate String */
  1265. }
  1266.  
  1267. /**********************************************************
  1268.  * Locate the Config.xxx file
  1269.  *
  1270.  * The parameter "node" should be declared globaly and
  1271.  * initialized to "1" if not otherwise declared either
  1272.  * by your own program or the "TASK" environment variable.
  1273.  * Note: It's up to you to check these two things.
  1274.  *
  1275.  * eg: if((pntr=findc(2))==NULL) is_error();
  1276.  **********************************************************/
  1277. char *findc(int node)
  1278. {
  1279.     char p[128];                                  /* Temp String Pointer */
  1280.     static char path[128];                        /* To store the location */
  1281.     char *s[] = {"CONFIG.1","CONFIG.EZY"};
  1282.  
  1283.     strcpy(p,getenv("EZY"));                      /* Get EZY Environment value */
  1284.     fixslash(p);                                  /* Make sure theres a backslash */
  1285.  
  1286.     if(node > 1 && node < 251) sprintf(s[0],"CONFIG.%d",node);
  1287.  
  1288.     if(strlen(p) > 1)                             /* If environment path set */
  1289.     {
  1290.         strcpy(path,p);
  1291.         strcat(path,s[0]);
  1292.         if(exists(path)) return(path);            /* Env Path + Config.xxx */
  1293.  
  1294.         strcpy(path,p);
  1295.         strcat(path,s[1]);
  1296.         if(exists(path)) return(path);            /* Env Path + Config.Ezy */
  1297.     }
  1298.  
  1299.     strcpy(path,s[0]);
  1300.     if(exists(path)) return(path);                /* Config.xxx in CurDir */
  1301.  
  1302.     strcpy(path,s[1]);
  1303.     if(exists(path)) return(path);                /* Config.Ezy in CurDir */
  1304.  
  1305.     return(NULL);                                 /* Unable to locate config.xx */
  1306. }
  1307.  
  1308. /**********************************************************
  1309.  * Check for a valid date
  1310.  *
  1311.  * Returns 1 if a valid date and 0 if not.
  1312.  *
  1313.  * eg: if(!checkdate(1992,1,1)) do_nothing();
  1314.  **********************************************************/
  1315. int checkdate(unsigned int yy, unsigned int mm, unsigned int dd)
  1316. {
  1317.     int days[] = {31,29,31,30,31,30,31,31,30,31,30,31};
  1318.  
  1319.     if( mm < 1 || mm > 12) return(0);                        /* Invalid Month */
  1320.     if( dd < 1 || dd > days[mm-1]) return(0);                /* Invalid Day */
  1321.     if(yy < 1900) return(0);                                 /* Your to Old */
  1322.     if(((yy%4) != 0) && (dd == 29) &&  (mm == 2)) return(0); /* Tryin to fool me */
  1323.  
  1324.     return(1);                                               /* Everything must be valid */
  1325. }
  1326.  
  1327. /**********************************************************
  1328.  * Convert a Date to an Int
  1329.  *
  1330.  * Returns the converted date on success or 65535 on failure.
  1331.  *
  1332.  * eg: intdate = dat2int(1992,1,1);
  1333.  **********************************************************/
  1334. unsigned int dat2int(unsigned int yy, unsigned int mm, unsigned int dd)
  1335. {
  1336.     unsigned int  tofield=0;
  1337.  
  1338.     if(!checkdate(yy,mm,dd) || yy < 1980 || yy > 2107) return(65535);
  1339.  
  1340.     tofield = dd-1;
  1341.     tofield = tofield + ((mm-1) << 5);
  1342.     tofield = tofield + ((yy-1980) << 9);
  1343.  
  1344.     return(tofield);
  1345. }
  1346.  
  1347. /**********************************************************
  1348.  * Convert an Int to a Date
  1349.  *
  1350.  * Returns the converted date in the variables yy,mm,dd
  1351.  * and a true false value in relation to the conversion.
  1352.  *
  1353.  * eg: if(!int2dat(intdate,&year,&mon,&day)) is_error();
  1354.  **********************************************************/
  1355. int int2dat(unsigned int dat, unsigned int *yy, unsigned int *mm, unsigned int *dd)
  1356. {
  1357.     unsigned int temp=dat;
  1358.  
  1359.     if(dat == 65535) return(0);          /* Invalid Date */
  1360.  
  1361.     *dd = (temp & 31) + 1;
  1362.     temp >>= 5;
  1363.     *mm = (temp & 15) + 1;
  1364.     temp >>= 4;
  1365.     *yy = (temp & 127) + 1980;
  1366.     return(1);                         /* Conversion OK */
  1367. }
  1368.