MCPcopy Create free account
hub / github.com/coreutils/coreutils / xstrxfrm

Function xstrxfrm

src/sort.c:2277–2293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2275/* This is like strxfrm, except it reports any error and exits. */
2276
2277static size_t
2278xstrxfrm (char *restrict dest, char const *restrict src, size_t destsize)
2279{
2280 errno = 0;
2281 size_t translated_size = strxfrm (dest, src, destsize);
2282
2283 if (errno)
2284 {
2285 error (0, errno, _("string transformation failed"));
2286 error (0, 0, _("set LC_ALL='C' to work around the problem"));
2287 error (SORT_FAILURE, 0,
2288 _("the original string was %s"),
2289 quotearg_n_style (0, locale_quoting_style, src));
2290 }
2291
2292 return translated_size;
2293}
2294
2295/* Compare the keys TEXTA (of length LENA) and TEXTB (of length LENB)
2296 using one or more random hash functions. TEXTA[LENA] and

Callers 1

compare_randomFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected