[Coco] more MW-C cross platform issues
James Jones
jejones3141 at gmail.com
Thu Mar 13 10:07:25 EDT 2014
That's right. Remember, it's K&R *1st edition* (minus bitfields), which
predates even the pcc extensions like void, passing and returning
structs/unions, and the like, much less ANSI/ISO C. There was one namespace
for members of all structures and unions.
On Wed, Mar 12, 2014 at 7:51 PM, Bill Pierce <ooogalapasooo at aol.com> wrote:
>
> Luis, that is correct. I usually use a prefix to reflect the struct I'm in
> ie:
>
> typedef struct{
> char f_name[33];
> int f_size;
> char f_type;
> } FILE;
>
> typedefs struct{
> char s_name[33];
> int s_size
> char s_type
> {SOURCE;
>
> FILE file[24];
> SOURCE src[24];
>
>
> It satisfies the compiler and keeps me from getting confused as well.
>
> Bill Pierce
> "Today is a good day... I woke up" - Ritchie Havens
>
>
> My Music from the Tandy/Radio Shack Color Computer 2 & 3
> https://sites.google.com/site/dabarnstudio/
> Co-Webmaster of The TRS-80 Color Computer Archive
> http://www.colorcomputerarchive.com/
> Co-Contributor, Co-Editor for CocoPedia
> http://www.cocopedia.com/wiki/index.php/Main_Page
> E-Mail: ooogalapasooo at aol.com
>
>
>
>
> -----Original Message-----
> From: Luis Antoniosi (CoCoDemus) <retrocanada76 at gmail.com>
> To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
> Sent: Wed, Mar 12, 2014 8:33 pm
> Subject: [Coco] more MW-C cross platform issues
>
>
> apparently we cannot have the same member names for different structs like:
>
>
> typedef struct
> {
> char hiaddr;
> unsigned loaddr;
> } vaddr;
>
> typedef struct
> {
> char used;
> unsigned size;
> vaddr next;
> vaddr prev;
> } vdp_head;
>
> typedef struct
> {
> unsigned size;
> long next;
> long prev;
> } line_head;
>
>
> changing the second to: _size, _next and _prev does compile.
>
>
> --
> Long live the CoCo
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>
More information about the Coco
mailing list