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:
parent
8f728ace35
commit
84ea62ea0d
3 changed files with 318 additions and 272 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue