]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/environment/windows/windows.factor
io.encodings.utf16n: merge with io.encodings.utf16
[factor.git] / basis / environment / windows / windows.factor
index dbadff376196e9e0f9e509679f1e0b08df86e188..4c0d00d2ca6df119f6b4ca620ef09c084a34e4de 100644 (file)
@@ -1,30 +1,30 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.strings fry io.encodings.utf16n kernel
+USING: alien.strings fry io.encodings.utf16 kernel
 splitting windows windows.kernel32 windows.types system
 environment alien.data sequences windows.errors
 io.streams.memory io.encodings io specialized-arrays ;
 SPECIALIZED-ARRAY: TCHAR
 IN: environment.windows
 
-M: windows os-env ( key -- value )
+M: windows os-env
     MAX_UNICODE_PATH TCHAR <c-array>
     [ dup length GetEnvironmentVariable ] keep over 0 = [
         2drop f
     ] [
-        nip utf16n alien>string
+        nip alien>native-string
     ] if ;
 
-M: windows set-os-env ( value key -- )
+M: windows set-os-env
     swap SetEnvironmentVariable win32-error=0/f ;
 
-M: windows unset-os-env ( key -- )
+M: windows unset-os-env
     f SetEnvironmentVariable 0 = [
         GetLastError ERROR_ENVVAR_NOT_FOUND =
         [ win32-error ] unless
     ] when ;
 
-M: windows (os-envs) ( -- seq )
+M: windows (os-envs)
     GetEnvironmentStrings [
         [
             utf16n decode-input