-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Argparsing for output modules #34
Comments
I second that motion! (but @vifino still is the owner ^^) |
But you already got arguments for output modules...? |
|
@vifino I know about the argstrings. But it would be simpler to use int init(int argc, char **argv), than parsing those argstrings in every output module. |
I see. While I get your point, for me, having a rather universal way to handle arguments is more important. You'd have to pass the remaining arguments to the output module, which isn't that helpful. |
Well I tought of a conversion from argstring to argc/argv and pass this to the modules and then have a loop in the module to get the arguments from the argc/argv. This can be done easily with arg.h from 20h. Code would look like this:
On error the parser will return: |
That's not too bad, but I think I still prefer something like |
Arguments should be passed to output modules to get rid of the defines, i.e. in out_sdl2.
When simply just -[any character] would be enough then 20h's arg.h could be used.
I have some code ready to use if this adequate.
The text was updated successfully, but these errors were encountered: