History log of /freebsd-10.1-release/usr.bin/finger/sprint.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 216370 11-Dec-2010 joel

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


# 202191 13-Jan-2010 ed

Migrate finger(1) towards utmpx.

It was already ported to use libulog, which makes it simpler now. Be
sure to catch the error returned by setutxdb(). Otherwise it may perform
a lookup on the utx.active database.


# 201140 28-Dec-2009 ed

Migrate finger(1) away from <utmp.h>.

Unfortunately it also uses lastlog, which means we must resort to local
extensions of the utmpx-interface. Because the user name and TTY name
are now nul-terminated, there is no need to copy around strings as
often.


# 156282 04-Mar-2006 rwatson

Reduce number of spaces for full name by four, and reduce padding
after tty entry by one space in order to provide extra spaces for
the tty entry. As a result, full pts names are now visible (up
to 999 pts's anyway):

Before:
Login Name TTY Idle Login Time Office Phone
robert Robert Watson *v0 3:55 Fri 02:54
robert Robert Watson p0 19 Sat 11:01
robert Robert Watson pts Sat 14:55

After:

Login Name TTY Idle Login Time Office Phone
robert Robert Watson *v0 5:08 Fri 02:54
robert Robert Watson p0 8 Sat 11:01
robert Robert Watson pts/5 Sat 14:55

MFC after: 1 week


# 112987 02-Apr-2003 rwatson

If stat() on the terminal specified in utmp fails due to ENOENT, don't
print a warning, and set the idletime variable for the entry to -1;
then pick up the -1 later in sprint() and lprint() and ignore those
idle times by printing just whitespace. When third party applications,
such as kdm, insert utmp entries, they sometimes use strings like ":0",
which can't be stat()'d and currently result in warnings that are
not helpful to the user.


# 102944 04-Sep-2002 dwmalone

ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

Reviewed by: md5


# 99249 02-Jul-2002 mini

Add -g option, which restricts printing of the gecos fields to just the user's
real name.

PR: bin/39462
Submitted by: Mike Makonnen <makonnen@pacbell.net>
Obtained from: NetBSD
MFC after: 1 week


# 92920 21-Mar-2002 imp

remove __P


# 87628 10-Dec-2001 dwmalone

Style improvements recommended by Bruce as a follow up to some
of the recent WARNS commits. The idea is:

1) FreeBSD id tags should follow vendor tags.
2) Vendor tags should not be compiled (though copyrights probably should).
3) There should be no blank line between including cdefs and __FBSDIF.


# 87229 02-Dec-2001 markm

WARNS=2 fix, remove 'register' and use __FBSDID().


# 74586 21-Mar-2001 ache

Don't attempt to parse %c


# 72109 06-Feb-2001 charnier

Spelling
Remove unused #includes


# 63007 12-Jul-2000 asmodai

Backout previous commit.
(Mental note: don't forget -rRELENG_4 next time.)


# 63006 12-Jul-2000 asmodai

MFC: fix some output cosmetics so that the finger -s output is properly
lined up


# 62937 11-Jul-2000 asmodai

Fix finger -s output on an user who never logged in.
This is purely a cosmetic patch.

PR: 9809
Submitted by: se
Nagged about: nrahlstr


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 27169 02-Jul-1997 charnier

Add rcsid, usage(). Silent -Wall. Use warn(3).


# 23693 11-Mar-1997 peter

Merge from Lite2


# 20157 05-Dec-1996 ache

Adjust line to not overflow 80 cols (result of recent utmp changes)


# 11386 10-Oct-1995 peter

Reverse out some of the previous commit I did, which shortened the
finger output from 80 to 79 characters to stop the syscons
every-second-line-is-blank problem.

Also, redo the TTY column mod so that it steals one of the (usually) two
blank spaces from the before the tty column rather than from the office
phone number.

This means the office phone field width in the short finger is back to 15
characters instead of 13.


# 10553 03-Sep-1995 peter

Increase the tty column width from 2 to 3 characters.

This gives us more room to breath with tty names, especially with drivers
that support large numbers of ports.. eg: specialix and digiboard.

This does not actually change the current tty names, it just allows room
for reporting more characters if the drivers use them.


# 9993 07-Aug-1995 ache

Replace asctime/ctime by strftime %c to use national representation


# 9987 07-Aug-1995 wollman

Delete bogus referneces to timezone code internal header file `tzfile.h',
which is no longer bogusly installed in /usr/include.


# 7371 25-Mar-1995 joerg

Make finger(1) accept "cua" to be also a tty, and use the suffix instead
of the very meaningful string "cu" to describe the tty.


# 2537 07-Sep-1994 pst

Install Luke's enhancements for finger.

By default, behave like the old ugly 4.4bsd finger and print office
information instead of remote login information.

It's an easy one line fix to make it behave like most other vendor's
fingers if we decide to change the default.

Reviewed by: pst


# 1591 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1590,
which included commits to RCS files with non-trunk default branches.


# 1590 27-May-1994 rgrimes

BSD 4.4 Lite Usr.bin Sources