]> Savannah Git Hosting - gnulib.git/commitdiff
xstrtol: Improve documentation.
authorBruno Haible <bruno@clisp.org>
Fri, 19 Jul 2024 16:45:28 +0000 (18:45 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 19 Jul 2024 16:45:28 +0000 (18:45 +0200)
* lib/xstrtol.h: Don't test _STRTOL_ERROR, left-over from 2007-08-08.
(_DECLARE_XSTRTOL): Add the parameter names, referenced by the comments.

ChangeLog
lib/xstrtol.h

index fb6b7eba58b24b446f352d3a9a637dc618aef041..31ed29ac61077ec990a5f7f79f734df5ac79335a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-07-19  Bruno Haible  <bruno@clisp.org>
+
+       xstrtol: Improve documentation.
+       * lib/xstrtol.h: Don't test _STRTOL_ERROR, left-over from 2007-08-08.
+       (_DECLARE_XSTRTOL): Add the parameter names, referenced by the comments.
+
 2024-07-18  Paul Eggert  <eggert@cs.ucla.edu>
 
        xstrtol: document and stray less from strtol
index cedff6393ef52ac29965d249b23ad570b88be5be..10b48cac4eca711dddac470a6df6de3deeda56f2 100644 (file)
@@ -27,7 +27,6 @@ extern "C" {
 #endif
 
 
-#ifndef _STRTOL_ERROR
 enum strtol_error
   {
     LONGINT_OK = 0,
@@ -42,7 +41,6 @@ enum strtol_error
     LONGINT_INVALID = 4
   };
 typedef enum strtol_error strtol_error;
-#endif
 
 /* Act like the system's strtol (NPTR, ENDPTR, BASE) except:
    - The TYPE of the result might be something other than long int.
@@ -59,8 +57,11 @@ typedef enum strtol_error strtol_error;
      'c' for 1, and 'w' for 2.  */
 
 #define _DECLARE_XSTRTOL(name, type) \
-  strtol_error name (char const *restrict, char **restrict, int, \
-                     type *restrict, char const *restrict);
+  strtol_error name (char const *restrict /*nptr*/,             \
+                     char **restrict /*endptr*/,                \
+                     int /*base*/,                              \
+                     type *restrict /*val*/,                    \
+                     char const *restrict /*valid_suffixes*/);
 _DECLARE_XSTRTOL (xstrtol, long int)
 _DECLARE_XSTRTOL (xstrtoul, unsigned long int)
 _DECLARE_XSTRTOL (xstrtoll, long long int)