"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/xfeutils.cpp" between
xfe-1.43.tar.gz and xfe-1.43.1.tar.gz

About: Xfe (X File Explorer) is a file manager and browser (using the FOX toolkit).

xfeutils.cpp  (xfe-1.43):xfeutils.cpp  (xfe-1.43.1)
skipping to change at line 887 skipping to change at line 887
ptr[-1] = '\0'; // ?? ptr[-1] = '\0'; // ??
if (closedir(dp) < 0) if (closedir(dp) < 0)
{ {
fprintf(stderr, _("Error: Can't close folder %s\n"), path); fprintf(stderr, _("Error: Can't close folder %s\n"), path);
} }
return(dsize); return(dsize);
} }
// Write the file size in human readable form (bytes or Kbytes or Mbytes) // Write the file size in human readable form (bytes, kBytes, MBytes, GBytes)
// We use a decimal basis for KB, MB, GB count // We use a decimal basis for kB, MB, GB count
FXString hSize(char* size) FXString hSize(char* size)
{ {
int flag = 0; int flag = 0;
char suf[64]; char suf[64];
char buf[128]; char buf[128];
FXString hsize; FXString hsize;
FXulong lsize = strtoull(size, NULL, 10); FXulong lsize = strtoull(size, NULL, 10);
float fsize = 0.0; float fsize = 0.0;
skipping to change at line 915 skipping to change at line 915
} }
else if (lsize > 1e6) else if (lsize > 1e6)
{ {
fsize = lsize/1e6; fsize = lsize/1e6;
strlcpy(suf, _("MB"), sizeof(suf)); strlcpy(suf, _("MB"), sizeof(suf));
flag = 1; flag = 1;
} }
else if (lsize > 1e3) else if (lsize > 1e3)
{ {
fsize = lsize/1e3; fsize = lsize/1e3;
strlcpy(suf, _("KB"), sizeof(suf)); strlcpy(suf, _("kB"), sizeof(suf));
flag = 1; flag = 1;
} }
if (flag) if (flag)
{ {
if (fsize == (int)fsize) if (fsize == (int)fsize)
{ {
snprintf(buf, sizeof(buf), "%.0f %s", fsize, suf); snprintf(buf, sizeof(buf), "%.0f %s", fsize, suf);
} }
else else
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)