diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-02-17 09:10:25 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-02-17 09:10:25 -0800 |
commit | fa9b9111f795c2377ac5d338fab4f431fdd44464 (patch) | |
tree | f5919f8ca9a07562e5006c32e5acbf0216b18ab8 /txr-embedded-arg.txr | |
parent | f16aaf441c112f0e6382b77ebdcd585d8c531580 (diff) | |
download | txr-fa9b9111f795c2377ac5d338fab4f431fdd44464.tar.gz txr-fa9b9111f795c2377ac5d338fab4f431fdd44464.tar.bz2 txr-fa9b9111f795c2377ac5d338fab4f431fdd44464.zip |
save-exe: new function.
* lisplib.c (save_exe_instantiate, save_exe_set_entries): New
static functions.
(lisplib_init): Register auto-load of save-exe module, keyed
to save-exe symbol.
* share/txr/stdlib/save-exe.tl: New file.
* txr.1: Removing txr-embedded-arg.txr documentation and
documenting save-exe in its place.
* txr-embedded-arg.txr: File removed.
Diffstat (limited to 'txr-embedded-arg.txr')
-rwxr-xr-x | txr-embedded-arg.txr | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/txr-embedded-arg.txr b/txr-embedded-arg.txr deleted file mode 100755 index 8b48095d..00000000 --- a/txr-embedded-arg.txr +++ /dev/null @@ -1,32 +0,0 @@ -@(do - (defun stream-positioned-to-right-place (name) - (let* ((stream (open-file name "r+b")) - (pre (progn (stream-set-prop stream :byte-oriented t) - (read-until-match #/@\(txr\)/ stream t)))) - (when (or (empty pre) (not (search-str pre "@(txr)"))) - (throwf 'error "~a isn't a TXR executable" name)) - stream))) -@(next :args) -@(cases) --w -@string -@file -@ (eof) -@ (do - (let* ((f (stream-positioned-to-right-place file)) - (b (ffi-put string (ffi (zarray 128 char))))) - (put-buf b 0 f))) -@(or) -@file -@ (eof) -@ (do - (let ((f (stream-positioned-to-right-place file)) - (b (make-buf 128))) - (fill-buf b 0 f) - (put-line (ffi-get b (ffi (zarray 128 char)))))) -@(or) -@ (output) -usage: @{self-path} [-w string] txr-executable -@ (end) -@ (do (exit 1)) -@(end) |