home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / pascal / 8578 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.0 KB

  1. From: tp923021@jarrah.canberra.edu.au (ben elliston)
  2. Sender: gateway@f262.n620.z3.fidonet.org
  3. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!munnari.oz.au!manuel.anu.edu.au!sserve!f262.n620.z3!gateway
  4. Newsgroups: comp.lang.pascal
  5. Subject: BIG blockwrites!
  6. Message-ID: <728098043.AA00331@f262.n620.z3.fidonet.org>
  7. Date: Wed, 27 Jan 1993 01:25:00
  8. Lines: 20
  9.  
  10. I'm trying to write out several structures to a typed file on disk.
  11.  
  12. I'm using:
  13.  
  14. blockwrite(thefile, struct_1, sizeof(struct_1));
  15. blockwrite(thefile, struct_2, sizeof(struct_2));
  16. blockwrite(thefile, struct_2, sizeof(struct_3));
  17.  
  18. .. and so on.  Only about 3 of them anyway.
  19.  
  20. The problems are:
  21.  
  22. 1.  Struct_2 has three null-terminated fields.  These contain people's names. These names are NOWHERE to be found when viewing the file with Xtree (in hex view mode).
  23.  
  24. 2.  The total size of the structures is about 300 bytes. The file, when closed, goes well over 30k in size!  I've seen this before, and I never worked out what I actually did to fix it.
  25.  
  26. Any suggestions would be most appreciated.
  27.  
  28. Cheers, Ben
  29.  
  30.