Why so many such declarations/definitions exist in XBoard-4.9.1 ?
For instance from backend.h :
Code: Select all
void SetWhiteToPlayEvent P((void));
Moderators: hgm, Rebel, chrisw
Code: Select all
void SetWhiteToPlayEvent P((void));
Code: Select all
#if defined(__STDC__) || defined(WIN32) || defined(_amigados)
#define P(args) args
typedef void *VOIDSTAR;
#else
#define P(args) ()
typedef char *VOIDSTAR;
#endif
Are not these #else some ancient compilers whom have no practical use at such a date ?hgm wrote: ↑Fri Oct 25, 2019 8:00 pm P() is a macro #defined in common.h, as
It seems to be there or compatibility purposes with compilers that do not allow the function prototypes to have formal parameters.Code: Select all
#if defined(__STDC__) || defined(WIN32) || defined(_amigados) #define P(args) args typedef void *VOIDSTAR; #else #define P(args) () typedef char *VOIDSTAR; #endif