[BACK]Return to main.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / games / phantasia

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/games/phantasia/main.c between version 1.19 and 1.20

version 1.19, 2009/05/25 23:14:33 version 1.20, 2009/05/26 00:27:23
Line 29 
Line 29 
   
 #include <sys/stat.h>  #include <sys/stat.h>
 #include <sys/types.h>  #include <sys/types.h>
   #include <err.h>
 #include <pwd.h>  #include <pwd.h>
   
 /*  /*
Line 271  void
Line 272  void
 initialstate(void)  initialstate(void)
 {  {
         struct stat sb;          struct stat sb;
           struct passwd *pw;
   
         Beyond = FALSE;          Beyond = FALSE;
         Marsh = FALSE;          Marsh = FALSE;
Line 283  initialstate(void)
Line 285  initialstate(void)
         Echo = TRUE;          Echo = TRUE;
   
         /* setup login name */          /* setup login name */
         if ((Login = getlogin()) == NULL)          if ((Login = getlogin()) == NULL) {
                 Login = getpwuid(getuid())->pw_name;                  pw = getpwuid(getuid());
                   if (pw == NULL) {
                           errx(1, "Who are you?");
                   }
                   Login = pw->pw_name;
           }
   
         /* open some files */          /* open some files */
         if ((Playersfp = fopen(_PATH_PEOPLE, "r+")) == NULL)          if ((Playersfp = fopen(_PATH_PEOPLE, "r+")) == NULL)

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

CVSweb <webmaster@jp.NetBSD.org>