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)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
bool FileExists(const string& strFilename);
|
||||
|
||||
#endif
|
||||
|
||||
+20
-17
@@ -95,21 +95,21 @@ int fileExists(const char * filename)
|
||||
}
|
||||
|
||||
/*
|
||||
#ifdef LINUX
|
||||
#ifdef LINUX
|
||||
|
||||
#include <execinfo.h>
|
||||
void dumpStack()
|
||||
{
|
||||
void* buffer[50];
|
||||
int s = backtrace(buffer, 50);
|
||||
char** tab = backtrace_symbols(buffer, s);
|
||||
for (int i = 1; i < s; ++i) printf("%s\n", tab[i]);
|
||||
printf("\n");
|
||||
free(tab);
|
||||
}
|
||||
#include <execinfo.h>
|
||||
void dumpStack()
|
||||
{
|
||||
void* buffer[50];
|
||||
int s = backtrace(buffer, 50);
|
||||
char** tab = backtrace_symbols(buffer, s);
|
||||
for (int i = 1; i < s; ++i) printf("%s\n", tab[i]);
|
||||
printf("\n");
|
||||
free(tab);
|
||||
}
|
||||
|
||||
#endif
|
||||
*/
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* RAM simple check functions source */
|
||||
|
||||
@@ -298,19 +298,22 @@ std::string wordWrap(const std::string& sentence, float width, int fontId)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
bool FileExists(const string& strFilename) {
|
||||
bool FileExists(const string& strFilename)
|
||||
{
|
||||
struct stat stFileInfo;
|
||||
bool blnReturn;
|
||||
int intStat;
|
||||
|
||||
// Attempt to get the file attributes
|
||||
intStat = stat(strFilename.c_str(),&stFileInfo);
|
||||
if(intStat == 0) {
|
||||
if(intStat == 0)
|
||||
{
|
||||
// We were able to get the file attributes
|
||||
// so the file obviously exists.
|
||||
blnReturn = true;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
// We were not able to get the file attributes.
|
||||
// This may mean that we don't have permission to
|
||||
// access the folder which contains this file. If you
|
||||
|
||||
Reference in New Issue
Block a user