From: Cat Stevens Date: Sat, 19 May 2018 21:32:14 +0000 (-0400) Subject: fix bugs in windows implementation X-Git-Tag: 0.99~1668 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=8e62bda60bbbb4ea6f4038091cdfd5c2c5887b8f fix bugs in windows implementation --- diff --git a/basis/elevate/windows/windows.factor b/basis/elevate/windows/windows.factor index 404f1644c4..5f4aa8f60e 100644 --- a/basis/elevate/windows/windows.factor +++ b/basis/elevate/windows/windows.factor @@ -1,9 +1,13 @@ -USING: io.launcher elevate ; +USING: accessors alien alien.c-types elevate io.launcher kernel +locals math sequences splitting strings system windows.errors +windows.shell32 ; IN: elevate.windows - command >>command @@ -12,12 +16,12 @@ M:: windows elevated ( command replace? win-console? posix-graphical? -- process f "runas" command dup string? [ " " split ] when ! lpFile lpParameters lpDirectory nShowCmd - [ first ] [ rest ] bi f win-console? 1 0 ? + [ first ] [ rest ] bi " " join f win-console? >c-bool ! call shell function - ShellExecuteW :> retval retval n>win32-error-check + ShellExecuteW alien-address :> retval retval 32 <= [ retval n>win32-error-check ] [ ] if retval replace? [ exit ] [ ] if ] if ; ! no-op (not possible to lower) -M: windows lowered -PRIVATE> \ No newline at end of file +M: windows lowered ; +PRIVATE>