diff options
Diffstat (limited to 'nim/osproc.pas')
-rwxr-xr-x | nim/osproc.pas | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/nim/osproc.pas b/nim/osproc.pas deleted file mode 100755 index 485daaf67..000000000 --- a/nim/osproc.pas +++ /dev/null @@ -1,58 +0,0 @@ -// -// -// The Nimrod Compiler -// (c) Copyright 2009 Andreas Rumpf -// -// See the file "copying.txt", included in this -// distribution, for details about the copyright. -// -unit osproc; - -// This module provides Nimrod's osproc module in Pascal -// Note: Only implement what is really needed here! - -interface - -{$include 'config.inc'} - -uses - nsystem, nos; - -type - TProcessOption = (poEchoCmd, poUseShell, poStdErrToStdOut, poParentStreams); - TProcessOptions = set of TProcessOption; - -function execCmd(const cmd: string): int; -function execProcesses(const cmds: array of string; - options: TProcessOptions; - n: int): int; - -function countProcessors(): int; - -implementation - -function execCmd(const cmd: string): int; -begin - writeln(output, cmd); - result := executeShellCommand(cmd); -end; - -function execProcesses(const cmds: array of string; - options: TProcessOptions; - n: int): int; -var - i: int; -begin - result := 0; - for i := 0 to high(cmds) do begin - //if poEchoCmd in options then writeln(output, cmds[i]); - result := max(result, execCmd(cmds[i])) - end -end; - -function countProcessors(): int; -begin - result := 1; -end; - -end. |