filename | src/paths_unix.c |
changeset | 1038:f220d18c0615 |
prev | 1024:c67f2d61ab97 |
next | 1241:74f8e11ab4b8 |
author | nkeynes |
date | Mon Dec 12 21:15:44 2011 +1000 (12 years ago) |
permissions | -rw-r--r-- |
last change | Handle branch delay-slot instruction that falls on the next page correctly. - Generate the right end PC in the first place (sh4trans.c) - Allow blocks to be marked as both entry point + continuation, and specifically handle invalidation when first entry of a page is a continuation == flush previous page as well. |
file | annotate | diff | log | raw |
nkeynes@964 | 1 | /** |
nkeynes@1021 | 2 | * $Id$ |
nkeynes@964 | 3 | * |
nkeynes@964 | 4 | * Wrappers for system-dependent functions (mainly path differences) |
nkeynes@964 | 5 | * |
nkeynes@964 | 6 | * Copyright (c) 2008 Nathan Keynes. |
nkeynes@964 | 7 | * |
nkeynes@964 | 8 | * This program is free software; you can redistribute it and/or modify |
nkeynes@964 | 9 | * it under the terms of the GNU General Public License as published by |
nkeynes@964 | 10 | * the Free Software Foundation; either version 2 of the License, or |
nkeynes@964 | 11 | * (at your option) any later version. |
nkeynes@964 | 12 | * |
nkeynes@964 | 13 | * This program is distributed in the hope that it will be useful, |
nkeynes@964 | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
nkeynes@964 | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
nkeynes@964 | 16 | * GNU General Public License for more details. |
nkeynes@964 | 17 | */ |
nkeynes@964 | 18 | |
nkeynes@964 | 19 | #include <string.h> |
nkeynes@1038 | 20 | #include <stdlib.h> |
nkeynes@1038 | 21 | #include <glib/gstrfuncs.h> |
nkeynes@964 | 22 | |
nkeynes@964 | 23 | #include "lxdream.h" |
nkeynes@1038 | 24 | #include "config.h" |
nkeynes@964 | 25 | |
nkeynes@964 | 26 | const char *get_sysconf_path() |
nkeynes@964 | 27 | { |
nkeynes@964 | 28 | return PACKAGE_CONF_DIR; |
nkeynes@964 | 29 | } |
nkeynes@964 | 30 | |
nkeynes@964 | 31 | const char *get_locale_path() |
nkeynes@964 | 32 | { |
nkeynes@964 | 33 | return PACKAGE_LOCALE_DIR; |
nkeynes@964 | 34 | } |
nkeynes@964 | 35 | |
nkeynes@1024 | 36 | const char *get_plugin_path() |
nkeynes@1024 | 37 | { |
nkeynes@1024 | 38 | return PACKAGE_PLUGIN_DIR; |
nkeynes@1024 | 39 | } |
nkeynes@1038 | 40 | |
nkeynes@1038 | 41 | static char *user_data_path = NULL; |
nkeynes@1038 | 42 | |
nkeynes@1038 | 43 | const char *get_user_data_path() |
nkeynes@1038 | 44 | { |
nkeynes@1038 | 45 | if( user_data_path == NULL ) { |
nkeynes@1038 | 46 | char *home = getenv("HOME"); |
nkeynes@1038 | 47 | user_data_path = g_strdup_printf( "%s/.lxdream", home ); |
nkeynes@1038 | 48 | } |
nkeynes@1038 | 49 | return user_data_path; |
nkeynes@1038 | 50 | } |
.