November 12th, 2009
Quick, what is "char (*(*(* const x[3])())[5])(int)?"

If you immediately blurted out "x­is­an­array­of­three­const­pointers­to­functions­returning­pointers­to­arrays­of­five­pointers­to­functions­taking­int­returning­char", and your last name doesn't end with "itchie," then chances are you used my new website:

Yes, the venerable cdecl - the C gibberish to English translator - is now online. With AJAX! Every C declaration will be as an open book to you! Your coworkers' scruffy beards and suspenders will be nigh useless!

Write C casts and declarations in plain English! Write plain English in the chicken scratchings and line noise we call C! The possibilities are twain!

(Click here to try it with that declaration!) gets better! Did I mention that my version of cdecl supports blocks? That's right, now you can totally nail that API that requires a block taking a pointer to a block taking a block taking a pointer to an int returning an int returning a pointer to a block taking void returning int!

This site:

  • Converts readable English variable declarations or typecasts to C
  • Converts C variable declarations or typecasts to English
  • Supports Apple's blocks extension to C
  • Uses AJAX and has nifty effects
  • Allows you to generate permalinks, so you can send hilarious declarations to your friends, or add them gratuitously to your blog
A note on licensing. The cdecl readme states:
You may well be wondering what the status of cdecl is. So am I. It was twice posted to comp.sources.unix, but neither edition carried any mention of copyright. This version is derived from the second edition. I have no reason to believe there are any limitations on its use, and strongly believe it to be in the Public Domain.
I hereby place my blocks changes to cdecl in the public domain. The cdecl source code, including my changes, is available for download on the site.