Crossfire Server, Trunk
|
Go to the source code of this file.
Functions | |
char * | path_combine (const char *src, const char *dst, char *path, size_t size) |
char * | path_combine_and_normalize (const char *src, const char *dst, char *path, size_t size) |
void | path_normalize (char *path) |
Path-related function prototypes.
Definition in file path.h.
char* path_combine | ( | const char * | src, |
const char * | dst, | ||
char * | path, | ||
size_t | size | ||
) |
Combine two paths and return the combined path. Returns path.
Combines 2 paths, which can be relative.
src | path we're starting from. |
dst | path we're doing to. |
path | buffer containing the combined path. |
size | size of path. |
Definition at line 51 of file path.cpp.
References llevDebug, LOG(), python_init::path, and strlcpy().
Referenced by check_combine(), and path_combine_and_normalize().
char* path_combine_and_normalize | ( | const char * | src, |
const char * | dst, | ||
char * | path, | ||
size_t | size | ||
) |
Combine two paths and normalize the result. The result is a static buffer; it is valid until the next call to either this function or to combine_path().
Combines the 2 paths.
src | path we're starting from. |
dst | path we're getting to. |
path | buffer that will contain combined paths. |
size | length of path. |
Definition at line 172 of file path.cpp.
References python_init::path, path_combine(), and path_normalize().
Referenced by check_combine_and_normalize(), CREMapInformationManager::checkItem(), command_reset(), command_swap(), enter_exit(), enter_fixed_template_map(), enter_random_template_map(), enter_unique_map(), load_and_link_tiled_map(), CREMapInformationManager::process(), and process_map().
void path_normalize | ( | char * | path | ) |
Normalize a path; the passed in path is modified in-place.
Cleans specified path. Removes .. and things like that.
path | path to clear. It will be modified in place. |
Definition at line 85 of file path.cpp.
References llevDebug, LOG(), python_init::path, and item::q.
Referenced by check_normalize(), and path_combine_and_normalize().