+++ /dev/null
-#!/usr/bin/env tclsh
-
-source [file join [file dirname $::argv0] keks.tcl]
-namespace import KEKS::*
-eval [lindex $::argv 0]
-puts [binary encode hex $::KEKS::buf]
+#!/usr/bin/env tclsh
# TclKEKS -- Tcl KEKS encoder implementation
# Copyright (C) 2024-2025 Sergey Matveev <stargrave@stargrave.org>
#
namespace export LIST MAP SET LenFirstSort BLOB
}
+
+if {[info exists argv0] && ([file tail [info script]] eq [file tail $argv0])} {
+ namespace import KEKS::*
+ set buf ""
+ eval [lindex $::argv 0]
+ puts [binary encode hex $buf]
+}