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

Function format_user_or_group

src/ls.c:4158–4174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4156 print width of WIDTH columns. */
4157
4158static void
4159format_user_or_group (char const *name, uintmax_t id, int width)
4160{
4161 if (name)
4162 {
4163 int name_width = mbswidth (name, MBSWIDTH_FLAGS);
4164 int width_gap = name_width < 0 ? 0 : width - name_width;
4165 int pad = MAX (0, width_gap);
4166 dired_outstring (name);
4167
4168 do
4169 dired_outbyte (' ');
4170 while (pad--);
4171 }
4172 else
4173 dired_pos += printf ("%*ju ", width, id);
4174}
4175
4176/* Print the name or id of the user with id U, using a print width of
4177 WIDTH. */

Callers 3

format_userFunction · 0.85
format_groupFunction · 0.85
print_long_formatFunction · 0.85

Calls 2

dired_outstringFunction · 0.85
dired_outbyteFunction · 0.85

Tested by

no test coverage detected