C*USERNM -- return name of current user C+ SUBROUTINE USERNM (USER) CHARACTER*(*) USER C C Return the username currently associated with the calling process. C C Argument: C USER (output) : receives the node name, or string '' if C information is not available; should be at least C 12 characters. C C Subroutines required: C GETLOG (HP-UX) C GETENV (HP-UX) C C 1988 Apr 14 - TJP. C 1988 may 04 - r. gaume C stubbed for ndp fortran under dos C 1995 Oct 95 - CAH: modified for use with HP-UX C----------------------------------------------------------------------- C C First see what GETLOG will return: C C CALL GETLOG(USER) ! HP-UX C IF (USER.NE.' ') RETURN C C If this fails, use GETENV to get the environment variable USER: C CALL GETENV('USER', USER) IF (USER.NE.' ') RETURN C C Otherwise give up: C USER = '' C END