shithub: rc

Download patch

ref: 09450ef5777e7fe9d1065582ca86cf94b00f97e0
parent: cffe0a8c867e90cc8334edac55fecf98fab64125
author: qwx <qwx@sciops.net>
date: Sun Sep 18 19:26:00 EDT 2022

update for pc(1) -n removal

--- a/bin/br
+++ b/bin/br
@@ -62,7 +62,7 @@
 		exit "attach failed"
 	}
 	r = pipe("seg -Lr igfxmmio " mem " " did[dev,"r"])
-	v = pipe("echo \''" r " & ~0xffff | ((" r ">>16) * " fac " / 100)\'' | pc -n")
+	v = pipe("echo \''" r " & ~0xffff | ((" r ">>16) * " fac " / 100)\'' | pc")
 	if(system("seg -Lw igfxmmio " mem " " did[dev,"w"] " " v) != 0)
 		exit "write failed"
 }
--- a/bin/mailrio
+++ b/bin/mailrio
@@ -13,7 +13,7 @@
 facerect=( \
 	0 \
 	0 \
-	`{echo $wsz(3) - $wsz(1) | pc -n} \
+	`{echo $wsz(3) - $wsz(1) | pc} \
 	116 \
 )
 cat <<! >/tmp/mailrio.$pid
--- a/bin/qk2
+++ b/bin/qk2
@@ -20,7 +20,7 @@
 		cdmnt=$2
 		shift
 	case -r
-		res=(-dx `{echo $2 + 8 | pc -n} -dy `{echo $3 + 8 | pc -n})
+		res=(-dx `{echo $2 + 8 | pc} -dy `{echo $3 + 8 | pc})
 		shift 2
 	case -z
 		noresz=1
--- a/bin/s
+++ b/bin/s
@@ -109,7 +109,7 @@
 # from umbraticus' rc/s
 # |pc          # inline arithmetic
 fn pc{
-	/bin/pc -n | tr -d '
+	/bin/pc | tr -d '
 '
 }
 # _sig           # print function signature
--- a/bin/sizes
+++ b/bin/sizes
@@ -5,18 +5,18 @@
 
 # tentative bar(1) placement, which is determined by riostart policy
 barrect=( \
-	`{echo $bsamrect(1) - 430 | pc -n} \
-	`{echo $bsamrect(2) - 28 | pc -n} \
+	`{echo $bsamrect(1) - 430 | pc} \
+	`{echo $bsamrect(2) - 28 | pc} \
 	$screensize(3) \
 	$screensize(4) \
 )
 
-briorect=(0 0 $screensize(1) `{echo $screensize(2) - 16 | pc -n})
+briorect=(0 0 $screensize(1) `{echo $screensize(2) - 16 | pc})
 bsamrect=(0 32 $briorect(3) $briorect(4))
 bcmdrect=( \
 	0 \
-	`{echo $bsamrect(4) - $bsamrect(4) / 3 | pc -n} \
-	`{echo $bsamrect(3) / 3 | pc -n} \
+	`{echo $bsamrect(4) - $bsamrect(4) / 3 | pc} \
+	`{echo $bsamrect(3) / 3 | pc} \
 	$briorect(4) \
 )
 # default windows
@@ -27,7 +27,7 @@
 	296 \
 )
 volrect=( \
-	`{echo $catrect(3) - 4 | pc -n} \
+	`{echo $catrect(3) - 4 | pc} \
 	0 \
 	768 \
 	28 \
@@ -34,49 +34,49 @@
 )
 kprintrect=( \
 	$volrect(1) \
-	`{echo $volrect(4) - 4 | pc -n} \
+	`{echo $volrect(4) - 4 | pc} \
 	$volrect(3) \
-	`{echo $catrect(4) / 2 | pc -n} \
+	`{echo $catrect(4) / 2 | pc} \
 )
 statrect=( \
 	$volrect(1) \
-	`{echo $kprintrect(4) - 4 | pc -n} \
+	`{echo $kprintrect(4) - 4 | pc} \
 	$volrect(3) \
 	$catrect(4) \
 )
 cmdrect=( \
 	0 \
-	`{echo $catrect(4) - 4 | pc -n} \
+	`{echo $catrect(4) - 4 | pc} \
 	$volrect(3) \
 	$screensize(2) \
 )
 riowrect=( \
-	`{echo $screensize(1) - 100 | pc -n} \
-	`{echo $screensize(2) - 28 | pc -n} \
+	`{echo $screensize(1) - 100 | pc} \
+	`{echo $screensize(2) - 28 | pc} \
 	$screensize(1) \
 	$screensize(2) \
 )
 zukerect=( \
-	`{echo $screensize(1) - 768 | pc -n} \
+	`{echo $screensize(1) - 768 | pc} \
 	0 \
 	$screensize(1) \
 	$screensize(2) \
 )
 duckrect=( \
-	`{echo $screensize(1) / 2 | pc -n} \
+	`{echo $screensize(1) / 2 | pc} \
 	0 \
 	$screensize(1) \
-	`{echo $screensize(2) - 256 | pc -n} \
+	`{echo $screensize(2) - 256 | pc} \
 )
 mailrect=( \
 	0 \
 	0 \
-	`{echo $briorect(3) / 3 | pc -n} \
+	`{echo $briorect(3) / 3 | pc} \
 	$briorect(4) \
 )
 # force corner
 vncrect=( \
-	`{echo $screensize(1) - 160 | pc -n} \
+	`{echo $screensize(1) - 160 | pc} \
 	0 \
 	$screensize(1) \
 	64 \