Rev | Line | |
---|
[412] | 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. */ |
---|
| 7 | char *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). */ |
---|
| 13 | const char *pa_path_get_filename(const char *p) { |
---|
[413] | 14 | char * r; |
---|
| 15 | |
---|
| 16 | if ( (r = strrchr(p, '/')) ) { |
---|
| 17 | return (const char *) r+1; |
---|
| 18 | } else { |
---|
| 19 | return p; |
---|
| 20 | } |
---|
| 21 | |
---|
[412] | 22 | } |
---|
| 23 | |
---|
| 24 | //ll |
---|
Note: See
TracBrowser
for help on using the repository browser.