summaryrefslogtreecommitdiff
path: root/man3/getutent.3
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2007-05-12 09:06:04 +0000
committerMichael Kerrisk <mtk.manpages@gmail.com>2007-05-12 09:06:04 +0000
commit60a90ecdae7bf6d1a91dc5d1d7177e400b114e47 (patch)
tree9f7c19a897084607a9688be5414d0d4cd6391b54 /man3/getutent.3
parentd92a60f2575c95cd532b822e4fb983c3a9e35641 (diff)
Convert function formatting of the form "\fBname\fP()" to ".BR name ()".
Diffstat (limited to 'man3/getutent.3')
-rw-r--r--man3/getutent.346
1 files changed, 33 insertions, 13 deletions
diff --git a/man3/getutent.3 b/man3/getutent.3
index 9848338e4..260406d89 100644
--- a/man3/getutent.3
+++ b/man3/getutent.3
@@ -46,47 +46,67 @@ getutent, getutid, getutline, pututline, setutent, endutent, utmpname \- access
.sp
.BI "void utmpname(const char *" file );
.SH DESCRIPTION
-\fButmpname\fP() sets the name of the utmp-format file for the other utmp
+.BR utmpname ()
+sets the name of the utmp-format file for the other utmp
functions to access.
-If \fButmpname\fP() is not used to set the filename
+If
+.BR utmpname ()
+is not used to set the filename
before the other functions are used, they assume \fB_PATH_UTMP\fP, as
defined in \fI<paths.h>\fP.
.PP
-\fBsetutent\fP() rewinds the file pointer to the beginning of the utmp file.
+.BR setutent ()
+rewinds the file pointer to the beginning of the utmp file.
It is generally a Good Idea to call it before any of the other
functions.
.PP
-\fBendutent\fP() closes the utmp file.
+.BR endutent ()
+closes the utmp file.
It should be called when the user
code is done accessing the file with the other functions.
.PP
-\fBgetutent\fP() reads a line from the current file position in the utmp
+.BR getutent ()
+reads a line from the current file position in the utmp
file.
It returns a pointer to a structure containing the fields of
the line.
.PP
-\fBgetutid\fP() searches forward from the current file position in the utmp
+.BR getutid ()
+searches forward from the current file position in the utmp
file based upon \fIut\fP.
If \fIut\fP->ut_type is one of \fBRUN_LVL\fP,
-\fBBOOT_TIME\fP, \fBNEW_TIME\fP, or \fBOLD_TIME\fP, \fBgetutid\fP() will
+\fBBOOT_TIME\fP, \fBNEW_TIME\fP, or \fBOLD_TIME\fP,
+.BR getutid ()
+will
find the first entry whose \fIut_type\fP field matches \fIut\fP->ut_type.
If \fIut\fP->ut_type is one of \fBINIT_PROCESS\fP, \fBLOGIN_PROCESS\fP,
-\fBUSER_PROCESS\fP, or \fBDEAD_PROCESS\fP, \fBgetutid\fP() will find the
+\fBUSER_PROCESS\fP, or \fBDEAD_PROCESS\fP,
+.BR getutid ()
+will find the
first entry whose ut_id field matches \fIut\fP->ut_id.
.PP
-\fBgetutline\fP() searches forward from the current file position in the
+.BR getutline ()
+searches forward from the current file position in the
utmp file.
It scans entries whose ut_type is \fBUSER_PROCESS\fP
or \fBLOGIN_PROCESS\fP and returns the first one whose ut_line field
matches \fIut\fP->ut_line.
.PP
-\fBpututline\fP() writes the utmp structure \fIut\fP into the utmp file.
-It uses \fBgetutid\fP() to search for the proper place in the file to insert
+.BR pututline ()
+writes the utmp structure \fIut\fP into the utmp file.
+It uses
+.BR getutid ()
+to search for the proper place in the file to insert
the new entry.
If it cannot find an appropriate slot for \fIut\fP,
-\fBpututline\fP() will append the new entry to the end of the file.
+.BR pututline ()
+will append the new entry to the end of the file.
.SH "RETURN VALUE"
-\fBgetutent\fP(), \fBgetutid\fP(), \fBgetutline\fP() and \fBpututline\fP()
+.BR getutent (),
+.BR getutid (),
+.BR getutline ()
+and
+.BR pututline ()
return a pointer to a \fBstruct utmp\fP on success, and NULL on failure.
This \fBstruct utmp\fP is allocated in static storage, and may be
overwritten by subsequent calls.