www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/16/06:03:42

Message-ID: <8D53104ECD0CD211AF4000A0C9D60AE32888B0@probe-2.Acclaim-Euro.net>
From: Shawn Hargreaves <ShawnH AT Probe DOT co DOT uk>
To: djgpp AT delorie DOT com
Cc: rylan AT intekom DOT co DOT za
Subject: Re: Allegro Datafile Problem
Date: Mon, 16 Nov 1998 11:00:20 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.0.1460.8)
Reply-To: djgpp AT delorie DOT com

StefanViljoen writes:
> If I have a custom datafile property defined for a datafile object, 
> using the grabber, how the heck do I acces this property's value 
> inside my program????

Try something like:

    #define XDIM_ID  DAT_ID('X','D','I','M')

    char *property = get_datafile_property(&dat[index], XDIM_ID);

For example:

    DATAFILE *dat = load_datafile("filename.dat");
    int i;

    for (i=0; dat[i].type != DAT_END; i++) {
        printf("Object %d has name %s, xdim %s\n", i,
               get_datafile_property(dat+index, DAT_NAME),
               get_datafile_property(dat+index, XDIM_ID));
    }

Hope that helps...


	Shawn Hargreaves.


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019