From 7186d75c44fd47d65e29eb97a64a321f8b72caf8 Mon Sep 17 00:00:00 2001 From: libretroadmin Date: Mon, 11 Jul 2022 20:03:42 +0200 Subject: [PATCH] Designate fill_pathname_noext as deprecated function --- libretro-common/file/file_path.c | 41 ++++++++++++------------ libretro-common/include/file/file_path.h | 34 ++++++++++---------- 2 files changed, 38 insertions(+), 37 deletions(-) diff --git a/libretro-common/file/file_path.c b/libretro-common/file/file_path.c index 8d63334566..21131dcd2a 100644 --- a/libretro-common/file/file_path.c +++ b/libretro-common/file/file_path.c @@ -296,26 +296,6 @@ void fill_pathname(char *out_path, const char *in_path, strlcat(out_path, replace, size); } -/** - * fill_pathname_noext: - * @out_path : output path - * @in_path : input path - * @replace : what to replace - * @size : buffer size of output path - * - * Appends a filename extension 'replace' to 'in_path', and outputs - * result in 'out_path'. - * - * Assumes in_path has no extension. If an extension is still - * present in 'in_path', it will be ignored. - * - */ -size_t fill_pathname_noext(char *out_path, const char *in_path, - const char *replace, size_t size) -{ - strlcpy(out_path, in_path, size); - return strlcat(out_path, replace, size); -} char *find_last_slash(const char *str) { @@ -1445,3 +1425,24 @@ void fill_short_pathname_representation_noext(char* out_rep, fill_short_pathname_representation(out_rep, in_path, size); path_remove_extension(out_rep); } + +/** + * fill_pathname_noext: + * @out_path : output path + * @in_path : input path + * @replace : what to replace + * @size : buffer size of output path + * + * Appends a filename extension 'replace' to 'in_path', and outputs + * result in 'out_path'. + * + * Assumes in_path has no extension. If an extension is still + * present in 'in_path', it will be ignored. + * + */ +size_t fill_pathname_noext(char *out_path, const char *in_path, + const char *replace, size_t size) +{ + strlcpy(out_path, in_path, size); + return strlcat(out_path, replace, size); +} diff --git a/libretro-common/include/file/file_path.h b/libretro-common/include/file/file_path.h index b76d8ff15d..a6404dd02d 100644 --- a/libretro-common/include/file/file_path.h +++ b/libretro-common/include/file/file_path.h @@ -268,23 +268,6 @@ size_t fill_dated_filename(char *out_filename, void fill_str_dated_filename(char *out_filename, const char *in_str, const char *ext, size_t size); -/** - * fill_pathname_noext: - * @out_path : output path - * @in_path : input path - * @replace : what to replace - * @size : buffer size of output path - * - * Appends a filename extension 'replace' to 'in_path', and outputs - * result in 'out_path'. - * - * Assumes in_path has no extension. If an extension is still - * present in 'in_path', it will be ignored. - * - */ -size_t fill_pathname_noext(char *out_path, const char *in_path, - const char *replace, size_t size); - /** * find_last_slash: * @str : input path @@ -556,6 +539,23 @@ size_t fill_pathname_join_delim_concat(char *out_path, const char *dir, const char *path, const char delim, const char *concat, size_t size); +/** + * fill_pathname_noext: + * @out_path : output path + * @in_path : input path + * @replace : what to replace + * @size : buffer size of output path + * + * Appends a filename extension 'replace' to 'in_path', and outputs + * result in 'out_path'. + * + * Assumes in_path has no extension. If an extension is still + * present in 'in_path', it will be ignored. + * + */ +size_t fill_pathname_noext(char *out_path, const char *in_path, + const char *replace, size_t size); + RETRO_END_DECLS #endif