OSDN Git Service

v3.0.0 Alpha5 OSDN最終版
[hengband/hengband.git] / src / main.c
index e43b9d6..895573a 100644 (file)
@@ -116,25 +116,27 @@ static void create_user_dir(void)
  */
 static void init_stuff(void)
 {
-    char path[1024];
+       char libpath[1024], varpath[1024];
 
     concptr tail;
 
     /* Get the environment variable */
     tail = getenv("ANGBAND_PATH");
 
-    /* Use the angband_path, or a default */
-    strncpy(path, tail ? tail : DEFAULT_PATH, 511);
+       /* Use the angband_path, or a default */
+       strncpy(libpath, tail ? tail : DEFAULT_LIB_PATH, 511);
+       strncpy(varpath, tail ? tail : DEFAULT_VAR_PATH, 511);
 
-    /* Make sure it's terminated */
-    path[511] = '\0';
+       /* Make sure they're terminated */
+       libpath[511] = '\0';
+       varpath[511] = '\0';
 
-    /* Hack -- Add a path separator (only if needed) */
-    if (!suffix(path, PATH_SEP))
-        strcat(path, PATH_SEP);
+       /* Hack -- Add a path separator (only if needed) */
+       if (!suffix(libpath, PATH_SEP)) strcat(libpath, PATH_SEP);
+       if (!suffix(varpath, PATH_SEP)) strcat(varpath, PATH_SEP);
 
-    /* Initialize */
-    init_file_paths(path);
+       /* Initialize */
+       init_file_paths(libpath, varpath);
 }
 
 /*
@@ -299,11 +301,6 @@ int main(int argc, char *argv[])
     /* Default permissions on files */
     (void)umask(022);
 
-# ifdef SECURE
-       /* Authenticate */
-       Authenticate();
-# endif
-
 #endif
 
     /* Get the file paths */
@@ -551,6 +548,3 @@ int main(int argc, char *argv[])
 }
 
 #endif
-
-
-