summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/experimental/diff.nim2
-rw-r--r--lib/impure/nre.nim2
-rw-r--r--lib/nimhcr.nim4
-rw-r--r--lib/packages/docutils/rst.nim2
-rw-r--r--lib/packages/docutils/rstgen.nim2
-rw-r--r--lib/posix/posix_macos_amd64.nim2
-rw-r--r--lib/posix/posix_other.nim2
-rw-r--r--lib/pure/bitops.nim2
-rw-r--r--lib/pure/collections/sequtils.nim2
-rw-r--r--lib/pure/collections/sets.nim2
-rw-r--r--lib/pure/colors.nim4
-rw-r--r--lib/pure/encodings.nim2
-rw-r--r--lib/pure/json.nim2
-rw-r--r--lib/pure/math.nim2
-rw-r--r--lib/pure/os.nim2
-rw-r--r--lib/system.nim8
-rw-r--r--lib/system/gc_regions.nim2
-rw-r--r--lib/system/io.nim4
-rw-r--r--lib/system/sysstr.nim4
-rw-r--r--lib/wrappers/iup.nim2
-rw-r--r--lib/wrappers/mysql.nim2
-rw-r--r--lib/wrappers/openssl.nim2
22 files changed, 29 insertions, 29 deletions
diff --git a/lib/experimental/diff.nim b/lib/experimental/diff.nim
index d98999912..5a69687a3 100644
--- a/lib/experimental/diff.nim
+++ b/lib/experimental/diff.nim
@@ -233,7 +233,7 @@ proc lcs(dataA: var DiffData; lowerA, upperA: int; dataB: var DiffData; lowerB,
       inc lowerA
 
   else:
-    # Find the middle snakea and length of an optimal path for A and B
+    # Find the middle snake and length of an optimal path for A and B
     let smsrd = sms(dataA, lowerA, upperA, dataB, lowerB, upperB, downVector, upVector)
     # Debug.Write(2, "MiddleSnakeData", String.Format("{0},{1}", smsrd.x, smsrd.y))
 
diff --git a/lib/impure/nre.nim b/lib/impure/nre.nim
index 22f786cd6..f0b3074f9 100644
--- a/lib/impure/nre.nim
+++ b/lib/impure/nre.nim
@@ -215,7 +215,7 @@ type
     pattern*: string  ## the pattern that caused the problem
 
   StudyError* = ref object of RegexError
-    ## Thrown when studying the regular expression failes
+    ## Thrown when studying the regular expression fails
     ## for whatever reason. The message contains the error
     ## code.
 
diff --git a/lib/nimhcr.nim b/lib/nimhcr.nim
index 396747527..0f9ae918d 100644
--- a/lib/nimhcr.nim
+++ b/lib/nimhcr.nim
@@ -77,7 +77,7 @@
 #   - named `performCodeReload`, requires the hotcodereloading module
 #   - explicitly called by the user - the current active callstack shouldn't contain
 #     any functions which are defined in modules that will be reloaded (or crash!).
-#     The reason is that old dynalic libraries get unloaded.
+#     The reason is that old dynamic libraries get unloaded.
 #     Example:
 #       if A is the main module and it imports B, then only B is reloadable and only
 #       if when calling hcrPerformCodeReload there is no function defined in B in the
@@ -549,7 +549,7 @@ when defined(createNimHcr):
     # problems when the GC is executed while the reload is underway.
     # Future versions of NIMHCR won't use the GC, because all globals and the
     # metadata needed to access them will be placed in shared memory, so they
-    # can be manipulted from external programs without reloading.
+    # can be manipulated from external programs without reloading.
     GC_disable()
     defer: GC_enable()
 
diff --git a/lib/packages/docutils/rst.nim b/lib/packages/docutils/rst.nim
index 26222d951..eaefc7265 100644
--- a/lib/packages/docutils/rst.nim
+++ b/lib/packages/docutils/rst.nim
@@ -1605,7 +1605,7 @@ proc dirCodeBlock(p: var RstParser, nimExtension = false): PRstNode =
   ## <http://docutils.sourceforge.net/docs/ref/rst/directives.html#code>`_ and
   ## the nim extension ``.. code-block::``. If the block is an extension, we
   ## want the default language syntax highlighting to be Nim, so we create a
-  ## fake internal field to comminicate with the generator. The field is named
+  ## fake internal field to communicate with the generator. The field is named
   ## ``default-language``, which is unlikely to collide with a field specified
   ## by any random rst input file.
   ##
diff --git a/lib/packages/docutils/rstgen.nim b/lib/packages/docutils/rstgen.nim
index f9fd9e32b..abbf99fed 100644
--- a/lib/packages/docutils/rstgen.nim
+++ b/lib/packages/docutils/rstgen.nim
@@ -660,7 +660,7 @@ proc mergeIndexes*(dir: string): string =
   ## As convention this proc will split index files into two categories:
   ## documentation and API. API indices will be all joined together into a
   ## single big sorted index, making the bulk of the final index. This is good
-  ## for API documentation because many symbols are repated in different
+  ## for API documentation because many symbols are repeated in different
   ## modules. On the other hand, documentation indices are essentially table of
   ## contents plus a few special markers. These documents will be rendered in a
   ## separate section which tries to maintain the order and hierarchy of the
diff --git a/lib/posix/posix_macos_amd64.nim b/lib/posix/posix_macos_amd64.nim
index 41522fd17..0687267f0 100644
--- a/lib/posix/posix_macos_amd64.nim
+++ b/lib/posix/posix_macos_amd64.nim
@@ -562,7 +562,7 @@ when defined(macosx):
   var
     SO_NOSIGPIPE* {.importc, header: "<sys/socket.h>".}: cint
 elif defined(solaris):
-  # Solaris dont have MSG_NOSIGNAL
+  # Solaris doesn't have MSG_NOSIGNAL
   const
     MSG_NOSIGNAL* = 0'i32
 else:
diff --git a/lib/posix/posix_other.nim b/lib/posix/posix_other.nim
index c582240d1..e42092513 100644
--- a/lib/posix/posix_other.nim
+++ b/lib/posix/posix_other.nim
@@ -572,7 +572,7 @@ when defined(macosx):
   var
     SO_NOSIGPIPE* {.importc, header: "<sys/socket.h>".}: cint
 elif defined(solaris):
-  # Solaris dont have MSG_NOSIGNAL
+  # Solaris doesn't have MSG_NOSIGNAL
   const
     MSG_NOSIGNAL* = 0'i32
 else:
diff --git a/lib/pure/bitops.nim b/lib/pure/bitops.nim
index 710c8590a..9ebdabb7b 100644
--- a/lib/pure/bitops.nim
+++ b/lib/pure/bitops.nim
@@ -173,7 +173,7 @@ proc fastlog2Nim(x: uint64): int {.inline, noSideEffect.} =
   result = lookup[(v * 0x03F6EAF2CD271461'u64) shr 58].int
 
 # sets.nim cannot import bitops, but bitops can use include
-# system/sets to eleminate code duplication. sets.nim defines defines
+# system/sets to eliminate code duplication. sets.nim defines
 # countBits32 and countBits64.
 include system/sets
 
diff --git a/lib/pure/collections/sequtils.nim b/lib/pure/collections/sequtils.nim
index 0207c2bde..9573753ff 100644
--- a/lib/pure/collections/sequtils.nim
+++ b/lib/pure/collections/sequtils.nim
@@ -1361,7 +1361,7 @@ when isMainModule:
     doAssert foo1(openArray[int]([identity(1), identity(2)])) == @[10, 20]
     doAssert counter == 2
 
-    # Corner cases (openArray litterals should not be common)
+    # Corner cases (openArray literals should not be common)
     template foo2(x: openArray[int]): seq[int] = x.mapIt(it * 10)
     counter = 0
     doAssert foo2(openArray[int]([identity(1), identity(2)])) == @[10, 20]
diff --git a/lib/pure/collections/sets.nim b/lib/pure/collections/sets.nim
index 930b7f0ed..9dd72cb56 100644
--- a/lib/pure/collections/sets.nim
+++ b/lib/pure/collections/sets.nim
@@ -904,7 +904,7 @@ proc `$`*[A](s: OrderedSet[A]): string =
 iterator items*[A](s: OrderedSet[A]): A =
   ## Iterates over keys in the ordered set `s` in insertion order.
   ##
-  ## If you need a sequence with the elelments you can use `sequtils.toSeq
+  ## If you need a sequence with the elements you can use `sequtils.toSeq
   ## template <sequtils.html#toSeq.t,untyped>`_.
   ##
   ## .. code-block::
diff --git a/lib/pure/colors.nim b/lib/pure/colors.nim
index 1332b0738..57ae171dc 100644
--- a/lib/pure/colors.nim
+++ b/lib/pure/colors.nim
@@ -49,7 +49,7 @@ proc satMinus(a, b: int): int {.inline.} =
 proc `+`*(a, b: Color): Color =
   ## Adds two colors.
   ##
-  ## This uses saturated artithmetic, so that each color
+  ## This uses saturated arithmetic, so that each color
   ## component cannot overflow (255 is used as a maximum).
   ##
   runnableExamples:
@@ -63,7 +63,7 @@ proc `+`*(a, b: Color): Color =
 proc `-`*(a, b: Color): Color =
   ## Subtracts two colors.
   ##
-  ## This uses saturated artithmetic, so that each color
+  ## This uses saturated arithmetic, so that each color
   ## component cannot underflow (0 is used as a minimum).
   ##
   runnableExamples:
diff --git a/lib/pure/encodings.nim b/lib/pure/encodings.nim
index 25e779217..e3be1764b 100644
--- a/lib/pure/encodings.nim
+++ b/lib/pure/encodings.nim
@@ -468,7 +468,7 @@ proc convert*(s: string, destEncoding = "UTF-8",
                          srcEncoding = "CP1252"): string =
   ## converts `s` to `destEncoding`. It assumed that `s` is in `srcEncoding`.
   ## This opens a converter, uses it and closes it again and is thus more
-  ## convienent but also likely less efficient than re-using a converter.
+  ## convenient but also likely less efficient than re-using a converter.
   ## utf-16BE, utf-32 conversions not supported on windows
   var c = open(destEncoding, srcEncoding)
   try:
diff --git a/lib/pure/json.nim b/lib/pure/json.nim
index 72002fbab..4e88b6528 100644
--- a/lib/pure/json.nim
+++ b/lib/pure/json.nim
@@ -99,7 +99,7 @@
 ## Unmarshalling
 ## -------------
 ##
-## In addition to reading dynamic data, Nim can also unmarshall JSON directly
+## In addition to reading dynamic data, Nim can also unmarshal JSON directly
 ## into a type with the ``to`` macro.
 ##
 ## .. code-block:: Nim
diff --git a/lib/pure/math.nim b/lib/pure/math.nim
index ee78b6c91..224791e5d 100644
--- a/lib/pure/math.nim
+++ b/lib/pure/math.nim
@@ -43,7 +43,7 @@
 ## * `rationals module<rationals.html>`_ for rational numbers and their
 ##   mathematical operations
 ## * `fenv module<fenv.html>`_ for handling of floating-point rounding
-##   and exceptions (overflow, zero-devide, etc.)
+##   and exceptions (overflow, zero-divide, etc.)
 ## * `random module<random.html>`_ for fast and tiny random number generator
 ## * `mersenne module<mersenne.html>`_ for Mersenne twister random number generator
 ## * `stats module<stats.html>`_ for statistical analysis
diff --git a/lib/pure/os.nim b/lib/pure/os.nim
index b27eee782..a43a9cb32 100644
--- a/lib/pure/os.nim
+++ b/lib/pure/os.nim
@@ -3025,7 +3025,7 @@ proc getFileInfo*(handle: FileHandle): FileInfo {.noNimScript.} =
   when defined(Windows):
     var rawInfo: BY_HANDLE_FILE_INFORMATION
     # We have to use the super special '_get_osfhandle' call (wrapped above)
-    # To transform the C file descripter to a native file handle.
+    # To transform the C file descriptor to a native file handle.
     var realHandle = get_osfhandle(handle)
     if getFileInformationByHandle(realHandle, addr rawInfo) == 0:
       raiseOSError(osLastError())
diff --git a/lib/system.nim b/lib/system.nim
index 663ac1f66..54ced6c7c 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -800,7 +800,7 @@ type
     ## Raised if an array index is out of bounds.
 
   FieldError* = object of Defect ## \
-    ## Raised if a record field is not accessible because its dicriminant's
+    ## Raised if a record field is not accessible because its discriminant's
     ## value does not fit.
   RangeError* = object of Defect ## \
     ## Raised if a range check error occurred.
@@ -1646,7 +1646,7 @@ proc `+`*[T](x, y: set[T]): set[T] {.magic: "PlusSet", noSideEffect.}
   ##     b = {2, 3, 4}
   ##   echo a + b # => {1, 2, 3, 4}
 proc `-`*[T](x, y: set[T]): set[T] {.magic: "MinusSet", noSideEffect.}
-  ## This operator computes the diference of two sets.
+  ## This operator computes the difference of two sets.
   ##
   ## .. code-block:: Nim
   ##   let
@@ -2230,13 +2230,13 @@ type
 
   BiggestInt* = int64
     ## is an alias for the biggest signed integer type the Nim compiler
-    ## supports. Currently this is ``int64``, but it is platform-dependant
+    ## supports. Currently this is ``int64``, but it is platform-dependent
     ## in general.
 
   BiggestFloat* = float64
     ## is an alias for the biggest floating point type the Nim
     ## compiler supports. Currently this is ``float64``, but it is
-    ## platform-dependant in general.
+    ## platform-dependent in general.
 
 when defined(JS):
   type BiggestUInt* = uint32
diff --git a/lib/system/gc_regions.nim b/lib/system/gc_regions.nim
index 797eeeebf..b7d1d302b 100644
--- a/lib/system/gc_regions.nim
+++ b/lib/system/gc_regions.nim
@@ -213,7 +213,7 @@ proc dealloc(r: var MemRegion; p: pointer; size: int) =
   if it.typ != nil and it.typ.finalizer != nil:
     (cast[Finalizer](it.typ.finalizer))(p)
   it.typ = nil
-  # it is benefitial to not use the free lists here:
+  # it is beneficial to not use the free lists here:
   if r.bump -! size == p:
     dec r.bump, size
   when false:
diff --git a/lib/system/io.nim b/lib/system/io.nim
index a3ac235a9..76bf41b11 100644
--- a/lib/system/io.nim
+++ b/lib/system/io.nim
@@ -115,8 +115,8 @@ proc c_fprintf(f: File, frmt: cstring): cint {.
 proc c_fputc(c: char, f: File): cint {.
   importc: "fputc", header: "<stdio.h>".}
 
-## When running nim in android app stdout goes no where, so echo gets ignored
-## To redreict echo to the android logcat use -d:androidNDK
+## When running nim in android app, stdout goes nowhere, so echo gets ignored
+## To redirect echo to the android logcat, use -d:androidNDK
 when defined(androidNDK):
   const ANDROID_LOG_VERBOSE = 2.cint
   proc android_log_print(prio: cint, tag: cstring, fmt: cstring): cint
diff --git a/lib/system/sysstr.nim b/lib/system/sysstr.nim
index 6201a1c74..853397e0a 100644
--- a/lib/system/sysstr.nim
+++ b/lib/system/sysstr.nim
@@ -325,7 +325,7 @@ proc setLengthSeq(seq: PGenericSeq, elemSize, newLen: int): PGenericSeq {.
     # cell is aliased by another pointer (ie proc parameter or a let variable).
     # This is a tough problem, because even if we don't zeroMem here, in the
     # presence of user defined destructors, the user will expect the cell to be
-    # "destroyed" thus creating the same problem. We can destoy the cell in the
+    # "destroyed" thus creating the same problem. We can destroy the cell in the
     # finalizer of the sequence, but this makes destruction non-deterministic.
     zeroMem(cast[pointer](cast[ByteAddress](result) +% GenericSeqSize +%
            (newLen*%elemSize)), (result.len-%newLen) *% elemSize)
@@ -361,7 +361,7 @@ proc setLengthSeqV2(s: PGenericSeq, typ: PNimType, newLen: int): PGenericSeq {.
         # cell is aliased by another pointer (ie proc parameter or a let variable).
         # This is a tough problem, because even if we don't zeroMem here, in the
         # presence of user defined destructors, the user will expect the cell to be
-        # "destroyed" thus creating the same problem. We can destoy the cell in the
+        # "destroyed" thus creating the same problem. We can destroy the cell in the
         # finalizer of the sequence, but this makes destruction non-deterministic.
         zeroMem(cast[pointer](cast[ByteAddress](result) +% GenericSeqSize +%
               (newLen*%elemSize)), (result.len-%newLen) *% elemSize)
diff --git a/lib/wrappers/iup.nim b/lib/wrappers/iup.nim
index dee2e14c7..1a9e6ab3e 100644
--- a/lib/wrappers/iup.nim
+++ b/lib/wrappers/iup.nim
@@ -57,7 +57,7 @@ type
 
   Icallback* = proc (arg: PIhandle): cint {.cdecl.}
 
-#                      pre-defineded dialogs
+#                      pre-defined dialogs
 proc fileDlg*: PIhandle {.importc: "IupFileDlg", dynlib: dllname, cdecl.}
 proc messageDlg*: PIhandle {.importc: "IupMessageDlg", dynlib: dllname, cdecl.}
 proc colorDlg*: PIhandle {.importc: "IupColorDlg", dynlib: dllname, cdecl.}
diff --git a/lib/wrappers/mysql.nim b/lib/wrappers/mysql.nim
index 1f523ac5f..f8d4739ae 100644
--- a/lib/wrappers/mysql.nim
+++ b/lib/wrappers/mysql.nim
@@ -579,7 +579,7 @@ type
     STATUS_READY, STATUS_GET_RESULT, STATUS_USE_RESULT
   Protocol_type* = enum  # There are three types of queries - the ones that have to go to
                           # the master, the ones that go to a slave, and the administrative
-                          # type which must happen on the pivot connectioin
+                          # type which must happen on the pivot connection
     PROTOCOL_DEFAULT, PROTOCOL_TCP, PROTOCOL_SOCKET, PROTOCOL_PIPE,
     PROTOCOL_MEMORY
   Rpl_type* = enum
diff --git a/lib/wrappers/openssl.nim b/lib/wrappers/openssl.nim
index 482062617..cfe18b5c8 100644
--- a/lib/wrappers/openssl.nim
+++ b/lib/wrappers/openssl.nim
@@ -31,7 +31,7 @@ const useWinVersion = defined(Windows) or defined(nimdoc)
 # To force openSSL version use -d:sslVersion=1.0.0
 # See: #10281, #10230
 # General issue:
-# Other dynamic libraries (like libpg) load diffetent openSSL version then what nim loads.
+# Other dynamic libraries (like libpg) load different openSSL version then what nim loads.
 # Having two different openSSL loaded version causes a crash.
 # Use this compile time define to force the openSSL version that your other dynamic libraries want.
 const sslVersion {.strdefine.}: string = ""