Import Debian changes 20180207-1
[hcoop/debian/mlton.git] / basis-library / system / command-line.sml
CommitLineData
7f918cf1
CE
1(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
3 * Copyright (C) 1997-2000 NEC Research Institute.
4 *
5 * MLton is released under a BSD-style license.
6 * See the file MLton-LICENSE for details.
7 *)
8
9structure CommandLine: COMMAND_LINE =
10 struct
11 structure Prim = PrimitiveFFI.CommandLine
12
13 fun name () =
14 CUtil.C_String.toString (Prim.commandNameGet ())
15
16 fun arguments () =
17 (Array.toList o CUtil.C_StringArray.toArrayOfLength)
18 (Prim.argvGet (), C_Int.toInt (Prim.argcGet ()))
19 end