summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/bit.y7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/bit.y b/bin/bit.y
index 798103f1..8e816fec 100644
--- a/bin/bit.y
+++ b/bin/bit.y
@@ -54,7 +54,7 @@ static uint64_t get(size_t i) {
 %left '+' '-'
 %left '*' '/' '%'
 %right '~'
-%left 'K' 'M' 'G'
+%left 'K' 'M' 'G' 'T'
 
 %%
 
@@ -72,6 +72,7 @@ expr:
 	| expr 'K' { $$ = $1 << 10; }
 	| expr 'M' { $$ = $1 << 20; }
 	| expr 'G' { $$ = $1 << 30; }
+	| expr 'T' { $$ = $1 << 40; }
 	| '~' expr { $$ = ~$2; }
 	| '-' expr { $$ = -$2; }
 	| expr '*' expr { $$ = $1 * $3; }
@@ -129,7 +130,9 @@ static void print(size_t i) {
 	);
 
 	if (val) {
-		if (!(val & (1 << 30) - 1)) {
+		if (!(val & (1ULL << 40) - 1)) {
+			printf(" %"PRId64"T", val >> 40);
+		} else if (!(val & (1 << 30) - 1)) {
 			printf(" %"PRId64"G", val >> 30);
 		} else if (!(val & (1 << 20) - 1)) {
 			printf(" %"PRId64"M", val >> 20);
2022-02-12Use compat_readpassphrase.c on LinuxJune McEnroe 2022-02-12Copy RPP defines from oconfigureJune McEnroeune McEnroe 2020-12-15Update pounce to 2.1p1June McEnroe 2020-12-15Add imbox portJune McEnroe 2020-11-24Update pounce to 2.1June McEnroe 2020-11-24Update libretls to 3.3.0June McEnroe 2020-11-17Update catgirl to 1.3June McEnroe 2020-11-17Update libretls to 3.2.2June McEnroe 2020-09-29Update libretls to 3.2.1June McEnroe 2020-09-10Update catgirl to 1.2June McEnroe 2020-09-09Add pounce-palaver portJune McEnroe 2020-09-09Update pounce to 2.0June McEnroe 2020-09-09Update litterbox to 1.6June McEnroe 2020-08-23Add scooper portJune McEnroe 2020-08-23Add catsit portJune McEnroe 2020-08-13Update pounce to 1.4p2June McEnroe 2020-08-11Update pounce to 1.4p1June McEnroe 2020-08-10Add litterbox portJune McEnroe 2020-08-10Add missing USES=pkgconfig to pounceJune McEnroe