Main Page | Namespace List | Class Hierarchy | Compound List | File List | Namespace Members | Compound Members | File Members

UserHomeDir Struct Reference

#include <infolines.h>

Inheritance diagram for UserHomeDir:

Inheritance graph
[legend]
Collaboration diagram for UserHomeDir:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 UserHomeDir ()
virtual operator const char * () const

Protected Attributes

char * _infoLine

Constructor & Destructor Documentation

UserHomeDir::UserHomeDir  ) 
 

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 }


Member Function Documentation

virtual InfoLine::operator const char *  )  const [inline, virtual, inherited]
 

Definition at line 79 of file infolines.h.

References InfoLine::_infoLine.

00079 { return _infoLine; }


Member Data Documentation

char* InfoLine::_infoLine [protected, inherited]
 

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().


The documentation for this struct was generated from the following files:
Generated on Mon Apr 25 01:16:11 2005 for Parquete by doxygen 1.3.2