Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

replace_filename(3alleg4) [opendarwin man page]

replace_filename(3alleg4)					  Allegro manual					 replace_filename(3alleg4)

replace_filename - Replaces path+filename with a new filename tail. Allegro game programming library. SYNOPSIS
#include <allegro.h> char *replace_filename(char *dest, const char *path, const char *filename, int size); DESCRIPTION
Replaces the specified path+filename with a new filename tail, storing at most `size' bytes into the `dest' buffer. You can use the same buffer both as input and output because Allegro internally works on a copy of the input before touching `dest'. Example: char name[200]; ... get_executable_name(name, sizeof(name)); replace_filename(name, name, "sound.dat", sizeof(name)); RETURN VALUE
Returns a copy of the `dest' parameter. SEE ALSO
get_filename(3alleg4), replace_extension(3alleg4), append_filename(3alleg4) Allegro version 4.4.2 replace_filename(3alleg4)

Check Out this Related Man Page

get_filename(3alleg4)						  Allegro manual					     get_filename(3alleg4)

get_filename - Returns a pointer to the filename portion of a path. Allegro game programming library. SYNOPSIS
#include <allegro.h> char *get_filename(const char *path); DESCRIPTION
Finds out the filename portion of a completely specified file path. Both `' and `/' are recognized as directory separators under DOS and Windows. However, only `/' is recognized as directory separator under other platforms. Example: get_executable_name(name, sizeof(name)); allegro_message("Running `%s' ", get_filename(name)); Note that Allegro won't perform any IO operations during the verification. This means that if you have `/a/path/like/this/', which doesn't have a filename, the function will return a pointer to the trailing null character. However, if you have `/a/path/like/this', Allegro will return a pointer to `this', even if it is a valid directory. RETURN VALUE
Returns a pointer to the portion of `path' where the filename starts, or the beginning of `path' if no valid filename is found (eg. you are processing a path with backslashes under Unix). SEE ALSO
get_extension(3alleg4), put_backslash(3alleg4), replace_filename(3alleg4), exmidi(3alleg4) Allegro version 4.4.2 get_filename(3alleg4)
Man Page

Featured Tech Videos