From 73734c7010c3230bb1eb23042417de6a29a5781f Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Tue, 16 Jan 2018 19:54:59 +0900 Subject: [PATCH] adding (srfi 159) wrapper around (chibi show) --- lib/chibi/show/color.sld | 3 ++- lib/srfi/159.sld | 27 +++++++++++++++++++++++++++ lib/srfi/159/base.sld | 13 +++++++++++++ lib/srfi/159/color.sld | 6 ++++++ lib/srfi/159/columnar.sld | 8 ++++++++ lib/srfi/159/unicode.sld | 4 ++++ 6 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 lib/srfi/159.sld create mode 100644 lib/srfi/159/base.sld create mode 100644 lib/srfi/159/color.sld create mode 100644 lib/srfi/159/columnar.sld create mode 100644 lib/srfi/159/unicode.sld diff --git a/lib/chibi/show/color.sld b/lib/chibi/show/color.sld index 711b111a..a07bd427 100644 --- a/lib/chibi/show/color.sld +++ b/lib/chibi/show/color.sld @@ -2,5 +2,6 @@ (define-library (chibi show color) (import (scheme base) (chibi show base)) (export as-red as-blue as-green as-cyan as-yellow - as-magenta as-white as-black as-bold) + as-magenta as-white as-black + as-bold as-underline) (include "color.scm")) diff --git a/lib/srfi/159.sld b/lib/srfi/159.sld new file mode 100644 index 00000000..6c180b9b --- /dev/null +++ b/lib/srfi/159.sld @@ -0,0 +1,27 @@ + +(define-library (srfi 159) + (import (srfi 159 base) (srfi 159 columnar) + (srfi 159 unicode) (srfi 159 color)) + (export + ;; base + show fn fn-fork with update! each each-in-list call-with-output + displayed written written-shared written-simply + numeric numeric/comma numeric/si numeric/fitted + nothing nl fl space-to tab-to escaped maybe-escaped + padded padded/left padded/right padded/both + trimmed trimmed/left trimmed/right trimmed/both trimmed/lazy + fitted fitted/left fitted/right fitted/both + joined joined/prefix joined/suffix joined/last joined/dot joined/range + upcased downcased + ;; columnar + call-with-output-generator call-with-output-generators + string->line-generator + tabular columnar show-columns wrapped wrapped/list wrapped/char + justified line-numbers from-file + ;; unicode + as-unicode unicode-terminal-width + ;; color + as-red as-blue as-green as-cyan as-yellow + as-magenta as-white as-black + as-bold as-underline + )) diff --git a/lib/srfi/159/base.sld b/lib/srfi/159/base.sld new file mode 100644 index 00000000..f3faa7c9 --- /dev/null +++ b/lib/srfi/159/base.sld @@ -0,0 +1,13 @@ + +(define-library (srfi 159 base) + (import (chibi show)) + (export + show fn fn-fork with update! each each-in-list call-with-output + displayed written written-shared written-simply + numeric numeric/comma numeric/si numeric/fitted + nothing nl fl space-to tab-to escaped maybe-escaped + padded padded/left padded/right padded/both + trimmed trimmed/left trimmed/right trimmed/both trimmed/lazy + fitted fitted/left fitted/right fitted/both + joined joined/prefix joined/suffix joined/last joined/dot joined/range + upcased downcased)) diff --git a/lib/srfi/159/color.sld b/lib/srfi/159/color.sld new file mode 100644 index 00000000..a2e5bca1 --- /dev/null +++ b/lib/srfi/159/color.sld @@ -0,0 +1,6 @@ + +(define-library (srfi 159 color) + (import (chibi show color)) + (export as-red as-blue as-green as-cyan as-yellow + as-magenta as-white as-black + as-bold as-underline)) diff --git a/lib/srfi/159/columnar.sld b/lib/srfi/159/columnar.sld new file mode 100644 index 00000000..76d4af4e --- /dev/null +++ b/lib/srfi/159/columnar.sld @@ -0,0 +1,8 @@ + +(define-library (srfi 159 columnar) + (import (chibi show column)) + (export + call-with-output-generator call-with-output-generators + string->line-generator + tabular columnar show-columns wrapped wrapped/list wrapped/char + justified line-numbers from-file)) diff --git a/lib/srfi/159/unicode.sld b/lib/srfi/159/unicode.sld new file mode 100644 index 00000000..b6a26215 --- /dev/null +++ b/lib/srfi/159/unicode.sld @@ -0,0 +1,4 @@ + +(define-library (srfi 159 unicode) + (import (chibi show unicode)) + (export as-unicode unicode-terminal-width))