lib: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
This commit is contained in:
parent
d681812465
commit
43bddf62dd
67 changed files with 2435 additions and 2435 deletions
|
|
@ -33,7 +33,7 @@ type
|
|||
|
||||
when defined(windows):
|
||||
fHandle: int
|
||||
mapHandle: int
|
||||
mapHandle: int
|
||||
else:
|
||||
handle: cint
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ proc open*(filename: string, mode: FileMode = fmRead,
|
|||
fail(osLastError(), "error opening file")
|
||||
|
||||
if newFileSize != -1:
|
||||
var
|
||||
var
|
||||
sizeHigh = int32(newFileSize shr 32)
|
||||
sizeLow = int32(newFileSize and 0xffffffff)
|
||||
|
||||
|
|
@ -177,7 +177,7 @@ proc open*(filename: string, mode: FileMode = fmRead,
|
|||
rollback()
|
||||
if result.handle != 0: discard close(result.handle)
|
||||
raiseOSError(errCode)
|
||||
|
||||
|
||||
var flags = if readonly: O_RDONLY else: O_RDWR
|
||||
|
||||
if newFileSize != -1:
|
||||
|
|
@ -221,7 +221,7 @@ proc open*(filename: string, mode: FileMode = fmRead,
|
|||
proc close*(f: var MemFile) =
|
||||
## closes the memory mapped file `f`. All changes are written back to the
|
||||
## file system, if `f` was opened with write access.
|
||||
|
||||
|
||||
var error = false
|
||||
var lastErr: OSErrorCode
|
||||
|
||||
|
|
@ -245,7 +245,7 @@ proc close*(f: var MemFile) =
|
|||
f.mapHandle = 0
|
||||
else:
|
||||
f.handle = 0
|
||||
|
||||
|
||||
if error: raiseOSError(lastErr)
|
||||
|
||||
type MemSlice* = object ## represent slice of a MemFile for iteration over delimited lines/records
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue