Fixed some formatting issues that cause compile issues on bsd.

This commit is contained in:
wrenczes@gmail.com
2011-02-01 11:54:38 +00:00
parent b42dbf0655
commit b6dcb0dcd3
3 changed files with 88 additions and 85 deletions
+2 -2
View File
@@ -117,6 +117,6 @@ u32 ramAvailable(void);
#define MAKEDIR(name) mkdir(name, 0777) #define MAKEDIR(name) mkdir(name, 0777)
#endif #endif
#endif
bool FileExists(const string& strFilename); bool FileExists(const string& strFilename);
#endif
+7 -4
View File
@@ -298,19 +298,22 @@ std::string wordWrap(const std::string& sentence, float width, int fontId)
return retVal; return retVal;
} }
bool FileExists(const string& strFilename)
bool FileExists(const string& strFilename) { {
struct stat stFileInfo; struct stat stFileInfo;
bool blnReturn; bool blnReturn;
int intStat; int intStat;
// Attempt to get the file attributes // Attempt to get the file attributes
intStat = stat(strFilename.c_str(),&stFileInfo); intStat = stat(strFilename.c_str(),&stFileInfo);
if(intStat == 0) { if(intStat == 0)
{
// We were able to get the file attributes // We were able to get the file attributes
// so the file obviously exists. // so the file obviously exists.
blnReturn = true; blnReturn = true;
} else { }
else
{
// We were not able to get the file attributes. // We were not able to get the file attributes.
// This may mean that we don't have permission to // This may mean that we don't have permission to
// access the folder which contains this file. If you // access the folder which contains this file. If you