rogue5: add savedir, logfile, bugfixes

This commit is contained in:
John "Elwin" Edwards 2010-05-24 20:16:15 +00:00
parent 3741c4867d
commit 53a15a3e2e
13 changed files with 2124 additions and 1397 deletions

View file

@ -448,7 +448,10 @@ md_getusername(void)
pw = getpwuid(getuid());
l = pw->pw_name;
if (pw != NULL)
l = pw->pw_name;
else
l = NULL;
#endif
if ((l == NULL) || (*l == '\0'))
@ -479,7 +482,10 @@ md_gethomedir(void)
struct passwd *pw;
pw = getpwuid(getuid());
h = pw->pw_dir;
if (pw != NULL)
h = pw->pw_dir;
else
h = NULL;
if (strcmp(h,"/") == 0)
h = NULL;
@ -543,7 +549,8 @@ md_getshell(void)
char *def = "/bin/sh";
struct passwd *pw;
pw = getpwuid(getuid());
s = pw->pw_shell;
if (pw != NULL)
s = pw->pw_shell;
#endif
if ((s == NULL) || (*s == '\0'))
if ( (s = getenv("COMSPEC")) == NULL)