Changeset - r13500:e02fc48dfb2e
[Not reviewed]
master
0 2 0
glx - 15 years ago 2009-11-09 15:16:38
glx@openttd.org
(svn r18029) -Fix (r18028): AppendPathSeparator() should stay global
2 files changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/fileio.cpp
Show inline comments
 
@@ -433,13 +433,13 @@ void FioCreateDirectory(const char *name
 
/**
 
 * Appends, if necessary, the path separator character to the end of the string.
 
 * It does not add the path separator to zero-sized strings.
 
 * @param buf    string to append the separator to
 
 * @param buflen the length of the buf
 
 */
 
static void AppendPathSeparator(char *buf, size_t buflen)
 
void AppendPathSeparator(char *buf, size_t buflen)
 
{
 
	size_t s = strlen(buf);
 

	
 
	/* Length of string + path separator + '\0' */
 
	if (s != 0 && buf[s - 1] != PATHSEPCHAR && s + 2 < buflen) {
 
		buf[s]     = PATHSEPCHAR;
src/fileio_func.h
Show inline comments
 
@@ -54,12 +54,13 @@ bool FioCheckFileExists(const char *file
 
char *FioGetFullPath(char *buf, size_t buflen, Searchpath sp, Subdirectory subdir, const char *filename);
 
char *FioFindFullPath(char *buf, size_t buflen, Subdirectory subdir, const char *filename);
 
char *FioAppendDirectory(char *buf, size_t buflen, Searchpath sp, Subdirectory subdir);
 
char *FioGetDirectory(char *buf, size_t buflen, Subdirectory subdir);
 

	
 
void SanitizeFilename(char *filename);
 
void AppendPathSeparator(char *buf, size_t buflen);
 
void DeterminePaths(const char *exe);
 
void *ReadFileToMem(const char *filename, size_t *lenp, size_t maxsize);
 
bool FileExists(const char *filename);
 
const char *FioTarFirstDir(const char *tarname);
 
void FioTarAddLink(const char *src, const char *dest);
 

	
0 comments (0 inline, 0 general)