aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--uxd.16
-rw-r--r--uxd.c2
-rw-r--r--uxd.rst6
3 files changed, 8 insertions, 6 deletions
diff --git a/uxd.1 b/uxd.1
index d891194..41f01c4 100644
--- a/uxd.1
+++ b/uxd.1
@@ -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
diff --git a/uxd.c b/uxd.c
index 109cbf8..9e402dc 100644
--- a/uxd.c
+++ b/uxd.c
@@ -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);
}
diff --git a/uxd.rst b/uxd.rst
index 5ef598b..7190c20 100644
--- a/uxd.rst
+++ b/uxd.rst
@@ -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.