From: Sergey Matveev Date: Sun, 13 Apr 2025 12:14:39 +0000 (+0300) Subject: Read Tcl code from stdin X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a4e311dc4018388fe102a20e57318aff084fbb460b5458afb841f6ceb546e741;p=keks.git Read Tcl code from stdin --- diff --git a/tcl/keks.tcl b/tcl/keks.tcl index 5f661d3..cad23e7 100755 --- a/tcl/keks.tcl +++ b/tcl/keks.tcl @@ -308,6 +308,7 @@ package provide KEKS $KEKS::version if {[info exists argv0] && ([file tail [info script]] eq [file tail $argv0])} { namespace import KEKS::* set buf "" - eval [lindex $::argv 0] + set in [read stdin] + eval $in puts [binary encode hex $buf] } diff --git a/tcl/mk-fuzz-inputs b/tcl/mk-fuzz-inputs index fb749fe..54667e5 100755 --- a/tcl/mk-fuzz-inputs +++ b/tcl/mk-fuzz-inputs @@ -1,7 +1,7 @@ #!/bin/sh -e dump() { - keks.tcl "$1" | xxd -r -p + echo "$@" | keks.tcl | xxd -r -p } dump 'BIN ""' >bin-empty