diff --git a/src/get_fname.c b/src/get_fname.c index c7f64bea9..8d113233b 100644 --- a/src/get_fname.c +++ b/src/get_fname.c @@ -33,7 +33,7 @@ /* DIR_SAVE: Where is the user's saved directory? This is where their saved files are stored and where the "current_id.txt" file is saved. - + Windows predefines "savedir" as: "C:\Documents and Settings\%USERNAME%\Application Data\TuxPaint" though it may get overridden with "--savedir" option @@ -60,10 +60,10 @@ const char *datadir; char *get_fname(const char *const name, int kind) { char f[512]; - const char *restrict const dir = (kind==DIR_SAVE) ? savedir : datadir; + const char *restrict const dir = (kind == DIR_SAVE) ? savedir : datadir; // Some mkdir()'s don't like trailing slashes - snprintf(f, sizeof(f), "%s%c%s", dir, (*name)?'/':'\0', name); + snprintf(f, sizeof(f), "%s%c%s", dir, (*name) ? '/' : '\0', name); return strdup(f); } diff --git a/src/get_fname.h b/src/get_fname.h index bf04e9369..d5e7ebdc4 100644 --- a/src/get_fname.h +++ b/src/get_fname.h @@ -28,7 +28,8 @@ extern const char *savedir; extern const char *datadir; -enum { +enum +{ DIR_SAVE, DIR_DATA };