Merge branch 'devel' of https://github.com/Araq/Nim into devel

This commit is contained in:
Araq
2015-01-13 13:56:15 +01:00
7 changed files with 20 additions and 10 deletions

View File

@@ -24,7 +24,7 @@ proc execute*(program: string) =
when hasFFI: defineSymbol("nimffi")
registerPass(verbosePass)
registerPass(semPass)
registerPass(vmPass)
registerPass(evalPass)
appendStr(searchPaths, options.libpath)
compileSystemModule()

View File

@@ -100,7 +100,7 @@ hint[LineTooLong]=off
@end
@end
@if macosx:
@if macosx or freebsd:
cc = clang
tlsEmulation:on
gcc.options.always = "-w -fasm-blocks"

View File

@@ -468,12 +468,16 @@ Windows specific
* `windows <windows.html>`_
Contains a wrapper for the Win32 API.
* `winlean <winlean.html>`_
Contains a wrapper for a small subset of the Win32 API.
* `shellapi <shellapi.html>`_
Contains a wrapper for the ``shellapi.h`` header.
* `shfolder <shfolder.html>`_
Contains a wrapper for the ``shfolder.h`` header.
* `mmsystem <mmsystem.html>`_
Contains a wrapper for the ``mmsystem.h`` header.
* `psapi <psapi.html>`_
Contains a wrapper for the ``psapi.h`` header.
* `nb30 <nb30.html>`_
This module contains the definitions for portable NetBIOS 3.0 support.

View File

@@ -1313,9 +1313,9 @@ Slices
------
Slices look similar to subranges types in syntax but are used in a different
context. A slice is just an object of type TSlice which contains two bounds,
context. A slice is just an object of type Slice which contains two bounds,
`a` and `b`. By itself a slice is not very useful, but other collection types
define operators which accept TSlice objects to define ranges.
define operators which accept Slice objects to define ranges.
.. code-block:: nim

View File

@@ -417,10 +417,12 @@ proc generateSymbolIndex(symbols: seq[TIndexEntry]): string =
result = ""
var i = 0
while i < symbols.len:
result.addf("<dt><span>$1:</span></dt><ul class=\"simple\"><dd>\n",
[symbols[i].keyword])
let keyword= symbols[i].keyword
let cleaned_keyword = keyword[1..keyword.high - 1]
result.addf("<dt><a name=\"$2\" href=\"#$2\"><span>$1:</span></a></dt><ul class=\"simple\"><dd>\n",
[keyword, cleaned_keyword])
var j = i
while j < symbols.len and symbols[i].keyword == symbols[j].keyword:
while j < symbols.len and keyword == symbols[j].keyword:
let
url = symbols[j].link
text = if not symbols[j].linkTitle.isNil: symbols[j].linkTitle else: url

View File

@@ -157,8 +157,6 @@ elif defined(linux):
var evSet: set[Event] = {}
if (s.events[i].events and EPOLLERR) != 0: evSet = evSet + {EvError}
if (s.events[i].events and EPOLLHUP) != 0: evSet = evSet + {EvError}
if (s.events[i].events and EPOLLRDHUP) != 0: evSet = evSet + {EvError}
if (s.events[i].events and EPOLLIN) != 0: evSet = evSet + {EvRead}
if (s.events[i].events and EPOLLOUT) != 0: evSet = evSet + {EvWrite}
let selectorKey = s.fds[fd]

View File

@@ -54,10 +54,16 @@ case $uos in
myos="linux"
LINK_FLAGS="$LINK_FLAGS -ldl -lm"
;;
*freebsd* | *dragonfly* )
*dragonfly* )
myos="freebsd"
LINK_FLAGS="$LINK_FLAGS -lm"
;;
*freebsd* )
myos="freebsd"
CC="clang"
LINKER="clang"
LINK_FLAGS="$LINK_FLAGS -ldl -lm"
;;
*openbsd* )
myos="openbsd"
LINK_FLAGS="$LINK_FLAGS -lm"