-Subproject commit 1a72950760b1fce763ff834de0d545caab8a983c
+Subproject commit ff7c8b21e259fdc4bc721ed55519cfee06739efa
#include "fadvise.h"
#include "getndelim2.h"
#include "hash.h"
-#include "xstrndup.h"
#include "set-fields.h"
#include "obstack.h"
#include "quote.h"
#include "stdio--.h"
-#include "xstrndup.h"
/* The official name of this program (e.g., no 'g' prefix). */
#define PROGRAM_NAME "dircolors"
++p;
}
- *keyword = xstrndup (keyword_start, p - keyword_start);
+ *keyword = ximemdup0 (keyword_start, p - keyword_start);
if (*p == '\0')
return;
continue;
++p;
- *arg = xstrndup (arg_start, p - arg_start);
+ *arg = ximemdup0 (arg_start, p - arg_start);
}
/* FIXME: Write a string to standard out, while watching for "dangerous"
#include "error.h"
#include "fadvise.h"
#include "quote.h"
-#include "xstrndup.h"
#include "expand-common.h"
if (!DECIMAL_DIGIT_ACCUMULATE (tabval, *stops - '0', uintmax_t))
{
size_t len = strspn (num_start, "0123456789");
- char *bad_num = xstrndup (num_start, len);
+ char *bad_num = ximemdup0 (num_start, len);
error (0, 0, _("tab stop is too large %s"), quote (bad_num));
free (bad_num);
ok = false;
#include <sys/types.h>
#include "system.h"
#include "die.h"
-#include "xstrndup.h"
#include "expand-common.h"
#include "quote.h"
#include "system.h"
#include "xstrtol.h"
-#include "xstrndup.h"
#include "set-fields.h"
quote (fmt));
if (prefix_len)
- format_str_prefix = xstrndup (fmt, prefix_len);
+ format_str_prefix = ximemdup0 (fmt, prefix_len);
if (fmt[suffix_pos] != '\0')
format_str_suffix = xstrdup (fmt + suffix_pos);
#include "system.h"
#include "error.h"
#include "quote.h"
-#include "xstrndup.h"
#include "set-fields.h"
/* Array of `struct field_range_pair' holding all the finite ranges. */
complain only about the first number. */
/* Determine the length of the offending number. */
size_t len = strspn (num_start, "0123456789");
- char *bad_num = xstrndup (num_start, len);
+ char *bad_num = ximemdup0 (num_start, len);
error (0, 0, (options & SETFLD_ERRMSG_USE_POS)
?_("byte/character offset %s is too large")
:_("field number %s is too large"),
#include <sys/types.h>
#include "system.h"
#include "die.h"
-#include "xstrndup.h"
#include "expand-common.h"