diff options
author | B. Watson <urchlay@slackware.uk> | 2024-12-23 15:51:41 -0500 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2024-12-23 15:51:41 -0500 |
commit | e739d2ccb7a7b488b7dcc15313b0ffaedd8c0a77 (patch) | |
tree | bdb41f736d7becc99016497d0bd7cc8734f21fe6 | |
parent | 734994ddaf7522f9d763cacc0f7cde63b9c7188a (diff) | |
download | uxd-e739d2ccb7a7b488b7dcc15313b0ffaedd8c0a77.tar.gz |
add T/t (terabytes) for numeric options
-rw-r--r-- | uxd.1 | 6 | ||||
-rw-r--r-- | uxd.c | 2 | ||||
-rw-r--r-- | uxd.rst | 6 |
3 files changed, 8 insertions, 6 deletions
@@ -62,9 +62,9 @@ by itself. .sp The options that accept numbers (\fB\-l\fP, \fB\-o\fP, \fB\-s\fP, and \fB\-S\fP) allow decimal, hex (with \fI0x\fP prefix), or octal (with \fI0\fP prefix). -Also, you can use the suffixes \fIk\fP, \fIm\fP, and \fIg\fP for power\-of\-2 based -kilobytes, megabytes, or gigabytes (e.g. \fI1k\fP is 1024 bytes), as well -as \fIK\fP, \fIM\fP, and \fIG\fP for power\-of\-10 based (e.g. \fI1K\fP is 1000 bytes). +Also, you can use the suffixes \fIk\fP, \fIm\fP, \fIg\fP, and \fIt\fP for power\-of\-2 based +kilobytes, megabytes, gigabytes, or terabytes (e.g. \fI1k\fP is 1024 bytes), as well +as \fIK\fP, \fIM\fP, \fIG\fP, and \fIT\fP for power\-of\-10 based (e.g. \fI1K\fP is 1000 bytes). .\" the comments are turned into the --help message by mkusage.pl. . .INDENT 0.0 @@ -254,9 +254,11 @@ long parse_number(int opt, const char *s) { case 'k': result *= 1024L; break; case 'm': result *= 1048576L; break; case 'g': result *= 1073741824L; break; + case 't': result *= 1099511627776L; break; case 'K': result *= 1000L; break; case 'M': result *= 1000000L; break; case 'G': result *= 1000000000L; break; + case 'T': result *= 1000000000000L; break; default: number_err(opt); } @@ -52,9 +52,9 @@ by itself. The options that accept numbers (**-l**, **-o**, **-s**, and **-S**) allow decimal, hex (with *0x* prefix), or octal (with *0* prefix). -Also, you can use the suffixes *k*, *m*, and *g* for power-of-2 based -kilobytes, megabytes, or gigabytes (e.g. *1k* is 1024 bytes), as well -as *K*, *M*, and *G* for power-of-10 based (e.g. *1K* is 1000 bytes). +Also, you can use the suffixes *k*, *m*, *g*, and *t* for power-of-2 based +kilobytes, megabytes, gigabytes, or terabytes (e.g. *1k* is 1024 bytes), as well +as *K*, *M*, *G*, and *T* for power-of-10 based (e.g. *1K* is 1000 bytes). .. the comments are turned into the --help message by mkusage.pl. |