|
102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
|
Go to the source code of this file.
Functions | |
| static bool | copy_path_value (char *out, size_t out_size, const char *value, size_t value_len, bool allow_empty) |
| static const char * | skip_dot_separators (const char *path) |
| static void | trim_trailing_separators (sds path) |
| char | DTTR_Path_AsciiLower (char ch) |
| bool | DTTR_Path_AsciiIeqN (const char *lhs, const char *rhs, size_t n) |
| bool | DTTR_Path_CopyString (char *out, size_t out_size, const char *value) |
| bool | DTTR_Path_CopySds (char *out, size_t out_size, sds value) |
| bool | DTTR_Path_IsSeparator (char ch) |
| const char * | DTTR_Path_SkipSeparators (const char *path) |
| size_t | DTTR_Path_SegmentLen (const char *path) |
| bool | DTTR_Path_IsRelativeSegment (const char *segment, size_t segment_len) |
| static bool | path_has_windows_drive_prefix (const char *path) |
| bool | DTTR_Path_IsSafeRelative (const char *path) |
| static sds | normalize_path_for_compare (const char *path) |
| bool | DTTR_Path_MatchesNormalized (const char *lhs, const char *rhs) |
| bool | DTTR_Path_IsWindowsAbsolute (const char *path) |
| bool | DTTR_Path_IsAnyAbsolute (const char *path) |
| bool | DTTR_Path_ExactExists (const char *path) |
| sds | DTTR_Path_CurrentDir () |
| sds | DTTR_Path_ModuleDir (void *module) |
| sds | DTTR_Path_ModuleSibling (void *module, const char *relative_path) |
| sds | DTTR_Path_ResolveRelativeTo (const char *base_dir, const char *path) |
| sds | DTTR_Path_NativeRoot (const char *path, const char **rest) |
| bool | DTTR_Path_AppendChar (sds *path, char ch) |
| bool | DTTR_Path_AppendSeparator (sds *path, char separator) |
| bool | DTTR_Path_AppendSegment (sds *path, const char *segment, char separator) |
|
static |
Definition at line 7 of file path.c.
Referenced by DTTR_Path_CopySds(), and DTTR_Path_CopyString().
| bool DTTR_Path_AppendChar | ( | sds * | path, |
| char | ch ) |
Definition at line 262 of file path.c.
Referenced by DTTR_Path_AppendSegment(), DTTR_Path_AppendSeparator(), normalize_path_for_compare(), and sdscat_lower_segment().
| bool DTTR_Path_AppendSegment | ( | sds * | path, |
| const char * | segment, | ||
| char | separator ) |
Definition at line 276 of file path.c.
References DTTR_Path_AppendChar(), and DTTR_Path_IsSeparator().
Referenced by append_game_path(), attempt_play_startup_movies(), build_save_slot_dir(), build_saves_dir(), child_iso_path(), dttr_game_data_resolve_existing_read_path(), dttr_game_data_resolve_media_path(), DTTR_Path_ModuleSibling(), DTTR_Path_ResolveRelativeTo(), dttr_test_join_path(), make_mod_path(), redirect_path(), resolve_iso_path_case(), resolve_mods_dir(), set_dump_dir(), and set_mods_dir_from_config_path().
| bool DTTR_Path_AppendSeparator | ( | sds * | path, |
| char | separator ) |
Definition at line 272 of file path.c.
References DTTR_Path_AppendChar().
Referenced by DTTR_ISO_CachePathForFile(), and set_dump_dir().
| bool DTTR_Path_AsciiIeqN | ( | const char * | lhs, |
| const char * | rhs, | ||
| size_t | n ) |
Definition at line 58 of file path.c.
References DTTR_Path_AsciiLower(), and n.
Referenced by dttr_game_data_find_data_segment(), find_disabled_mod(), name_matches_segment(), and name_matches_segment().
| char DTTR_Path_AsciiLower | ( | char | ch | ) |
Definition at line 50 of file path.c.
Referenced by DTTR_Path_AsciiIeqN(), and sdscat_lower_segment().
| bool DTTR_Path_CopySds | ( | char * | out, |
| size_t | out_size, | ||
| sds | value ) |
Definition at line 72 of file path.c.
References copy_path_value().
Referenced by append_game_path(), build_save_slot_dir(), build_saves_dir(), dttr_game_data_resolve_existing_read_path(), DTTR_Hook_WinMainCallback(), DTTR_ISO_CachePathForFile(), init_state_from_args(), make_shadow_path(), redirect_path(), resolve_iso_path_case(), resolve_loader_dir(), resolve_mods_dir(), resolve_modules_dir(), resolve_sdl_dll_path(), resolve_sidecar_dll_path(), set_dump_dir(), and set_mods_dir_from_config_path().
| bool DTTR_Path_CopyString | ( | char * | out, |
| size_t | out_size, | ||
| const char * | value ) |
Definition at line 68 of file path.c.
References copy_path_value().
Referenced by add_disabled_mod(), apply_dialog_selection(), copy_path(), dttr_game_data_init(), DTTR_ISO_Open(), find_case_match(), find_case_match(), prepare_mod(), scan_mod_dlls(), and set_mod_display_name().
| sds DTTR_Path_CurrentDir | ( | ) |
Definition at line 191 of file path.c.
Referenced by DTTR_Path_NativeRoot().
| bool DTTR_Path_ExactExists | ( | const char * | path | ) |
Definition at line 187 of file path.c.
Referenced by dttr_game_data_resolve_existing_read_path(), dttr_game_data_resolve_read_path(), and redirect_path().
| bool DTTR_Path_IsAnyAbsolute | ( | const char * | path | ) |
Definition at line 179 of file path.c.
References DTTR_Path_IsSeparator(), and DTTR_Path_IsWindowsAbsolute().
Referenced by dttr_game_data_resolve_read_path(), DTTR_Path_IsSafeRelative(), and DTTR_Path_ResolveRelativeTo().
| bool DTTR_Path_IsRelativeSegment | ( | const char * | segment, |
| size_t | segment_len ) |
Definition at line 98 of file path.c.
Referenced by dttr_game_data_resolve_existing_read_path(), DTTR_ISO_CachePathForFile(), DTTR_Path_IsSafeRelative(), and resolve_iso_path_case().
| bool DTTR_Path_IsSafeRelative | ( | const char * | path | ) |
Definition at line 107 of file path.c.
References DTTR_Path_IsAnyAbsolute(), DTTR_Path_IsRelativeSegment(), DTTR_Path_SegmentLen(), DTTR_Path_SkipSeparators(), and path_has_windows_drive_prefix().
Referenced by append_game_path(), is_relative_path(), and safe_relative_rejects_absolute_and_traversal_paths().
| bool DTTR_Path_IsSeparator | ( | char | ch | ) |
Definition at line 76 of file path.c.
Referenced by create_parent_dirs(), DTTR_ISO_CachePathForFile(), DTTR_Path_AppendSegment(), DTTR_Path_IsAnyAbsolute(), DTTR_Path_IsWindowsAbsolute(), DTTR_Path_NativeRoot(), DTTR_Path_SegmentLen(), DTTR_Path_SkipSeparators(), file_url_for_parent_dir(), find_case_match(), normalize_path_for_compare(), skip_dot_separators(), trim_trailing_separators(), and trim_trailing_separators().
| bool DTTR_Path_IsWindowsAbsolute | ( | const char * | path | ) |
Definition at line 175 of file path.c.
References DTTR_Path_IsSeparator().
Referenced by DTTR_Path_IsAnyAbsolute(), DTTR_Path_NativeRoot(), and resolve_stream_path().
| bool DTTR_Path_MatchesNormalized | ( | const char * | lhs, |
| const char * | rhs ) |
Definition at line 165 of file path.c.
References normalize_path_for_compare().
Referenced by DTTR_Config_FieldChanged().
| sds DTTR_Path_ModuleDir | ( | void * | module | ) |
Definition at line 201 of file path.c.
Referenced by DTTR_Path_ModuleSibling(), get_loader_dir(), resolve_loader_dir(), and set_mods_dir_from_config_path().
| sds DTTR_Path_ModuleSibling | ( | void * | module, |
| const char * | relative_path ) |
Definition at line 217 of file path.c.
References DTTR_Path_AppendSegment(), DTTR_Path_ModuleDir(), DTTR_PATH_NATIVE_SEPARATOR, and NULL.
Referenced by config_path_from_args(), resolve_config_path(), resolve_modules_dir(), resolve_sdl_dll_path(), and resolve_sidecar_dll_path().
| sds DTTR_Path_NativeRoot | ( | const char * | path, |
| const char ** | rest ) |
Definition at line 247 of file path.c.
References DTTR_Path_CurrentDir(), DTTR_Path_IsSeparator(), DTTR_Path_IsWindowsAbsolute(), DTTR_PATH_NATIVE_SEPARATOR, and DTTR_Path_SkipSeparators().
Referenced by dttr_game_data_resolve_existing_read_path().
| sds DTTR_Path_ResolveRelativeTo | ( | const char * | base_dir, |
| const char * | path ) |
Definition at line 228 of file path.c.
References DTTR_Path_AppendSegment(), DTTR_Path_IsAnyAbsolute(), DTTR_PATH_NATIVE_SEPARATOR, and NULL.
Referenced by DTTR_Hook_WinMainCallback(), and open_log_file().
| size_t DTTR_Path_SegmentLen | ( | const char * | path | ) |
Definition at line 88 of file path.c.
References DTTR_Path_IsSeparator().
Referenced by dttr_game_data_find_data_segment(), dttr_game_data_resolve_existing_read_path(), DTTR_ISO_CachePathForFile(), DTTR_Path_IsSafeRelative(), and resolve_iso_path_case().
| const char * DTTR_Path_SkipSeparators | ( | const char * | path | ) |
Definition at line 80 of file path.c.
References DTTR_Path_IsSeparator().
Referenced by append_game_path(), dttr_game_data_find_data_segment(), dttr_game_data_resolve_existing_read_path(), DTTR_ISO_CachePathForFile(), DTTR_Path_IsSafeRelative(), DTTR_Path_NativeRoot(), and resolve_iso_path_case().
|
static |
Definition at line 129 of file path.c.
References DTTR_Path_AppendChar(), DTTR_Path_IsSeparator(), NULL, skip_dot_separators(), and trim_trailing_separators().
Referenced by DTTR_Path_MatchesNormalized().
|
static |
Definition at line 103 of file path.c.
Referenced by DTTR_Path_IsSafeRelative().
|
static |
Definition at line 23 of file path.c.
References DTTR_Path_IsSeparator().
Referenced by normalize_path_for_compare().
|
static |
Definition at line 31 of file path.c.
References DTTR_Path_IsSeparator().
Referenced by normalize_path_for_compare().