logname(3) CLIX logname(3)
NAME
logname - Returns the login name of the user
LIBRARY
The Programmer's Workbench Library (libPW.a)
SYNOPSIS
char *logname(
void );
DESCRIPTION
The logname() function returns a pointer to the null-terminated login
name; it extracts the LOGNAME environment variable from the user's
environment.
EXAMPLES
To display the login name of the user:
main()
{
char *p;
p = logname();
printf("login name is %s\n",p);
}
FILES
/etc/profile
The user profile file for the system.
CAUTIONS
The return values for this function point to static data that is
overwritten by each call. This method of determining a login name is
subject to forgery.
RETURN VALUES
See the DESCRIPTION section.
RELATED INFORMATION
Commands: env(1), login(1)
2/94 - Intergraph Corporation 1
logname(3) CLIX logname(3)
Functions: getenv(3)
Files: profile(4)
Miscellany: environ(4)
2 Intergraph Corporation - 2/94