Skip to content

Instantly share code, notes, and snippets.

@shawnchin
Created October 26, 2011 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shawnchin/1316366 to your computer and use it in GitHub Desktop.
Save shawnchin/1316366 to your computer and use it in GitHub Desktop.
Dummy complex.h to allow splint to work
/*
Dummy header file for complex.h
This file suppresses the relevant keywords and replaces constants/functions
with dummy ones so splint doesn't choke.
Keywords derived from :
http://pubs.opengroup.org/onlinepubs/009604499/basedefs/complex.h.html
*/
/* Keywords */
#define complex _Complex
#define _Complex
/* Constant expressions */
#define _Complex_I I
#define imaginary _Imaginary
#define _imaginary_I _Imaginary
#define _Imaginary I
#define I 1.0
/* functions */
#define cabs(x) x
#define cabsf(x) x
#define cabsl(x) x
#define cacos(x) x
#define cacosf(x) x
#define cacosh(x) x
#define cacoshf(x) x
#define cacoshl(x) x
#define cacosl(x) x
#define carg(x) x
#define cargf(x) x
#define cargl(x) x
#define casin(x) x
#define casinf(x) x
#define casinh(x) x
#define casinhf(x) x
#define casinhl(x) x
#define casinl(x) x
#define catan(x) x
#define catanf(x) x
#define catanh(x) x
#define catanhf(x) x
#define catanhl(x) x
#define catanl(x) x
#define ccos(x) x
#define ccosf(x) x
#define ccosh(x) x
#define ccoshf(x) x
#define ccoshl(x) x
#define ccosl(x) x
#define cexp(x) x
#define cexpf(x) x
#define cexpl(x) x
#define cimag(x) x
#define cimagf(x) x
#define cimagl(x) x
#define clog(x) x
#define clogf(x) x
#define clogl(x) x
#define conj(x) x
#define conjf(x) x
#define conjl(x) x
#define cpow(x, y) x
#define cpowf(x, y) x
#define cpowl(x, y) x
#define cproj(x) x
#define cprojf(x) x
#define cprojl(x) x
#define creal(x) x
#define crealf(x) x
#define creall(x) x
#define csin(x) x
#define csinf(x) x
#define csinh(x) x
#define csinhf(x) x
#define csinhl(x) x
#define csinl(x) x
#define csqrt(x) x
#define csqrtf(x) x
#define csqrtl(x) x
#define ctan(x) x
#define ctanf(x) x
#define ctanh(x) x
#define ctanhf(x) x
#define ctanhl(x) x
#define ctanl(x) x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment