102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
Loading...
Searching...
No Matches
dttr_path.h
Go to the documentation of this file.
1#ifndef DTTR_PATH_H
2#define DTTR_PATH_H
3
4#include <stdbool.h>
5#include <stddef.h>
6
7#include <sds.h>
8
9#define DTTR_PATH_NATIVE_SEPARATOR '\\'
10
11char DTTR_Path_AsciiLower(char ch);
12bool DTTR_Path_AsciiIeqN(const char *lhs, const char *rhs, size_t n);
13
14bool DTTR_Path_CopyString(char *out, size_t out_size, const char *value);
15bool DTTR_Path_CopySds(char *out, size_t out_size, sds value);
16
17bool DTTR_Path_IsSeparator(char ch);
18const char *DTTR_Path_SkipSeparators(const char *path);
19size_t DTTR_Path_SegmentLen(const char *path);
20bool DTTR_Path_IsRelativeSegment(const char *segment, size_t segment_len);
21bool DTTR_Path_IsSafeRelative(const char *path);
22bool DTTR_Path_MatchesNormalized(const char *lhs, const char *rhs);
23
24bool DTTR_Path_IsWindowsAbsolute(const char *path);
25bool DTTR_Path_IsAnyAbsolute(const char *path);
26bool DTTR_Path_ExactExists(const char *path);
27
29sds DTTR_Path_ModuleDir(void *module);
30sds DTTR_Path_ModuleSibling(void *module, const char *relative_path);
31sds DTTR_Path_ResolveRelativeTo(const char *base_dir, const char *path);
32sds DTTR_Path_NativeRoot(const char *path, const char **rest);
33
34bool DTTR_Path_AppendChar(sds *path, char ch);
35bool DTTR_Path_AppendSeparator(sds *path, char separator);
36bool DTTR_Path_AppendSegment(sds *path, const char *segment, char separator);
37
38#endif // DTTR_PATH_H
DTTR_Graphics_COM_Direct3DDevice7 void *status DTTR_Graphics_COM_Direct3DDevice7 DWORD DWORD void DWORD n
bool DTTR_Path_AsciiIeqN(const char *lhs, const char *rhs, size_t n)
Definition path.c:58
sds DTTR_Path_NativeRoot(const char *path, const char **rest)
Definition path.c:247
bool DTTR_Path_IsSeparator(char ch)
Definition path.c:76
const char * DTTR_Path_SkipSeparators(const char *path)
Definition path.c:80
sds DTTR_Path_CurrentDir()
Definition path.c:191
sds DTTR_Path_ModuleSibling(void *module, const char *relative_path)
Definition path.c:217
bool DTTR_Path_IsRelativeSegment(const char *segment, size_t segment_len)
Definition path.c:98
bool DTTR_Path_CopyString(char *out, size_t out_size, const char *value)
Definition path.c:68
bool DTTR_Path_CopySds(char *out, size_t out_size, sds value)
Definition path.c:72
bool DTTR_Path_ExactExists(const char *path)
Definition path.c:187
bool DTTR_Path_AppendChar(sds *path, char ch)
Definition path.c:262
bool DTTR_Path_IsWindowsAbsolute(const char *path)
Definition path.c:175
sds DTTR_Path_ResolveRelativeTo(const char *base_dir, const char *path)
Definition path.c:228
sds DTTR_Path_ModuleDir(void *module)
Definition path.c:201
bool DTTR_Path_IsAnyAbsolute(const char *path)
Definition path.c:179
bool DTTR_Path_AppendSeparator(sds *path, char separator)
Definition path.c:272
bool DTTR_Path_AppendSegment(sds *path, const char *segment, char separator)
Definition path.c:276
char DTTR_Path_AsciiLower(char ch)
Definition path.c:50
size_t DTTR_Path_SegmentLen(const char *path)
Definition path.c:88
bool DTTR_Path_IsSafeRelative(const char *path)
Definition path.c:107
bool DTTR_Path_MatchesNormalized(const char *lhs, const char *rhs)
Definition path.c:165