/* GNU's pinky.
- Copyright (C) 1992-1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1992-1997, 1999, 2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
last_change = 0;
}
- printf ("%-8.*s", (int) sizeof (utmp_ent->ut_name), utmp_ent->ut_name);
+ printf ("%-8.*s", (int) sizeof (UT_USER (utmp_ent)), UT_USER (utmp_ent));
if (include_fullname)
{
struct passwd *pw;
- char name[sizeof (utmp_ent->ut_name) + 1];
+ char name[sizeof (UT_USER (utmp_ent)) + 1];
- strncpy (name, utmp_ent->ut_name, sizeof (utmp_ent->ut_name));
- name[sizeof (utmp_ent->ut_name)] = '\0';
+ strncpy (name, UT_USER (utmp_ent), sizeof (UT_USER (utmp_ent)));
+ name[sizeof (UT_USER (utmp_ent))] = '\0';
pw = getpwnam (name);
if (pw == NULL)
printf (" %19s", " ???");
while (n--)
{
- if (utmp_buf->ut_name[0]
+ if (UT_USER (utmp_buf)[0]
#ifdef USER_PROCESS
&& utmp_buf->ut_type == USER_PROCESS
#endif
int i;
for (i = 0; i < argc_names; i++)
- if (strncmp (utmp_buf->ut_name, argv_names[i],
- sizeof (utmp_buf->ut_name)) == 0)
+ if (strncmp (UT_USER (utmp_buf), argv_names[i],
+ sizeof (UT_USER (utmp_buf))) == 0)
{
print_entry (utmp_buf);
break;
/* GNU's who.
- Copyright (C) 1992-1999 Free Software Foundation, Inc.
+ Copyright (C) 1992-2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
last_change = 0;
}
- printf ("%-8.*s", (int) sizeof (utmp_ent->ut_name), utmp_ent->ut_name);
+ printf ("%-8.*s", (int) sizeof (UT_USER (utmp_ent)), UT_USER (utmp_ent));
if (include_mesg)
printf (" %c ", mesg);
printf (" %-8.*s", (int) sizeof (utmp_ent->ut_line), utmp_ent->ut_line);
entries = 0;
while (n--)
{
- if (utmp_buf->ut_name[0]
+ if (UT_USER (utmp_buf)[0]
#ifdef USER_PROCESS
&& utmp_buf->ut_type == USER_PROCESS
#endif
while (n--)
{
- if (utmp_buf->ut_name[0]
+ if (UT_USER (utmp_buf)[0]
#ifdef USER_PROCESS
&& utmp_buf->ut_type == USER_PROCESS
#endif
{
while (n--)
{
- if (utmp_buf->ut_name[0]
+ if (UT_USER (utmp_buf)[0]
#ifdef USER_PROCESS
&& utmp_buf->ut_type == USER_PROCESS
#endif