#include <infolines.h>
Inheritance diagram for User:


Public Member Functions | |
| User () | |
| virtual | operator const char * () const |
Protected Attributes | |
| char * | _infoLine |
|
|
Definition at line 240 of file platfDepend.cxx. References InfoLine::_infoLine, and gethostname().
00241 {
00242
00243 //#if defined(linux) || defined(sun) || defined(__SUNPRO_CC)
00244 #if defined(linux)
00245 char host[100];
00246 gethostname(host,31);
00247 struct passwd *pwr=getpwuid(getuid());
00248 if (pwr==NULL)
00249 {
00250 _infoLine= new char[40];
00251 strcpy(_infoLine, "# User : unknown \n");
00252 return;
00253 }
00254
00255 _infoLine= new char[strlen(pwr->pw_name)+strlen(pwr->pw_gecos)+130];
00256 sprintf(_infoLine,"# User : %s@%s (%s) \n",
00257 pwr->pw_name,host,pwr->pw_gecos);
00258 #elif defined(_MSC_VER)
00259 _infoLine= new char[40];
00260 strcpy(_infoLine, "# User : unknown \n");
00261 #else
00262 _infoLine= new char[40];
00263 strcpy(_infoLine, "# User : unknown \n");
00264 #endif
00265 }
|
Here is the call graph for this function:

|
|
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(), UserHomeDir::UserHomeDir(), and InfoLine::~InfoLine(). |
1.3.2