r2dec-js icon indicating copy to clipboard operation
r2dec-js copied to clipboard

Option to spit .h instead of .c

Open radare opened this issue 7 years ago • 2 comments

Just to get the function definitions so it can be used to call functions from an object or dylib without having to do that by hand.

#define FCN
FCN int sumstuff(int a, int b);
FCN void printstring(const char *str);
...

this way the user can later edit this define to be export, static, etc... and write the main at the bottom

radare avatar Sep 05 '18 11:09 radare

shouldn't this be easily done in r2? i mean seems useful, but i was wondering if it was more appropriate for r2 or r2dec

wargio avatar Sep 05 '18 14:09 wargio

I would move the "#include" directives there too, instead of appearing on top of every function.

elicn avatar Sep 08 '18 17:09 elicn