From 1e81dbdf17281dfcacaad7a1e685b3cdaf147fd3 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Mon, 13 Apr 2020 12:43:25 -0700 Subject: [PATCH] drive-strings: move to windows.drive-strings. --- extra/windows/drive-strings/authors.txt | 1 + extra/windows/drive-strings/drive-strings.factor | 9 +++++++++ extra/windows/drive-strings/platforms.txt | 1 + 3 files changed, 11 insertions(+) create mode 100644 extra/windows/drive-strings/authors.txt create mode 100644 extra/windows/drive-strings/drive-strings.factor create mode 100644 extra/windows/drive-strings/platforms.txt diff --git a/extra/windows/drive-strings/authors.txt b/extra/windows/drive-strings/authors.txt new file mode 100644 index 0000000000..8e1955f8e1 --- /dev/null +++ b/extra/windows/drive-strings/authors.txt @@ -0,0 +1 @@ +Alexander Ilin diff --git a/extra/windows/drive-strings/drive-strings.factor b/extra/windows/drive-strings/drive-strings.factor new file mode 100644 index 0000000000..a1dd4adef3 --- /dev/null +++ b/extra/windows/drive-strings/drive-strings.factor @@ -0,0 +1,9 @@ +! Copyright (C) 2019 Alexander Ilin. +! See http://factorcode.org/license.txt for BSD license. +USING: byte-arrays io.encodings.string io.encodings.utf16 +kernel math sequences splitting windows.kernel32 ; +IN: windows.drive-strings + +: logical-drive-strings ( -- seq ) + 30 4 2 * * dup [ GetLogicalDriveStrings ] keep + utf16le decode swap head "\0" split harvest ; diff --git a/extra/windows/drive-strings/platforms.txt b/extra/windows/drive-strings/platforms.txt new file mode 100644 index 0000000000..8e1a55995e --- /dev/null +++ b/extra/windows/drive-strings/platforms.txt @@ -0,0 +1 @@ +windows