documentation and comments use HTTPS when possible (#24264)

(cherry picked from commit 95a7695810)
This commit is contained in:
ringabout
2024-10-09 03:50:35 +08:00
committed by narimiran
parent b24f58183d
commit 9f7b664836
39 changed files with 50 additions and 50 deletions

View File

@@ -63,7 +63,7 @@ type
# Configuration settings for various compilers.
# When adding new compilers, the cmake sources could be a good reference:
# http://cmake.org/gitweb?p=cmake.git;a=tree;f=Modules/Platform;
# https://cmake.org/gitweb?p=cmake.git;a=tree;f=Modules/Platform;
template compiler(name, settings: untyped): untyped =
proc name: TInfoCC {.compileTime.} = settings
@@ -777,7 +777,7 @@ proc getLinkCmd(conf: ConfigRef; output: AbsoluteFile,
# https://blog.molecular-matters.com/2017/05/09/deleting-pdb-files-locked-by-visual-studio/
# and a bit about the .pdb format in case that is ever needed:
# https://github.com/crosire/blink
# http://www.debuginfo.com/articles/debuginfomatch.html#pdbfiles
# https://www.debuginfo.com/articles/debuginfomatch.html#pdbfiles
if conf.hcrOn and isVSCompatible(conf):
let t = now()
let pdb = output.string & "." & format(t, "MMMM-yyyy-HH-mm-") & $t.nanosecond & ".pdb"

View File

@@ -21,4 +21,4 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
[ MIT license: http://www.opensource.org/licenses/mit-license.php ]
[ MIT license: https://www.opensource.org/licenses/mit-license.php ]

View File

@@ -31,7 +31,7 @@ Objective-C targets and the JavaScript target. [The C like targets](
into a library or a final executable. [The JavaScript target](
#backends-the-javascript-target) can generate a ``.js`` file which you
reference from an HTML file or create a [standalone Node.js program](
http://nodejs.org).
https://nodejs.org).
On top of generating libraries or standalone applications, Nim offers
bidirectional interfacing with the backend targets through generic and

View File

@@ -67,7 +67,7 @@ Documentation Comments
Any comments which are preceded by a double-hash (`##`), are interpreted as
documentation. Comments are parsed as RST (see [reference](
http://docutils.sourceforge.net/docs/user/rst/quickref.html)), providing
https://docutils.sourceforge.net/docs/user/rst/quickref.html)), providing
Nim module authors the ability to easily generate richly formatted
documentation with only their well-documented code!
Basic Markdown syntax is also supported inside the doc comments.

View File

@@ -241,5 +241,5 @@ JavaScript target
=================
Once your code is compiled for hot reloading, a convenient solution for implementing the actual reloading
in the browser using a framework such as [LiveReload](http://livereload.com/)
in the browser using a framework such as [LiveReload](https://livereload.com/)
or [BrowserSync](https://browsersync.io/).

View File

@@ -21,7 +21,7 @@ library should follow.
Note that there can be exceptions to these rules. Nim being as flexible as it
is, there will be parts of this style guide that don't make sense in certain
contexts. Furthermore, just as
[Python's style guide](http://legacy.python.org/dev/peps/pep-0008/) changes
[Python's style guide](https://legacy.python.org/dev/peps/pep-0008/) changes
over time, this style guide will too.
These rules will only be enforced for contributions to the Nim

View File

@@ -24,7 +24,7 @@ on the different supported platforms. It is not a definition of the Nim
programming language (which is covered in the [manual](manual.html)).
Nim is free software; it is licensed under the
[MIT License](http://www.opensource.org/licenses/mit-license.php).
[MIT License](https://www.opensource.org/licenses/mit-license.php).
Compiler Usage

View File

@@ -14,7 +14,7 @@ Introduction
niminst is a tool to generate an installer for a Nim program. Currently
it can create an installer for Windows
via [Inno Setup](http://www.jrsoftware.org/isinfo.php) as well as
via [Inno Setup](https://www.jrsoftware.org/isinfo.php) as well as
installation/deinstallation scripts for UNIX. Later versions will support
Linux' package management systems.

View File

@@ -41,7 +41,7 @@ Regular expression syntax and semantics
=======================================
As the regular expressions supported by this module are enormous,
the reader is referred to http://perldoc.perl.org/perlre.html for the
the reader is referred to https://perldoc.perl.org/perlre.html for the
full documentation of Perl's regular expressions.
Because the backslash ``\`` is a meta character both in the Nim

View File

@@ -10,7 +10,7 @@
## This module implements an algorithm to compute the
## `diff`:idx: between two sequences of lines.
##
## - To learn more see `Diff on Wikipedia. <http://wikipedia.org/wiki/Diff>`_
## - To learn more see `Diff on Wikipedia. <https://wikipedia.org/wiki/Diff>`_
runnableExamples:
assert diffInt(
@@ -37,7 +37,7 @@ jkl"""
# code owner: Arne Döring
#
# This is based on C# code written by Matthias Hertel, http://www.mathertel.de
# This is based on C# code written by Matthias Hertel, https://www.mathertel.de
#
# This Class implements the Difference Algorithm published in
# "An O(ND) Difference Algorithm and its Variations" by Eugene Myers

View File

@@ -37,7 +37,7 @@ runnableExamples:
## PCRE has `some additional terms`_ that you must agree to in order to use
## this module.
##
## .. _`some additional terms`: http://pcre.sourceforge.net/license.txt
## .. _`some additional terms`: https://pcre.sourceforge.net/license.txt
runnableExamples:
import std/sugar
let vowels = re"[aeoui]"
@@ -134,11 +134,11 @@ type
## - `(*NO_STUDY)` - turn off studying; study is enabled by default
##
## For more details on the leading option groups, see the `Option
## Setting <http://man7.org/linux/man-pages/man3/pcresyntax.3.html#OPTION_SETTING>`_
## Setting <https://man7.org/linux/man-pages/man3/pcresyntax.3.html#OPTION_SETTING>`_
## and the `Newline
## Convention <http://man7.org/linux/man-pages/man3/pcresyntax.3.html#NEWLINE_CONVENTION>`_
## Convention <https://man7.org/linux/man-pages/man3/pcresyntax.3.html#NEWLINE_CONVENTION>`_
## sections of the `PCRE syntax
## manual <http://man7.org/linux/man-pages/man3/pcresyntax.3.html>`_.
## manual <https://man7.org/linux/man-pages/man3/pcresyntax.3.html>`_.
##
## Some of these options are not part of PCRE and are converted by nre
## into PCRE flags. These include `NEVER_UTF`, `ANCHORED`,

View File

@@ -13,7 +13,7 @@ when defined(js):
## Regular expression support for Nim.
##
## This module is implemented by providing a wrapper around the
## `PCRE (Perl-Compatible Regular Expressions) <http://www.pcre.org>`_
## `PCRE (Perl-Compatible Regular Expressions) <https://www.pcre.org>`_
## C library. This means that your application will depend on the PCRE
## library's licence when using this module, which should not be a problem
## though.

View File

@@ -110,7 +110,7 @@ __EMSCRIPTEN__
/*
NIM_THREADVAR declaration based on
http://stackoverflow.com/questions/18298280/how-to-declare-a-variable-as-thread-local-portably
https://stackoverflow.com/questions/18298280/how-to-declare-a-variable-as-thread-local-portably
*/
#if defined _WIN32
# if defined _MSC_VER || defined __BORLANDC__

View File

@@ -3364,7 +3364,7 @@ proc dirCodeBlock(p: var RstParser, nimExtension = false): PRstNode =
## description of ``parseDirective`` for further structure information.
##
## Code blocks can come in two forms, the standard `code directive
## <http://docutils.sourceforge.net/docs/ref/rst/directives.html#code>`_ and
## <https://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 communicate with the generator. The field is named

View File

@@ -8,7 +8,7 @@
#
## This module implements a generator of HTML/Latex from
## `reStructuredText`:idx: (see http://docutils.sourceforge.net/rst.html for
## `reStructuredText`:idx: (see https://docutils.sourceforge.net/rst.html for
## information on this markup syntax) and is used by the compiler's `docgen
## tools <docgen.html>`_.
##

View File

@@ -1133,7 +1133,7 @@ proc utimes*(path: cstring, times: ptr array[2, Timeval]): int {.
##
## Returns zero on success.
##
## For more information read http://www.unix.com/man-page/posix/3/utimes/.
## For more information read https://www.unix.com/man-page/posix/3/utimes/.
proc handle_signal(sig: cint, handler: proc (a: cint) {.noconv.}) {.importc: "signal", header: "<signal.h>".}

View File

@@ -372,7 +372,7 @@ elif defined(haiku):
# from sys/un.h
const Sockaddr_un_path_length* = 126
else:
# according to http://pubs.opengroup.org/onlinepubs/009604499/basedefs/sys/un.h.html
# according to https://pubs.opengroup.org/onlinepubs/009604499/basedefs/sys/un.h.html
# this is >=92
const Sockaddr_un_path_length* = 92

View File

@@ -386,7 +386,7 @@ when defined(linux):
# from sys/un.h
const Sockaddr_un_path_length* = 108
else:
# according to http://pubs.opengroup.org/onlinepubs/009604499/basedefs/sys/un.h.html
# according to https://pubs.opengroup.org/onlinepubs/009604499/basedefs/sys/un.h.html
# this is >=92
const Sockaddr_un_path_length* = 92

View File

@@ -370,7 +370,7 @@ when hasSpawnH:
Tposix_spawn_file_actions* {.importc: "posix_spawn_file_actions_t",
header: "<spawn.h>", final, pure.} = object
# according to http://pubs.opengroup.org/onlinepubs/009604499/basedefs/sys/un.h.html
# according to https://pubs.opengroup.org/onlinepubs/009604499/basedefs/sys/un.h.html
# this is >=92
const Sockaddr_un_path_length* = 92

View File

@@ -418,7 +418,7 @@ elif defined(freertos) or defined(lwip):
const Sockaddr_un_path_length* = 108
else:
const Sockaddr_max_length* = 255
# according to http://pubs.opengroup.org/onlinepubs/009604499/basedefs/sys/un.h.html
# according to https://pubs.opengroup.org/onlinepubs/009604499/basedefs/sys/un.h.html
# this is >=92
const Sockaddr_un_path_length* = 92

View File

@@ -757,7 +757,7 @@ proc prevPermutation*[T](x: var openArray[T]): bool {.discardable.} =
proc rotateInternal[T](arg: var openArray[T]; first, middle, last: int): int =
## A port of std::rotate from C++.
## Ported from [this reference](http://www.cplusplus.com/reference/algorithm/rotate/).
## Ported from [this reference](https://www.cplusplus.com/reference/algorithm/rotate/).
result = first + last - middle
if first == middle or middle == last:

View File

@@ -417,8 +417,8 @@ when defined(windows) or defined(nimdoc):
# We do not have to 'GC_unref(customOverlapped)' because the destructor
# does that for us.
# http://stackoverflow.com/a/12277264/492186
# TODO: http://www.serverframework.com/handling-multiple-pending-socket-read-and-write-operations.html
# https://stackoverflow.com/a/12277264/492186
# TODO: https://www.serverframework.com/handling-multiple-pending-socket-read-and-write-operations.html
if res:
# This is useful for ensuring the reliability of the overlapped struct.
assert customOverlapped.data.fd == lpCompletionKey.AsyncFD
@@ -845,7 +845,7 @@ when defined(windows) or defined(nimdoc):
failAccept(errcode)
)
# http://msdn.microsoft.com/en-us/library/windows/desktop/ms737524%28v=vs.85%29.aspx
# https://msdn.microsoft.com/en-us/library/windows/desktop/ms737524%28v=vs.85%29.aspx
let ret = acceptEx(socket.SocketHandle, clientSock, addr lpOutputBuf[0],
dwReceiveDataLength,
dwLocalAddressLength,

View File

@@ -354,7 +354,7 @@ proc writeBuffer*(f: AsyncFile, buf: pointer, size: int): Future[void] =
)
# passing -1 here should work according to MSDN, but doesn't. For more
# information see
# http://stackoverflow.com/questions/33650899/does-asynchronous-file-
# https://stackoverflow.com/questions/33650899/does-asynchronous-file-
# appending-in-windows-preserve-order
ol.offset = DWORD(f.offset and 0xffffffff)
ol.offsetHigh = DWORD(f.offset shr 32)

View File

@@ -26,7 +26,7 @@
## Each builds on top of the layers below it. The selectors module is an
## abstraction for the various system `select()` mechanisms such as epoll or
## kqueue. If you wish you can use it directly, and some people have done so
## `successfully <http://goran.krampe.se/2014/10/25/nim-socketserver/>`_.
## `successfully <https://goran.krampe.se/2014/10/25/nim-socketserver/>`_.
## But you must be aware that on Windows it only supports
## `select()`.
##

View File

@@ -187,7 +187,7 @@ proc card*[A](s: HashSet[A]): int =
## Alias for `len() <#len,HashSet[A]>`_.
##
## Card stands for the `cardinality
## <http://en.wikipedia.org/wiki/Cardinality>`_ of a set.
## <https://en.wikipedia.org/wiki/Cardinality>`_ of a set.
result = s.counter
proc incl*[A](s: var HashSet[A], key: A) =
@@ -840,7 +840,7 @@ proc card*[A](s: OrderedSet[A]): int {.inline.} =
## Alias for `len() <#len,OrderedSet[A]>`_.
##
## Card stands for the `cardinality
## <http://en.wikipedia.org/wiki/Cardinality>`_ of a set.
## <https://en.wikipedia.org/wiki/Cardinality>`_ of a set.
result = s.counter
proc `==`*[A](s, t: OrderedSet[A]): bool =

View File

@@ -22,7 +22,7 @@ type
HttpHeaderValues* = distinct seq[string]
# The range starts at '0' so that we don't have to explicitly initialise
# it. See: http://irclogs.nim-lang.org/19-09-2016.html#19:48:27 for context.
# it. See: https://irclogs.nim-lang.org/19-09-2016.html#19:48:27 for context.
HttpCode* = distinct range[0 .. 599]
HttpVersion* = enum

View File

@@ -230,7 +230,7 @@ proc close*(socket: SocketHandle) =
else:
discard posix.close(socket)
# TODO: These values should not be discarded. An OSError should be raised.
# http://stackoverflow.com/questions/12463473/what-happens-if-you-call-close-on-a-bsd-socket-multiple-times
# https://stackoverflow.com/questions/12463473/what-happens-if-you-call-close-on-a-bsd-socket-multiple-times
when declared(setInheritable) or defined(nimdoc):
proc setInheritable*(s: SocketHandle, inheritable: bool): bool {.inline.} =

View File

@@ -598,7 +598,7 @@ when defineSsl:
ctx.referencedData.incl(index)
GC_ref(data)
# http://simplestcodings.blogspot.co.uk/2010/08/secure-server-client-using-openssl-in-c.html
# https://simplestcodings.blogspot.co.uk/2010/08/secure-server-client-using-openssl-in-c.html
proc loadCertificates(ctx: SslCtx, certFile, keyFile: string) =
if certFile != "" and not fileExists(certFile):
raise newException(system.IOError,

View File

@@ -142,7 +142,7 @@ proc quoteShellWindows*(s: string): string {.noSideEffect, rtl, extern: "nosp$1"
## Quote `s`, so it can be safely passed to Windows API.
##
## Based on Python's `subprocess.list2cmdline`.
## See `this link <http://msdn.microsoft.com/en-us/library/17w5ykft.aspx>`_
## See `this link <https://msdn.microsoft.com/en-us/library/17w5ykft.aspx>`_
## for more details.
let needQuote = {' ', '\t'} in s or s.len == 0
result = ""

View File

@@ -157,7 +157,7 @@ proc close*(p: Process) {.rtl, extern: "nosp$1", raises: [IOError, OSError], tag
##
## .. warning:: If the process has not finished executing, this will forcibly
## terminate the process. Doing so may result in zombie processes and
## `pty leaks <http://stackoverflow.com/questions/27021641/how-to-fix-request-failed-on-channel-0>`_.
## `pty leaks <https://stackoverflow.com/questions/27021641/how-to-fix-request-failed-on-channel-0>`_.
proc suspend*(p: Process) {.rtl, extern: "nosp$1", tags: [].}
## Suspends the process `p`.

View File

@@ -11,8 +11,8 @@
##
## Its implementation is based on the `xoroshiro128+`
## (xor/rotate/shift/rotate) library.
## * More information: http://xoroshiro.di.unimi.it
## * C implementation: http://xoroshiro.di.unimi.it/xoroshiro128plus.c
## * More information: https://xoroshiro.di.unimi.it
## * C implementation: https://xoroshiro.di.unimi.it/xoroshiro128plus.c
##
## **Do not use this module for cryptographic purposes!**
##

View File

@@ -484,7 +484,7 @@ proc toEpochDay(monthday: MonthdayRange, month: Month, year: int): int64 =
## Get the epoch day from a year/month/day date.
## The epoch day is the number of days since 1970/01/01
## (it might be negative).
# Based on http://howardhinnant.github.io/date_algorithms.html
# Based on https://howardhinnant.github.io/date_algorithms.html
assertValidDate monthday, month, year
var (y, m, d) = (year, ord(month), monthday.int)
if m <= 2:
@@ -501,7 +501,7 @@ proc fromEpochDay(epochday: int64):
## Get the year/month/day date from a epoch day.
## The epoch day is the number of days since 1970/01/01
## (it might be negative).
# Based on http://howardhinnant.github.io/date_algorithms.html
# Based on https://howardhinnant.github.io/date_algorithms.html
var z = epochday
z.inc 719468
let era = (if z >= 0: z else: z - 146096) div 146097

View File

@@ -382,7 +382,7 @@ func combine*(base: Uri, reference: Uri): Uri =
## Combines a base URI with a reference URI.
##
## This uses the algorithm specified in
## `section 5.2.2 of RFC 3986 <http://tools.ietf.org/html/rfc3986#section-5.2.2>`_.
## `section 5.2.2 of RFC 3986 <https://tools.ietf.org/html/rfc3986#section-5.2.2>`_.
##
## This means that the slashes inside the base URIs path as well as reference
## URIs path affect the resulting URI.

View File

@@ -936,11 +936,11 @@ macro `<>`*(x: untyped): untyped =
## Constructor macro for XML. Example usage:
##
## ```nim
## <>a(href="http://nim-lang.org", newText("Nim rules."))
## <>a(href="https://nim-lang.org", newText("Nim rules."))
## ```
##
## Produces an XML tree for:
##
## <a href="http://nim-lang.org">Nim rules.</a>
## <a href="https://nim-lang.org">Nim rules.</a>
##
result = xmlConstructor(x)

View File

@@ -51,7 +51,7 @@ proc parseCmdLine*(c: string): seq[string] {.
## `parseopt module <parseopt.html>`_.
##
## On Windows, it uses the `following parsing rules
## <http://msdn.microsoft.com/en-us/library/17w5ykft.aspx>`_:
## <https://msdn.microsoft.com/en-us/library/17w5ykft.aspx>`_:
##
## * Arguments are delimited by white space, which is either a space or a tab.
## * The caret character (^) is not recognized as an escape character or

View File

@@ -545,7 +545,7 @@ proc disjoint*[A](s1, s2: PackedSet[A]): bool =
proc card*[A](s: PackedSet[A]): int {.inline.} =
## Alias for `len() <#len,PackedSet[A]>`_.
##
## Card stands for the [cardinality](http://en.wikipedia.org/wiki/Cardinality)
## Card stands for the [cardinality](https://en.wikipedia.org/wiki/Cardinality)
## of a set.
result = s.len()

View File

@@ -3,7 +3,7 @@ Copyright (c) Facebook, Inc. and its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

View File

@@ -59,7 +59,7 @@ proc procAddrError(name: cstring) {.compilerproc, nonReloadable, hcrInline.} =
# this code was inspired from Lua's source code:
# Lua - An Extensible Extension Language
# Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil
# http://www.lua.org
# https://www.lua.org
# mailto:info@lua.org
when defined(posix):

View File

@@ -94,7 +94,7 @@ proc nimParseBiggestFloat(s: openArray[char], number: var BiggestFloat,
# these restrictions, transform the float into this form:
# INTEGER * 10 ^ exponent and leave the work to standard `strtod()`.
# This avoid the problems of decimal character portability.
# see: http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/
# see: https://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/
var
i = 0
sign = 1.0