source: roaraudio/libroarpulse/util.c @ 413:7e49a3206e31

Last change on this file since 413:7e49a3206e31 was 413:7e49a3206e31, checked in by phi, 16 years ago

added code for pa_path_get_filename()

File size: 497 bytes
Line 
1//util.c:
2
3#include <libroarpulse/libroarpulse.h>
4
5/** Return the binary file name of the current process. This is not
6 * supported on all architectures, in which case NULL is returned. */
7char *pa_get_binary_name(char *s, size_t l) {
8 return NULL;
9}
10
11/** Return a pointer to the filename inside a path (which is the last
12 * component). */
13const char *pa_path_get_filename(const char *p) {
14 char * r;
15
16 if ( (r = strrchr(p, '/')) ) {
17  return (const char *) r+1;
18 } else {
19  return p;
20 }
21
22}
23
24//ll
Note: See TracBrowser for help on using the repository browser.