platform/win32.c
changeset 197 b59917ad3bae
parent 195 c9eef6e349a2
child 198 39274fb69c25
equal deleted inserted replaced
196:146f35f06992 197:b59917ad3bae
   138         } /* if */
   138         } /* if */
   139     } /* if */
   139     } /* if */
   140 
   140 
   141     return((char *) retval);
   141     return((char *) retval);
   142 } /* __PHYSFS_platformGetUserName */
   142 } /* __PHYSFS_platformGetUserName */
   143 
       
   144 
       
   145 static char *copyEnvironmentVariable(const char *varname)
       
   146 {
       
   147     const char *envr = getenv(varname);
       
   148     char *retval = NULL;
       
   149 
       
   150     if (envr != NULL)
       
   151     {
       
   152         retval = malloc(strlen(envr) + 1);
       
   153         if (retval != NULL)
       
   154             strcpy(retval, envr);
       
   155     } /* if */
       
   156 
       
   157     return(retval);
       
   158 } /* copyEnvironmentVariable */
       
   159 
   143 
   160 
   144 
   161 char *__PHYSFS_platformGetUserDir(void)
   145 char *__PHYSFS_platformGetUserDir(void)
   162 {
   146 {
   163     char *userdir = NULL;
   147     char *userdir = NULL;