Merge pull request #1279 from xexyl/1990-jaw-path-script
This commit is contained in:
3 files changed
+8
-9
No files matched your search
+1
-1
@@ -142,7 +142,7 @@ atob: zcat
|
||||
${PROG}:
|
||||
${RM} -f $@
|
||||
echo 'PATH=;export PATH;./atob|./zcat' > $@
|
||||
${CHMOD} 0555 $@
|
||||
${CHMOD} 0755 $@
|
||||
|
||||
# alternative executable
|
||||
#
|
||||
|
||||
+3
-3
@@ -9,11 +9,11 @@ for i in "${@?${usage?$0 file...}}";do<"$i"||exit;done
|
||||
#
|
||||
# "Cleverly he dialed from within." -- D. Van Vliet, "Trout Mask Replica"
|
||||
#
|
||||
PATH=$PATH:.:.. a=atob m=unshark z=zcat
|
||||
a=atob m=unshark z=zcat
|
||||
r="rm -f $a $m* ../$m.tar $z" v="cc -Wno-implicit-function-declaration -Wno-implicit-int -o $z $m.c"
|
||||
trap '$r;exit 1' 1 2 13 15
|
||||
echo decoding...
|
||||
(:|compress|btoa|./$a|./$z)2>$m>&2||(sed '1,9s/./#define & /
|
||||
(:|compress|btoa|$a|$z)2>$m>&2||(sed '1,9s/./#define & /
|
||||
s/@/[w]/g
|
||||
s/C/char /g
|
||||
s/I/;if(/g
|
||||
@@ -43,5 +43,5 @@ Z,h@=w;n=8;f=Q+e;i=o=HIo<0)X,1;P(i)WH+1){Iw==Q&e){Z;m=n=8;f=QIH<0)X}
|
||||
c=wIw>=f)U++=i,w=oWw>=Q)U++=h@,w=t@;P(i=h@)Wp>D+Q)P(*--p)
|
||||
I(w=f)<1l<<k)t@=o,h[f++]=i;o=c}X}
|
||||
_
|
||||
($v);echo 1>&2;ln -f $z $a);./$a<<\w>./$m-&&./$z<./$m->./$m;tar xvf ../$m.tar&&$r
|
||||
($v);echo 1>&2;ln -f $z $a);./$a<<\w>$m-&&./$z<$m->$m;tar xvf ../$m.tar&&$r
|
||||
Z
|
||||
+4
-5
@@ -948,10 +948,9 @@ with if the C preprocessor botches single quotes in cpp expansion.
|
||||
|
||||
## [1990/jaw](1990/jaw/jaw.c) ([README.md](1990/jaw/README.md]))
|
||||
|
||||
Cody fixed the script to work properly in modern environments including paths,
|
||||
writing to and extracting from stdout, (to do with `$PATH`
|
||||
not having `.` in it) and relying on the exit code in the commands to allow for
|
||||
`&& ...`.
|
||||
Cody fixed the script to work properly in modern environments including writing
|
||||
to and extracting from `stdout` and relying on the exit code in the commands to
|
||||
allow for `&& ...`.
|
||||
|
||||
He also changed the `perror(3)` call to `fprintf(3)` because in macOS when errno
|
||||
is 0 it shows what looks like an error.
|
||||
@@ -961,7 +960,7 @@ the time.
|
||||
|
||||
NOTE: as `btoa` is not common we used a ruby script from Yusuke but with a minor
|
||||
fix applied by Cody that made the program just show `oops` twice from invalid
|
||||
input.
|
||||
input but which now works.
|
||||
|
||||
|
||||
## [1990/pjr](1990/pjr/pjr.c) ([README.md](1990/pjr/README.md]))
|
||||
|
||||
Reference in new issue
Block a user