xboard-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XBoard-devel] C89/C99/ANSI compliance - cleanups needed?


From: Thomas Adam
Subject: Re: [XBoard-devel] C89/C99/ANSI compliance - cleanups needed?
Date: Mon, 23 Mar 2015 01:50:53 +0000

On 23 March 2015 at 01:45, Tim Mann <address@hidden> wrote:
> That sounds like an OK idea to me. xboard has a long history and at one time
> needed to be able to build with K&R and/or other older compilers. I doubt
> there is any need for that anymore. I don't have a strong opinion on exactly
> which version of the ANSI C standard would be best to target.

Well, a first step is to get rid of the P macro.  I've started to
semi-automate this here:

https://github.com/ThomasAdam/xboard/tree/ta/tidy-prototypes

It's a work in progress, but it's a simple thing to do, and won't
break anything, since the actual prototypes themselves aren't
changing.  Thus far, the change has a few things of note:

* Lots of prototypes/function definitions used () rather than (void);
* There were a few true K&R function prototypes, they've been converted.

I've tried to chunk the changes out per-file so that review is easier.
Hopefully there's nothing too shocking of note there.  It certainly
all compiles still which is the main thing, and still works.

> One thing to be careful of is that the code shared with WinBoard needs to
> build with whatever Windows compiler(s) we care about. At one time that was
> some old version of MSVC that I owned a copy of, then that plus gcc. HG will
> hopefully weigh in on what compiler he uses.

Yes, this is being discussed in another thread.  I'm very mindful not
to break the windows front-end, although I can't guarantee that won't
always happen, as I have no ability to compile this myself, and the
cross-compilation on linux is broken.  I might look at this later on.

-- Thomas Adam



reply via email to

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