(svn r10246) -Fix (r10297): some forgotten money conversions and truncation issues. Thanks to benc for providing the patch.

This commit is contained in:
rubidium
2007-06-21 14:32:27 +00:00
parent c755fa43d0
commit 0d8e82b7d7
25 changed files with 94 additions and 82 deletions

View File

@@ -410,7 +410,9 @@ void ChangeWorkingDirectory(const char *exe)
void DetermineBasePaths(const char *exe)
{
char tmp[MAX_PATH];
#ifdef WITH_PERSONAL_DIR
#if defined(__MORPHOS__) || defined(__AMIGA__) || !defined(WITH_PERSONAL_DIR)
_searchpaths[SP_PERSONAL_DIR] = NULL;
#else
const char *homedir = getenv("HOME");
if (homedir == NULL) {
@@ -422,14 +424,16 @@ void DetermineBasePaths(const char *exe)
AppendPathSeparator(tmp, MAX_PATH);
_searchpaths[SP_PERSONAL_DIR] = strdup(tmp);
#else
_searchpaths[SP_PERSONAL_DIR] = NULL;
#endif
_searchpaths[SP_SHARED_DIR] = NULL;
#if defined(__MORPHOS__) || defined(__AMIGA__)
_searchpaths[SP_WORKING_DIR] = NULL;
#else
getcwd(tmp, MAX_PATH);
AppendPathSeparator(tmp, MAX_PATH);
_searchpaths[SP_WORKING_DIR] = strdup(tmp);
#endif
/* Change the working directory to that one of the executable */
ChangeWorkingDirectory((char*)exe);
@@ -437,9 +441,13 @@ void DetermineBasePaths(const char *exe)
AppendPathSeparator(tmp, MAX_PATH);
_searchpaths[SP_BINARY_DIR] = strdup(tmp);
#if defined(__MORPHOS__) || defined(__AMIGA__)
_searchpaths[SP_INSTALLATION_DIR] = NULL;
#else
snprintf(tmp, MAX_PATH, "%s", GLOBAL_DATA_DIR);
AppendPathSeparator(tmp, MAX_PATH);
_searchpaths[SP_INSTALLATION_DIR] = strdup(tmp);
#endif
#ifdef WITH_COCOA
extern void cocoaSetApplicationBundleDir();
cocoaSetApplicationBundleDir();