diff options
Diffstat (limited to 'lib/posix')
-rw-r--r-- | lib/posix/inotify.nim | 4 | ||||
-rw-r--r-- | lib/posix/posix.nim | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/posix/inotify.nim b/lib/posix/inotify.nim index db698c59c..7c3cb46c5 100644 --- a/lib/posix/inotify.nim +++ b/lib/posix/inotify.nim @@ -75,11 +75,11 @@ proc inotify_rm_watch*(fd: cint; wd: cint): cint {.cdecl, iterator inotify_events*(evs: pointer, n: int): ptr InotifyEvent = ## Abstract the packed buffer interface to yield event object pointers. - ## - ## .. code-block:: Nim + ## ```Nim ## var evs = newSeq[byte](8192) # Already did inotify_init+add_watch ## while (let n = read(fd, evs[0].addr, 8192); n) > 0: # read forever ## for e in inotify_events(evs[0].addr, n): echo e[].len # echo name lens + ## ``` var ev: ptr InotifyEvent = cast[ptr InotifyEvent](evs) var n = n while n > 0: diff --git a/lib/posix/posix.nim b/lib/posix/posix.nim index 4ebae4361..317cc8735 100644 --- a/lib/posix/posix.nim +++ b/lib/posix/posix.nim @@ -1093,11 +1093,11 @@ template onSignal*(signals: varargs[cint], body: untyped) = ## scope. ## ## Example: - ## - ## .. code-block:: + ## ```Nim ## from std/posix import SIGINT, SIGTERM, onSignal ## onSignal(SIGINT, SIGTERM): ## echo "bye from signal ", sig + ## ``` for s in signals: handle_signal(s, |