-// Where can I put this? I found the occurence of the same code
-// three/four times. Don't you think it better to use a macro definition
-// (an inlined member of some class)?
-///
-inline string getUserName()
-{
- string userName(GetEnv("LOGNAME"));
- if (userName.empty())
- userName = GetEnv("USER");
- if (userName.empty())
- userName = _("unknown");
- return userName;
-}
-
-// This should have been a namespace
-struct lyx {
- static char * getcwd(char * buffer, size_t size) {
-#ifndef __EMX__
- return ::getcwd(buffer, size);
-#else
- return ::_getcwd2(buffer, size);
-#endif
- };
- static chdir(const char * name) {
-#ifndef __EMX__
- return ::chdir(name);
-#else
- return ::_chdir2(name);
-#endif
- };
-};
-#endif