Index: [thread] [date] [subject] [author]
  From: Marcus Sundberg <e94_msu@e.kth.se>
  To  : ggi-develop@eskimo.com
  Date: Fri, 17 Jul 1998 12:31:09 +0200

Re: GGI_AUTO

Hartmut Niemann wrote:
> 
> > Andrew Apted wrote:
> > >
> > > Would the person who changed GGI_AUTO to 0 kindly change it back to -1.
> > > There was NO agreement to change it !  The value 0 breaks some intended
> > > purposes for this value (e.g. ggiSetPalette), and possibly future uses
> > > where 0 is a valid parameter.
> >
> > Well, if that's the general opinion I'll change GGI_AUTO back
> > to -1. GT_AUTO will dissapear as it's obviously already causing
> > confusion. The value 0 will then be used for graphtypes.
> >
> Well, the problem lies somewhere else.
> GGI_AUTO is an I-don_t-care integer. It is used for mode sizes (pixels
> per line/column ...) and ggiSetPalette, currently. So it should be an
> integer value that is invalid everywhere, and -1 fits perfect here.
> But OTOH if software was bugfree, changing GGI_AUTO to -42 shouldn't break
> anything (after a complete recompile/reinstall, that is.) So actually it
> would be worthwile to change it to -2 and make +that* work again.
> But it looks like -1 is hard coded somewhere.
> 
> The graphtype is an integer too, but that's coincidence. So that
> you can do mode.graphtype=GGI_AUTO is nothing to depend on.
> BTW: Modula or Pascal would have complained loudly  ...
> 
> The problem is: how does an application specify Pick-a-mode-yourself?
> IMHO some GT_AUTO is needed here. Whether you choose -1 or 0 or 33 does
> not matter, as long as it is, in itself, an otherwise invalid mode type.

0 is an absolute neccesity when we're dealing with graphtypes, as 
graphtypes are made up of several bytes of info. If GGI_AUTO is
-1 you can't do (GT_TRUECOLOR | GGI_AUTO) ...

And having two different symbolic constants meaning the same
thing is obviously already causing confusion, so GT_AUTO is
a NO-NO.

That's why I still think GGI_AUTO == 0 is the ideal solution.
Using the same "auto" value for ggiSetPalette() and all ggi_mode
entries execpt the graphtype, instead of having the same for
ggi_mode AND grapthtype and a different one for ggiSetPalette()
is so bizzare I don't know what to say...

//Marcus

Index: [thread] [date] [subject] [author]