mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-27 17:53:58 +00:00
Move command line parameter code (#20946)
Command line paramater code moved from os.nim to cmdparam.nim Co-authored-by: IgorDeepakM <IgorDeepak@noreply.com>
This commit is contained in:
@@ -54,14 +54,12 @@ when defined(windows) and not weirdTarget:
|
||||
proc findFirstFile*(a: string, b: var WIN32_FIND_DATA): Handle =
|
||||
result = findFirstFileW(newWideCString(a), b)
|
||||
template findNextFile*(a, b: untyped): untyped = findNextFileW(a, b)
|
||||
template getCommandLine*(): untyped = getCommandLineW()
|
||||
|
||||
template getFilename*(f: untyped): untyped =
|
||||
$cast[WideCString](addr(f.cFileName[0]))
|
||||
else:
|
||||
template findFirstFile*(a, b: untyped): untyped = findFirstFileA(a, b)
|
||||
template findNextFile*(a, b: untyped): untyped = findNextFileA(a, b)
|
||||
template getCommandLine*(): untyped = getCommandLineA()
|
||||
|
||||
template getFilename*(f: untyped): untyped = $cast[cstring](addr f.cFileName)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user