From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id CC6111F47C for ; Wed, 11 Jan 2023 22:25:41 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=clisp.org header.i=@clisp.org header.a=rsa-sha256 header.s=strato-dkim-0002 header.b=ZIj6ERiz; dkim-atps=neutral Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFjXD-0001bN-7F; Wed, 11 Jan 2023 17:25:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFjXA-0001aw-WC for bug-gnulib@gnu.org; Wed, 11 Jan 2023 17:25:25 -0500 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.23]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFjX8-0000bw-QD for bug-gnulib@gnu.org; Wed, 11 Jan 2023 17:25:24 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1673475919; cv=none; d=strato.com; s=strato-dkim-0002; b=otk0QJn2h5cbhFxzkpocG2JYjzKksMooqzCETYFKoURLj1sEAy59njDqZAJyMVJwoI ajAN82jI7DlQINOniy3b+95TiCjCa+HnWIDWXgZ9t159ujijGk8DkWd9Ag6p7XqqvFXu 1k+SABR1IcL0Mivw5B3JxmaLnqcMC57EY9JFat7bPAsHG88i2ihSo8LSjyIJh7itUuVn t0WbyvTBz6OXK+y3yo60zWtgEUpDorGoJiST6aNBwX9pi/EC1MUx33arQjKD88oYXhG7 Z/IeX3y56CBxpp/hZkZgce9gXCyecbUS7XXSfRSf2J3GS9AZexP3LOJH77uEg1n9uyao AFVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1673475919; s=strato-dkim-0002; d=strato.com; h=Message-ID:Date:Subject:To:From:Cc:Date:From:Subject:Sender; bh=G4EyLe/ZUGYU5Alcu+It9SA30WFi7HQpBgqjRGJFpPY=; b=k2ezexWXkgnpv2DJLd2cURStutwWQN3ZNe3Sh08ZilBa3tQfos4R4ajiv45fgAFinS 5I6G+jPLfhgwk4rPURCtJgAASEDTKLg0rM9Xna2wrcTzNZ/JCx5CmLNHUHAoVdL/eRci KCpESM93m1h8ikZ7mBHtmz9UvIQa51bfmOf1GCzUXXflD70uv9lipUGTbWy4BChxoNja sg6MKdZoIvo889+UEXVdh7wq+XVZ5pjsSi87T1q9aBv+61WzKAebX0pyNF/BTD6bSW1Y djtU62KiqYfT3s4oH4v6npHgACl4mcQvnuGWc5hDHeh43R6G1fM2JO+dx8TFuHSSGEY7 9HJA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1673475919; s=strato-dkim-0002; d=clisp.org; h=Message-ID:Date:Subject:To:From:Cc:Date:From:Subject:Sender; bh=G4EyLe/ZUGYU5Alcu+It9SA30WFi7HQpBgqjRGJFpPY=; b=ZIj6ERizVRHjMyxXmmUfCgJdXWsVSQK/tw0I1d9fb3RbWIfXWR5p2koC7ljxaoezJF r5tD4QhH3nB7LQY/dzbEAO+80YiL4oOo3+mUEjsXqqym1srAdPfTVzXxO8WNrGrdxNPp rNMnRtoGaGLvU8gm7bavYKs+80eHfBDpS+ETmJb1iwxyBwxN69a/ZS9sRFHHOre9Pahi WSfUo+Qh99majUCPv9VU+UpGIG/pIAN9rBcnDiHfgdR/S1ekwS4JFC/kvNXcjRZVgsiy jpjO6TdZPB2CVTS/AwJIWUhHliKW6QYU0DnyjrefyJgqKmgEUrFIhKleapFWPR/qFSIY vVoA== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH0WWb0LN8XZoH94zq68+3cfpOV1KfevSn/sVBN8TS9zA9aoIqWAw==" Received: from nimes.localnet by smtp.strato.de (RZmta 48.6.2 AUTH) with ESMTPSA id I8f358z0BMPH2xf (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 11 Jan 2023 23:25:17 +0100 (CET) From: Bruno Haible To: bug-gnulib@gnu.org Subject: xstrtol-error: Improve comments Date: Wed, 11 Jan 2023 23:25:17 +0100 Message-ID: <3335674.NQBDW4tYnK@nimes> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=85.215.255.23; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org 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 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_ */