Fixed some formatting issues that cause compile issues on bsd.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user