Allegro 5 api
#include <allegro5/allegro.h> void al_set_path_filename(ALLEGRO_PATH *path, const char *filename)
Set the optional filename part of the path. The filename may be NULL, which is equivalent to setting the filename to the empty string.
al_set_path_extension(3alleg5), al_get_path_filename(3alleg5)