summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--doc/docgen.rst16
-rw-r--r--doc/docs.rst4
-rw-r--r--doc/lib.rst18
-rw-r--r--doc/nimc.rst22
-rw-r--r--lib/impure/db_odbc.nim15
-rw-r--r--lib/pure/concurrency/cpuload.nim2
-rw-r--r--tools/kochdocs.nim11
7 files changed, 27 insertions, 61 deletions
diff --git a/doc/docgen.rst b/doc/docgen.rst
index fa23bdc79..65c7bd908 100644
--- a/doc/docgen.rst
+++ b/doc/docgen.rst
@@ -131,7 +131,7 @@ Output::
 
 Similarly to the old ``doc`` command the old ``jsondoc`` command has been
 renamed ``jsondoc0``.
- 
+
 The ``jsondoc0`` command::
   nim jsondoc0 sample
 
@@ -158,11 +158,11 @@ Project switch
 --------------
 
 ::
-  nim doc2 --project filename.nim
+  nim doc --project filename.nim
 
 This will recursively generate documentation of all nim modules imported
-into the input module, including system modules. Be careful with this command,
-as it may end up sprinkling html files all over your filesystem!
+into the input module that belong to the Nimble package that ``filename.nim``
+belongs to.
 
 
 Index switch
@@ -222,9 +222,8 @@ Usage::
 Output::
   You're reading it!
 
-The input can be viewed here `docgen.txt <docgen.txt>`_. The ``rst2tex``
-command is invoked identically to ``rst2html``, but outputs a .tex file instead
-of .html.
+The ``rst2tex`` command is invoked identically to ``rst2html``, but outputs
+a .tex file instead of .html.
 
 
 HTML anchor generation
@@ -312,8 +311,7 @@ but can have up to four (additional columns are ignored). The content of these
 columns is:
 
 1. Mandatory term being indexed. Terms can include quoting according to
-   Nim's rules (eg. \`^\` like in `the actors module
-   <actors.html#^,ptr.TChannel[T]>`_).
+   Nim's rules (eg. \`^\`).
 2. Base filename plus anchor hyper link (eg.
    ``algorithm.html#*,int,SortOrder``).
 3. Optional human readable string to display as hyper link. If the value is not
diff --git a/doc/docs.rst b/doc/docs.rst
index 4484784ae..cd1a05853 100644
--- a/doc/docs.rst
+++ b/doc/docs.rst
@@ -27,10 +27,6 @@ The documentation consists of several documents:
   | The Nim compiler supports source code filters as a simple yet powerful
     builtin templating system.
 
-- | `Term rewriting macros <trmacros.html>`_
-  | Term rewriting macros enhance the compilation process with user defined
-    optimizations.
-
 - | `Internal documentation <intern.html>`_
   | The internal documentation describes how the compiler is implemented. Read
     this if you want to hack the compiler.
diff --git a/doc/lib.rst b/doc/lib.rst
index bfb7306fb..5ae1a59c7 100644
--- a/doc/lib.rst
+++ b/doc/lib.rst
@@ -184,12 +184,6 @@ Generic Operating System Services
   This module provides support for memory mapped files (Posix's ``mmap``)
   on the different operating systems.
 
-* `fsmonitor <fsmonitor.html>`_
-  This module implements the ability to monitor a directory/file for changes
-  using Posix's inotify API.
-
-  **Warning:** This module will likely be moved out to a Nimble package soon.
-
 * `asyncfile <asyncfile.html>`_
   This module implements asynchronous file reading and writing using
   ``asyncdispatch``.
@@ -238,9 +232,6 @@ Internet Protocols and Support
   This module implements procs for opening URLs with the user's default
   browser.
 
-* `httpserver <httpserver.html>`_
-  This module implements a simple HTTP server.
-
 * `httpclient <httpclient.html>`_
   This module implements a simple HTTP client which supports both synchronous
   and asynchronous retrieval of web pages.
@@ -289,11 +280,6 @@ Parsers
 * `parseopt <parseopt.html>`_
   The ``parseopt`` module implements a command line option parser.
 
-* `parseopt2 <parseopt2.html>`_
-  The ``parseopt2`` module implements a command line option parser. This
-  supports long and short command options with optional values and command line
-  arguments.
-
 * `parsecfg <parsecfg.html>`_
   The ``parsecfg`` module implements a high performance configuration file
   parser. The configuration file's syntax is similar to the Windows ``.ini``
@@ -393,10 +379,6 @@ Multimedia support
 Miscellaneous
 -------------
 
-* `events <events.html>`_
-  This module implements an event system that is not dependent on external
-  graphical toolkits.
-
 * `oids <oids.html>`_
   An OID is a global ID that consists of a timestamp,
   a unique counter and a random value. This combination should suffice to
diff --git a/doc/nimc.rst b/doc/nimc.rst
index 9fa181f48..acda484fb 100644
--- a/doc/nimc.rst
+++ b/doc/nimc.rst
@@ -136,7 +136,7 @@ source code with the `when statement <manual.html#when-statement>`_ and
 `defined proc <system.html#defined>`_. The typical use of this switch is to
 enable builds in release mode (``-d:release``) where certain safety checks are
 omitted for better performance. Another common use is the ``-d:ssl`` switch to
-activate `SSL sockets <sockets.html>`_.
+activate SSL sockets.
 
 Additionally, you may pass a value along with the symbol: ``-d:x=y``
 which may be used in conjunction with the `compile time define
@@ -289,8 +289,7 @@ For example, with the above mentioned config::
 
 This will generate a file called ``switchhomebrew.elf`` which can then be turned into
 an nro file with the ``elf2nro`` tool in the DevkitPro release. Examples can be found at
-`the nim-libnx github repo <https://github.com/jyapayne/nim-libnx.git>`_ or you can use
-`the switch builder tool <https://github.com/jyapayne/switch-builder.git>`_.
+`the nim-libnx github repo <https://github.com/jyapayne/nim-libnx.git>`_.
 
 There are a few things that don't work because the DevkitPro libraries don't support them.
 They are:
@@ -396,11 +395,6 @@ the generated C contains code to ensure that proper stack traces with line
 number information are given if the program crashes or an uncaught exception
 is raised.
 
-Debugger option
----------------
-The ``debugger`` option enables or disables the *Embedded Nim Debugger*.
-See the documentation of endb_ for further information.
-
 Hot code reloading
 ------------------
 **Note:** At the moment hot code reloading is supported only in
@@ -442,11 +436,6 @@ Once your code is compiled for hot reloading, you can use a framework such
 as `LiveReload <http://livereload.com/>` or `BrowserSync <https://browsersync.io/>`
 to implement the actual reloading behavior in your project.
 
-Breakpoint pragma
------------------
-The *breakpoint* pragma was specially added for the sake of debugging with
-ENDB. See the documentation of `endb <endb.html>`_ for further information.
-
 
 DynlibOverride
 ==============
@@ -543,13 +532,6 @@ fatal errors that produce a stack trace. This can be disabled with the
 ``-d:noSignalHandler`` switch.
 
 
-Debugging with Nim
-==================
-
-Nim comes with its own *Embedded Nim Debugger*. See
-the documentation of endb_ for further information.
-
-
 Optimizing for Nim
 ==================
 
diff --git a/lib/impure/db_odbc.nim b/lib/impure/db_odbc.nim
index d6343acc7..224bcbb50 100644
--- a/lib/impure/db_odbc.nim
+++ b/lib/impure/db_odbc.nim
@@ -183,7 +183,7 @@ proc sqlGetDBMS(db: var DbConn): string {.
     db.sqlCheck(SQLGetInfo(db.hDb, SQL_DBMS_NAME, cast[SqlPointer](buf.addr),
                         4095.TSqlSmallInt, sz.addr))
   except: discard
-  return $buf.cstring
+  return $(addr buf)
 
 proc dbQuote*(s: string): string {.noSideEffect.} =
   ## DB quotes the string.
@@ -201,10 +201,7 @@ proc dbFormat(formatstr: SqlQuery, args: varargs[string]): string {.
   var a = 0
   for c in items(string(formatstr)):
     if c == '?':
-      if args[a] == nil:
-        add(result, "NULL")
-      else:
-        add(result, dbQuote(args[a]))
+      add(result, dbQuote(args[a]))
       inc(a)
     else:
       add(result, c)
@@ -303,7 +300,7 @@ iterator fastRows*(db: var DbConn, query: SqlQuery,
         buf[0] = '\0'
         db.sqlCheck(SQLGetData(db.stmt, colId.SqlUSmallInt, SQL_C_CHAR,
                                  cast[cstring](buf.addr), 4095.TSqlSmallInt, sz.addr))
-        rowRes[colId-1] = $buf.cstring
+        rowRes[colId-1] = $(addr buf)
         cCnt = tempcCnt
       yield rowRes
       res = SQLFetch(db.stmt)
@@ -338,7 +335,7 @@ iterator instantRows*(db: var DbConn, query: SqlQuery,
         buf[0] = '\0'
         db.sqlCheck(SQLGetData(db.stmt, colId.SqlUSmallInt, SQL_C_CHAR,
                                  cast[cstring](buf.addr), 4095.TSqlSmallInt, sz.addr))
-        rowRes[colId-1] = $buf.cstring
+        rowRes[colId-1] = $(addr buf)
         cCnt = tempcCnt
       yield (row: rowRes, len: cCnt.int)
       res = SQLFetch(db.stmt)
@@ -380,7 +377,7 @@ proc getRow*(db: var DbConn, query: SqlQuery,
       buf[0] = '\0'
       db.sqlCheck(SQLGetData(db.stmt, colId.SqlUSmallInt, SQL_C_CHAR,
                                cast[cstring](buf.addr), 4095.TSqlSmallInt, sz.addr))
-      rowRes[colId-1] = $buf.cstring
+      rowRes[colId-1] = $(addr buf)
       cCnt = tempcCnt
     res = SQLFetch(db.stmt)
     result = rowRes
@@ -415,7 +412,7 @@ proc getAllRows*(db: var DbConn, query: SqlQuery,
         buf[0] = '\0'
         db.sqlCheck(SQLGetData(db.stmt, colId.SqlUSmallInt, SQL_C_CHAR,
                                  cast[cstring](buf.addr), 4095.TSqlSmallInt, sz.addr))
-        rowRes[colId-1] = $buf.cstring
+        rowRes[colId-1] = $(addr buf)
         cCnt = tempcCnt
       rows.add(rowRes)
       res = SQLFetch(db.stmt)
diff --git a/lib/pure/concurrency/cpuload.nim b/lib/pure/concurrency/cpuload.nim
index 1ec739485..78a95681d 100644
--- a/lib/pure/concurrency/cpuload.nim
+++ b/lib/pure/concurrency/cpuload.nim
@@ -81,7 +81,7 @@ proc advice*(s: var ThreadPoolState): ThreadPoolAdvice =
     result = doNothing
   inc s.calls
 
-when not defined(testing) and isMainModule:
+when not defined(testing) and isMainModule and not defined(nimdoc):
   import random
 
   proc busyLoop() =
diff --git a/tools/kochdocs.nim b/tools/kochdocs.nim
index d24eba5dc..ed135f579 100644
--- a/tools/kochdocs.nim
+++ b/tools/kochdocs.nim
@@ -94,6 +94,8 @@ doc/manual/var_t_return.rst
 lib/system.nim
 lib/system/nimscript.nim
 lib/pure/ospaths.nim
+lib/pure/parsejson.nim
+lib/pure/cstrutils.nim
 lib/core/macros.nim
 lib/pure/marshal.nim
 lib/core/typeinfo.nim
@@ -102,6 +104,7 @@ lib/pure/typetraits.nim
 nimsuggest/sexp.nim
 lib/pure/concurrency/threadpool.nim
 lib/pure/concurrency/cpuinfo.nim
+lib/pure/concurrency/cpuload.nim
 lib/js/dom.nim
 lib/js/jsffi.nim
 lib/js/jsconsole.nim
@@ -139,6 +142,7 @@ lib/pure/browsers.nim
 lib/impure/db_postgres.nim
 lib/impure/db_mysql.nim
 lib/impure/db_sqlite.nim
+lib/impure/db_odbc.nim
 lib/pure/db_common.nim
 lib/pure/httpserver.nim
 lib/pure/httpclient.nim
@@ -156,6 +160,7 @@ lib/pure/mimetypes.nim
 lib/pure/json.nim
 lib/pure/base64.nim
 lib/pure/scgi.nim
+lib/deprecated/pure/asyncio.nim
 lib/pure/collections/tables.nim
 lib/pure/collections/sets.nim
 lib/pure/collections/lists.nim
@@ -166,6 +171,7 @@ lib/pure/collections/queues.nim
 lib/pure/collections/deques.nim
 lib/pure/encodings.nim
 lib/pure/collections/sequtils.nim
+lib/pure/collections/rtarrays.nim
 lib/pure/cookies.nim
 lib/pure/memfiles.nim
 lib/pure/subexes.nim
@@ -194,6 +200,7 @@ lib/pure/selectors.nim
 lib/pure/sugar.nim
 lib/pure/collections/chains.nim
 lib/pure/asyncfile.nim
+lib/deprecated/pure/ftpclient.nim
 lib/pure/asyncftpclient.nim
 lib/pure/lenientops.nim
 lib/pure/md5.nim
@@ -203,7 +210,9 @@ lib/pure/oswalkdir.nim
 lib/pure/collections/heapqueue.nim
 lib/pure/fenv.nim
 lib/std/sha1.nim
+lib/std/varints.nim
 lib/impure/rdstdin.nim
+lib/wrappers/linenoise/linenoise.nim
 lib/pure/strformat.nim
 lib/pure/segfaults.nim
 lib/pure/mersenne.nim
@@ -230,6 +239,8 @@ lib/wrappers/odbcsql.nim
 lib/wrappers/pcre.nim
 lib/wrappers/openssl.nim
 lib/posix/posix.nim
+lib/posix/linux.nim
+lib/posix/termios.nim
 lib/wrappers/odbcsql.nim
 lib/js/jscore.nim
 """.splitWhitespace()