commit
17128f163a
7 changed files with 12 additions and 12 deletions
|
|
@ -215,7 +215,7 @@ const
|
||||||
errOrdinalTypeExpected: "ordinal type expected",
|
errOrdinalTypeExpected: "ordinal type expected",
|
||||||
errOrdinalOrFloatTypeExpected: "ordinal or float type expected",
|
errOrdinalOrFloatTypeExpected: "ordinal or float type expected",
|
||||||
errOverOrUnderflow: "over- or underflow",
|
errOverOrUnderflow: "over- or underflow",
|
||||||
errCannotEvalXBecauseIncompletelyDefined: "cannot evalutate '$1' because type is not defined completely",
|
errCannotEvalXBecauseIncompletelyDefined: "cannot evaluate '$1' because type is not defined completely",
|
||||||
errChrExpectsRange0_255: "\'chr\' expects an int in the range 0..255",
|
errChrExpectsRange0_255: "\'chr\' expects an int in the range 0..255",
|
||||||
errDynlibRequiresExportc: "\'dynlib\' requires \'exportc\'",
|
errDynlibRequiresExportc: "\'dynlib\' requires \'exportc\'",
|
||||||
errUndeclaredFieldX: "undeclared field: \'$1\'",
|
errUndeclaredFieldX: "undeclared field: \'$1\'",
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ proc processCmdLine*(pass: TCmdLinePass, cmd: string) =
|
||||||
of "auto": gStyleCheck = StyleCheck.Auto
|
of "auto": gStyleCheck = StyleCheck.Auto
|
||||||
else: localError(gCmdLineInfo, errOnOrOffExpected)
|
else: localError(gCmdLineInfo, errOnOrOffExpected)
|
||||||
of "wholeproject": gOnlyMainfile = false
|
of "wholeproject": gOnlyMainfile = false
|
||||||
of "besteffort": msgs.gErrorMax = high(int) # dont stop after first error
|
of "besteffort": msgs.gErrorMax = high(int) # don't stop after first error
|
||||||
else:
|
else:
|
||||||
processSwitch(pass, p)
|
processSwitch(pass, p)
|
||||||
of cmdArgument:
|
of cmdArgument:
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ when defined(macosx) or defined(freebsd):
|
||||||
NOTE_USECONDS* = 0x00000004'u32 ## data is microseconds
|
NOTE_USECONDS* = 0x00000004'u32 ## data is microseconds
|
||||||
NOTE_NSECONDS* = 0x00000008'u32 ## data is nanoseconds
|
NOTE_NSECONDS* = 0x00000008'u32 ## data is nanoseconds
|
||||||
else:
|
else:
|
||||||
# NetBSD and OpenBSD doesnt support NOTE_{TIME} constants, but
|
# NetBSD and OpenBSD doesn't support NOTE_{TIME} constants, but
|
||||||
# support EVFILT_TIMER with granularity of milliseconds.
|
# support EVFILT_TIMER with granularity of milliseconds.
|
||||||
const
|
const
|
||||||
NOTE_MSECONDS* = 0x00000000'u32
|
NOTE_MSECONDS* = 0x00000000'u32
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ export Port, SocketFlag
|
||||||
## # Handle exception
|
## # Handle exception
|
||||||
##
|
##
|
||||||
## Unfortunately the semantics of the try statement may not always be correct,
|
## Unfortunately the semantics of the try statement may not always be correct,
|
||||||
## and occassionally the compilation may fail altogether.
|
## and occasionally the compilation may fail altogether.
|
||||||
## As such it is better to use the former style when possible.
|
## As such it is better to use the former style when possible.
|
||||||
##
|
##
|
||||||
## Discarding futures
|
## Discarding futures
|
||||||
|
|
|
||||||
|
|
@ -446,7 +446,7 @@ proc request*(url: string, httpMethod: string, extraHeaders = "",
|
||||||
|
|
||||||
|
|
||||||
# get the socket ready. If we are connecting through a proxy to SSL,
|
# get the socket ready. If we are connecting through a proxy to SSL,
|
||||||
# send the appropiate CONNECT header. If not, simply connect to the proper
|
# send the appropriate CONNECT header. If not, simply connect to the proper
|
||||||
# host (which may still be the proxy, for normal HTTP)
|
# host (which may still be the proxy, for normal HTTP)
|
||||||
if proxy != nil and hostUrl.scheme == "https":
|
if proxy != nil and hostUrl.scheme == "https":
|
||||||
when defined(ssl):
|
when defined(ssl):
|
||||||
|
|
@ -750,7 +750,7 @@ proc newHttpClient*(userAgent = defUserAgent,
|
||||||
## ``proxy`` specifies an HTTP proxy to use for this HTTP client's
|
## ``proxy`` specifies an HTTP proxy to use for this HTTP client's
|
||||||
## connections.
|
## connections.
|
||||||
##
|
##
|
||||||
## ``timeout`` specifies the number of miliseconds to allow before a
|
## ``timeout`` specifies the number of milliseconds to allow before a
|
||||||
## ``TimeoutError`` is raised.
|
## ``TimeoutError`` is raised.
|
||||||
new result
|
new result
|
||||||
result.headers = newHttpHeaders()
|
result.headers = newHttpHeaders()
|
||||||
|
|
|
||||||
|
|
@ -52,13 +52,13 @@ when defined(nimdoc):
|
||||||
Vnode, ## BSD specific file change happens
|
Vnode, ## BSD specific file change happens
|
||||||
User, ## User event is raised
|
User, ## User event is raised
|
||||||
Error, ## Error happens while waiting, for descriptor
|
Error, ## Error happens while waiting, for descriptor
|
||||||
VnodeWrite, ## NOTE_WRITE (BSD specific, write to file occured)
|
VnodeWrite, ## NOTE_WRITE (BSD specific, write to file occurred)
|
||||||
VnodeDelete, ## NOTE_DELETE (BSD specific, unlink of file occured)
|
VnodeDelete, ## NOTE_DELETE (BSD specific, unlink of file occurred)
|
||||||
VnodeExtend, ## NOTE_EXTEND (BSD specific, file extended)
|
VnodeExtend, ## NOTE_EXTEND (BSD specific, file extended)
|
||||||
VnodeAttrib, ## NOTE_ATTRIB (BSD specific, file attributes changed)
|
VnodeAttrib, ## NOTE_ATTRIB (BSD specific, file attributes changed)
|
||||||
VnodeLink, ## NOTE_LINK (BSD specific, file link count changed)
|
VnodeLink, ## NOTE_LINK (BSD specific, file link count changed)
|
||||||
VnodeRename, ## NOTE_RENAME (BSD specific, file renamed)
|
VnodeRename, ## NOTE_RENAME (BSD specific, file renamed)
|
||||||
VnodeRevoke ## NOTE_REVOKE (BSD specific, file revoke occured)
|
VnodeRevoke ## NOTE_REVOKE (BSD specific, file revoke occurred)
|
||||||
|
|
||||||
ReadyKey*[T] = object
|
ReadyKey*[T] = object
|
||||||
## An object which holds result for descriptor
|
## An object which holds result for descriptor
|
||||||
|
|
@ -140,7 +140,7 @@ when defined(nimdoc):
|
||||||
|
|
||||||
proc flush*[T](s: Selector[T]) =
|
proc flush*[T](s: Selector[T]) =
|
||||||
## Flushes all changes was made to kernel pool/queue.
|
## Flushes all changes was made to kernel pool/queue.
|
||||||
## This function is usefull only for BSD and MacOS, because
|
## This function is useful only for BSD and MacOS, because
|
||||||
## kqueue supports bulk changes to be made.
|
## kqueue supports bulk changes to be made.
|
||||||
## On Linux/Windows and other Posix compatible operation systems,
|
## On Linux/Windows and other Posix compatible operation systems,
|
||||||
## ``flush`` is alias for `discard`.
|
## ``flush`` is alias for `discard`.
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ when isMainModule:
|
||||||
inc occur[x]
|
inc occur[x]
|
||||||
for i, oc in occur:
|
for i, oc in occur:
|
||||||
if oc < 69:
|
if oc < 69:
|
||||||
doAssert false, "too few occurances of " & $i
|
doAssert false, "too few occurrences of " & $i
|
||||||
elif oc > 130:
|
elif oc > 130:
|
||||||
doAssert false, "too many occurances of " & $i
|
doAssert false, "too many occurrences of " & $i
|
||||||
main()
|
main()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue