seaotter@athena.mit.edu (Stacy L Ramirez) (08/25/90)
Hello again!
I am looking (without access to decent manuals, of course :-( for
the VMS/VAX-C equivalent of the following unix C code:
if (( pp = getpwuid(getuid()) == NULL ) {
pwdir = "???";
login = "???";
}
else {
pwdir = pp->pw_dir;
login = pp->pw_name;
}
)) Any help is appreciated.
Side Note: I am slowly building a file of #defines useful in porting
unix c-code to VAX/VMS. It includes such things as #define _begx _beg_x
and so forth for procedures that use curses _win_st structure, and
so on. It #includes <unixlib.h> and <unixio.h> automatically. Any
suggestions for other stuff to put in there?
Thanks,
Mike
____Mike_Zraly____________________________________________________________
| obligatory address : c/o seaotter@athena.mit.edu |
| obligatory disclaimer : My views don't represent anyone but me |
| obligatory quote : Nothing takes the taste out of peanut |
| butter quite like unrequited love. |
| -- Charlie Brown |
:________________________________________________________________________:murphy@ufp.dco.dec.com (Rick Murphy) (08/25/90)
In article <1990Aug24.220621.2506@athena.mit.edu>, seaotter@athena.mit.edu (Stacy L Ramirez) writes: >I am looking (without access to decent manuals, of course :-( for >the VMS/VAX-C equivalent of the following unix C code: > > if (( pp = getpwuid(getuid()) == NULL ) { > pwdir = "???"; > login = "???"; > } > else { > pwdir = pp->pw_dir; > login = pp->pw_name; > } > #ifdef VMS pwdir = getenv("HOME"); login = getenv("USER"); #endif If you want the CURRENT directory the user is in, that's getenv("PATH"). getenv also can be used to translate logicals and DCL symbols. -Rick -- Rick Murphy, WA1SPT/4 Digital Customer Center, Landover, MD Domain: murphy@ufp.dco.dec.com -or- murphy@ufp.enet.dec.com Bang: decwrl!ufp.enet!murphy Ding: (301) 306-2985 Disclaimer: This nonsense came from an AI program written in TECO. Ignore it.