From: Alyssa M. <fu...@us...> - 2011-04-26 20:28:28
|
gemrb: Infinity Engine emulator The branch master has been updated via 873011b369144df13337c1f07f4158fb3aa11aff (commit) via d95db020b980909aba9e356b32b9ac329eaf95d7 (commit) via 89e7418ebcbec4296a741e3ad4ed5d825f02b153 (commit) via 0aefea0fcbcc0fa9dc2819a819ea3e2d71ba40cb (commit) Summary of changes: gemrb/core/System/VFS.cpp | 25 +++++++++++++------------ gemrb/plugins/BIFImporter/BIFImporter.cpp | 5 +++-- 2 files changed, 16 insertions(+), 14 deletions(-) from 1f2f6fbc682f2f6f9faa99a777fbdd5db6079d52 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=873011b369144df13337c1f07f4158fb3aa11aff commit 873011b369144df13337c1f07f4158fb3aa11aff Author: dhewg <dh...@wi...> Date: Tue Apr 26 17:49:47 2011 +0200 BIFImporter: Fix whitespaces diff --git a/gemrb/plugins/BIFImporter/BIFImporter.cpp b/gemrb/plugins/BIFImporter/BIFImporter.cpp index 0107951..5894eca 100644 --- a/gemrb/plugins/BIFImporter/BIFImporter.cpp +++ b/gemrb/plugins/BIFImporter/BIFImporter.cpp @@ -95,7 +95,7 @@ int BIFImporter::CreateArchive(DataStream *compressed) return GEM_ERROR; } char Signature[8]; - + memcpy(Signature,"SAV V1.0",8); compressed->Write(Signature, 8); @@ -194,7 +194,7 @@ int BIFImporter::OpenArchive(const char* filename) return GEM_ERROR; stream->Read( Signature, 8 ); if (strncmp( Signature, "BIFFV1 ", 8 ) == 0) { - ReadBIF(); + ReadBIF(); } else return GEM_ERROR; return GEM_OK; @@ -317,3 +317,4 @@ void BIFImporter::ReadBIF(void) GEMRB_PLUGIN(0xC7F133C, "BIF File Importer") PLUGIN_CLASS(IE_BIF_CLASS_ID, BIFImporter) END_PLUGIN() + http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=d95db020b980909aba9e356b32b9ac329eaf95d7 commit d95db020b980909aba9e356b32b9ac329eaf95d7 Author: dhewg <dh...@wi...> Date: Tue Apr 26 17:47:31 2011 +0200 VFS: Fix va_start/va_end usage in PathJoin() diff --git a/gemrb/core/System/VFS.cpp b/gemrb/core/System/VFS.cpp index 06f8f61..ab08106 100644 --- a/gemrb/core/System/VFS.cpp +++ b/gemrb/core/System/VFS.cpp @@ -188,9 +188,6 @@ static bool FindInDir(const char* Dir, char *Filename) bool PathJoin (char *target, const char *base, ...) { - va_list ap; - va_start(ap, base); - if (base == NULL) { target[0] = '\0'; return false; @@ -198,6 +195,9 @@ bool PathJoin (char *target, const char *base, ...) strcpy(target, base); + va_list ap; + va_start(ap, base); + while (char *source = va_arg(ap, char*)) { char *slash; do { @@ -219,8 +219,10 @@ bool PathJoin (char *target, const char *base, ...) source = slash + 1; } while (slash); } + va_end( ap ); return true; + finish: while (char *source = va_arg(ap, char*)) { PathAppend(target, source); http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=89e7418ebcbec4296a741e3ad4ed5d825f02b153 commit 89e7418ebcbec4296a741e3ad4ed5d825f02b153 Author: dhewg <dh...@wi...> Date: Tue Apr 26 17:45:37 2011 +0200 VFS: Use dir_exists in IsDirectory() diff --git a/gemrb/core/System/VFS.cpp b/gemrb/core/System/VFS.cpp index d8f99ea..06f8f61 100644 --- a/gemrb/core/System/VFS.cpp +++ b/gemrb/core/System/VFS.cpp @@ -362,10 +362,8 @@ DirectoryIterator::~DirectoryIterator() bool DirectoryIterator::IsDirectory() { char dtmp[_MAX_PATH]; - struct stat fst; GetFullPath(dtmp); - stat( dtmp, &fst ); - return S_ISDIR( fst.st_mode ); + return dir_exists(dtmp); } char* DirectoryIterator::GetName() http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=0aefea0fcbcc0fa9dc2819a819ea3e2d71ba40cb commit 0aefea0fcbcc0fa9dc2819a819ea3e2d71ba40cb Author: dhewg <dh...@wi...> Date: Tue Apr 26 17:45:00 2011 +0200 VFS: Mark private functions as static diff --git a/gemrb/core/System/VFS.cpp b/gemrb/core/System/VFS.cpp index fb12e93..d8f99ea 100644 --- a/gemrb/core/System/VFS.cpp +++ b/gemrb/core/System/VFS.cpp @@ -62,7 +62,7 @@ struct dirent { // buffer which readdir returns static dirent de; -DIR* opendir(const char* filename) +static DIR* opendir(const char* filename) { DIR* dirp = ( DIR* ) malloc( sizeof( DIR ) ); dirp->is_first = 1; @@ -73,7 +73,7 @@ DIR* opendir(const char* filename) return dirp; } -dirent* readdir(DIR* dirp) +static dirent* readdir(DIR* dirp) { struct _finddata_t c_file; @@ -93,7 +93,7 @@ dirent* readdir(DIR* dirp) return &de; } -void closedir(DIR* dirp) +static void closedir(DIR* dirp) { _findclose( dirp->hFile ); free( dirp ); @@ -139,7 +139,7 @@ bool file_exists(const char* path) * Appends 'name' to path 'target' and returns 'target'. * It takes care of inserting PathDelimiter ('/' or '\\') if needed */ -char* PathAppend (char* target, const char* name) +static char* PathAppend (char* target, const char* name) { size_t len = strlen(target); @@ -153,7 +153,7 @@ char* PathAppend (char* target, const char* name) } -bool FindInDir(const char* Dir, char *Filename) +static bool FindInDir(const char* Dir, char *Filename) { // First test if there's a Filename with exactly same name // and if yes, return it and do not search in the Dir @@ -260,7 +260,7 @@ void FixPath (char *path, bool needslash) path[i] = 0; } -int strmatch(const char *string, const char *mask) +static int strmatch(const char *string, const char *mask) { while(*mask) { if (*mask!='?') { @@ -394,3 +394,4 @@ void DirectoryIterator::Rewind() else Entry = readdir(static_cast<DIR*>(Directory)); } + ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |