home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / OFFLINE / QWKINFO.ZIP / QWKINFO3.TXT < prev   
Text File  |  1992-01-09  |  21KB  |  468 lines

  1. ===========================================================================
  2.  BBS: The Little Kingdom
  3. Date: 01-02-92 (02:31)             Number: 6648
  4. From: JIM SMITH                    Refer#: NONE
  5.   To: VINCE LAURENT                 Recvd: NO  
  6. Subj: .QWK Formats and more 1/5      Conf: (19) Shareware
  7. ---------------------------------------------------------------------------
  8.  
  9. VL▐│ So you can see where I stand.  I am trying to get the formats so I could
  10.   ▐│ write the BBS side (export the CORRECT .QWK format and import the .REP
  11.   ▐│ correctly!).  Any and all help would be GREATLY appreciated!
  12.  
  13. Here is some messages that I captured and found very useful:
  14.  
  15. ===========================================================================
  16. From the announcement...
  17.  
  18. You can now ADD and DROP conferences from your Qmail Door 4.00 setup
  19. directly from inside your DeLuxe² (or compatible) reader.  All you need
  20. to do is to enter a message to "QMAIL" with a subject of "CONFIG"
  21. (without quotes).  Then, enter any of the commands listed below inside
  22. the text of your message.  Remember to use one command per line.
  23.  
  24. ------------------------------------------------------------------------
  25.  
  26.                 ADD <confnum>             Add a conference into the
  27.                                           Qmail Door 4.00 scanning list.
  28.                                           "YOURS" can also be added to
  29.                                           the command if the user wishes
  30.                                           to receive messages only
  31.                                           addressed them.  Example:
  32.  
  33.                                           ADD 1 YOURS
  34.  
  35.                 DROP <confnum>            Drop a conference from the
  36.                                           Qmail Door 4.00 scanning list.
  37.  
  38.                 RESET <confnum> <value>   Resets a conference to a
  39.                                           particular value.  The user
  40.                                           can use "HIGH-xxx" to set the
  41.                                           conference to the highest
  42.                                           message in the base.
  43.  
  44.                 CITY <value>              Changes the "city" field in the
  45.                                           User's PCBoard entry.
  46.  
  47.                 PASSWORD <value>          Changes the user's login
  48.                                           password.
  49.  
  50.                 BPHONE <value>            Business/data phone number
  51.  
  52.                 HPHONE <value>            Home/voice phone number
  53.  
  54.                 PCBEXPERT <on|off>        Turns the PCBoard EXPERT
  55.                                           mode ON or OFF.
  56.  
  57.                 PCBPROT <value>           PCBoard file transfer
  58.                                           protocol (A-Z).
  59.  
  60.                 PAGELEN <value>           Page length inside PCBoard.
  61.  
  62.                 PCBCOMMENT <value>        User maintained comment.
  63.  
  64.                 AUTOSTART <value>         Qmail Door autostart command.
  65.  
  66.                 PROTOCOL <value>          Qmail Door file transfer
  67.                                           protocol (A-Z).
  68.  
  69.                 EXPERT <on|off>           Turns the Qmail Door EXPERT
  70.                                           mode ON or OFF.
  71.  
  72.                 MAXSIZE <value>           Maximum size of the user's
  73.                                           .QWK packet (in bytes)
  74.  
  75.                 MAXNUMBER <value>         Maximum number of messages
  76.                                           per conference.
  77.  
  78.                 Sparky
  79.                 Qmail Support
  80. ===========================================================================
  81.  
  82. CONTROL.DAT
  83.  
  84.          Line # 1 - This is the BBS name where you got your mail
  85.                     packet.
  86.          Line # 2 - This is the city and state where the BBS is
  87.                     located.
  88.          Line # 3 - This is the BBS phone number.
  89.          Line # 4 - This is the sysop's name.
  90.          Line # 5 - This line contains first the serial number of the
  91.                     mail door followed by the BBS ID. Note the BBS ID
  92.                     as it will be used later in this article.
  93.          Line # 6 - This is the time and date of the packet.
  94.          Line # 7 - This is the uppercase name of the user for which
  95.                     this packet was prepared.
  96.          Line # 8 - This line contains the name of the menu file for
  97.                     those who use the Qmail reader/door. Almost all
  98.                     other mail doors leave this line blank.
  99.          Line # 9 - No one seems to know what this line is meant for.
  100.          Line #10 - No one seems to know what this line is meant for.
  101.                     (Note: Both of these ALWAYS seem to be 0)
  102.          Line #11 - This line is the maximum number of conferences
  103.    [ Continued In Next Message... ]
  104.  
  105. ---
  106. ===========================================================================
  107.  BBS: The Little Kingdom
  108. Date: 01-02-92 (02:31)             Number: 6649
  109. From: JIM SMITH                    Refer#: NONE
  110.   To: VINCE LAURENT                 Recvd: NO  
  111. Subj: .QWK Formats and more 2/5      Conf: (19) Shareware
  112. ---------------------------------------------------------------------------
  113.    [ ...Continued From Previous Message ]
  114.  
  115.                     MINUS 1.
  116.          Line #12 - This line is the first conference's number. It is
  117.                     usually 0 but not always.
  118.          Line #13 - This line is the name of the first conference. It
  119.                     is 10 characters or less.
  120.  
  121.          Lines 12 and 13 are repeated for as many conferences as
  122.          listed in line 11.
  123.  
  124.          Anything you see after the last conference name can be
  125.          ignored as that information isn't usually provided by mail
  126.          doors. One exception to this is the Markmail door.
  127.  
  128.  
  129.          Now we'll talk about the message file itself. If you haven't
  130.          guess by now, it is the MESSAGES.DAT file. This is, quite
  131.          obviously, the largest file in the .QWK packet.
  132.  
  133.          MESSAGES.DAT is organized very specifically into 128-byte
  134.          records. The first record is the Sparkware copyright notice.
  135.          The rest of the record after the copyright notice is filled
  136.          with blanks (spaces). To maintain compatibility with Sparky's
  137.          Qmail Door, all mail doors reproduce the copyright notice
  138.          exactly.
  139.  
  140.          Following the first record begins the "meat" of the message
  141.          file. Each message included in the file consists of a header
  142.          followed directly by the message text itself. First we will
  143.          describe the header:
  144.  
  145.           Header    Field
  146.          Position   Length   Description
  147.          --------   ------   ----------------------------------------
  148.          1          1        Message status byte
  149.                                 ' ' = public message which hasn't been
  150.                                       read
  151.                                 '-' = public and already read
  152.                                 '*' = private message
  153.                                 '~' = comment to sysop which hasn't
  154.                                       been read by the sysop
  155.                                 '`' = comment to sysop which HAS been
  156.                                       read by the sysop
  157.                                 '%' = password protected message that
  158.                                       hasn't been read (protected by
  159.                                       sender of message)
  160.                                 '^' = password protected message that
  161.                                       HAS been read (protected by
  162.                                       sender of message)
  163.                                 '!' = password protected message that
  164.                                       hasn't been read (protected by
  165.                                       group password)
  166.                                 '#' = password protected message that
  167.                                       HAS been read (protected by
  168.                                       group password)
  169.                                 '$' = password protected message that
  170.                                       is addressed to ALL (protected
  171.                                       by group password)
  172.          2         7         Message number coded in ASCII
  173.          9         8         Date coded in ASCII (MM-DD-YY)
  174.          17        5         Time coded in ASCII (HH:MM) 24 hour
  175.                              format
  176.          22        25        Uppercase name of person message is TO
  177.          47        25        Uppercase name of person message is FROM
  178.          72        25        Subject of message
  179.          97        12        Message password. Usually not anything
  180.                              but spaces (to denote no password)
  181.          109       8         Message # this message refers to (coded
  182.                              in ASCII)
  183.          117       6         Number of 128-byte chunks in the actual
  184.                              message (includes header and is coded in
  185.                              ASCII)
  186.          123       1         Determines whethere a message is live
  187.                              (active) or killed. 90% of the time you
  188.                              won't see a killed message in a packet.
  189.                                  'a' = Message is active/alive (0xE1)
  190.                                  'b' = Message is killed/dead  (0xE2)
  191.          124       1         Least significant byte of conference
  192.                              number.
  193.          125       1         Most significant byte of conference
  194.                              number. NOTE: This isn't in the original
  195.                              .QWK format but has become the standard
  196.                              due to conference numbers greater than
  197.                              255. In the original format, this byte
  198.                              was space-filled.
  199.          126       3         Filler bytes for future expansion.
  200.                              Space-filled and usually ignored.
  201.  
  202.          Following the header record comes the message text itself.
  203.          The message text is simply the body of the message. To save
  204.          space, the return/linefeed combination is translated to the
  205.          pi character 'c' (0xE3). Note that the last line of the
  206.          message is padded with spaces to fill out the 128-byte
  207.          record.
  208.    [ Continued In Next Message... ]
  209.  
  210. ---
  211. ===========================================================================
  212.  BBS: The Little Kingdom
  213. Date: 01-02-92 (02:31)             Number: 6650
  214. From: JIM SMITH                    Refer#: NONE
  215.   To: VINCE LAURENT                 Recvd: NO  
  216. Subj: .QWK Formats and more 3/5      Conf: (19) Shareware
  217. ---------------------------------------------------------------------------
  218.    [ ...Continued From Previous Message ]
  219.  
  220.  
  221.  
  222.          Now we'll talk about the *.NDX files that are included in the
  223.          packet. Each .NDX file is formatted into records of 5-bytes
  224.          each. The bytes in each record are formatted thusly:
  225.  
  226.          Start  Field
  227.          Byte   Length   Description
  228.          ----   ------   --------------------------------------------
  229.          1      4        This is a floating point number in the MSBIN
  230.                          format. This number is the record number of
  231.                          the message header in MESSAGES.DAT that
  232.                          corresponds to this message.
  233.          5      1        This byte is the conferece number of this
  234.                          message. This byte can (and should) be
  235.                          ignored as it is duplicated in the message
  236.                          header in MESSAGES.DAT. This is especially
  237.                          important for conferences numbered higher
  238.                          than 255.
  239.  
  240.          Let's stray just a moment to talk about the MSBIN floating
  241.          point format. This is the format used by the older Microsoft
  242.          Basic compilers and interpreters. Most compiler manufacturers
  243.          have switched to the more efficient IEEE floating point
  244.          format. Therefore, we must have a method of converting to and
  245.          from MSBIN format. Included at the end of this article are
  246.          two routines in C that accomplish this quite easily.
  247.  
  248.  
  249.  
  250.          Ok, let's talk about the format of the .REP (reply) packet.
  251.          Like the .QWK packet it is usually compressed. Inside the
  252.          compressed archive is a file whose extension is .MSG. The
  253.          filename itself is the same as line #5 of CONTROL.DAT. This
  254.          is the BBSID. So, for example, if the BBSID is GENERIC, the
  255.          complete filename in the .REP packet would be GENERIC.MSG.
  256.  
  257.          The format of the .MSG file is almost exactly the same as the
  258.          MESSAGES.DAT file with three differences:
  259.  
  260.          1). In the first record, rather than a copyright notice, the
  261.          first eight bytes are the BBSID as described above. The rest
  262.          of the record is filled with spaces.
  263.  
  264.          2). In the message header, rather than the ASCII-coded
  265.          message number, we have the ASCII-coded conference number
  266.  
  267.          3). Also in the message header, the conference number field
  268.          (byte offset 124 & 125) may be filled with spaces *OR* the
  269.          conference number.
  270.  
  271.          In recent months a new file, DOOR.ID, has been added to the
  272.          .QWK packet. I know very little about it but will attempt to
  273.          explain it as best as I can.
  274.  
  275.          DOOR.ID seems to be a method for individual doors to let the
  276.          mail reader know how to add and drop conferences. It is a
  277.          good idea and I hope more doors and readers can be made to
  278.          cooperate with it.
  279.  
  280.          Usually there are only five lines in this file. Here is a
  281.          sample from one of my recent .QWK packets:
  282.  
  283.          DOOR = TomCat!                       Line #1
  284.          VERSION = 2.9                        Line #2
  285.          SYSTEM = Wildcat! 2.x                Line #3
  286.          CONTROLNAME = TOMCAT                 Line #4
  287.          CONTROLTYPE = ADD                    Line #5
  288.          CONTROLTYPE = DROP                   Line #6
  289.  
  290.          Line #1 - This is the mail door's name.
  291.          Line #2 - This is the mail door's version number.
  292.          Line #3 - This is the BBS software used and version number.
  293.          Line #4 - This is the control name (TO:) where to send
  294.                    requests for conference changes.
  295.          Line #5 - This is the command the door expects to see to add
  296.                    a conference to the user's current list.
  297.          Line #6 - This is the command the door expects to see to drop
  298.                    a conference from the user's current list.
  299.  
  300.  
  301.          Here are the routines I use to convert to and from the MSBIN
  302.          format. You may use them as you see fit - they are not
  303.          copyrighted by me.
  304.  
  305.          /***  MSBIN conversion routines ***/
  306.  
  307.          union Converter
  308.                {
  309.                 unsigned char uc[10];
  310.                 unsigned int  ui[5];
  311.                 unsigned long ul[2];
  312.                 float          f[2];
  313.    [ Continued In Next Message... ]
  314.  
  315. ---
  316. ===========================================================================
  317.  BBS: The Little Kingdom
  318. Date: 01-02-92 (02:31)             Number: 6651
  319. From: JIM SMITH                    Refer#: NONE
  320.   To: VINCE LAURENT                 Recvd: NO  
  321. Subj: .QWK Formats and more 4/5      Conf: (19) Shareware
  322. ---------------------------------------------------------------------------
  323.    [ ...Continued From Previous Message ]
  324.  
  325.                 double         d[1];
  326.                }
  327.  
  328.          /* MSBINToIEEE - Converts an MSBIN floating point number */
  329.          /*               to IEEE floating point format           */
  330.          /*                                                       */
  331.          /*  Input: f - floating point number in MSBIN format     */
  332.          /* Output: Same number in IEEE format                    */
  333.  
  334.          float MSBINToIEEE(float f)
  335.          {
  336.             union Converter t;
  337.             int sign, exp;       /* sign and exponent */
  338.  
  339.             t.f[0] = f;
  340.  
  341.          /* extract the sign & move exponent bias from 0x81 to 0x7f */
  342.  
  343.             sign = t.uc[2] / 0x80;
  344.             exp  = (t.uc[3] - 0x81 + 0x7f) & 0xff;
  345.  
  346.          /* reassemble them in IEEE 4 byte real number format */
  347.  
  348.             t.ui[1] = (t.ui[1] & 0x7f) | (exp << 7) | (sign << 15);
  349.             return t.f[0];
  350.          } /* End of MSBINToIEEE */
  351.  
  352.  
  353.          /* MSBINToIEEE - Converts an MSBIN floating point number */
  354.          /*               to IEEE floating point format           */
  355.          /*                                                       */
  356.          /*  Input: f - floating point number in MSBIN format     */
  357.          /* Output: Same number in IEEE format                    */
  358.  
  359.          float MSBINToIEEE(float f)
  360.          {
  361.             union Converter t;
  362.             int sign, exp;       /* sign and exponent */
  363.  
  364.             t.f[0] = f;
  365.  
  366.          /* extract the sign & move exponent bias from 0x81 to 0x7f */
  367.  
  368.             sign = t.uc[2] / 0x80;
  369.             exp  = (t.uc[3] - 0x81 + 0x7f) & 0xff;
  370.  
  371.          /* reassemble them in IEEE 4 byte real number format */
  372.  
  373.             t.ui[1] = (t.ui[1] & 0x7f) | (exp << 7) | (sign << 15);
  374.             return t.f[0];
  375.          } /* End of MSBINToIEEE */
  376.  
  377.  
  378.          /* IEEEToMSBIN - Converts an IEEE floating point number  */
  379.          /*               to MSBIN floating point format          */
  380.          /*                                                       */
  381.          /*  Input: f - floating point number in IEEE format      */
  382.          /* Output: Same number in MSBIN format                   */
  383.  
  384.          float IEEEToMSBIN(float f)
  385.          {
  386.             union Converter t;
  387.             int sign, exp;       /* sign and exponent */
  388.  
  389.             t.f[0] = f;
  390.  
  391.          /* extract sign & change exponent bias from 0x7f to 0x81 */
  392.  
  393.             sign = t.uc[3] / 0x80;
  394.             exp  = ((t.ui[1] >> 7) - 0x7f + 0x81) & 0xff;
  395.  
  396.          /* reassemble them in MSBIN format */
  397.  
  398.             t.ui[1] = (t.ui[1] & 0x7f) | (sign << 7) | (exp << 8);
  399.             return t.f[0];
  400.          } /* End of IEEEToMSBIN */
  401.  
  402.  
  403.          Well, that is all there is to it! I hope this article has
  404.          shed some light on the so-called "mysterious" .QWK format.
  405.  
  406.  
  407.                                              Jeffery Foy, April 1991
  408.  
  409. ===============================================================================
  410.  
  411. Now, the format of the DOOR.ID file is like this:
  412.  
  413. DOOR = <doorname>
  414.  
  415.         This is the name of the door that created the QWK packet, eg.
  416.         <doorname> = Tomcat.
  417.    [ Continued In Next Message... ]
  418.  
  419. ---
  420.  ■ SPEED 1.0B #0 ■ Of all the things I've lost, I miss my mind most.
  421. ===========================================================================
  422.  BBS: The Little Kingdom
  423. Date: 01-02-92 (02:31)             Number: 6652
  424. From: JIM SMITH                    Refer#: NONE
  425.   To: VINCE LAURENT                 Recvd: NO  
  426. Subj: .QWK Formats and more 5/5      Conf: (19) Shareware
  427. ---------------------------------------------------------------------------
  428.    [ ...Continued From Previous Message ]
  429.  
  430. VERSION = <doorversion>
  431.  
  432.         This is the version number of the door that created the packet,
  433.         eg. <doorversion> = 2.9.
  434.  
  435. SYSTEM = <systemtype>
  436.  
  437.         This is the underlying BBS system type and version, eg.
  438.         <systemtype> = Wildcat 2.55.
  439.  
  440. CONTROLNAME = <controlname>
  441.  
  442.         This is the name to which the reader should send control
  443.         messages, eg. <controlname> = TOMCAT.
  444.  
  445. CONTROLTYPE = <controltype>
  446.  
  447.         This can be one of ADD, DROP, or REQUEST (or others).  ADD and
  448.         DROP are pretty obvious (they work as in Markmail), and REQUEST
  449.         is for use with BBS systems that support file attachments.  Try
  450.         out SLMR with CONTROLTYPE = REQUEST and use the Q function.
  451.  
  452. RECEIPT
  453.  
  454.         This flag indicates that the door/BBS is capable of return
  455.         receipts when a message is received.  If the first three letters
  456.         of the subject are RRR, then the door should strip the RRR and
  457.         set the 'return-receipt-requested' flag on the corresponding
  458.         message.
  459.  
  460. ===============================================================================
  461.  
  462. Good luck!
  463. .
  464.  
  465. ---
  466.  ■ SPEED 1.0B #0 ■ Of all the things I've lost, I miss my mind most.
  467.  ■ QNet3ß ■ Intelec:Bloom County BBS ■ BHAM, AL ■ 205-856-0587 HST Dual
  468.