From: Siddhesh Poyarekar Date: Wed, 4 May 2022 10:26:47 +0000 (+0530) Subject: manual: Clarify that abbreviations of long options are allowed X-Git-Tag: upstream/2.36~316 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db1efe02c9f15affc3908d6ae73875b82898a489;p=platform%2Fupstream%2Fglibc.git manual: Clarify that abbreviations of long options are allowed The man page and code comments clearly state that abbreviations of long option names are recognized correctly as long as they are unique. Document this fact in the glibc manual as well. Signed-off-by: Siddhesh Poyarekar Reviewed-by: Florian Weimer Reviewed-by: Andreas Schwab --- diff --git a/manual/getopt.texi b/manual/getopt.texi index 5485fc4..b4c0b15 100644 --- a/manual/getopt.texi +++ b/manual/getopt.texi @@ -250,7 +250,8 @@ option, and stores the option's argument (if it has one) in @code{optarg}. When @code{getopt_long} encounters a long option, it takes actions based on the @code{flag} and @code{val} fields of the definition of that -option. +option. The option name may be abbreviated as long as the abbreviation is +unique. If @code{flag} is a null pointer, then @code{getopt_long} returns the contents of @code{val} to indicate which option it found. You should