2.9BSD/usr/man/cat3/homedr.3f


HOMEDR(3F)          UNIX Programmer's Manual           HOMEDR(3F)

NAME
     homedr - get name of home directory

SYNTAX
     character*length homedr, name
     homedr()
          or
     call homedr(name)

DESCRIPTION
     _H_o_m_e_d_r returns the absolute pathname of the user's home
     directory as defined in /_e_t_c/_p_a_s_s_w_d.  In other words the
     home directory or more properly the login directory reported
     by this function is not changed by the HOME parameter in the
     shell.  If length is not long enough for the character
     string, the string is returned as all blanks.  The string is
     not null terminated.  Note that dummy parentheses are
     required for the compiler to recognize _h_o_m_e_d_r if used as a
     function.

SEE ALSO
     getpwent(3)

EXAMPLE
           character*20 homedr,name
           write(6,1) homedr()
         1 format(a20)
           call homedr(name)
           write(6,1)name
           end

AUTHOR
     Peter L. Ward, U.S. Geological Survey, Menlo Park, Califor-
     nia.

Printed 5/27/83                                                 1