Designate fill_pathname_noext as deprecated function

This commit is contained in:
libretroadmin 2022-07-11 20:03:42 +02:00
parent d706c9c5bf
commit 7186d75c44
2 changed files with 38 additions and 37 deletions

View File

@ -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);
}

View File

@ -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