Re: [AD] Figuring out the language from the environment variable LANG

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Thu, Jan 23, 2003 at 10:08:44PM +0100, Eric Botcazou wrote:
> > > +      char lang[3] = "en";
> > >
> > > Kill the "3".
> >
> > Any particular reason? Specifying size is safer
> 
> Safer !?????

We don't share the same POV, that's all. It's safer to me because I
have the certainity that the string will always be three characters
long, and a modification of the string will turn into either
a startup crash during install_allegro, or a complete obvious
behaviour failure for everybody using something else than 'en'.

Try this patch instead, should give another example to the word
pedantic.

> > > Don't mix char[] and char* variables.
> > 
> > Why? It's funny...
> 
> I should have said: don't declare variables with different types
> on the same line.

I knew what you meant. I still consider it a funny language feature.

Attachment: environment_language.gz
Description: application/gunzip



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/