| 4644 | } |
| 4645 | |
| 4646 | static size_t |
| 4647 | quote_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 '/'. */ |
no test coverage detected