#ifndef FUNCPROTO_H
#define FUNCPROTO_H

#if __STDC__ || defined(__cplusplus)
#  undef WANT_PROTOTYPES
#endif

#ifdef WANT_PROTOTYPES
#  define DOPROTO
#  define ELLIPSIS
#endif

#ifdef __cplusplus
#  define DOPROTO
#  define ELLIPSIS ...
#  define C_LINKAGE_BEGIN extern "C" {
#  define C_LINKAGE_END   }
#else
#  define C_LINKAGE_BEGIN
#  define C_LINKAGE_END
#endif

#if __STDC__ && !defined(__cplusplus)
#  define DOPROTO
#  define ELLIPSIS
#endif

#ifdef NO_PROTOTYPES
#  undef DOPROTO
#endif

#ifdef DOPROTO
#  define P_(args) args
#else
#  define P_(args) ()
#  define ELLIPSIS
#endif

#undef DOPROTO

#endif
