home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / W / DEVBBS.ZIP / VARDEC.H < prev    next >
C/C++ Source or Header  |  1992-06-23  |  22KB  |  696 lines

  1. #ifndef _VARDEC_H_
  2. #define _VARDEC_H_
  3.  
  4. /*****************************************************************************
  5.  
  6.                 WWIV Version 4
  7.                     Copyright (C) 1988-1991 by Wayne Bell
  8.  
  9. Distribution of the source code for WWIV, in any form, modified or unmodified,
  10. without PRIOR, WRITTEN APPROVAL by the author, is expressly prohibited.
  11. Distribution of compiled versions of WWIV is limited to copies compiled BY
  12. THE AUTHOR.  Distribution of any copies of WWIV not compiled by the author
  13. is expressly prohibited.
  14.  
  15.  
  16. *****************************************************************************/
  17.  
  18.  
  19.  
  20. /* These are the variable type declarations.  There are a few things you
  21.  * should note while reading these:
  22.  *
  23.  * unsigned char = 8 bits
  24.  * unsigned short= 16 bits
  25.  * unsigned long = 32 bits
  26.  * float         = 32 bits floating point
  27.  *
  28.  * You will notice that usually there are two "unsigned char" declarations.
  29.  * The reason for this is that the first group of unsigned char variables are
  30.  * taken to be actual character.  The second group are using "unsigned char"
  31.  * as a numeric variable of 8 bits long.
  32.  *
  33.  * All variables are declared to be unsigned (excepting float, of course).
  34.  * The reason is that most variables have meaning only for positive numbers,
  35.  * so allowing negative values would cut the number of valid values in half,
  36.  * wasting one bit (oh no!).  Many people will say, "Why bother?", but since
  37.  * the negatives aren't used anyway, might as well allow the whole range of
  38.  * postive values.
  39.  */
  40.  
  41.  
  42.  
  43. /****************************************************************************/
  44. /*
  45.  * BE CAREFUL with this stuff.  DO NOT try to change MAX_DIRS - you'll have
  46.  * to do a lot of additional programming to support more than 64.  Changing
  47.  * MAX_SUBS to 64 SHOULD work.
  48.  *
  49.  * HOWEVER: if you #define EXTENDED (do it BEFORE the #ifdef STANDARD),
  50.  * be forewarned that you WILL have to reformat your userlist.
  51.  */
  52.  
  53. #define EXTENDED
  54. #ifdef STANDARD
  55. #endif
  56.  
  57. #ifdef EXTENDED
  58. #define MAX_SUBS 64
  59. #define MAX_DIRS 64
  60. #else
  61. #define MAX_SUBS 32
  62. #define MAX_DIRS 64
  63. #endif
  64.  
  65.  
  66. #if MAX_SUBS>32
  67. #define QSCN(i) (*((i>31)?(&thisuser.qscnptr2[i-32]):(&thisuser.qscnptr[i])))
  68. #else
  69. #define QSCN(i) (thisuser.qscnptr[i])
  70. #endif
  71. /****************************************************************************/
  72.  
  73.  
  74. /* DATA FOR EVERY USER */
  75. typedef struct {
  76.     char        name[31],        /* user's name */
  77.             realname[21],        /* user's real name */
  78.             lastname[21],           /* user's last name */
  79.             stretadd[38],           /* user's street address */
  80.             citstate[38],           /* user's city & state */
  81.             zipcode[7],        /* user's zipcode */
  82.             phone[13],        /* user's phone number */
  83.             pw[9],            /* user's password */
  84.             laston[9],        /* last date on */
  85.             firston[9],        /* first date on */
  86.             note[41],        /* sysop's note about user */
  87.             macros[3][81],        /* macro keys */
  88.             sex;            /* user's sex */
  89.     unsigned char    age,            /* user's age */
  90.             inact,            /* if deleted or inactive */
  91.             comp_type,        /* computer type */
  92.             defprot,        /* deflt transfer protocol */
  93.             defed,            /* default editor */
  94.             screenchars,screenlines,/* screen size */
  95.             sl,            /* security level */
  96.             dsl,            /* transfer security level */
  97.             exempt,            /* exempt from ratios, etc */
  98.             colors[8],        /* user's colors */
  99.             votes[20],        /* user's votes */
  100.             illegal,        /* illegal logons */
  101.             waiting,        /* number mail waiting */
  102.             sysopsub,        /* sysop sub board number */
  103.             ontoday;        /* num times on today */
  104.     unsigned short    homeuser,homesys,    /* where user can be found */
  105.             forwardusr,forwardsys,    /* where to forward mail */
  106.             msgpost,        /* number messages posted */
  107.             emailsent,        /* number of email sent */
  108.             feedbacksent,        /* number of f-back sent */
  109.             posttoday,        /* number posts today */
  110.             etoday,            /* number emails today */
  111.             ar,            /* board access */
  112.             dar,            /* directory access */
  113.             restrict,        /* restrictions on account */
  114.             ass_pts,        /* bad things the user did */
  115.             uploaded,        /* number files uploaded */
  116.             downloaded,        /* number files downloaded */
  117.             lastrate,        /* last baud rate on */
  118.             logons;            /* total number of logons */
  119.     unsigned long    msgread,        /* total num msgs read */
  120.             uk,            /* number of k uploaded */
  121.             dk,            /* number of k downloaded */
  122.             qscn,            /* which subs to n-scan */
  123.                         qscnptr[33],            /* q-scan pointers */
  124.             nscn1,nscn2,        /* which dirs to n-scan */
  125.             daten,            /* numerical time last on */
  126.             sysstatus;        /* status/defaults */
  127.     float        timeontoday,        /* time on today */
  128.             extratime,        /* time left today */
  129.             timeon,            /* total time on system */
  130.             pos_account,        /* $ credit */
  131.             neg_account,        /* $ debit */
  132.             gold;            /* game money */
  133.     unsigned char    bwcolors[8];        /* b&w colors */
  134.     unsigned char    month,day,year;        /* user's birthday */
  135.     unsigned int    emailnet,        /* email sent into net */
  136.             postnet;        /* posts sent into net */
  137.     unsigned short    fsenttoday1;        /* feedbacks today */
  138.         unsigned char   num_extended;           /* num lines of ext desc */
  139.         unsigned char   optional_val;           /* optional lines in msgs */
  140.         unsigned long   wwiv_regnum;            /* users WWIV reg number */
  141.         char            res[29];                /* reserved bytes */
  142. #if MAX_SUBS>32
  143.         unsigned long   qscn2;                  /* additional qscan ptr */
  144.         unsigned long   qscnptr2[MAX_SUBS-32];  /* additional quickscan ptrs */
  145. #endif
  146. } userrec;
  147.  
  148.  
  149. /* SECLEV DATA FOR 1 SL */
  150. typedef struct {
  151.     unsigned short    time_per_day,        /* time allowed on per day */
  152.             time_per_logon,        /* time allowed on per logon */
  153.             messages_read,        /* messages allowed to read */
  154.             emails,            /* number emails allowed */
  155.             posts;            /* number posts allowed */
  156.     unsigned long    ability;        /* bit mapped abilities */
  157. } slrec;
  158.  
  159.  
  160. /* AUTO-VALIDATION DATA */
  161. typedef struct {
  162.     unsigned char    sl,            /* SL */
  163.             dsl;            /* DSL */
  164.     unsigned short    ar,            /* AR */
  165.             dar,            /* DAR */
  166.             restrict;        /* restrictions */
  167. } valrec;
  168.  
  169. typedef struct {
  170.         char            extension[4],           /* extension for archive */
  171.                         arca[32],
  172.                         arce[32],
  173.                         arcl[32];
  174. } arcrec;
  175.  
  176.  
  177. /* STATIC SYSTEM INFORMATION */
  178. typedef struct {
  179.     char        newuserpw[21],        /* new user password */
  180.             systempw[21],        /* system password */
  181.             msgsdir[81],        /* path for msgs directory */
  182.             gfilesdir[81],        /* path for gfiles dir */
  183.             datadir[81],        /* path for data directory */
  184.             dloadsdir[81],        /* path for dloads dir */
  185.             ramdrive,        /* drive for ramdisk */
  186.             tempdir[81],        /* path for temporary directory */
  187.                         resx[84],               /* reserved for never */
  188.             bbs_init_modem[51],    /* modem initialization cmd */
  189.             answer[21],        /* modem answer cmd */
  190.             connect_300[21],    /* modem responses for */
  191.             connect_1200[21],    /* connections made at */
  192.             connect_2400[21],    /* various speeds */
  193.             connect_9600[21],
  194.             connect_19200[21],
  195.             no_carrier[21],        /* modem disconnect */
  196.             ring[21],        /* modem ring */
  197.             terminal[21],        /* DOS cmd for run term prg */
  198.             systemname[51],        /* BBS system name */
  199.             systemphone[13],    /* BBS system phone number */
  200.             sysopname[51],        /* sysop's name */
  201.             executestr[51];        /* mail route path name */
  202.     unsigned char    newusersl,        /* new user SL */
  203.             newuserdsl,        /* new user DSL */
  204.             maxwaiting,        /* max mail waiting */
  205.             comport[5],        /* what connected to comm */
  206.             com_ISR[5],        /* Com Interrupts */
  207.             primaryport,        /* primary comm port */
  208.             newuploads,        /* file dir new uploads go */
  209.             closedsystem;        /* if system is closed */
  210.     unsigned short    systemnumber,        /* BBS system number */
  211.             baudrate[5],        /* Baud rate for com ports */
  212.             com_base[5],        /* Com base addresses */
  213.             maxusers,        /* max users on system */
  214.             newuser_restrict,    /* new user restrictions */
  215.             sysconfig,        /* System configuration */
  216.             sysoplowtime,        /* Chat time on */
  217.             sysophightime,        /* Chat time off */
  218.             executetime;        /* time to run mail router */
  219.     float        req_ratio,        /* required up/down ratio */
  220.             newusergold;        /* new user gold */
  221.     slrec        sl[256];        /* security level data */
  222.     valrec        autoval[10];        /* sysop quik-validation data*/
  223.     char        hangupphone[21],    /* string to hang up phone */
  224.             pickupphone[21];    /* string to pick up phone */
  225.     unsigned int    netlowtime,        /* net time on */
  226.             nethightime;        /* net time off */
  227.     char            connect_300_a[21],    /* alternate connect str's */
  228.             connect_1200_a[21],
  229.             connect_2400_a[21],
  230.             connect_9600_a[21],
  231.             connect_19200_a[21];
  232.         arcrec          arcs[4];
  233.         char            beginday_c[51],
  234.                         logon_c[51];
  235.         int             userreclen,
  236.                         waitingoffset,
  237.                         inactoffset;
  238.         char            newuser_c[51];
  239.         unsigned long   wwiv_reg_number;
  240.         char            dial_prefix[21];
  241.         float           post_call_ratio;
  242.         char            upload_c[51];
  243.         char            dszbatchdl[81];
  244.         char            modem_type[9];
  245.         char            batchdir[81];
  246.         char            res[39];               /* RESERVED */
  247. } configrec;
  248.  
  249.  
  250.  
  251. /* DYNAMIC SYSTEM STATUS */
  252. typedef struct {
  253.     char        date1[9],        /* last date active */
  254.             date2[9],        /* date before now */
  255.             date3[9],        /* two days ago */
  256.             log1[13],        /* yesterday's log */
  257.             log2[13],        /* two days ago log */
  258.             gfiledate[9],        /* date gfiles last updated */
  259.             resx[9];        /* reserved for nothing */
  260.     unsigned short    users,            /* Current number of users */
  261.             callernum,        /* Current caller number */
  262.             callstoday,        /* Number of calls today */
  263.             msgposttoday,        /* Messages posted today*/
  264.             emailtoday,        /* Email sent today */
  265.             fbacktoday,        /* Feedback sent today */
  266.             uptoday,        /* files uploaded today */
  267.             activetoday;        /* Minutes active today */
  268.     unsigned long    qscanptr;        /* Q-scan pointer value */
  269.     char        amsganon;        /* auto-message anony stat */
  270.     unsigned short    amsguser;        /* user who wrote a-msg */
  271.     unsigned long    callernum1;        /* caller number */
  272.         unsigned int    net_edit_stuff;         /* word for net editor */
  273.         unsigned int    wwiv_version;           /* tell what version it is */
  274.         unsigned int    net_version;            /* tell what version of net */
  275.         float           net_bias;               /* network bias factor */
  276.         long            last_connect,           /* date last connect.net */
  277.                         last_bbslist;           /* date last bbslist.net */
  278.         float           net_req_free;           /* net free factor def 3 */
  279.         char            res[31];                /* RESERVED */
  280. } statusrec;
  281.  
  282.  
  283.  
  284. /* MESSAGE BASE INFORMATION */
  285. typedef struct {
  286.     char        name[41],        /* board name */
  287.             filename[9],        /* board database filename */
  288.             key;            /* board special key */
  289.     unsigned char    readsl,            /* sl required to read */
  290.             postsl,            /* sl required to post */
  291.             anony,            /* anonymous board? */
  292.             age;            /* minimum age for sub */
  293.     unsigned short    maxmsgs,        /* max # of msgs */
  294.             ar,            /* AR for sub-board */
  295.             storage_type,        /* how messages are stored */
  296.             type;            /* 4 digit board type */
  297. } subboardrec;
  298.  
  299.  
  300.  
  301. /* UPLOAD DIRECTORY INFORMATION */
  302. typedef struct {
  303.     char        name[41],        /* directory name */
  304.             filename[9],        /* direct database filename */
  305.             path[81];        /* filename path */
  306.     unsigned char    dsl,            /* DSL for directory */
  307.             age;            /* minimum age for directory */
  308.     unsigned short    dar,            /* DAR for directory */
  309.             maxfiles,        /* max files for directory */
  310.             mask,            /* file type mask */
  311.             type;            /* 4 digit directory type */
  312. } directoryrec;
  313.         
  314.  
  315.  
  316. /* QUICK REFERNCE TO FIND USER NUMBER FROM NAME */
  317. typedef struct {
  318.     char        name[31];
  319.     unsigned short    number;
  320. } smalrec;
  321.  
  322.  
  323.  
  324. /* TYPE TO TELL WHERE A MESSAGE IS STORED */
  325. typedef struct {
  326.     unsigned char    storage_type;        /* how it is stored */
  327.     unsigned long    stored_as;        /* where it is stored */
  328. } messagerec;
  329.  
  330.  
  331.  
  332. /* DATA HELD FOR EVERY POST */
  333. typedef struct {
  334.     char        title[81];        /* title of post */
  335.     unsigned char    anony,            /* anony-stat of message */
  336.             status;            /* bit-mapped status */
  337.     unsigned short    ownersys,owneruser;    /* who posted it */
  338.     unsigned long    qscan,            /* qscan pointer */
  339.             daten;            /* numerical date posted */
  340.     messagerec    msg;            /* where to find it */
  341. } postrec;
  342.  
  343.  
  344.  
  345. /* DATA HELD FOR EVERY E-MAIL OR F-BACK */
  346. typedef struct {
  347.     char        title[81];        /* E-mail title */
  348.     unsigned char    anony,            /* anonymous mail? */
  349.             status;            /* status for e-mail */
  350.     unsigned short    fromsys,fromuser,    /* originating system,user */
  351.             tosys,touser;        /* destination system,user */
  352.     unsigned long    daten;            /* date it was sent */
  353.     messagerec    msg;            /* where to find it */
  354. } mailrec;
  355.  
  356.  
  357.  
  358. /* SHORT RESPONSE FOR USER, TELLING HIS MAIL HAS BEEN READ */
  359. typedef struct {
  360.     char        message[81];        /* short message to user */
  361.     unsigned short    tosys,touser;        /* who it is to */
  362. } shortmsgrec;
  363.  
  364.  
  365.  
  366. /* VOTING RESPONSE DATA */
  367. typedef struct {
  368.     char        response[81];        /* Voting question response */
  369.     unsigned short    numresponses;        /* number of responses */
  370. } voting_response;
  371.  
  372.  
  373.  
  374. /* VOTING DATA INFORMATION */
  375. typedef struct {
  376.     char        question[81];        /* Question */
  377.     unsigned char    numanswers;        /* number of responses */
  378.     voting_response    responses[20];        /* actual responses */
  379. } votingrec;
  380.  
  381.  
  382.  
  383. /* DATA HELD FOR EVERY UPLOAD */
  384. typedef struct {
  385.     char        filename[13],        /* filename */
  386.             description[59],    /* file description */
  387.             date[9],        /* date u/l'ed */
  388.             upby[46];        /* name of upload user */
  389.     unsigned char    filetype;        /* file type for apples */
  390.     unsigned short    numdloads,        /* number times d/l'ed */
  391.             ownersys,ownerusr,    /* who uploaded it */
  392.             mask;            /* file type mask */
  393.     unsigned long    daten,            /* date uploaded */
  394.             numbytes;        /* number bytes long file is */
  395. } uploadsrec;
  396.  
  397.  
  398.  
  399. /* ZLOG INFORMATION FOR PAST SYSTEM USAGE */
  400. typedef struct {
  401.     char        date[9];        /* zlog for what date */
  402.     unsigned short    active,            /* number minutes active */
  403.             calls,            /* number calls */
  404.             posts,            /* number posts */
  405.             email,            /* number e-mail */
  406.             fback,            /* number f-back */
  407.             up;            /* number uploads */
  408. } zlogrec;
  409.  
  410.  
  411.  
  412. /* DATA FOR OTHER PROGRAMS AVAILABLE */
  413. typedef struct {
  414.     char        filename[81],        /* filename for .chn file */
  415.             description[81];    /* description of it */
  416.     unsigned char    sl,            /* seclev restriction */
  417.             ansir;            /* if ANSI required */
  418.     unsigned short    ar;            /* AR restriction */
  419. } chainfilerec;
  420.  
  421.  
  422.  
  423. /* DATA FOR EXTERNAL PROTOCOLS */
  424. typedef struct {
  425.     char        description[81],    /* protocol description */
  426.             receivefn[81],        /* receive filename */
  427.             sendfn[81];        /* send filename */
  428.     unsigned short    ok1,ok2,        /* if sent */
  429.             nok1,nok2;        /* if not sent */
  430. } externalrec;
  431.  
  432. typedef struct {
  433.     char        description[81],    /* protocol description */
  434.             receivefn[81],        /* receive filename */
  435.                         sendfn[81],             /* send filename */
  436.                         receivebatchfn[81],     /* batch receive cmd */
  437.                         sendbatchfn[81],        /* batch send cmd */
  438.                         bibatchfn[81];          /* batch send/receive cmd */
  439.         unsigned short  ok1;                    /* if sent */
  440.         unsigned short  othr;                   /* other flags */
  441.         char            pad[22];
  442. } newexternalrec;
  443.  
  444.  
  445. /* DATA FOR EXTERNAL EDITORS */
  446. typedef struct {
  447.     char        description[81],    /* description of editor */
  448.             filename[81];        /* how to run the editor */
  449.     unsigned long    config;            /* configuration for editor */
  450.         char        filenamecon[81];    /* how to run locally */
  451.     char        res[119];
  452. } editorrec;
  453.  
  454.  
  455.  
  456. /* DATA FOR CONVERSION OF MAIN MENU KEYS TO SUB-BOARD NUMBERS */
  457. typedef struct {
  458.     char        keys[3];
  459.     int        subnum;
  460. } usersubrec;
  461.  
  462.  
  463.  
  464. typedef struct {
  465.         char            sending;
  466.         char            filename[13];
  467.         short           dir;
  468.         float           time;
  469.         long            len;
  470. } batchrec;
  471.  
  472. typedef enum {
  473.   xf_up, xf_down, xf_up_temp, xf_down_temp, xf_up_batch, xf_down_batch, xf_bi, xf_none
  474. } xfertype;
  475.  
  476. /* userrec.inact */
  477. #define inact_deleted 0x01
  478. #define inact_inactive 0x02
  479.  
  480. /* userrec.exempt */
  481. #define exempt_ratio 0x01
  482. #define exempt_time 0x02
  483. #define exempt_all 0x04
  484. #define exempt_post 0x08
  485.  
  486. /* userrec.restrict */
  487. #define restrict_logon 0x0001
  488. #define restrict_chat 0x0002
  489. #define restrict_validate 0x0004
  490. #define restrict_automessage 0x0008
  491. #define restrict_anony 0x0010
  492. #define restrict_post 0x0020
  493. #define restrict_email 0x0040
  494. #define restrict_vote 0x0080
  495. #define restrict_auto_msg_delete 0x0100
  496. #define restrict_net 0x0200
  497. #define restrict_upload 0x0400
  498.  
  499. #define restrict_string "LCMA*PEVKNU     "
  500.  
  501. /* userrec.sysstatus */
  502. #define sysstatus_ansi 0x0001
  503. #define sysstatus_color 0x0002
  504. #define sysstatus_music 0x0004
  505. #define sysstatus_pause_on_page 0x0008
  506. #define sysstatus_expert 0x0010
  507. #define sysstatus_smw 0x0020
  508. #define sysstatus_full_screen 0x0040
  509. #define sysstatus_nscan_file_system 0x0080
  510. #define sysstatus_funky_colors 0x0100
  511. #define sysstatus_clr_scrn 0x0200
  512.  
  513. /* slrec.ability */
  514. #define ability_post_anony 0x0001
  515. #define ability_email_anony 0x0002
  516. #define ability_read_post_anony 0x0004
  517. #define ability_read_email_anony 0x0008
  518. #define ability_limited_cosysop 0x0010
  519. #define ability_cosysop 0x0020
  520. #define ability_val_net 0x0040
  521.  
  522. /* subboardrec.anony */
  523. #define anony_enable_anony 0x01
  524. #define anony_enable_dear_abby 0x02
  525. #define anony_force_anony 0x04
  526. #define anony_real_name 0x08
  527. #define anony_val_net 0x10
  528. #define anony_ansi_only 0x20
  529. #define anony_no_tag 0x40
  530. #define anony_require_sv 0x80
  531.  
  532. /* postrec.anony, mailrec.anony */
  533. #define anony_sender 0x01
  534. #define anony_sender_da 0x02
  535. #define anony_sender_pp 0x03
  536. #define anony_receiver 0x10
  537. #define anony_receiver_da 0x20
  538. #define anony_receiver_pp 0x30
  539.  
  540. /* directoryrec.mask */
  541. #define mask_PD 0x0001
  542. #define mask_no_uploads 0x0004
  543. #define mask_archive 0x0008
  544. #define mask_pending_batch 0x0010
  545. #define mask_no_ratio 0x0020
  546. #define mask_extended 0x8000
  547.  
  548. /* postrec.status */
  549. #define status_unvalidated 0x01
  550. #define status_delete 0x02
  551. #define status_no_delete 0x04
  552. #define status_pending_net 0x08
  553. #define status_post_source_verified 0x10
  554.  
  555. /* mailrec.status */
  556. #define status_multimail 0x01
  557. #define status_source_verified 0x02
  558.  
  559. /* configrec.sysconfig */
  560. #define sysconfig_no_local 0x0001
  561. #define sysconfig_no_beep 0x0002
  562. #define sysconfig_high_speed 0x0004
  563. #define sysconfig_off_hook 0x0008
  564. #define sysconfig_two_color 0x0010
  565. #define sysconfig_flow_control 0x0020
  566. #define sysconfig_printer 0x0040
  567. #define sysconfig_list 0x0080
  568. #define sysconfig_no_xfer 0x0100
  569. #define sysconfig_2_way 0x0200
  570. #define sysconfig_no_alias 0x0400
  571. #define sysconfig_all_sysop 0x0800
  572. #define sysconfig_shrink_term 0x1000
  573. #define sysconfig_free_phone 0x2000
  574. #define sysconfig_log_dl 0x4000
  575.  
  576. /* editorrec.config */
  577. #define config_80_25 0x0001
  578.  
  579. #define ansir_ansi 0x01
  580. #define ansir_no_DOS 0x02
  581. #define ansir_no_300 0x04
  582. #define ansir_shrink 0x08
  583. #define ansir_no_pause 0x10
  584.  
  585. /* newexternalrec.othr */
  586. #define othr_error_correct 0x0001
  587. #define othr_bimodem 0x0002
  588.  
  589. #define PREV 1
  590. #define NEXT 2
  591. #define DONE 4
  592. #define NUM_ONLY 1
  593. #define UPPER_ONLY 2
  594. #define ALL 4
  595. #define SET 8
  596.  
  597.  
  598. struct line {
  599.     char        text[160];
  600.     struct line     *prev,*next;
  601. };
  602.  
  603.  
  604. typedef struct {
  605.   int x1,y1,topline1,curatr1;
  606.   char *scrn1;
  607. } screentype;
  608.  
  609. typedef struct{
  610.   char name[13];
  611.   int len;
  612. } ext_desc_type;
  613.  
  614. typedef struct {
  615.     char        name[41],        /* g-file section name */
  616.             filename[9];        /* g-file database filename */
  617.     unsigned char    sl,            /* sl required to read */
  618.             age;            /* minimum age for section */
  619.     unsigned short    maxfiles,        /* max # of files */
  620.             ar;            /* AR for g-file section */
  621. } gfiledirrec;
  622.  
  623. typedef struct {
  624.     char        description[81],    /* description of file */
  625.             filename[13];        /* filename of file */
  626.         long        daten;            /* date added */
  627. } gfilerec;
  628.  
  629. typedef struct {
  630.         char            curspeed[23];           /* description of speed */
  631.         char            return_code[23];        /* modem result code */
  632.         unsigned short  modem_speed,            /* speed modems talk at */
  633.                         com_speed;              /* speed com port runs at */
  634. } resultrec;
  635.  
  636.  
  637. #define VERSION_NUMBER "WWIV v4.20e"
  638. #define max_buf 1024
  639. #define MSG_COLOR 0
  640. #define MAX_BATCH 50
  641.  
  642. #define INT_SAVE_21 0x69
  643. #define INT_POINT_FUNCS 0x6a
  644. #define INT_SHRINK 0x6b
  645.  
  646. /****************************************************************************/
  647. /* modem info structure */
  648.  
  649. #define mode_norm     1   /* normal status */
  650. #define mode_ring     2   /* phone is ringing */
  651. #define mode_dis      3   /* disconnected (no connection) */
  652. #define mode_err      4   /* error encountered */
  653. #define mode_ringing  5   /* remote phone is ringing */
  654. #define mode_con      6   /* connection established */
  655. #define mode_ndt      7   /* no dial tone */
  656. #define mode_fax      8   /* fax connection */
  657.  
  658. #define flag_as       1   /* asymmetrical baud rates */
  659. #define flag_ec       2   /* error correction in use */
  660. #define flag_dc       4   /* data compression in use */
  661. #define flag_fc       8   /* flow control should be used */
  662. #define flag_append   16  /* description string should be appended */
  663.  
  664.  
  665. typedef struct {
  666.   char result[41];
  667.   char description[31];
  668.   unsigned int main_mode;
  669.   unsigned int flag_mask;
  670.   unsigned int flag_value;
  671.   unsigned int com_speed;
  672.   unsigned int modem_speed;
  673. } result_info;
  674.  
  675. typedef struct {
  676.   unsigned short ver;
  677.   char name[81];
  678.   char init[161];
  679.   char setu[161];
  680.   char ansr[81];
  681.   char pick[81];
  682.   char hang[81];
  683.   char dial[81];
  684.  
  685.   char sepr[10];
  686.  
  687.   result_info defl;
  688.   unsigned int num_resl;
  689.   result_info resl[1];
  690. } modem_info;
  691.  
  692. /****************************************************************************/
  693.  
  694.  
  695. #endif
  696.