1. Re: C to Euphoria
- Posted by Antoine Delle Donne <delledonne at GEOCITIES.COM> Jul 09, 1998
- 422 views
> -----Original Message----- > From: Antoine Delle Donne [mailto:delledonne at geocities.com] > Sent: Thursday, July 09, 1998 7:40 PM > To: 'Euphoria List Server' > Subject: C to Euphoria > > > > How to convert these structures in Euphoria and will they > keep the same size as in C. For example structure IDNAME is > 162 bytes long Will it still be 162 bytes long in Euphoria? > P.S. I'm trying to reply to the list but Outlook98 seems to > send to original poster?? Will have to figure that out. > > typedef struct { > unsigned int no, sno; > char id[40]; > float ip; > } ITEMS; > > typedef struct { > unsigned int no; > char n[4][32]; > char tel[16],fax[16]; > } IDNAME; > > Thanks > -antoine > > > > > I checked the structure (above) that Jesus asked about > > using WATCOM C, compiling for 32-bit Windows. > > The total size (sizeof) of the structure is 16 bytes. > > The constant offsets should be: > > h_name = 0, -- pointer is 4 bytes long > > h_aliases = 4, -- pointer is 4 bytes long > > h_addrtype = 8, -- short is 2 bytes > > h_length = 10, -- short is 2 bytes > > h_addr_list = 12 -- pointer is 4 bytes long > > > > The FAR keyword is usually #defined in some C .h file > > as null string. So the pointers aren't really far pointers. > > Something like: > > > > #ifdef WIN32 > > #define FAR > > #else > > #define FAR _far > > #endif > > > > (or something like that). > > > > Regards, > > Rob Craig > > Rapid Deployment Software > > http://members.aol.com/FilesEu/ > > > http://welcome.to/antoine Home of Prodecom