return filename;
}
-char *getSolutionTapeFilename(int nr)
+char *getDefaultSolutionTapeFilename(int nr)
{
static char *filename = NULL;
char basename[MAX_FILENAME_LEN];
sprintf(basename, "%03d.%s", nr, TAPEFILE_EXTENSION);
filename = getPath2(getSolutionTapeDir(), basename);
- if (!fileExists(filename))
- {
- static char *filename_sln = NULL;
+ return filename;
+}
+
+char *getSokobanSolutionTapeFilename(int nr)
+{
+ static char *filename = NULL;
+ char basename[MAX_FILENAME_LEN];
+
+ checked_free(filename);
+
+ sprintf(basename, "%03d.sln", nr);
+ filename = getPath2(getSolutionTapeDir(), basename);
+
+ return filename;
+}
- checked_free(filename_sln);
+char *getSolutionTapeFilename(int nr)
+{
+ char *filename = getDefaultSolutionTapeFilename(nr);
- sprintf(basename, "%03d.sln", nr);
- filename_sln = getPath2(getSolutionTapeDir(), basename);
+ if (!fileExists(filename))
+ {
+ char *filename2 = getSokobanSolutionTapeFilename(nr);
- if (fileExists(filename_sln))
- return filename_sln;
+ if (fileExists(filename2))
+ return filename2;
}
return filename;
char *getProgramMainDataPath(char *, char *);
char *getProgramConfigFilename(char *);
char *getTapeFilename(int);
+char *getDefaultSolutionTapeFilename(int);
+char *getSokobanSolutionTapeFilename(int);
char *getSolutionTapeFilename(int);
char *getScoreFilename(int);
char *getScoreCacheFilename(int);