Merge pull request #2236 from def-/working-again
Make reading from stdin work again.
This commit is contained in:
commit
6226973c7f
2 changed files with 2 additions and 2 deletions
|
|
@ -35,7 +35,7 @@ proc llStreamOpen*(data: string): PLLStream =
|
||||||
result.s = data
|
result.s = data
|
||||||
result.kind = llsString
|
result.kind = llsString
|
||||||
|
|
||||||
proc llStreamOpen*(f: var File): PLLStream =
|
proc llStreamOpen*(f: File): PLLStream =
|
||||||
new(result)
|
new(result)
|
||||||
result.f = f
|
result.f = f
|
||||||
result.kind = llsFile
|
result.kind = llsFile
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ proc processModule(module: PSym, stream: PLLStream, rd: PRodReader) =
|
||||||
let filename = fileIdx.toFullPathConsiderDirty
|
let filename = fileIdx.toFullPathConsiderDirty
|
||||||
if module.name.s == "-":
|
if module.name.s == "-":
|
||||||
module.name.s = "stdinfile"
|
module.name.s = "stdinfile"
|
||||||
s = llStreamOpenStdIn()
|
s = llStreamOpen(stdin)
|
||||||
else:
|
else:
|
||||||
s = llStreamOpen(filename, fmRead)
|
s = llStreamOpen(filename, fmRead)
|
||||||
if s == nil:
|
if s == nil:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue