Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getlogin(3)

getpwent(3)

getpwuid(3)

getpwnam(3)

setpwent(3)

endpwent(3)



  cuserid(3)                          CLIX                          cuserid(3)



  NAME

    cuserid - Gets the alphanumeric username associated with the current
    process

  LIBRARY

    Standard C Library (libc.a)

  SYNOPSIS

    #include <stdio.h>

    char *cuserid(
      char *s );

  PARAMETERS

    s   If the s parameter is a NULL pointer, the character string is stored
        in an internal static area, the address of which is returned.

        If the s parameter is not a NULL pointer, the character string is
        stored in the array the s parameter points to.  This array must
        contain at least L_cuserid bytes.  The L_cuserid constant is defined
        in the <stdio.h> header file, and has a value greater than 0.

  DESCRIPTION

    The cuserid() function generates a character string representing the login
    name of the owner of the current process.

    The recommended procedure is to call the cuserid() function, or the
    getlogin() function.  If either fails, the getpwuid() function should be
    called, with the value returned by the getuid() function.

  RETURN VALUES

    If s is not a NULL pointer, s is returned.  If the s parameter is not a
    NULL pointer and the username cannot be found, a NULL character is stored
    in s[0].

    If s is a NULL pointer and the username cannot be found, cuserid() returns
    a NULL pointer.

  RELATED INFORMATION

    Functions:  getlogin(3), getpwent(3), getpwuid(3), getpwnam(3),
    setpwent(3), endpwent(3)






  2/94 - Intergraph Corporation                                              1




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026