Lines Matching +full:name +full:- +full:prefix
1 /* Code to mangle pathnames into those matching a given prefix.
2 eg. open("/lib/foo.so") => open("/usr/gnemul/i386-linux/lib/foo.so");
17 void init_paths(const char *prefix) in init_paths() argument
19 if (prefix[0] == '\0' || !strcmp(prefix, "/")) { in init_paths()
23 if (prefix[0] == '/') { in init_paths()
24 base = g_strdup(prefix); in init_paths()
27 base = g_build_filename(cwd, prefix, NULL); in init_paths()
35 /* Look for path in emulation dir, otherwise return name. */
36 const char *path(const char *name) in path() argument
42 if (!base || !name || name[0] != '/') { in path()
43 return name; in path()
49 if (g_hash_table_lookup_extended(hash, name, &key, &value)) { in path()
50 ret = value ? value : name; in path()
52 char *save = g_strdup(name); in path()
53 char *full = g_build_filename(base, name, NULL); in path()
64 ret = name; in path()