1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-08 12:15:49 +00:00

Remove unused function

This commit is contained in:
twinaphex 2020-05-12 14:20:12 +02:00
parent cc50eaa88f
commit 9088137051
2 changed files with 0 additions and 68 deletions

View File

@ -414,53 +414,3 @@ void fill_pathname_application_special(char *s,
break;
}
}
/**
* fill_short_pathname_representation:
* @out_rep : output representation
* @in_path : input path
* @size : size of output representation
*
* Generates a short representation of path. It should only
* be used for displaying the result; the output representation is not
* binding in any meaningful way (for a normal path, this is the same as basename)
* In case of more complex URLs, this should cut everything except for
* the main image file.
*
* E.g.: "/path/to/game.img" -> game.img
* "/path/to/myarchive.7z#folder/to/game.img" -> game.img
*/
void fill_short_pathname_representation_wrapper(char* out_rep,
const char *in_path, size_t size)
{
#ifdef HAVE_COMPRESSION
char *path_short = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
char *last_slash = NULL;
path_short[0] = '\0';
fill_pathname(path_short, path_basename(in_path), "",
PATH_MAX_LENGTH * sizeof(char)
);
last_slash = find_last_slash(path_short);
if (last_slash != NULL)
{
/* We handle paths like:
* /path/to/file.7z#mygame.img
* short_name: mygame.img:
*
* We check whether something is actually
* after the hash to avoid going over the buffer.
*/
strlcpy(out_rep, last_slash + 1, size);
free(path_short);
return;
}
free(path_short);
#endif
fill_short_pathname_representation(out_rep, in_path, size);
}

View File

@ -117,24 +117,6 @@ enum application_special_type
APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_DISCORD_AVATARS
};
/**
* fill_short_pathname_representation:
* @out_rep : output representation
* @in_path : input path
* @size : size of output representation
*
* Generates a short representation of path. It should only
* be used for displaying the result; the output representation is not
* binding in any meaningful way (for a normal path, this is the same as basename)
* In case of more complex URLs, this should cut everything except for
* the main image file.
*
* E.g.: "/path/to/game.img" -> game.img
* "/path/to/myarchive.7z#folder/to/game.img" -> game.img
*/
void fill_short_pathname_representation_wrapper(char* out_rep,
const char *in_path, size_t size);
const char *file_path_str(enum file_path_enum enum_idx);
bool fill_pathname_application_data(char *s, size_t len);