Interpreting number suffix "d" (disk block) as factor of 512

This commit is contained in:
Thomas Schmitt 2014-10-28 14:08:31 +00:00
parent 9cd6c71d39
commit 63bd1bdfa3
2 changed files with 4 additions and 2 deletions

View File

@ -172,7 +172,8 @@ ex:;
/** Convert a text into a number of type double and multiply it by unit code
[kmgtpe] (2^10 to 2^60) or [s] (2048). (Also accepts capital letters.)
[kmgtpe] (2^10 to 2^60) or [s] (2048) or [d] (512).
(Also accepts capital letters.)
@param text Input like "42", "2k", "3.14m" or "-1g"
@param flag Bitfield for control purposes:
bit0= return -1 rathern than 0 on failure
@ -199,6 +200,7 @@ double Scanf_io_size(char *text, int flag)
if(c=='p' || c=='P') ret*= 1024.0*1024.0*1024.0*1024.0*1024.0;
if(c=='e' || c=='E') ret*= 1024.0*1024.0*1024.0*1024.0*1024.0*1024.0;
if(c=='s' || c=='S') ret*= 2048.0;
if(c=='d' || c=='D') ret*= 512.0;
return(ret);
}

View File

@ -1 +1 @@
#define Xorriso_timestamP "2014.10.28.140609"
#define Xorriso_timestamP "2014.10.28.140709"