comparison get_path.c @ 24242:76f5d8892c04

Clean up the way get_path is handled: Compile get_path.c to an object to link against instead of directly #including the C file and replace the many extern declarations by a proper header file.
author diego
date Tue, 28 Aug 2007 11:20:24 +0000
parents 0a38ad149c5c
children 0fad7c7596be
comparison
equal deleted inserted replaced
24241:e6c56a194610 24242:76f5d8892c04
6 * Returns the pointer to the ALLOCATED buffer containing the 6 * Returns the pointer to the ALLOCATED buffer containing the
7 * zero terminated path string. This buffer has to be FREED 7 * zero terminated path string. This buffer has to be FREED
8 * by the caller. 8 * by the caller.
9 * 9 *
10 */ 10 */
11
12 #include <stdio.h>
13 #include <stdlib.h>
14 #include <string.h>
15 #include "mp_msg.h"
16
11 #ifdef MACOSX_BUNDLE 17 #ifdef MACOSX_BUNDLE
12 #include <CoreFoundation/CoreFoundation.h> 18 #include <CoreFoundation/CoreFoundation.h>
13 #include <sys/types.h> 19 #include <sys/types.h>
14 #include <sys/stat.h> 20 #include <sys/stat.h>
15 #include <stdio.h>
16 #include <stdlib.h>
17 #include <unistd.h> 21 #include <unistd.h>
18 #include <string.h>
19 #endif 22 #endif
20 23
21 char *get_path(const char *filename){ 24 char *get_path(const char *filename){
22 char *homedir; 25 char *homedir;
23 char *buff; 26 char *buff;