Create fill_pathname_base_ext
This commit is contained in:
parent
e36107530e
commit
45c33c7acf
|
@ -351,6 +351,13 @@ void fill_pathname_base_noext(char *out, const char *in_path, size_t size)
|
||||||
path_remove_extension(out);
|
path_remove_extension(out);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void fill_pathname_base_ext(char *out, const char *in_path, const char *ext,
|
||||||
|
size_t size)
|
||||||
|
{
|
||||||
|
fill_pathname_base_noext(out, in_path, size);
|
||||||
|
strlcat(out, ext, size);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fill_pathname_basedir:
|
* fill_pathname_basedir:
|
||||||
* @out_dir : output directory
|
* @out_dir : output directory
|
||||||
|
|
|
@ -254,6 +254,10 @@ void fill_pathname_base(char *out_path, const char *in_path, size_t size);
|
||||||
void fill_pathname_base_noext(char *out_dir,
|
void fill_pathname_base_noext(char *out_dir,
|
||||||
const char *in_path, size_t size);
|
const char *in_path, size_t size);
|
||||||
|
|
||||||
|
void fill_pathname_base_ext(char *out,
|
||||||
|
const char *in_path, const char *ext,
|
||||||
|
size_t size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fill_pathname_basedir:
|
* fill_pathname_basedir:
|
||||||
* @out_dir : output directory
|
* @out_dir : output directory
|
||||||
|
|
|
@ -60,17 +60,17 @@ void menu_shader_manager_init(menu_handle_t *menu)
|
||||||
* conflicts on menu.cgp/menu.glslp. */
|
* conflicts on menu.cgp/menu.glslp. */
|
||||||
if (config_path)
|
if (config_path)
|
||||||
{
|
{
|
||||||
fill_pathname_base_noext(menu->default_glslp, config_path,
|
fill_pathname_base_ext(menu->default_glslp, config_path,
|
||||||
|
".glslp",
|
||||||
sizeof(menu->default_glslp));
|
sizeof(menu->default_glslp));
|
||||||
strlcat(menu->default_glslp, ".glslp", sizeof(menu->default_glslp));
|
|
||||||
|
|
||||||
fill_pathname_base_noext(menu->default_cgp, config_path,
|
fill_pathname_base_ext(menu->default_cgp, config_path,
|
||||||
|
".cgp",
|
||||||
sizeof(menu->default_cgp));
|
sizeof(menu->default_cgp));
|
||||||
strlcat(menu->default_cgp, ".cgp", sizeof(menu->default_cgp));
|
|
||||||
|
|
||||||
fill_pathname_base_noext(menu->default_slangp, config_path,
|
fill_pathname_base_ext(menu->default_slangp, config_path,
|
||||||
|
".slangp",
|
||||||
sizeof(menu->default_slangp));
|
sizeof(menu->default_slangp));
|
||||||
strlcat(menu->default_slangp, ".slangp", sizeof(menu->default_slangp));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue