[Freeciv-Dev] Re: Map coordinate cleanups.
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, 16 Aug 2001, Kevin Brown wrote:
> Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> > > So, the rule is: in C source, call the same functions with the same names,
> > > and use different names for different functions (and, slightly different
> > > names for slightly different functions, like my_* variants). How the
> > > `ffs' function name will lead to the actual implementation it's a
> > > linker job, and the C compiler (and the C source human reader) should
> > > not be concerned (well, not while compiling/reading the module that uses
> > > that
> > > function).
> > > I call that abstraction, too.
> >
> > Also if names are prefixed with "my_" you get an extra layer where you
> > can put code. Like the check for no memory in the malloc() case.
>
> Yep. Basically, if what you want has different semantics (an extra
> check for out of memory conditions, for instance) than the base thing,
> then call it my_whatever().
>
> If it has the same semantics as some other function that exists on at
> least some systems, then let configure check for its existence on the
> system and put your own version somewhere in the source that will be
> used if configure fails to find it on the system. Configure can also
> be used to check for the expected semantics, and fall back to using
> the Freeciv-supplied version if the semantics of the system function
> are different than expected.
That's precisely my point. The name depends on what the function does,
not on where, how (and why) it's implemented.
.TM.
--
____/ ____/ /
/ / / Marco Colombo
___/ ___ / / Technical Manager
/ / / ESI s.r.l.
_____/ _____/ _/ Colombo@xxxxxx
- [Freeciv-Dev] Re: Map coordinate cleanups., (continued)
[Freeciv-Dev] Re: Map coordinate cleanups., Raimar Falke, 2001/08/16
- [Freeciv-Dev] Re: Map coordinate cleanups., Andreas Kemnade, 2001/08/16
- [Freeciv-Dev] Re: Map coordinate cleanups., Raimar Falke, 2001/08/16
- [Freeciv-Dev] Re: Map coordinate cleanups., Marco Colombo, 2001/08/16
- [Freeciv-Dev] Re: Map coordinate cleanups., Raimar Falke, 2001/08/16
- [Freeciv-Dev] Re: Map coordinate cleanups., Marco Colombo, 2001/08/16
- [Freeciv-Dev] Re: Map coordinate cleanups., Raimar Falke, 2001/08/16
- [Freeciv-Dev] Re: Map coordinate cleanups., Kevin Brown, 2001/08/16
- [Freeciv-Dev] Re: Map coordinate cleanups.,
Marco Colombo <=
[Freeciv-Dev] Re: Map coordinate cleanups., Gaute B Strokkenes, 2001/08/16
[Freeciv-Dev] Re: Map coordinate cleanups., Kevin Brown, 2001/08/16
[Freeciv-Dev] Re: Map coordinate cleanups., Trent Piepho, 2001/08/16
[Freeciv-Dev] Re: Map coordinate cleanups., Gregory Berkolaiko, 2001/08/16
|
|