- file sizes > 4 GB were not correctly displayed in the file window. It

still was using int for calculus... made it using 64 bits ints.

- The "disk free" indicator in the header didn't work for OSX, due to
  a missing #ifdef __APPLE_
This commit is contained in:
Ton Roosendaal
2005-04-30 09:57:35 +00:00
parent feca8c4644
commit ea3f579482
3 changed files with 12 additions and 6 deletions

View File

@@ -188,7 +188,7 @@ double BLI_diskfree(char *dir)
if (slash) slash[1] = 0;
} else strcpy(name,"/");
#if defined (__FreeBSD__) || defined (linux) || defined (__OpenBSD__)
#if defined (__FreeBSD__) || defined (linux) || defined (__OpenBSD__) || defined (__APPLE__)
if (statfs(name, &disk)) return(-1);
#endif
#ifdef __BeOS
@@ -316,8 +316,13 @@ void BLI_adddirstrings()
char size[250];
static char * types[8] = {"---", "--x", "-w-", "-wx", "r--", "r-x", "rw-", "rwx"};
int num, mode;
int num1, num2, num3, num4, st_size;
int num1, num2, num3, num4;
#ifdef WIN32
__int64 st_size;
#else
long long st_size;
#endif
struct direntry * file;
struct tm *tm;
time_t zero= 0;
@@ -372,7 +377,7 @@ void BLI_adddirstrings()
strftime(files[num].time, 8, "%H:%M", tm);
strftime(files[num].date, 16, "%d-%b-%y", tm);
st_size= (int)files[num].s.st_size;
st_size= files[num].s.st_size;
num1= st_size % 1000;
num2= st_size/1000;

View File

@@ -394,7 +394,8 @@ void clear_global_filesel_vars()
void filesel_statistics(SpaceFile *sfile, int *totfile, int *selfile, float *totlen, float *sellen)
{
int a, len;
double len;
int a;
*totfile= *selfile= 0;
*totlen= *sellen= 0;

View File

@@ -153,7 +153,7 @@ void file_buttons(void)
filesel_statistics(sfile, &totfile, &selfile, &totlen, &sellen);
sprintf(naam, "Free: %.3f Mb Files: (%d) %d (%.3f) %.3f Mb", df, selfile,totfile, sellen, totlen);
sprintf(naam, "Free: %.3f MB Files: (%d) %d (%.3f) %.3f MB", df, selfile,totfile, sellen, totlen);
cpack(0x0);
glRasterPos2i(xco, 5);