Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn ) Newsgroups: net.graphics Subject: Re: C help needed Message-ID: <5630@brl-tgr.ARPA> Date: Wed, 7-Nov-84 11:22:53 EST Article-I.D.: brl-tgr.5630 Posted: Wed Nov 7 11:22:53 1984 Date-Received: Sat, 10-Nov-84 04:02:22 EST References: <8300009@uiucdcsb.UUCP> Organization: Ballistic Research Lab Lines: 17 > i have a program that generates a rather complex model of an object > (this is for computer graphics) that is composed of records. each record > contains data and pointers to other records. this entire data structure > is irregular. how can i save this structure in a file so that it can > be used by another program? keep in mind that this structure is not > tree-like in any way; it more closely resembles something a spider did > under influence of drugs. It would be hard to make sense of the (data address space) pointers in any other process image; otherwise you could just do a raw dump of your heap space. If there is some canonical way of traversing your structure (too bad it's not a tree), then you could do that and replace pointers by directory indices while writing out the data plus the directory. Reading it back in would be the converse. This is the sort of thing that needs to be designed up front before it's too late..