don't reuse code from 0.18.0
This commit is contained in:
parent
9fa477de75
commit
e317745098
1 changed files with 2 additions and 9 deletions
|
|
@ -145,15 +145,8 @@ proc readLine(f: File, line: var TaintedString): bool =
|
||||||
var pos = 0
|
var pos = 0
|
||||||
|
|
||||||
# Use the currently reserved space for a first try
|
# Use the currently reserved space for a first try
|
||||||
var sp = line.string.len
|
var sp = max(line.string.len, 80)
|
||||||
if sp == 0:
|
|
||||||
sp = 80
|
|
||||||
line.string.setLen(sp)
|
line.string.setLen(sp)
|
||||||
else:
|
|
||||||
when not defined(nimscript):
|
|
||||||
sp = cint(cast[PGenericSeq](line.string).space)
|
|
||||||
else:
|
|
||||||
line.string.setLen(sp + 1)
|
|
||||||
|
|
||||||
while true:
|
while true:
|
||||||
# memset to \L so that we can tell how far fgets wrote, even on EOF, where
|
# memset to \L so that we can tell how far fgets wrote, even on EOF, where
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue