cdefs
Describe C function prototypes in JSON.
const char*
=>
"get_name": "returns": "const char*" "arguments": "name": "id" "type": "int"
Install
$ npm install cdefs -g
Usage
from command-line
$ cdefs [-o output_file] [file1, [file2, [...]]]
Inspect ex1.c
and ex2.c
and print prototypes to stdout
.
$ cdefs example/ex1.c example/ex2.c
Inspect ex2.c
and save prototypes to ex2.json
:
$ cdefs example/ex2.c -o ex2.json
from your module
var cdefs = ;
Get the prototypes for ex1.c
:
var fs = src = fs prototypes = ;
Contribute
Contributions are welcome.