Fwd: Re: [airstrike] CVS accounts

Eero Tamminen oak at welho.com
Mon May 31 13:29:44 EDT 2004


----------  Forwarded Message  ----------

Subject: Re: [airstrike] CVS accounts
Date: Sunday 30 May 2004 18:35
From: Eero Tamminen <oak at welho.com>
To: machiel at bsdfreaks.nl
Cc: Ulf Ekström <ulfek at ifm.liu.se>

Hi,

> > Unfortunately there are still problems with adding new CVS users. I
> > have reported the bug again and hope that it will be fixed soon. In
> > the meantime you can send patches to me and I can apply them if I like
> > them.
>
> I will wait until a have CVS access to airstrike.

I looked at your CVS commits.  A couple of comments:
- Your casts in msg_types.h, level.c break compilation, you cast
  the return values to different types than what the functions return +
  gcc didn't know what's __cdecl (MS compilers have a lot of this non-
  standard stuff).
  -> I fixed them for unix & comited the fixes
      Please check whether they compile on your setup
- Please don't just blindly change '|=' and '&=' to '=' just because MS-VC
  doesn't handle it, that changes the functionality! Would MS-VC work
  if you just add a cast from the enum value to int? (in bonus.c, draco.c,
  zeppelin.c)
  -> please fix these back
- In mech.c, you've changed the code when you commented out the call to
  a return function, the function call changed the attributes of the sprite
  so that doesn't go through the background (like it did with your change)
  -> I fixed this & comited the fix
- Your changes add CRs to the middle code, please use an editor or
  CVS frontend that that handles newlines correctly (uses just LF).
  It's bad when some lines have CR+LF and other lines have
  just LF. If your editor / CVS frontend would convert everything to
  CR+LF, then when we change each other's source files, CVS would
  mark all lines as changed!
  -> Please fix your editor / CVS frontend
- It's better to have target OS specific ifdefs in header files than
  sprinkle the stuff to code files.  I did & comited the following changes:
  - Moved the M_PI check & define from biplane.c to maths.h
  - Instead of ifdefs for chdir() & <unistd.h> in testengine.c, I added
    a "unistd.h" header which either includes the <unistd.h> or
    (for Windows) declares a dummy chdir().
  -> Please check whether these changes work on your setup.

I would prefer if you would go though all your changes to make sure
there are no other subtle changes to how the code works and that all rest
 of your casts are right (e.g. pointers are really cast to pointers). A
 warning is much preferable to wrong cast hiding a problem.

I think it's preferable to use in casts the typedef'ed version of the type,
that would be a bit more consistent as e.g. "sprite_t *" is currently used
throughout the code instead of "struct sprite *" you've used in the casts.
This is matter of taste though, not so important :-).


Btw. can you select C99 option for MS-VC?  We'd like to use structure
initializers and inlines that were added in C99 standard, but AFAIK earlier
Ulf had needed to to add kludges for those because the newer C-standard
wasn't supported by Windows.


	- Eero

-------------------------------------------------------



More information about the airstrike mailing list