]> gitweb.factorcode.org Git - factor.git/commitdiff
Promote this to basis
authorAlex Maestas <git@se30.xyz>
Thu, 29 Sep 2022 20:38:14 +0000 (20:38 +0000)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 29 Sep 2022 21:34:27 +0000 (16:34 -0500)
basis/unicode/control-pictures/authors.txt [new file with mode: 0644]
basis/unicode/control-pictures/control-pictures-docs.factor [new file with mode: 0644]
basis/unicode/control-pictures/control-pictures-tests.factor [new file with mode: 0644]
basis/unicode/control-pictures/control-pictures.factor [new file with mode: 0644]
extra/unicode/control-pictures/authors.txt [deleted file]
extra/unicode/control-pictures/control-pictures-docs.factor [deleted file]
extra/unicode/control-pictures/control-pictures-tests.factor [deleted file]
extra/unicode/control-pictures/control-pictures.factor [deleted file]

diff --git a/basis/unicode/control-pictures/authors.txt b/basis/unicode/control-pictures/authors.txt
new file mode 100644 (file)
index 0000000..1137f8e
--- /dev/null
@@ -0,0 +1 @@
+Pi
diff --git a/basis/unicode/control-pictures/control-pictures-docs.factor b/basis/unicode/control-pictures/control-pictures-docs.factor
new file mode 100644 (file)
index 0000000..feeca10
--- /dev/null
@@ -0,0 +1,16 @@
+! Copyright (C) 2017 Pi.
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax strings ;
+IN: unicode.control-pictures
+
+HELP: control-pictures
+{ $values
+    { "string" string }
+}
+{ $description "Transforms C0 control characters into their corresponding Control Picture block codepoints." } ;
+
+ARTICLE: "unicode.control-pictures" "Control Pictures"
+"The " { $vocab-link "unicode.control-pictures" } " vocabulary provides a utility word " { $link control-pictures } " for transforming characters in the nonprintable " { $url "http://www.unicode.org/charts/PDF/U0000.pdf" "ASCII C0 block" } " to their representations in the " { $url "http://www.unicode.org/charts/PDF/U2400.pdf" "Control Pictures" } " block. It has no effect on any other characters."
+;
+
+ABOUT: "unicode.control-pictures"
diff --git a/basis/unicode/control-pictures/control-pictures-tests.factor b/basis/unicode/control-pictures/control-pictures-tests.factor
new file mode 100644 (file)
index 0000000..fb19622
--- /dev/null
@@ -0,0 +1,5 @@
+USING: sequences strings tools.test unicode.control-pictures ;
+
+{ "␀␁␂␃␄␅␆␇␈␉␊␋␌␍␎␏␐␑␒␓␔␕␖␗␘␙␚␛␜␝␞␟ !\"#$%&'()*+,-./" } [
+    48 <iota> >string control-pictures
+] unit-test
diff --git a/basis/unicode/control-pictures/control-pictures.factor b/basis/unicode/control-pictures/control-pictures.factor
new file mode 100644 (file)
index 0000000..94a439c
--- /dev/null
@@ -0,0 +1,18 @@
+! Copyright (C) 2017 Pi.
+! See http://factorcode.org/license.txt for BSD license.
+USING: combinators kernel math sequences ;
+IN: unicode.control-pictures
+
+<PRIVATE
+
+: char>control-picture ( char -- char' )
+    {
+        { [ dup 0x20 < ] [ 0x2400 bitor ] }
+        { [ dup 0x7f = ] [ drop 0x2421 ] }
+        [ ]
+    } cond ;
+
+PRIVATE>
+
+: control-pictures ( string -- string )
+    [ char>control-picture ] map ;
diff --git a/extra/unicode/control-pictures/authors.txt b/extra/unicode/control-pictures/authors.txt
deleted file mode 100644 (file)
index 1137f8e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Pi
diff --git a/extra/unicode/control-pictures/control-pictures-docs.factor b/extra/unicode/control-pictures/control-pictures-docs.factor
deleted file mode 100644 (file)
index feeca10..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-! Copyright (C) 2017 Pi.
-! See http://factorcode.org/license.txt for BSD license.
-USING: help.markup help.syntax strings ;
-IN: unicode.control-pictures
-
-HELP: control-pictures
-{ $values
-    { "string" string }
-}
-{ $description "Transforms C0 control characters into their corresponding Control Picture block codepoints." } ;
-
-ARTICLE: "unicode.control-pictures" "Control Pictures"
-"The " { $vocab-link "unicode.control-pictures" } " vocabulary provides a utility word " { $link control-pictures } " for transforming characters in the nonprintable " { $url "http://www.unicode.org/charts/PDF/U0000.pdf" "ASCII C0 block" } " to their representations in the " { $url "http://www.unicode.org/charts/PDF/U2400.pdf" "Control Pictures" } " block. It has no effect on any other characters."
-;
-
-ABOUT: "unicode.control-pictures"
diff --git a/extra/unicode/control-pictures/control-pictures-tests.factor b/extra/unicode/control-pictures/control-pictures-tests.factor
deleted file mode 100644 (file)
index fb19622..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-USING: sequences strings tools.test unicode.control-pictures ;
-
-{ "␀␁␂␃␄␅␆␇␈␉␊␋␌␍␎␏␐␑␒␓␔␕␖␗␘␙␚␛␜␝␞␟ !\"#$%&'()*+,-./" } [
-    48 <iota> >string control-pictures
-] unit-test
diff --git a/extra/unicode/control-pictures/control-pictures.factor b/extra/unicode/control-pictures/control-pictures.factor
deleted file mode 100644 (file)
index 94a439c..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-! Copyright (C) 2017 Pi.
-! See http://factorcode.org/license.txt for BSD license.
-USING: combinators kernel math sequences ;
-IN: unicode.control-pictures
-
-<PRIVATE
-
-: char>control-picture ( char -- char' )
-    {
-        { [ dup 0x20 < ] [ 0x2400 bitor ] }
-        { [ dup 0x7f = ] [ drop 0x2421 ] }
-        [ ]
-    } cond ;
-
-PRIVATE>
-
-: control-pictures ( string -- string )
-    [ char>control-picture ] map ;