Fix compilation problems on Windows
This commit is contained in:
parent
e6320e5881
commit
f0892ce934
|
@ -606,7 +606,8 @@ proc pickPasswordAndSaveWallet(rng: var BrHmacDrbgContext,
|
||||||
return ok WalletPathPair(wallet: wallet, path: outWalletFile)
|
return ok WalletPathPair(wallet: wallet, path: outWalletFile)
|
||||||
|
|
||||||
when defined(windows):
|
when defined(windows):
|
||||||
proc clearScreen() {.importc("clrscr"), header: "conio.h".}
|
proc clearScreen =
|
||||||
|
discard execShellCmd("cls")
|
||||||
else:
|
else:
|
||||||
template clearScreen =
|
template clearScreen =
|
||||||
echo "\e[1;1H\e[2J\e[3J"
|
echo "\e[1;1H\e[2J\e[3J"
|
||||||
|
@ -654,7 +655,7 @@ proc createWalletInteractively*(
|
||||||
|
|
||||||
echoP "Press any key to continue."
|
echoP "Press any key to continue."
|
||||||
try:
|
try:
|
||||||
discard stdin.readChar()
|
discard getch()
|
||||||
except IOError as err:
|
except IOError as err:
|
||||||
fatal "Failed to read a key from stdin", err = err.msg
|
fatal "Failed to read a key from stdin", err = err.msg
|
||||||
quit 1
|
quit 1
|
||||||
|
|
Loading…
Reference in New Issue