+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
#endif
-#ifndef _STRTOL_ERROR
enum strtol_error
{
LONGINT_OK = 0,
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.
'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)