1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-13 17:49:10 +00:00

(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular

This commit is contained in:
tron
2006-06-27 21:25:53 +00:00
parent c126ce110e
commit 2b27073156
77 changed files with 1051 additions and 1037 deletions

15
os2.c
View File

@@ -64,10 +64,11 @@ int compare_FiosItems(const void *a, const void *b)
static void append_path(char *out, const char *path, const char *file)
{
if (path[2] == '\\' && path[3] == '\0')
if (path[2] == '\\' && path[3] == '\0') {
sprintf(out, "%s%s", path, file);
else
} else {
sprintf(out, "%s\\%s", path, file);
}
}
// Get a list of savegames
@@ -347,10 +348,11 @@ char *FiosBrowseTo(const FiosItem *item)
case FIOS_TYPE_PARENT:
s = strrchr(path, '\\');
if (s != path + 2)
if (s != path + 2) {
s[0] = '\0';
else
} else {
s[1] = '\0';
}
break;
case FIOS_TYPE_DIR:
@@ -406,10 +408,7 @@ void FiosMakeSavegameName(char *buf, const char *name, size_t size)
const char* extension;
const char* period;
if (_game_mode == GM_EDITOR)
extension = ".scn";
else
extension = ".sav";
extension = (_game_mode == GM_EDITOR ? ".scn" : ".sav");
// Don't append the extension, if it is already there
period = strrchr(name, '.');