mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-21 03:12:48 +02:00
maint: use "char const *" rather than "const char *"
* cfg.mk (sc_prohibit-const-char): Add a new syntax-check to enforce this style. * *.[ch]: sed -i 's/const char \*/char const */g'
This commit is contained in:
@@ -109,14 +109,14 @@ mbs_align_pad (char *dest, const char* dest_end, size_t n_spaces)
|
||||
Update *WIDTH to indicate how many columns were used before padding. */
|
||||
|
||||
size_t
|
||||
mbsalign (const char *src, char *dest, size_t dest_size,
|
||||
mbsalign (char const *src, char *dest, size_t dest_size,
|
||||
size_t *width, mbs_align_t align, int flags)
|
||||
{
|
||||
size_t ret = SIZE_MAX;
|
||||
size_t src_size = strlen (src) + 1;
|
||||
char *newstr = NULL;
|
||||
wchar_t *str_wc = NULL;
|
||||
const char *str_to_print = src;
|
||||
char const *str_to_print = src;
|
||||
size_t n_cols = src_size - 1;
|
||||
size_t n_used_bytes = n_cols; /* Not including NUL */
|
||||
size_t n_spaces = 0;
|
||||
@@ -245,7 +245,7 @@ mbsalign_cleanup:
|
||||
Return NULL on failure. */
|
||||
|
||||
char *
|
||||
ambsalign (const char *src, size_t *width, mbs_align_t align, int flags)
|
||||
ambsalign (char const *src, size_t *width, mbs_align_t align, int flags)
|
||||
{
|
||||
size_t orig_width = *width;
|
||||
size_t size = *width; /* Start with enough for unibyte mode. */
|
||||
|
||||
@@ -52,8 +52,8 @@ enum {
|
||||
};
|
||||
|
||||
size_t
|
||||
mbsalign (const char *src, char *dest, size_t dest_size,
|
||||
mbsalign (char const *src, char *dest, size_t dest_size,
|
||||
size_t *width, mbs_align_t align, int flags);
|
||||
|
||||
char *
|
||||
ambsalign (const char *src, size_t *width, mbs_align_t align, int flags);
|
||||
ambsalign (char const *src, size_t *width, mbs_align_t align, int flags);
|
||||
|
||||
@@ -29,7 +29,7 @@ smack_new_label_from_self (char **label)
|
||||
}
|
||||
|
||||
static inline int
|
||||
smack_set_label_for_self (const char *label)
|
||||
smack_set_label_for_self (char const *label)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
ERR is printed along with N_STR on error. */
|
||||
|
||||
__xdectoint_t
|
||||
__xnumtoint (const char *n_str, int base, __xdectoint_t min, __xdectoint_t max,
|
||||
const char *suffixes, const char *err, int err_exit)
|
||||
__xnumtoint (char const *n_str, int base, __xdectoint_t min, __xdectoint_t max,
|
||||
char const *suffixes, char const *err, int err_exit)
|
||||
{
|
||||
strtol_error s_err;
|
||||
|
||||
@@ -79,8 +79,8 @@ __xnumtoint (const char *n_str, int base, __xdectoint_t min, __xdectoint_t max,
|
||||
ERR is printed along with N_STR on error. */
|
||||
|
||||
__xdectoint_t
|
||||
__xdectoint (const char *n_str, __xdectoint_t min, __xdectoint_t max,
|
||||
const char *suffixes, const char *err, int err_exit)
|
||||
__xdectoint (char const *n_str, __xdectoint_t min, __xdectoint_t max,
|
||||
char const *suffixes, char const *err, int err_exit)
|
||||
{
|
||||
return __xnumtoint (n_str, 10, min, max, suffixes, err, err_exit);
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
# include <inttypes.h>
|
||||
|
||||
# define _DECLARE_XDECTOINT(name, type) \
|
||||
type name (const char *n_str, type min, type max, \
|
||||
const char *suffixes, const char *err, int err_exit);
|
||||
type name (char const *n_str, type min, type max, \
|
||||
char const *suffixes, char const *err, int err_exit);
|
||||
# define _DECLARE_XNUMTOINT(name, type) \
|
||||
type name (const char *n_str, int base, type min, type max, \
|
||||
const char *suffixes, const char *err, int err_exit);
|
||||
type name (char const *n_str, int base, type min, type max, \
|
||||
char const *suffixes, char const *err, int err_exit);
|
||||
|
||||
_DECLARE_XDECTOINT (xdectoimax, intmax_t)
|
||||
_DECLARE_XDECTOINT (xdectoumax, uintmax_t)
|
||||
|
||||
Reference in New Issue
Block a user