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