Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2001:
[Freeciv-Dev] Re: (offtopic) C subscripts; was Re: Compiler-warnings
Home

[Freeciv-Dev] Re: (offtopic) C subscripts; was Re: Compiler-warnings

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Reinier Post <rp@xxxxxxxxxx>
Cc: Dirk Stoecker <stoecker@xxxxxxxxxxxxxx>, freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: (offtopic) C subscripts; was Re: Compiler-warnings
From: Gaute B Strokkenes <gs234@xxxxxxxxx>
Date: 27 Jan 2001 14:35:11 +0000

On Fri, 26 Jan 2001, rp@xxxxxxxxxx wrote:

>> So lets take another example. On Amiga there are some structures,
>> which have negative offset fields. And I still prefer to access
>> them *(seglist-1) instead of seglist[-1] :-)
> 
> Wow, I didn't know structures with negative offsets were actually
> used by *design*.

Backwards compatibility.  They couldn't make the struct any larger at
the end without breaking things, so they added an extra field right
before the start of the structure proper.  This sort of thing goes on
all the time in C++ as well, but it's all hidden behind the scenes.

-- 
Big Gaute                               http://www.srcf.ucam.org/~gs234/
Join the PLUMBER'S UNION!!



[Prev in Thread] Current Thread [Next in Thread]