diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-02-18 12:55:01 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-03-29 19:53:57 +0200 |
commit | c70d7a8c1fdf97aecc1e2a3a182fa1f3c091520a (patch) | |
tree | 0defd08159f04fb4d89022a157923ba152321c78 | |
parent | a782675c1580b6e9df12c8e1b73aee82be2051ec (diff) |
Remove conditional compilation based on PRIVATE_USER_PATH. It is always set.
-rw-r--r-- | src/externs.h | 2 | ||||
-rw-r--r-- | src/files.c | 5 | ||||
-rw-r--r-- | src/init2.c | 22 | ||||
-rw-r--r-- | src/main-crb.c | 6 | ||||
-rw-r--r-- | src/main-sdl-iso.c | 8 | ||||
-rw-r--r-- | src/main.c | 8 | ||||
-rw-r--r-- | src/modules.c | 8 |
7 files changed, 0 insertions, 59 deletions
diff --git a/src/externs.h b/src/externs.h index 36001d42..98e5368c 100644 --- a/src/externs.h +++ b/src/externs.h @@ -1508,9 +1508,7 @@ extern timer_type *new_timer(cptr callback, s32b delay); extern void del_timer(timer_type *t_ptr); /* main.c */ -#ifdef PRIVATE_USER_PATH extern bool_ private_check_user_directory(cptr dirpath); -#endif /* xtra1.c */ extern void fix_message(void); diff --git a/src/files.c b/src/files.c index 5bf2ef58..3facb8ef 100644 --- a/src/files.c +++ b/src/files.c @@ -3966,13 +3966,8 @@ void process_player_base() { char temp[128]; -#if defined(SAVEFILE_USE_UID) && !defined(PRIVATE_USER_PATH) - /* Rename the savefile, using the player_uid and player_base */ - (void)sprintf(temp, "%d.%s", player_uid, player_base); -#else /* Rename the savefile, using the player_base */ (void)sprintf(temp, "%s", player_base); -#endif /* Build the filename */ path_build(savefile, 1024, ANGBAND_DIR_SAVE, temp); diff --git a/src/init2.c b/src/init2.c index 83d316b0..6ab4ec54 100644 --- a/src/init2.c +++ b/src/init2.c @@ -169,8 +169,6 @@ void init_file_paths(char *path) strcpy(tail, "pref"); ANGBAND_DIR_PREF = string_make(path); -#ifdef PRIVATE_USER_PATH - /* synchronize with module_reset_dir */ { char user_path[1024]; @@ -201,26 +199,6 @@ void init_file_paths(char *path) ANGBAND_DIR_SAVE = string_make(user_path); } -#else /* PRIVATE_USER_PATH */ - - /* Build a path name */ - strcpy(tail, "save"); - ANGBAND_DIR_SAVE = string_make(path); - - /* Build a path name */ - strcpy(tail, "user"); - ANGBAND_DIR_USER = string_make(path); - - /* Build a path name */ - strcpy(tail, "note"); - ANGBAND_DIR_NOTE = string_make(path); - - /* Build a .. blah blah -- Improv */ - strcpy(tail, "cmov"); - ANGBAND_DIR_CMOV = string_make(path); - -#endif /* PRIVATE_USER_PATH */ - /* Build a path name */ strcpy(tail, "xtra"); ANGBAND_DIR_XTRA = string_make(path); diff --git a/src/main-crb.c b/src/main-crb.c index 9cd5b96c..4aeca8fa 100644 --- a/src/main-crb.c +++ b/src/main-crb.c @@ -478,8 +478,6 @@ #if defined(MACINTOSH) || defined(MACH_O_CARBON) -#ifdef PRIVATE_USER_PATH - /* * Check and create if needed the directory dirpath */ @@ -564,8 +562,6 @@ static bool_ check_create_user_dir(void) private_check_user_directory(savepath); } -#endif /* PRIVATE_USER_PATH */ - /* * Variant-dependent features: @@ -6389,10 +6385,8 @@ int main(void) /* Note the "system" */ ANGBAND_SYS = "mac"; -#ifdef PRIVATE_USER_PATH if (check_create_user_dir() == FALSE) quit("Cannot create directory " PRIVATE_USER_PATH); -#endif /* Initialize */ init_stuff(); diff --git a/src/main-sdl-iso.c b/src/main-sdl-iso.c index 87473466..62aa05d9 100644 --- a/src/main-sdl-iso.c +++ b/src/main-sdl-iso.c @@ -1470,8 +1470,6 @@ static errr term_data_init(term_data *td, int i) return (0); } -#ifdef PRIVATE_USER_PATH - /* * Check and create if needed the directory dirpath -- copied from main.c */ @@ -1533,8 +1531,6 @@ static bool_ check_create_user_dir(void) return private_check_user_directory(dirpath) && private_check_user_directory(versionpath) && private_check_user_directory(savepath); } -#endif /* PRIVATE_USER_PATH */ - /* * Init some stuff - copied from main.c */ @@ -1653,8 +1649,6 @@ int main(int argc, char *argv[]) user_name(player_name, player_uid); -#ifdef PRIVATE_USER_PATH - /* * On multiuser systems, users' private directories are * used to store pref files, chardumps etc. @@ -1669,8 +1663,6 @@ int main(int argc, char *argv[]) if (ret == FALSE) sdl_quit("Cannot create directory " PRIVATE_USER_PATH); } -#endif /* PRIVATE_USER_PATH */ - #endif /* SET_UID */ /* Before sdl_quit could possible be called, need to make sure that the text @@ -47,8 +47,6 @@ static void quit_hook(cptr s) -#ifdef PRIVATE_USER_PATH - /* * Check and create if needed the directory dirpath */ @@ -110,8 +108,6 @@ static bool_ check_create_user_dir(void) return private_check_user_directory(dirpath) && private_check_user_directory(versionpath) && private_check_user_directory(savepath); } -#endif /* PRIVATE_USER_PATH */ - /* * Initialize and verify the file paths, and the score file. @@ -331,8 +327,6 @@ int main(int argc, char *argv[]) user_name(player_name, player_uid); -#ifdef PRIVATE_USER_PATH - /* * On multiuser systems, users' private directories are * used to store pref files, chardumps etc. @@ -347,8 +341,6 @@ int main(int argc, char *argv[]) if (ret == FALSE) quit("Cannot create directory " PRIVATE_USER_PATH); } -#endif /* PRIVATE_USER_PATH */ - #endif /* SET_UID */ diff --git a/src/modules.c b/src/modules.c index 60c3b35d..39b41d20 100644 --- a/src/modules.c +++ b/src/modules.c @@ -12,8 +12,6 @@ #include "angband.h" -#ifdef PRIVATE_USER_PATH - static void module_reset_dir_aux(cptr *dir, cptr new_path) { char buf[1024]; @@ -29,8 +27,6 @@ static void module_reset_dir_aux(cptr *dir, cptr new_path) quit(format("Unable to create module dir %s\n", *dir)); } -#endif - void module_reset_dir(cptr dir, cptr new_path) { cptr *d = 0; @@ -51,9 +47,6 @@ void module_reset_dir(cptr dir, cptr new_path) if (!strcmp(dir, "user")) d = &ANGBAND_DIR_USER; if (!strcmp(dir, "note")) d = &ANGBAND_DIR_NOTE; if (!strcmp(dir, "cmov")) d = &ANGBAND_DIR_CMOV; -#ifndef PRIVATE_USER_PATH - if (!strcmp(dir, "save")) d = &ANGBAND_DIR_SAVE; -#else /* PRIVATE_USER_PATH */ if ( #ifdef PRIVATE_USER_PATH_APEX !strcmp(dir, "apex") || @@ -81,7 +74,6 @@ void module_reset_dir(cptr dir, cptr new_path) module_reset_dir_aux(&ANGBAND_DIR_SAVE, new_path); } else -#endif /* PRIVATE_USER_PATH */ { /* Build the new path */ strnfmt(buf, 1024, "%s%s%s%s%s", ANGBAND_DIR_MODULES, PATH_SEP, new_path, PATH_SEP, dir); |