1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:07:45 +00:00

LibC: Ensure getopt error messages end with a newline

This is what POSIX seems to specify, and also what glibc getopt does.
This commit is contained in:
Sergey Bugaev 2019-09-17 21:41:48 +03:00 committed by Andreas Kling
parent e9dd94063f
commit 3824f572ef

View file

@ -113,16 +113,16 @@ static int nonopt_start = -1; /* first non option argument (for permute) */
static int nonopt_end = -1; /* first option after non options (for permute) */
/* Error messages */
static const char recargchar[] = "option requires an argument -- %c";
static const char illoptchar[] = "illegal option -- %c"; /* From P1003.2 */
static const char recargchar[] = "option requires an argument -- %c\n";
static const char illoptchar[] = "illegal option -- %c\n"; /* From P1003.2 */
static int dash_prefix = NO_PREFIX;
static const char gnuoptchar[] = "invalid option -- %c";
static const char gnuoptchar[] = "invalid option -- %c\n";
static const char recargstring[] = "option `%s%s' requires an argument";
static const char ambig[] = "option `%s%.*s' is ambiguous";
static const char noarg[] = "option `%s%.*s' doesn't allow an argument";
static const char illoptstring[] = "unrecognized option `%s%s'";
static const char recargstring[] = "option `%s%s' requires an argument\n";
static const char ambig[] = "option `%s%.*s' is ambiguous\n";
static const char noarg[] = "option `%s%.*s' doesn't allow an argument\n";
static const char illoptstring[] = "unrecognized option `%s%s'\n";
/*
* Compute the greatest common divisor of a and b.