The Citrine Citadel


Cdecl99

Cdecl99 is a tool to help construct or understand complicated C declarations. Inspired by the venerable cdecl, which predates C’s standardization in 1989, cdecl99 implements more or less the same concept but for modern C.

Unlike the original cdecl, cdecl99 supports all relevant C99 keywords, has no undue restrictions on identifiers, understands features such as complex types, variadic functions and named parameters, and also has the ability to parse “plain” type names (which do not declare an identifier).

At this time there is no support for new declaration syntax introduced in C11, including atomic types, _Alignas, _Thread_local or _Noreturn specifers.

The package includes both an executable program (cdecl99) and a library (libcdecl) which can be used by other programs to provide cdecl-like functionality.

Obtaining Cdecl99

All released files are available from the cdecl99 archive directory. The latest development sources may be browsed online or cloned directly using git, e.g.,

git clone https://git.draconx.ca/cdecl99.git

The most recent release is version 1.1, released on 2021-03-13. Source code for this version is available in cdecl99-1.1.tar.gz (signature). Noteworthy changes in this release:

Use the signature file to verify that the corresponding source bundle is intact. After downloading both files, if GnuPG is installed, the signature can be verified with a command like:

gpg --verify cdecl99-1.1.tar.gz.sig

If the verification fails because you don’t have the required public key, that key can be imported with a command such as:

gpg --keyserver keys.gnupg.net --recv-keys 5B45D3D185B8E1F6

Then run the verify command again.

Prerequisites

Cdecl99 is writtin in C, so a working C compiler is required. Certain optional features depend on the use of external libraries. In particular,

Contributing

Please send suggestions, bug reports, patches or any other correspondence regarding cdecl99 by electronic mail to Nick Bowler <nbowler@draconx.ca>.

License

Cdecl99 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License or (at your option) any later version.