filename | src/lxpaths.h |
changeset | 1041:5fcc39857c5c |
next | 1205:a486ac64f34b |
author | nkeynes |
date | Tue Dec 15 08:46:37 2009 +1000 (14 years ago) |
permissions | -rw-r--r-- |
last change | Add side-by-side x86+sh4 disassembly output Print SH4 state information and disassembly of the current block when crashing. Fix delay slot instruction in conditional branch not being marked as a delay-slot instruction in the branch-not-taken path. Rename REG_* defines in cpu.h to avoid conflict with translation defs |
file | annotate | diff | log | raw |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00001.2 +++ b/src/lxpaths.h Tue Dec 15 08:46:37 2009 +10001.3 @@ -0,0 +1,97 @@1.4 +/**1.5 + * $Id$1.6 + *1.7 + * Various path definitions and helper functions1.8 + *1.9 + * Copyright (c) 2005 Nathan Keynes.1.10 + *1.11 + * This program is free software; you can redistribute it and/or modify1.12 + * it under the terms of the GNU General Public License as published by1.13 + * the Free Software Foundation; either version 2 of the License, or1.14 + * (at your option) any later version.1.15 + *1.16 + * This program is distributed in the hope that it will be useful,1.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of1.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1.19 + * GNU General Public License for more details.1.20 + */1.21 +1.22 +#ifndef lxdream_paths_H1.23 +#define lxdream_paths_H1.24 +1.25 +/****************** System paths ****************/1.26 +/**1.27 + * Location of the shared lxdreamrc (e.g. /usr/local/etc/lxdreamrc)1.28 + */1.29 +const char *get_sysconf_path();1.30 +1.31 +/**1.32 + * Location of the message catalogs (e.g. /usr/local/share/locale)1.33 + */1.34 +const char *get_locale_path();1.35 +1.36 +/**1.37 + * Location of the plugins, if any (e.g. /usr/local/lib/lxdream)1.38 + */1.39 +const char *get_plugin_path();1.40 +1.41 +/**1.42 + * Location of the current user's data path (e.g. ~/.lxdream)1.43 + */1.44 +const char *get_user_data_path();1.45 +1.46 +/******************** Path helpers *****************/1.47 +1.48 +/**1.49 + * Escape a pathname if needed to prevent shell substitution.1.50 + * @return a newly allocated string (or NULL if the input is NULL)1.51 + */1.52 +gchar *get_escaped_path( const gchar *name );1.53 +1.54 +/**1.55 + * Expand a pathname according to standard shell substitution rules1.56 + * (excluding command substitutions).1.57 + * @return a newly allocated string (or NULL if the input is NULL)1.58 + */1.59 +gchar *get_expanded_path( const gchar *name );1.60 +1.61 +/**1.62 + * Return an absolute path for the given input path, as a newly allocated1.63 + * string. If the input path is already absolute, the returned string will1.64 + * be identical to the input string.1.65 + */1.66 +gchar *get_absolute_path( const gchar *path );1.67 +1.68 +/**1.69 + * Construct a filename in the same directory as the file at. That is,1.70 + * if at is "/tmp/foo" and filename = "bar", the function returns1.71 + * "/tmp/bar".1.72 + * @return a newly allocated string that must be released by the caller.1.73 + */1.74 +gchar *get_filename_at( const gchar *at, const gchar *filename );1.75 +1.76 +1.77 +/********************* GUI Paths ***********************/1.78 +/* The following functions provide a cache for the most recently accessed1.79 + * path for each config key (ie for GUI file open/save dialogs)1.80 + */1.81 +/**1.82 + * Get the path corresponding to the given global config key1.83 + */1.84 +const gchar *get_gui_path(int key);1.85 +1.86 +/**1.87 + * Override the path for the given global config key, without changing the1.88 + * underlying configuration.1.89 + */1.90 +void set_gui_path( int key, const gchar *path );1.91 +1.92 +/**1.93 + * Notify the helper functions that the config paths have changed, in which1.94 + * event they will revert to the config-specified versions.1.95 + */1.96 +void reset_gui_paths();1.97 +1.98 +1.99 +1.100 +#endif /* !lxdream_paths_H */
.