home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / amiga / datacomm / 6279 < prev    next >
Encoding:
Internet Message Format  |  1992-09-10  |  1.0 KB

  1. Path: sparky!uunet!decwrl!netcomsv!terapin!paulk
  2. From: paulk@terapin.com (Paul Kienitz)
  3. Newsgroups: comp.sys.amiga.datacomm
  4. Subject: Re: QWK, Mark Mail Doors
  5. References: <18ltvtINN9hm@usenet.INS.CWRU.Edu>
  6. Message-ID: <paulk.1gfc@terapin.com>
  7. Date: 10 Sep 92 19:50:10 PST
  8. Organization: BBS
  9. Lines: 17
  10.  
  11. > The QWK docs say that the numbers in the .ndx files are MSBIN or
  12. > BasicReal format, and that I have to convert them to/from a Float
  13. > format??? why would they be floating point numbers anyways
  14.  
  15. Because the first QWK software was written in Basic.  The guy who
  16. created it said "I never dreamed it would become a standard."
  17.  
  18. Here's a C routine to convert them numbers to long ints:
  19.  
  20.     unsigned long msfloat = <a copy of the number to convert> ;
  21.     short shift = 24 - ((msfloat >> 24) & 0x7F);
  22.     long intresult = ((msfloat & 0xFFFFFF) | 0x800000) >> shift;
  23.  
  24. I believe the numbers are 128 byte block numbers, not byte offsets.
  25.  
  26. I've never messed with this directly myself; my QWK reader ignores
  27. NDX files entirely.
  28.