102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
Loading...
Searching...
No Matches
dttr_path.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <sds.h>

Go to the source code of this file.

Macros

#define DTTR_PATH_NATIVE_SEPARATOR   '\\'

Functions

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)
bool DTTR_Path_IsSafeRelative (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)

Macro Definition Documentation

◆ DTTR_PATH_NATIVE_SEPARATOR

Function Documentation

◆ DTTR_Path_AppendChar()

bool DTTR_Path_AppendChar ( sds * path,
char ch )

◆ DTTR_Path_AppendSegment()

◆ DTTR_Path_AppendSeparator()

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().

◆ DTTR_Path_AsciiIeqN()

bool DTTR_Path_AsciiIeqN ( const char * lhs,
const char * rhs,
size_t n )

◆ DTTR_Path_AsciiLower()

char DTTR_Path_AsciiLower ( char ch)

Definition at line 50 of file path.c.

Referenced by DTTR_Path_AsciiIeqN(), and sdscat_lower_segment().

◆ DTTR_Path_CopySds()

◆ DTTR_Path_CopyString()

bool DTTR_Path_CopyString ( char * out,
size_t out_size,
const char * value )

◆ DTTR_Path_CurrentDir()

sds DTTR_Path_CurrentDir ( )

Definition at line 191 of file path.c.

References DWORD, and NULL.

Referenced by DTTR_Path_NativeRoot().

◆ DTTR_Path_ExactExists()

bool DTTR_Path_ExactExists ( const char * path)

◆ DTTR_Path_IsAnyAbsolute()

bool DTTR_Path_IsAnyAbsolute ( const char * path)

◆ DTTR_Path_IsRelativeSegment()

bool DTTR_Path_IsRelativeSegment ( const char * segment,
size_t segment_len )

◆ DTTR_Path_IsSafeRelative()

◆ DTTR_Path_IsSeparator()

◆ DTTR_Path_IsWindowsAbsolute()

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().

◆ DTTR_Path_MatchesNormalized()

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().

◆ DTTR_Path_ModuleDir()

sds DTTR_Path_ModuleDir ( void * module)

Definition at line 201 of file path.c.

References DWORD, and NULL.

Referenced by DTTR_Path_ModuleSibling(), get_loader_dir(), resolve_loader_dir(), and set_mods_dir_from_config_path().

◆ DTTR_Path_ModuleSibling()

sds DTTR_Path_ModuleSibling ( void * module,
const char * relative_path )

◆ DTTR_Path_NativeRoot()

sds DTTR_Path_NativeRoot ( const char * path,
const char ** rest )

◆ DTTR_Path_ResolveRelativeTo()

sds DTTR_Path_ResolveRelativeTo ( const char * base_dir,
const char * path )

◆ DTTR_Path_SegmentLen()

◆ DTTR_Path_SkipSeparators()