| 94 | /* Count and return the number of ampersands in STR. */ |
| 95 | |
| 96 | ATTRIBUTE_PURE |
| 97 | static idx_t |
| 98 | count_ampersands (char const *str) |
| 99 | { |
| 100 | idx_t count = 0; |
| 101 | for (; *str; str++) |
| 102 | count += *str == '&'; |
| 103 | return count; |
| 104 | } |
| 105 | |
| 106 | /* Create a string (via xmalloc) which contains a full name by substituting |
| 107 | for each ampersand in GECOS_NAME the USER_NAME string with its first |