GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  GET_FILENAME (3)

NAME

get_filename - Returns a pointer to the filename portion of a path. Allegro game programming library.

CONTENTS

Synopsis
Description
See Also

SYNOPSIS

#include <allegro.h>

char *get_filename(const char *path);

DESCRIPTION

Finds out the filename portion of a completely specified file path. Both ‘#146; 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’\n", 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(3), put_backslash(3), replace_filename(3), exmidi(3)
Search for    or go to Top of page |  Section 3 |  Main Index


Allegro GET_FILENAME (3) version 4.4.2

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.