You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this would be a little more convenient to use if it generated a header file with just DocoptArgs and docopt(). The use case for this would be a program that deals with parsed arguments in many places.
If the parsed arguments (DocoptArgs) are needed in different files that are eventually linked together, we can't just do #include "docopt.c" like in the main file, since we would be redefining various variables and functions. We would instead have to redefine just the struct in each file that the parsed arguments are needed.
The text was updated successfully, but these errors were encountered:
I wouldn't mind taking this on myself, if I knew what CLI options I should add.
I was thinking of -H <path> and --output-header <path> that would set the destination for the header. The question then would be the path that .c file uses to include the header (should it be relative? assume it's in the same directory?).
Another option would be that if -o (or --output-name) is used, then we swap the extension with .h for the header and let the .c file assume it's in the same directory.
This is more of a brainstorm, but any thoughts are appreciated.
I think this would be a little more convenient to use if it generated a header file with just
DocoptArgs
anddocopt()
. The use case for this would be a program that deals with parsed arguments in many places.If the parsed arguments (
DocoptArgs
) are needed in different files that are eventually linked together, we can't just do#include "docopt.c"
like in the main file, since we would be redefining various variables and functions. We would instead have to redefine just the struct in each file that the parsed arguments are needed.The text was updated successfully, but these errors were encountered: