Interpreting number suffix "d" (disk block) as factor of 512
This commit is contained in:
parent
2446c08e16
commit
b3f6b8d374
@ -172,7 +172,8 @@ ex:;
|
|||||||
|
|
||||||
|
|
||||||
/** Convert a text into a number of type double and multiply it by unit code
|
/** 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 text Input like "42", "2k", "3.14m" or "-1g"
|
||||||
@param flag Bitfield for control purposes:
|
@param flag Bitfield for control purposes:
|
||||||
bit0= return -1 rathern than 0 on failure
|
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=='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=='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=='s' || c=='S') ret*= 2048.0;
|
||||||
|
if(c=='d' || c=='D') ret*= 512.0;
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2014.10.28.140609"
|
#define Xorriso_timestamP "2014.10.28.140709"
|
||||||
|
Loading…
Reference in New Issue
Block a user