#include <infolines.h>
Inheritance diagram for UserHomeDir:
Public Member Functions | |
UserHomeDir () | |
virtual | operator const char * () const |
Protected Attributes | |
char * | _infoLine |
|
Definition at line 352 of file platfDepend.cxx. References InfoLine::_infoLine.
00353 { 00354 #if defined(sun) || defined(linux) 00355 struct passwd *pwrec; 00356 pwrec=getpwuid(getuid()); 00357 _infoLine=strdup(pwrec->pw_dir); 00358 #elif defined(_MSC_VER) 00359 char *homedr=getenv("HOMEDRIVE"); 00360 char *homepath=getenv("HOMEPATH"); 00361 char *pathbuf=new char[_MAX_PATH]; 00362 if (homedr==NULL || homepath==NULL) 00363 strcpy(pathbuf, "c:\\users\\default"); 00364 else 00365 _makepath(pathbuf,homedr,homepath,NULL,NULL); 00366 int len=strlen(pathbuf); 00367 if (pathbuf[len-1]=='\\') pathbuf[len-1]='\0'; 00368 _infoLine=strdup(pathbuf); 00369 delete [] pathbuf; 00370 #endif 00371 } |
|
Definition at line 79 of file infolines.h. References InfoLine::_infoLine.
00079 { return _infoLine; } |
|
Definition at line 75 of file infolines.h. Referenced by CmdLine::CmdLine(), ExecLocation::ExecLocation(), InfoLine::InfoLine(), InfoLine::operator const char *(), Platform::Platform(), TimeStamp::TimeStamp(), User::User(), UserHomeDir(), and InfoLine::~InfoLine(). |