'\"macro stdmacro
.if n .pH g3s.cuserid @(#)cuserid	40.10 of 10/26/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} cuserid 3S "C Programming Language Utilities" "\&"
.if \nX=1 .ds x} cuserid 3S "C Programming Language Utilities"
.if \nX=2 .ds x} cuserid 3S "" "\&"
.if \nX=3 .ds x} cuserid "" "" "\&"
.TH \*(x}
.SH NAME
\f4cuserid\f1 \- get character login name of the user
.SH SYNOPSIS
\f4#include <stdio.h>\f1
.PP
\f4char \(**cuserid (char \(**s);\f1
.SH DESCRIPTION
\f4cuserid\fP
generates a character-string representation of the login
name that the owner of the current process is logged in under.
If
.I s\^
is a
\f4NULL\fP
pointer, this representation is generated in an
internal static area, the address of which is returned.
Otherwise,
.I s\^
is assumed to point to an array of at least
\f4L_cuserid\f1
characters; the representation is left in this array.
The constant
\f4L_cuserid\f1
is defined in the
\f4stdio.h\f1
header file.
.SH SEE ALSO
\f4getlogin\fP(3C), \f4getpwent\fP(3C).
.SH DIAGNOSTICS
If the login
name
cannot be found,
\f4cuserid\fP
returns a
\f4NULL\fP
pointer; if
.I s\^
is not a
\f4NULL\fP
pointer, a null character
\f4\`\e0\'\f1
will be placed at
\f2s\f4[0]\fP.
.\"	@(#)cuserid.3s	6.2 of 10/20/83
.Ee
