shithub: sce

Download patch

ref: 6b8005ee7ada815662d8bc09743b47b9ae773270
parent: 5b85f622f66ccdd13b583e5654f4c5777124404f
author: qwx <qwx@sciops.net>
date: Mon Apr 12 07:29:55 EDT 2021

utils: revert last, crop(1) patch accepted

--- a/utils/sceass
+++ b/utils/sceass
@@ -36,7 +36,7 @@
 ' | pico
 t=`{read -c 36 $grp | awk '{dx=$2+'^$dx^'; dy=$3+'^$dy^'; print dx, dy, dy+8}'}
 for(i in $name^?.^$frm^.^$rot.bit)
-	iconv -c r8g8b8 $i | {crop -t $t(1-2) >[2]/dev/null || cat} > a && mv a $i
+	iconv -c r8g8b8 $i | crop -t $t(1-2) > a && mv a $i
 if(~ $#noshad 0){
 	f=$name^s.^$frm^.^$rot.bit
 	echo '
@@ -49,6 +49,6 @@
 		o = z == 3 ? o[x,y,0] + o[x,y,1] + o[x,y,2] > 0 ? 0 : Z/2+1 : o
 		!w o '^$f^'
 	' | pico
-	iconv -c a8r8g8b8 $f | {crop -t $t(1) $t(3) >[2]/dev/null || cat} > a && mv a $f
+	iconv -c a8r8g8b8 $f | crop -t $t(1) $t(3) > a && mv a $f
 }
 status=''
--- a/utils/scefix
+++ b/utils/scefix
@@ -39,7 +39,7 @@
 		/env/fuckrc >/env/forever
 	</env/forever $home/p/pico/pico
 	iconv -c r8g8b8 /tmp/b.bit |\
-		{crop -t $x1 $y1 >[2]/dev/null || cat} \
+		crop -t $x1 $y1 \
 		>$name.$frm.$rot.bit
 	mv $name^s.$frm.$rot.bit $name.$frm.$rot.s.bit
 	rm /tmp/b.bit
@@ -81,8 +81,7 @@
 }
 
 fn translate{
-	if(! ~ $2 0 || ! ~ $3 0)
-		crop -t $2 $3 $1 > a && mv a $1
+	crop -t $2 $3 $1 > a && mv a $1
 }
 
 cat <<! >/env/fuckrc
--- a/utils/scerot
+++ b/utils/scerot
@@ -14,5 +14,5 @@
 for(i in $n){
 	t=`{read -c 46 $1^.^$id($i)^.bit | awk '{print $2, $3}'}
 	f=$1^.^$rev($i)^.bit
-	iconv -c $3 $f | {crop -t $t >[2]/dev/null || cat} > a && mv a $f
+	iconv -c $3 $f | crop -t $t > a && mv a $f
 }