home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / mail / elm / 2341 < prev    next >
Encoding:
Text File  |  1992-09-09  |  2.4 KB  |  67 lines

  1. Path: sparky!uunet!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!cleveland.Freenet.Edu!at595
  2. From: at595@cleveland.Freenet.Edu (Garrett Laska)
  3. Newsgroups: comp.mail.elm
  4. Subject: QWK, Mark Mail Doors
  5. Date: 9 Sep 1992 22:08:26 GMT
  6. Organization: Case Western Reserve University, Cleveland, OH (USA)
  7. Lines: 55
  8. Message-ID: <18lskqINN6to@usenet.INS.CWRU.Edu>
  9. Reply-To: at595@cleveland.Freenet.Edu (Garrett Laska)
  10. NNTP-Posting-Host: slc10.ins.cwru.edu
  11.  
  12.  
  13.   Can anyone out there shed some light on a dim subject (my brain).. that
  14. being what in the heck the format is of the .ndx files that are produced
  15. by QWK compatible doors... I'm currently stuck on this 1 point, I'm writing a
  16. QWK Mail door and for the life of me can't figure it out... I have misc
  17. docs of the QWK standards, everything else is a piece of cake but here is my
  18. situation:
  19.     The QWK docs say that the numbers in the .ndx files are MSBIN or BasicReal
  20. format, and that I have to convert them to/from a Float format??? why would
  21. they be floating point numbers anyways, a Long int (4 odd million) would seem
  22. sufficient, but anyways, here is a routine I pulled out of the docs..
  23.  
  24. union Converter
  25. {
  26. unsigned char uc[10];
  27. unsigned int  ui[5];
  28. unsigned long ul[2];
  29. float       f[2];
  30. double       d[1];
  31. }
  32.  
  33. float MSBINToIEEE(float f)
  34. {
  35. union Converter t;
  36. int sign, exp;
  37.  
  38. t.f[0] = f;
  39.  
  40. sign = t.uc[2] / 0x80;
  41. exp  = (t.uc[3] - 0x81 + 0x7F) & 0xFF;
  42.  
  43. t.ui[1] = (t.ui[1] & 0x7F) | (exp << 7) | (sign << 15);
  44. return(t.f[0]);
  45. }
  46.  
  47.  
  48.   I have many QWK packets I've pulled off of many boards, and always, the first
  49. .ndx file (the one that pertains to the first message in Message.dat) contains
  50. for the first message 0x82... which is 130 in decimal... if you run that
  51. through the converter you don't get a Byte seek position or a 128byte block
  52. position?? At least that is one common thing... from there on out it seems
  53. erratic as to what the next value will be... Someone told me that they were
  54. Shown 86%, press <SPACE> for more, 'q' to quit, or 'h' for help
  55. not MSBIN numbers and were just Byte seek positions for the Message.dat file
  56. but that doesn't fly.... Anyone out there that knows what I'm talking about??
  57. I appreciate any help!!!
  58.  
  59.  
  60.      Garrett Laska...
  61.              Internet: AT595@cleveland.freenet.edu  Cleve, OH
  62. -- 
  63.     
  64.           
  65.          Garrett Laska...  
  66.              Internet: AT595@cleveland.freenet.edu  Cleve, OH 
  67.