From f6a0cdc6cb2ca9c8c8c593176b152d7dcc041592 Mon Sep 17 00:00:00 2001 From: retropikzel Date: Thu, 25 Jun 2026 07:44:18 +0300 Subject: [PATCH] Slowly starting on scsh library --- retropikzel/scsh.scm | 0 retropikzel/scsh.sld | 748 +++++++++++++++++++++++++++++++++++++ retropikzel/scsh/LICENSE | 26 ++ retropikzel/scsh/README.md | 1 + retropikzel/scsh/VERSION | 1 + 5 files changed, 776 insertions(+) create mode 100644 retropikzel/scsh.scm create mode 100644 retropikzel/scsh.sld create mode 100644 retropikzel/scsh/LICENSE create mode 100644 retropikzel/scsh/README.md create mode 100644 retropikzel/scsh/VERSION diff --git a/retropikzel/scsh.scm b/retropikzel/scsh.scm new file mode 100644 index 0000000..e69de29 diff --git a/retropikzel/scsh.sld b/retropikzel/scsh.sld new file mode 100644 index 0000000..6f2117f --- /dev/null +++ b/retropikzel/scsh.sld @@ -0,0 +1,748 @@ +(define-library + (retropikzel scsh) + (import (scheme base) + (scheme write) + (scheme file) + (foreign c) + (srfi 170)) + (export + ;*temp-file-template* + ;->uid + ;->username + ;%exec + ;%exit + ;%fork + ;%fork/pipe + ;%fork/pipe+ + ;%read-delimited! + ;& + ;& + ;&& + ;reduce-port + ;absolute-file-name + ;accept-connection + ;add-after + ;add-before + ;alist->env + ;alist-compress + ;alist-delete + ;alist-update + ;arg + ;arg* + ;argv + ;arithmetic-shift + ;ascii->char + ;autoreap-policy + ;awk + ;become-session-leader + ;bin-dir + ;bind-listen-accept-loop + ;bind-prepare-listen-accept-loop + ;bind-socket + ;bitwise-and + ;bitwise-ior + ;bitwise-not + ;bitwise-xor + ;break-dot-lock + ;bufpol/block + ;bufpol/line + ;bufpol/none + ;call-terminally + ;call-with-string-output-port + ;call/fdes + ;cflags + ;char->ascii + ;char-ascii? + ;char-blank? + ;char-digit? + ;char-graphic? + ;char-hex-digit? + ;char-iso-control? + ;char-letter+digit? + ;char-letter? + ;char-lower-case? + ;char-printing? + ;char-punctuation? + ;char-title-case? + ;char-upper-case? + ;char-whitespace? + ;chdir + ;clean-up-cres + ;close + ;close-after + ;close-directory-stream + ;close-socket + ;close-syslog-channel + ;command-line + ;command-line-arguments + ;compiler-flags + ;connect-socket + ;connect-socket-no-wait + ;connect-socket-successful? + ;control-tty-file-name + ;copy-tty-info + ;cppflags + ;cpu-ticks/sec + ;create-directory + ;create-fifo + ;create-hard-link + ;create-socket + ;create-socket-pair + ;create-symlink + ;create-temp-file + ;crypt + ;current-thread + ;cwd + ;date, [2] + ;date, [2] + ;date->string + ;default-lib-dirs + ;define-record + ;defs + ;delete-directory + ;delete-file + ;delete-filesys-object + ;directory-as-file-name + ;directory-files + ;disable-tty-char + ;drain-tty + ;dump-scsh + ;dump-scsh-program + ;dup + ;dup->fdes + ;dup->inport + ;dup->outport + ;enabled-interrupts + ;env->alist + ;errno-error + ;error-output-port + ;exec + ;exec-epf + ;exec-epf + ;exec-path + ;exec-path-list + ;exec-path-search + ;exec-path/env + ;exec-prefix + ;exec/env + exit + ;expand-file-name + ;fdes->inport + ;fdes->outport + ;fdes-flags + ;fdes-status + ;field-reader + ;field-splitter + ;file-directory? + ;file-executable? + ;file-exists? + ;file-fifo? + ;file-group + ;file-info + ;file-info-directory? + ;file-info-executable? + ;file-info-fifo? + ;file-info-not-executable? + ;file-info-not-readable? + ;file-info-not-writable? + ;file-info-readable? + ;file-info-regular? + ;file-info-socket? + ;file-info-special? + ;file-info-symlink? + ;file-info-writable? + ;file-info:atime + ;file-info:ctime + ;file-info:device + ;file-info:gid + ;file-info:inode + ;file-info:mode + ;file-info:mtime + ;file-info:nlinks + ;file-info:size + ;file-info:type + ;file-info:uid + ;file-inode + ;file-last-access + ;file-last-mod + ;file-last-status-change + ;file-match + ;file-mode + ;file-name-absolute? + ;file-name-as-directory + ;file-name-directory + ;file-name-directory? + ;file-name-extension + ;file-name-non-directory? + ;file-name-nondirectory + ;file-name-sans-extension + ;file-nlinks + ;file-not-executable? + ;file-not-exists? + ;file-not-readable? + ;file-not-writable? + ;file-owner + ;file-readable? + ;file-regular? + ;file-size + ;file-socket? + ;file-special? + ;file-symlink? + ;file-type + ;file-writable? + ;fill-in-date! + ;find-library-file + ;flush-all-ports + ;flush-submatches + ;flush-tty/both + ;flush-tty/input + ;flush-tty/output + ;force-output + ;fork + ;fork-pty-session + ;fork-thread + ;fork/pipe + ;fork/pipe+ + ;format-date + ;get-lock-region + ;getenv + ;glob + ;glob-quote + ;group-info, [2] + ;group-info:gid + ;group-info:members + ;group-info:name + ;handle-signal-default + ;home-dir + ;home-directory + ;home-file + ;host + ;host-info + ;if-match + ;if-sre-form + ;ignore-signal + ;include-dir + ;infix-splitter + ;internet-address->socket-address + ;interrupt-handler + ;interrupt-set + ;interrupt/alarm + ;interrupt/alrm + ;interrupt/chld + ;interrupt/cont + ;interrupt/hup + ;interrupt/info + ;interrupt/int + ;interrupt/io + ;interrupt/keyboard + ;interrupt/memory-shortage + ;interrupt/poll + ;interrupt/prof + ;interrupt/pwr + ;interrupt/quit + ;interrupt/term + ;interrupt/tstp + ;interrupt/urg + ;interrupt/usr1 + ;interrupt/usr2 + ;interrupt/vtalrm + ;interrupt/winch + ;interrupt/xcpu + ;interrupt/xfsz + ;itimer + ;join-strings + ;ldflags + ;let-match + ;lib-dir + ;lib-dirs + ;lib-dirs-list + ;libs + ;linker-flags + ;listen-socket + ;lock-owner-uid + ;lock-region + ;lock-region/no-block + ;lock-region:end + ;lock-region:exclusive? + ;lock-region:len + ;lock-region:proc + ;lock-region:start + ;lock-region:whence + ;lock-region? + ;lock? + ;machine + ;make-char-port-filter + ;make-date + ;make-lock + ;make-lock-region + ;make-md5-context + ;make-placeholder + ;make-pty-generator + ;make-re-char-set + ;make-re-choice + ;make-re-dsm + ;make-re-repeat + ;make-re-seq + ;make-re-string + ;make-re-submatch + ;make-regexp + ;make-string-input-port + ;make-string-output-port + ;make-string-port-filter + ;make-syslog-mask + ;make-syslog-options + ;make-tty-info + ;man-dir + ;match-cond + ;match:end + ;match:start + ;match:substring + ;maybe-obtain-lock + ;md5-context->md5-digest + ;md5-context? + ;md5-digest->number + ;md5-digest-for-port + ;md5-digest-for-string + ;md5-digest? + ;most-recent-sigevent + ;move->fdes + ;network-info + ;next-sigevent + ;next-sigevent-set + ;next-sigevent-set/no-wait + ;next-sigevent/no-wait + ;nice + ;number->md5-digest + ;obtain-dot-lock + ;obtain-lock + ;open-control-tty + ;open-directory-stream + ;open-fdes + ;open-file + ;open-input-file + ;open-output-file + ;open-pty + ;open-syslog-channel + ;os + ;parent-pid + ;parse-file-name + ;parse-sre + ;parse-sres + ;path-list->file-name + ;pid + ;pid->proc + ;pipe + ;placeholder-value + ;placeholder? + ;port->fdes + ;port->list + ;port->sexp-list + ;port->socket + ;port->string + ;port->string-list + ;port-fold + ;port-revealed + ;posix-string->regexp + ;prefix + ;priority + ;proc + ;proc:pid + ;proc? + ;process-group + ;process-sleep + ;process-sleep-until + ;process-times + ;protocol-info + ;pty-name->tty-name + ;re-any + ;re-any? + ;re-bol + ;re-bol? + ;re-bos + ;re-bos? + ;re-char-set + ;re-char-set:cset + ;re-char-set? + ;re-choice + ;re-choice:elts + ;re-choice:tsm + ;re-choice? + ;re-dsm + ;re-dsm:body + ;re-dsm:post-dsm + ;re-dsm:pre-dsm + ;re-dsm:tsm + ;re-dsm? + ;re-empty + ;re-empty? + ;re-eol + ;re-eol? + ;re-eos + ;re-eos? + ;re-nonl + ;re-repeat:from + ;re-repeat:to + ;re-repeat:tsm + ;re-repeat? + ;re-seq + ;re-seq:elts + ;re-seq:tsm + ;re-seq? + ;re-string + ;re-string:chars + ;re-string? + ;re-submatch:post-dsm + ;re-submatch:pre-dsm + ;re-submatch:tsm + ;re-submatch? + ;re-trivial + ;re-trivial? + ;re-tsm + ;read-delimited + ;read-delimited! + ;read-directory-stream + ;read-line + ;read-paragraph + ;read-string + ;read-string! + ;read-string!/partial + ;read-string/partial + ;read-symlink + ;reap-zombies + ;receive-message + ;receive-message! + ;receive-message!/partial + ;receive-message/partial + ;record-reader + ;regexp->posix-string + ;regexp->scheme + ;regexp->sre + ;regexp-fold + ;regexp-fold-right + ;regexp-for-each + ;regexp-search + ;regexp-search? + ;regexp-substitute + ;regexp-substitute/global + ;regexp?, [2] + ;release-dot-lock + ;release-lock + ;release-port-handle + ;relinquish-timeslice + ;rename-file + ;replace-extension + ;resolve-file-name + ;run + ;run + ;run/collecting + ;run/collecting* + ;run/file + ;run/file* + ;run/port + ;run/port* + ;run/port+proc + ;run/port+proc* + ;run/sexp + ;run/sexp* + ;run/sexps + ;run/sexps* + ;run/string + ;run/string* + ;run/strings + ;run/strings* + ;rx + ;seek + ;select + ;select-port-channels + ;select-ports + ;send-message + ;send-message/partial + ;send-tty-break + ;service-info + ;set-enabled-interrupts + ;set-fdes-flags + ;set-fdes-status + ;set-file-group + ;set-file-mode + ;set-file-owner + ;set-file-times + ;set-gid + ;set-interrupt-handler + ;set-port-buffering + ;set-priority + ;set-process-group + ;set-socket-option + ;set-tty-info/drain + ;set-tty-info/flush + ;set-tty-info/now + ;set-tty-process-group + ;set-uid + ;set-umask + ;set-user-effective-gid + ;set-user-effective-uid + ;setenv + ;shutdown-socket + ;sigevent? + ;signal->interrupt + ;signal-process + ;signal-process-group + ;signal/abrt + ;signal/alrm + ;signal/bus + ;signal/chld + ;signal/cont + ;signal/emt + ;signal/fpe + ;signal/hup + ;signal/ill + ;signal/info + ;signal/int + ;signal/io + ;signal/iot + ;signal/kill + ;signal/pipe + ;signal/poll + ;signal/prof + ;signal/pwr + ;signal/quit + ;signal/segv + ;signal/stop + ;signal/sys + ;signal/term + ;signal/trap + ;signal/tstp + ;signal/ttin + ;signal/ttou + ;signal/urg + ;signal/usr1 + ;signal/usr2 + ;signal/vtalrm + ;signal/winch + ;signal/xcpu + ;signal/xfsz + ;simplify-file-name + ;simplify-regexp + ;skip-char-set + ;sleep + ;sloppy-suffix-splitter + ;socket-address->internet-address + ;socket-address->unix-address + ;socket-connect + ;socket-local-address + ;socket-option + ;socket-remote-address + ;spawn + ;split-file-name + ;spoon + ;sre->regexp + ;sre-form? + ;start-tty-input + ;start-tty-output + ;static-regexp? + ;status:exit-val + ;status:stop-sig + ;status:term-sig + ;stdio->stdports + ;stdports->stdio + ;stop-tty-input + ;stop-tty-output + ;string-match + ;string-output-port-output + ;substitute-env-vars + ;suffix-splitter + ;suspend + ;sync-file + ;sync-file-system + ;syslog, [2], [3] + ;syslog-facility + ;syslog-facility? + ;syslog-level + ;syslog-level? + ;syslog-mask + ;syslog-mask-all + ;syslog-mask-upto + ;syslog-mask? + ;syslog-option + ;syslog-option? + ;syslog-options + ;syslog-options? + ;system-name + ;tell + ;temp-file-channel + ;temp-file-iterate + ;terminate-current-thread + ;thread-name + ;thread-uid + ;thread? + ;ticks/sec + ;time + ;time, [2] + ;time+ticks + ;truncate-file + ;tty-file-name + ;tty-info + ;tty-info record type + ;tty-info:control-chars + ;tty-info:control-flags + ;tty-info:input-flags + ;tty-info:input-speed + ;tty-info:local-flags + ;tty-info:min + ;tty-info:output-flags + ;tty-info:output-speed + ;tty-info:time + ;tty-info? + ;tty-name->pty-name + ;tty-process-group + ;tty? + ;ttyc/2-stop-bits + ;ttyc/carrier-flow-ctl + ;ttyc/char-size + ;ttyc/char-size5 + ;ttyc/char-size6 + ;ttyc/char-size7 + ;ttyc/char-size8 + ;ttyc/CTS-output-flow-ctl + ;ttyc/enable-parity + ;ttyc/enable-read + ;ttyc/hup-on-close + ;ttyc/ignore-flags + ;ttyc/no-modem-sync + ;ttyc/odd-parity + ;ttyc/RTS-input-flow-ctl + ;ttychar/delayed-suspend + ;ttychar/delete-char + ;ttychar/delete-line + ;ttychar/delete-word + ;ttychar/discard + ;ttychar/eof + ;ttychar/eol + ;ttychar/eol2 + ;ttychar/interrupt + ;ttychar/literal-next + ;ttychar/quit + ;ttychar/reprint + ;ttychar/start + ;ttychar/status + ;ttychar/stop + ;ttychar/suspend + ;ttyin/7bits + ;ttyin/beep-on-overflow + ;ttyin/check-parity + ;ttyin/cr->nl + ;ttyin/ignore-bad-parity-chars + ;ttyin/ignore-break + ;ttyin/ignore-cr + ;ttyin/input-flow-ctl + ;ttyin/interrupt-on-break + ;ttyin/lowercase + ;ttyin/mark-parity-errors + ;ttyin/nl->cr + ;ttyin/output-flow-ctl + ;ttyin/xon-any + ;ttyl/alt-delete-word + ;ttyl/canonical + ;ttyl/case-map + ;ttyl/echo + ;ttyl/echo-ctl + ;ttyl/echo-delete-line + ;ttyl/echo-nl + ;ttyl/enable-signals + ;ttyl/extended + ;ttyl/flush-output + ;ttyl/hardcopy-delete + ;ttyl/no-flush-on-interrupt + ;ttyl/no-kernel-status + ;ttyl/reprint-unread-chars + ;ttyl/ttou-signal + ;ttyl/visual-delete + ;ttyl/visual-delete-line + ;ttyout/all-delay + ;ttyout/bs-delay + ;ttyout/bs-delay0 + ;ttyout/bs-delay1 + ;ttyout/cr->nl + ;ttyout/cr-delay + ;ttyout/cr-delay0 + ;ttyout/cr-delay1 + ;ttyout/cr-delay2 + ;ttyout/cr-delay3 + ;ttyout/delay-w/fill-char + ;ttyout/discard-eot + ;ttyout/enable + ;ttyout/expand-tabs + ;ttyout/ff-delay + ;ttyout/ff-delay0 + ;ttyout/ff-delay1 + ;ttyout/fill-w/del + ;ttyout/nl->crnl + ;ttyout/nl-delay + ;ttyout/nl-delay0 + ;ttyout/nl-delay1 + ;ttyout/nl-does-cr + ;ttyout/no-col0-cr + ;ttyout/tab-delay + ;ttyout/tab-delay0 + ;ttyout/tab-delay1 + ;ttyout/tab-delay2 + ;ttyout/tab-delayx + ;ttyout/uppercase + ;ttyout/vtab-delay + ;ttyout/vtab-delay0 + ;ttyout/vtab-delay1 + ;umask + ;uname + ;uncase + ;uncase-char-set + ;uncase-string + ;unix-address->socket-address + ;unlock-region + ;user-effective-gid + ;user-effective-uid + ;user-gid + ;user-info, [2] + ;user-info:gid + ;user-info:home-dir + ;user-info:name + ;user-info:shell + ;user-info:uid + ;user-login-name + ;user-supplementary-gids + ;user-uid + ;vendor + ;wait + ;wait-any + ;wait-process-group + ;with-current-input-port + ;with-current-input-port* + ;with-current-output-port + ;with-current-output-port* + ;with-cwd + ;with-cwd* + ;with-dot-lock + ;with-dot-lock* + ;with-enabled-interrupts + ;with-enabled-interrupts* + ;with-env + ;with-env* + ;with-errno-handler + ;with-errno-handler* + ;with-error-output-port + ;with-error-output-port* + ;with-region-lock + ;with-region-lock* + ;with-stdio-ports + ;with-stdio-ports* + ;with-syslog-destination + ;with-total-env + ;with-total-env* + ;with-umask + ;with-umask* + ;with-user-effective-gid + ;with-user-effective-gid* + ;with-user-effective-uid + ;with-user-effective-uid* + ;write-string + ;write-string/partial + ) + (include "scsh.scm")) diff --git a/retropikzel/scsh/LICENSE b/retropikzel/scsh/LICENSE new file mode 100644 index 0000000..b676172 --- /dev/null +++ b/retropikzel/scsh/LICENSE @@ -0,0 +1,26 @@ +Copyright 2026 Retropikzel + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors +may be used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/retropikzel/scsh/README.md b/retropikzel/scsh/README.md new file mode 100644 index 0000000..00d7bdd --- /dev/null +++ b/retropikzel/scsh/README.md @@ -0,0 +1 @@ +WIP diff --git a/retropikzel/scsh/VERSION b/retropikzel/scsh/VERSION new file mode 100644 index 0000000..6e8bf73 --- /dev/null +++ b/retropikzel/scsh/VERSION @@ -0,0 +1 @@ +0.1.0