diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/impure/db_mysql.nim | 1 | ||||
-rw-r--r-- | lib/posix/posix.nim | 11 | ||||
-rw-r--r-- | lib/pure/terminal.nim | 8 |
3 files changed, 8 insertions, 12 deletions
diff --git a/lib/impure/db_mysql.nim b/lib/impure/db_mysql.nim index e1119ada6..1b79b3543 100644 --- a/lib/impure/db_mysql.nim +++ b/lib/impure/db_mysql.nim @@ -120,7 +120,6 @@ proc dbQuote*(s: string): string = result = "'" for c in items(s): if c == '\'': add(result, "''") - if c == '\\': add(result, "\\\\") else: add(result, c) add(result, '\'') diff --git a/lib/posix/posix.nim b/lib/posix/posix.nim index a73b6090e..b635c0b0b 100644 --- a/lib/posix/posix.nim +++ b/lib/posix/posix.nim @@ -962,13 +962,10 @@ proc utimes*(path: cstring, times: ptr array[2, Timeval]): int {. proc handle_signal(sig: cint, handler: proc (a: cint) {.noconv.}) {.importc: "signal", header: "<signal.h>".} template onSignal*(signals: varargs[cint], body: untyped) = - ## Setup code to be executed when Unix signals are received. - ## Example: - ## - ## .. code-block:: nim - ## from posix import SIGINT, SIGTERM - ## onSignal(SIGINT, SIGTERM): - ## echo "bye" + ## Setup code to be executed when Unix signals are received. Example: + ## from posix import SIGINT, SIGTERM + ## onSignal(SIGINT, SIGTERM): + ## echo "bye" for s in signals: handle_signal(s, diff --git a/lib/pure/terminal.nim b/lib/pure/terminal.nim index a08a388ba..871ac5d39 100644 --- a/lib/pure/terminal.nim +++ b/lib/pure/terminal.nim @@ -650,10 +650,10 @@ template setCursorPos*(x, y: int) = setCursorPos(stdout, x, y) template setCursorXPos*(x: int) = setCursorXPos(stdout, x) when defined(windows): template setCursorYPos(x: int) = setCursorYPos(stdout, x) -template cursorUp*(count=1) = cursorUp(stdout, count) -template cursorDown*(count=1) = cursorDown(stdout, count) -template cursorForward*(count=1) = cursorForward(stdout, count) -template cursorBackward*(count=1) = cursorBackward(stdout, count) +template cursorUp*(count=1) = cursorUp(stdout, f) +template cursorDown*(count=1) = cursorDown(stdout, f) +template cursorForward*(count=1) = cursorForward(stdout, f) +template cursorBackward*(count=1) = cursorBackward(stdout, f) template eraseLine*() = eraseLine(stdout) template eraseScreen*() = eraseScreen(stdout) template setStyle*(style: set[Style]) = |