1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:47:35 +00:00

LibC: Implement the getsubopt function

This is a LibC function that POSIX defines to help userspace programs
to get suboptions. An example of a suboption is the token "pixclk" from
a Shell command running "edid-decode --gtf w=1024,h=768,pixclk=48".
The function should be run in a while loop to acquire all suboptions
until the last one.
This commit is contained in:
Liav A 2022-05-21 19:40:26 +03:00 committed by Linus Groh
parent 410b2f5d29
commit e02da2ed41
3 changed files with 53 additions and 0 deletions

View file

@ -167,5 +167,6 @@ extern int optreset;
extern char* optarg;
int getopt(int argc, char* const* argv, char const* short_options);
int getsubopt(char** optionp, char* const* tokens, char** valuep);
__END_DECLS