1replace_filename(3)             Allegro manual             replace_filename(3)
2
3
4

NAME

6       replace_filename  -  Replaces  path+filename  with a new filename tail.
7       Allegro game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       char *replace_filename(char *dest, const char *path, const char  *file‐
14       name, int size);
15

DESCRIPTION

17       Replaces  the specified path+filename with a new filename tail, storing
18       at most `size' bytes into the `dest' buffer. You can use the same  buf‐
19       fer both as input and output because Allegro internally works on a copy
20       of the input before touching `dest'. Example:
21
22          char name[200];
23          ...
24          get_executable_name(name, sizeof(name));
25          replace_filename(name, name, "sound.dat", sizeof(name));
26

RETURN VALUE

28       Returns a copy of the `dest' parameter.
29
30

SEE ALSO

32       get_filename(3), replace_extension(3), append_filename(3)
33
34
35
36Allegro                          version 4.2.3             replace_filename(3)
Impressum