Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2000:
[Freeciv-Dev] Re: OSF1 V4.0D 878 alpha port
Home

[Freeciv-Dev] Re: OSF1 V4.0D 878 alpha port

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gaute Strokkenes <gs234@xxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: OSF1 V4.0D 878 alpha port
From: Argiolas Nicola <nick@xxxxxxxxxxxxxx>
Date: Sat, 14 Oct 2000 14:21:05 +0200 (CEST)
Reply-to: Argiolas Nicola <argiolas@xxxxxxxxxxxxxx>

Hi Gaute!

On 13 Oct 2000, Gaute Strokkenes wrote:

> 
> An ANSI compiler is required...

        Behind the word ANSI there is world of problems... :( My K&R
manual reports that the #-commands can be started after an arbitrary
sequence of white spaces and this means that my preprocessor (but not the
compiler!) is not strictly ANSI and you're right.

        But now I ask you: is it better to leave that spaces in the code
(without IMHO making it more readable) or remove them and make the code
more portable?

> >     2. the char variables are unsigned by default in GCC,
> 
> You're wrong.  A char are signed by default in GCC, for consistency
> with other integer types.

        This is true (I've now done some tests) but in this case I simply
followed which K&R says: the signed keyword is introduced (in the ANSI
draft, in the 1988) to 'transform' a char in signed char, for the other
interger types this keyword is redundant... so GCC doesn't follow this
'rule'.

        But in this case (the xpm cursors and the icons) the problem is
another: XCreateBitmapFromData wants a char (i.e. in gcc a signed char)
string in the 'data' field but the datas passed are unsigned. GCC make a
casting without any warning (I've also tested this): I suppose because gcc
doesn't change anything in the conversion. In this case is better IMHO to
declare the cursors directly char (again, in gcc signed char), and again
the code becomes more portable.

        Bye!

        Nick




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