From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Subject: xstrtol-error: Improve comments
Date: Wed, 11 Jan 2023 23:25:17 +0100 [thread overview]
Message-ID: <3335674.NQBDW4tYnK@nimes> (raw)
The description of the function xstrtol_fatal mentions parameters ERR,
LONG_OPTION, OPT_IDX, etc. But the function's declaration lacks the
parameter names. So, in order to understand a comment in the .h file,
one needs to look into the declaration in the .c file. Weird!
This patch fixes it.
2023-01-11 Bruno Haible <bruno@clisp.org>
xstrtol-error: Improve comments.
* lib/xstrtol-error.h (xstrtol_fatal): Add parameter names to
declaration.
diff --git a/lib/xstrtol-error.h b/lib/xstrtol-error.h
index e79ff151ee..d8892ea871 100644
--- a/lib/xstrtol-error.h
+++ b/lib/xstrtol-error.h
@@ -28,7 +28,7 @@
ERR is the error code returned by one of the xstrto* functions.
Use OPT_IDX to decide whether to print the short option string "C"
- or "-C" or a long option string derived from LONG_OPTION. OPT_IDX
+ or "-C" or a long option string derived from LONG_OPTIONS. OPT_IDX
is -2 if the short option "C" was used, without any leading "-"; it
is -1 if the short option "-C" was used; otherwise it is an index
into LONG_OPTIONS, which should have a name preceded by two '-'
@@ -38,8 +38,9 @@
After reporting an error, exit with a failure status. */
-_Noreturn void xstrtol_fatal (enum strtol_error,
- int, char, struct option const *,
- char const *);
+_Noreturn void xstrtol_fatal (enum strtol_error /* err */,
+ int /* opt_idx */, char /* c */,
+ struct option const * /* long_options */,
+ char const * /* arg */);
#endif /* not XSTRTOL_ERROR_H_ */
reply other threads:[~2023-01-11 22:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3335674.NQBDW4tYnK@nimes \
--to=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).