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

Function quote_name_width

src/ls.c:4646–4664  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4644}
4645
4646static size_t
4647quote_name_width (char const *name, struct quoting_options const *options,
4648 int needs_general_quoting)
4649{
4650 char smallbuf[BUFSIZ];
4651 char *buf = smallbuf;
4652 size_t width;
4653 bool pad;
4654
4655 quote_name_buf (&buf, sizeof smallbuf, (char *) name, options,
4656 needs_general_quoting, &width, &pad);
4657
4658 if (buf != smallbuf && buf != name)
4659 free (buf);
4660
4661 width += pad;
4662
4663 return width;
4664}
4665
4666/* %XX escape any input out of range as defined in RFC3986,
4667 and also if PATH, convert all path separators to '/'. */

Callers 1

fileinfo_name_widthFunction · 0.85

Calls 1

quote_name_bufFunction · 0.85

Tested by

no test coverage detected