docgen should work again

This commit is contained in:
Araq
2014-10-05 03:06:19 +02:00
parent fc47c0edc7
commit a9a5766c66
15 changed files with 120 additions and 106 deletions

View File

@@ -69,6 +69,8 @@ const
reportMissedDeadlines avoidTimeMachine useClone ignoreAllocationSize
debugExecProcesses pcreDll useLipzipSrc
preventDeadlocks UNICODE winUnicode trackGcHeaders posixRealtime
nimStdSetjmp nimRawSetjmp nimSigSetjmp
""".split
proc initDefines*() =

View File

@@ -119,7 +119,7 @@ type
warnDifferentHeaps, warnWriteToForeignHeap, warnUnsafeCode,
warnEachIdentIsTuple, warnShadowIdent,
warnProveInit, warnProveField, warnProveIndex, warnGcUnsafe, warnGcUnsafe2,
warnUninit, warnGcMem, warnUnguardedAccess, warnUser,
warnUninit, warnGcMem, warnLockLevel, warnUser,
hintSuccess, hintSuccessX,
hintLineTooLong, hintXDeclaredButNotUsed, hintConvToBaseNotNeeded,
hintConvFromXtoItselfNotNeeded, hintExprAlwaysX, hintQuitCalled,
@@ -390,7 +390,7 @@ const
warnGcUnsafe2: "cannot prove '$1' is GC-safe. Does not compile with --threads:on.",
warnUninit: "'$1' might not have been initialized [Uninit]",
warnGcMem: "'$1' uses GC'ed memory [GcMem]",
warnUnguardedAccess: "'$1' is accessed without its guard [UnguardedAccess]",
warnLockLevel: "$1 [LockLevel]",
warnUser: "$1 [User]",
hintSuccess: "operation successful [Success]",
hintSuccessX: "operation successful ($# lines compiled; $# sec total; $#) [SuccessX]",
@@ -420,7 +420,7 @@ const
"AnalysisLoophole", "DifferentHeaps", "WriteToForeignHeap",
"UnsafeCode", "EachIdentIsTuple", "ShadowIdent",
"ProveInit", "ProveField", "ProveIndex", "GcUnsafe", "GcUnsafe2", "Uninit",
"GcMem", "UnguardedAccess", "User"]
"GcMem", "LockLevel", "User"]
HintsToStr*: array[0..16, string] = ["Success", "SuccessX", "LineTooLong",
"XDeclaredButNotUsed", "ConvToBaseNotNeeded", "ConvFromXtoItselfNotNeeded",

View File

@@ -29,7 +29,7 @@ App: Console
License: "copying.txt"
[Config]
Files: "config/nimrod.cfg"
Files: "config/nim.cfg"
Files: "config/nimdoc.cfg"
Files: "config/nimdoc.tex.cfg"
@@ -59,7 +59,7 @@ Files: "icons/koch_icon.o"
Files: "compiler/readme.txt"
Files: "compiler/nim.ini"
Files: "compiler/nimrod.cfg"
Files: "compiler/nim.nimrod.cfg"
Files: "compiler/*.nim"
Files: "compiler/c2nim/*.nim"
Files: "compiler/c2nim/*.cfg"

View File

@@ -411,6 +411,7 @@ proc getLockLevel(s: PSym): TLockLevel =
result = 0.TLockLevel
else:
result = UnknownLockLevel
#message(s.info, warnUser, "FOR THIS " & s.name.s)
proc mergeLockLevels(tracked: PEffects, n: PNode, lockLevel: TLockLevel) =
if lockLevel >= tracked.currLockLevel:
@@ -757,9 +758,15 @@ proc checkMethodEffects*(disp, branch: PSym) =
localError(branch.info, "base method is GC-safe, but '$1' is not" %
branch.name.s)
if branch.typ.lockLevel > disp.typ.lockLevel:
localError(branch.info,
"base method has lock level $1, but dispatcher has $2" %
[$branch.typ.lockLevel, $disp.typ.lockLevel])
when true:
message(branch.info, warnLockLevel,
"base method has lock level $1, but dispatcher has $2" %
[$branch.typ.lockLevel, $disp.typ.lockLevel])
else:
# XXX make this an error after bigbreak has been released:
localError(branch.info,
"base method has lock level $1, but dispatcher has $2" %
[$branch.typ.lockLevel, $disp.typ.lockLevel])
proc setEffectsForProcType*(t: PType, n: PNode) =
var effects = t.n.sons[0]

View File

@@ -101,7 +101,7 @@ The compiler can ensure the location in ``location = spawn f(...)`` is not
read prematurely within a ``parallel`` section and so there is no need for
the overhead of an indirection via ``FlowVar[T]`` to ensure correctness.
**Note**: Currently exceptions are not propagated between ``spawn``ed tasks!
**Note**: Currently exceptions are not propagated between ``spawn``'ed tasks!
Spawn statement

View File

@@ -143,12 +143,12 @@ iterator fastRows*(db: TDbConn, stmtName: TSqlPrepared,
args: varargs[string, `$`]): TRow {.tags: [FReadDB].} =
## executes the prepared query and iterates over the result dataset.
var res = setupQuery(db, stmtName, args)
var L = PQnfields(res)
var L = pqNfields(res)
var result = newRow(L)
for i in 0..PQntuples(res)-1:
for i in 0..pqNtuples(res)-1:
setRow(res, result, i, L)
yield result
PQclear(res)
pqClear(res)
proc getRow*(db: TDbConn, query: TSqlQuery,
args: varargs[string, `$`]): TRow {.tags: [FReadDB].} =
@@ -163,10 +163,10 @@ proc getRow*(db: TDbConn, query: TSqlQuery,
proc getRow*(db: TDbConn, stmtName: TSqlPrepared,
args: varargs[string, `$`]): TRow {.tags: [FReadDB].} =
var res = setupQuery(db, stmtName, args)
var L = PQnfields(res)
var L = pqNfields(res)
result = newRow(L)
setRow(res, result, 0, L)
PQclear(res)
pqClear(res)
proc getAllRows*(db: TDbConn, query: TSqlQuery,
args: varargs[string, `$`]): seq[TRow] {.tags: [FReadDB].} =
@@ -179,7 +179,7 @@ proc getAllRows*(db: TDbConn, stmtName: TSqlPrepared,
args: varargs[string, `$`]): seq[TRow] {.tags: [FReadDB].} =
## executes the prepared query and returns the whole result dataset.
result = @[]
for r in FastRows(db, stmtName, args):
for r in fastRows(db, stmtName, args):
result.add(r)
iterator rows*(db: TDbConn, query: TSqlQuery,

View File

@@ -14,7 +14,7 @@ when not defined(js) and not defined(Nimdoc):
{.error: "This module only works on the JavaScript platform".}
type
TEventHandlers* {.importc.} = object of TObject
TEventHandlers* {.importc.} = object of RootObj
onabort*: proc (event: ref TEvent) {.nimcall.}
onblur*: proc (event: ref TEvent) {.nimcall.}
onchange*: proc (event: ref TEvent) {.nimcall.}
@@ -124,14 +124,14 @@ type
embeds*: seq[ref TEmbed]
links*: seq[ref TLink]
TLink* {.importc.} = object of TObject
TLink* {.importc.} = object of RootObj
name*: cstring
target*: cstring
text*: cstring
x*: int
y*: int
TEmbed* {.importc.} = object of TObject
TEmbed* {.importc.} = object of RootObj
height*: int
hspace*: int
name*: cstring
@@ -142,12 +142,12 @@ type
play*: proc () {.nimcall.}
stop*: proc () {.nimcall.}
TAnchor* {.importc.} = object of TObject
TAnchor* {.importc.} = object of RootObj
name*: cstring
text*: cstring
x*, y*: int
TApplet* {.importc.} = object of TObject
TApplet* {.importc.} = object of RootObj
TElement* {.importc.} = object of TEventHandlers
checked*: bool
@@ -166,7 +166,7 @@ type
select*: proc () {.nimcall.}
options*: seq[ref TOption]
TOption* {.importc.} = object of TObject
TOption* {.importc.} = object of RootObj
defaultSelected*: bool
selected*: bool
selectedIndex*: int
@@ -209,7 +209,7 @@ type
DocumentTypeNode,
DocumentFragmentNode,
NotationNode
TNode* {.importc.} = object of TObject
TNode* {.importc.} = object of RootObj
attributes*: seq[ref TNode]
childNodes*: seq[ref TNode]
data*: cstring
@@ -241,7 +241,7 @@ type
setAttributeNode*: proc (attr: ref TNode) {.nimcall.}
style*: ref TStyle
TStyle* {.importc.} = object of TObject
TStyle* {.importc.} = object of RootObj
background*: cstring
backgroundAttachment*: cstring
backgroundColor*: cstring
@@ -335,7 +335,7 @@ type
removeAttribute*: proc (attr: cstring, caseSensitive=false) {.nimcall.}
setAttribute*: proc (attr, value: cstring, caseSensitive=false) {.nimcall.}
TEvent* {.importc.} = object of TObject
TEvent* {.importc.} = object of RootObj
altKey*, ctrlKey*, shiftKey*: bool
button*: int
clientX*, clientY*: int
@@ -373,7 +373,7 @@ type
SUBMIT*: int
UNLOAD*: int
TLocation* {.importc.} = object of TObject
TLocation* {.importc.} = object of RootObj
hash*: cstring
host*: cstring
hostname*: cstring
@@ -385,13 +385,13 @@ type
reload*: proc () {.nimcall.}
replace*: proc (s: cstring) {.nimcall.}
THistory* {.importc.} = object of TObject
THistory* {.importc.} = object of RootObj
length*: int
back*: proc () {.nimcall.}
forward*: proc () {.nimcall.}
go*: proc (pagesToJump: int) {.nimcall.}
TNavigator* {.importc.} = object of TObject
TNavigator* {.importc.} = object of RootObj
appCodeName*: cstring
appName*: cstring
appVersion*: cstring
@@ -402,18 +402,18 @@ type
javaEnabled*: proc (): bool {.nimcall.}
mimeTypes*: seq[ref TMimeType]
TPlugin* {.importc.} = object of TObject
TPlugin* {.importc.} = object of RootObj
description*: cstring
filename*: cstring
name*: cstring
TMimeType* {.importc.} = object of TObject
TMimeType* {.importc.} = object of RootObj
description*: cstring
enabledPlugin*: ref TPlugin
suffixes*: seq[cstring]
`type`*: cstring
TLocationBar* {.importc.} = object of TObject
TLocationBar* {.importc.} = object of RootObj
visible*: bool
TMenuBar* = TLocationBar
TPersonalBar* = TLocationBar
@@ -421,7 +421,7 @@ type
TToolBar* = TLocationBar
TStatusBar* = TLocationBar
TScreen* {.importc.} = object of TObject
TScreen* {.importc.} = object of RootObj
availHeight*: int
availWidth*: int
colorDepth*: int
@@ -429,8 +429,8 @@ type
pixelDepth*: int
width*: int
TTimeOut* {.importc.} = object of TObject
TInterval* {.importc.} = object of TObject
TTimeOut* {.importc.} = object of RootObj
TInterval* {.importc.} = object of RootObj
var
window* {.importc, nodecl.}: ref TWindow

View File

@@ -446,13 +446,14 @@ proc getFile[T](ftp: FtpBase[T], async = false): bool =
ftp.job.file.write(r2)
elif returned and r2 == "":
ftp.dsockConnected = false
if not async:
var readSocks: seq[TSocket] = @[ftp.csock]
blockingOperation(ftp.csock):
if readSocks.select(1) != 0 and ftp.csock in readSocks:
assertReply ftp.expectReply(), "226"
return true
when T is TSocket:
if not async:
var readSocks: seq[TSocket] = @[ftp.csock]
blockingOperation(ftp.csock):
if readSocks.select(1) != 0 and ftp.csock in readSocks:
assertReply ftp.expectReply(), "226"
return true
proc retrFile*[T](ftp: FtpBase[T], file, dest: string, async = false) =
## Downloads ``file`` and saves it to ``dest``. Usage of this function

View File

@@ -542,7 +542,7 @@ proc raiseParseErr*(p: JsonParser, msg: string) {.noinline, noreturn.} =
raise newException(JsonParsingError, errorMsgExpected(p, msg))
proc newJString*(s: string): JsonNode =
## Creates a new `JString PJsonNode`.
## Creates a new `JString JsonNode`.
new(result)
result.kind = JString
result.str = s
@@ -553,73 +553,73 @@ proc newJStringMove(s: string): JsonNode =
shallowCopy(result.str, s)
proc newJInt*(n: BiggestInt): JsonNode =
## Creates a new `JInt PJsonNode`.
## Creates a new `JInt JsonNode`.
new(result)
result.kind = JInt
result.num = n
proc newJFloat*(n: float): JsonNode =
## Creates a new `JFloat PJsonNode`.
## Creates a new `JFloat JsonNode`.
new(result)
result.kind = JFloat
result.fnum = n
proc newJBool*(b: bool): JsonNode =
## Creates a new `JBool PJsonNode`.
## Creates a new `JBool JsonNode`.
new(result)
result.kind = JBool
result.bval = b
proc newJNull*(): JsonNode =
## Creates a new `JNull PJsonNode`.
## Creates a new `JNull JsonNode`.
new(result)
proc newJObject*(): JsonNode =
## Creates a new `JObject PJsonNode`
## Creates a new `JObject JsonNode`
new(result)
result.kind = JObject
result.fields = @[]
proc newJArray*(): JsonNode =
## Creates a new `JArray PJsonNode`
## Creates a new `JArray JsonNode`
new(result)
result.kind = JArray
result.elems = @[]
proc `%`*(s: string): JsonNode =
## Generic constructor for JSON data. Creates a new `JString PJsonNode`.
## Generic constructor for JSON data. Creates a new `JString JsonNode`.
new(result)
result.kind = JString
result.str = s
proc `%`*(n: BiggestInt): JsonNode =
## Generic constructor for JSON data. Creates a new `JInt PJsonNode`.
## Generic constructor for JSON data. Creates a new `JInt JsonNode`.
new(result)
result.kind = JInt
result.num = n
proc `%`*(n: float): JsonNode =
## Generic constructor for JSON data. Creates a new `JFloat PJsonNode`.
## Generic constructor for JSON data. Creates a new `JFloat JsonNode`.
new(result)
result.kind = JFloat
result.fnum = n
proc `%`*(b: bool): JsonNode =
## Generic constructor for JSON data. Creates a new `JBool PJsonNode`.
## Generic constructor for JSON data. Creates a new `JBool JsonNode`.
new(result)
result.kind = JBool
result.bval = b
proc `%`*(keyVals: openArray[tuple[key: string, val: JsonNode]]): JsonNode =
## Generic constructor for JSON data. Creates a new `JObject PJsonNode`
## Generic constructor for JSON data. Creates a new `JObject JsonNode`
new(result)
result.kind = JObject
newSeq(result.fields, keyVals.len)
for i, p in pairs(keyVals): result.fields[i] = p
proc `%`*(elements: openArray[JsonNode]): JsonNode =
## Generic constructor for JSON data. Creates a new `JArray PJsonNode`
## Generic constructor for JSON data. Creates a new `JArray JsonNode`
new(result)
result.kind = JArray
newSeq(result.elems, elements.len)
@@ -932,7 +932,7 @@ proc parseJson(p: var JsonParser): JsonNode =
when not defined(js):
proc parseJson*(s: Stream, filename: string): JsonNode =
## Parses from a stream `s` into a `PJsonNode`. `filename` is only needed
## Parses from a stream `s` into a `JsonNode`. `filename` is only needed
## for nice error messages.
var p: JsonParser
p.open(s, filename)
@@ -945,7 +945,7 @@ when not defined(js):
result = parseJson(newStringStream(buffer), "input")
proc parseFile*(filename: string): JsonNode =
## Parses `file` into a `PJsonNode`.
## Parses `file` into a `JsonNode`.
var stream = newFileStream(filename, fmRead)
if stream == nil:
raise newException(IOError, "cannot read from file: " & filename)
@@ -956,7 +956,7 @@ else:
TJSObject = object
proc parseNativeJson(x: cstring): TJSObject {.importc: "JSON.parse".}
proc getVarType(x): TJsonNodeKind =
proc getVarType(x): JsonNodeKind =
result = JNull
proc getProtoName(y): cstring
{.importc: "Object.prototype.toString.call".}
@@ -991,7 +991,7 @@ else:
return `x`[`y`];
"""
proc convertObject(x: TJSObject): PJsonNode =
proc convertObject(x: TJSObject): JsonNode =
case getVarType(x)
of JArray:
result = newJArray()
@@ -1018,15 +1018,15 @@ else:
of JNull:
result = newJNull()
proc parseJson*(buffer: string): PJsonNode =
proc parseJson*(buffer: string): JsonNode =
return parseNativeJson(buffer).convertObject()
when false:
import os
var s = newFileStream(ParamStr(1), fmRead)
if s == nil: quit("cannot open the file" & ParamStr(1))
var x: TJsonParser
open(x, s, ParamStr(1))
var s = newFileStream(paramStr(1), fmRead)
if s == nil: quit("cannot open the file" & paramStr(1))
var x: JsonParser
open(x, s, paramStr(1))
while true:
next(x)
case x.kind
@@ -1035,13 +1035,13 @@ when false:
break
of jsonEof: break
of jsonString, jsonInt, jsonFloat: echo(x.str)
of jsonTrue: Echo("!TRUE")
of jsonFalse: Echo("!FALSE")
of jsonNull: Echo("!NULL")
of jsonObjectStart: Echo("{")
of jsonObjectEnd: Echo("}")
of jsonArrayStart: Echo("[")
of jsonArrayEnd: Echo("]")
of jsonTrue: echo("!TRUE")
of jsonFalse: echo("!FALSE")
of jsonNull: echo("!NULL")
of jsonObjectStart: echo("{")
of jsonObjectEnd: echo("}")
of jsonArrayStart: echo("[")
of jsonArrayEnd: echo("]")
close(x)

View File

@@ -107,9 +107,12 @@ proc substituteLog(frmt: string): string =
of "app": result.add(app)
of "appdir": result.add(app.splitFile.dir)
of "appname": result.add(app.splitFile.name)
else: discard
method log*(logger: Logger, level: Level,
frmt: string, args: varargs[string, `$`]) {.raises: [Exception], tags: [FTime, FWriteIO, FReadIO].} =
frmt: string, args: varargs[string, `$`]) {.
raises: [Exception],
tags: [TimeEffect, WriteIOEffect, ReadIOEffect].} =
## Override this method in custom loggers. Default implementation does
## nothing.
discard

View File

@@ -345,11 +345,12 @@ else:
node.appendChild(document.createTextNode(x))
node.appendChild(document.createElement("br"))
else:
raise newException(EInvalidValue, "<body> element does not exist yet!")
raise newException(ValueError, "<body> element does not exist yet!")
proc rawEcho {.compilerproc.} =
var node = document.getElementsByTagName("body")[0]
if node == nil: raise newException(EIO, "<body> element does not exist yet!")
if node == nil:
raise newException(IOError, "<body> element does not exist yet!")
asm """
for (var i = 0; i < arguments.length; ++i) {
var x = `toJSStr`(arguments[i]);

View File

@@ -35,7 +35,7 @@ type
GetAddrInfoProc* = proc (handle: PGetAddrInfo, status: cint, res: ptr TAddrInfo)
ExitProc* = proc (a2: PProcess, exit_status: cint, term_signal: cint)
FsProc* = proc (req: pFS)
FsProc* = proc (req: PFS)
WorkProc* = proc (req: PWork)
AfterWorkProc* = proc (req: PWork)
@@ -338,7 +338,7 @@ type
FS_CHMOD, FS_FCHMOD, FS_FSYNC, FS_FDATASYNC, FS_UNLINK, FS_RMDIR, FS_MKDIR,
FS_RENAME, FS_READDIR, FS_LINK, FS_SYMLINK, FS_READLINK, FS_CHOWN, FS_FCHOWN
tFS* {.pure, final, importc: "uv_fs_t", header: "uv.h".} = object
TFS* {.pure, final, importc: "uv_fs_t", header: "uv.h".} = object
typ* {.importc: "type".}: TReqType
data* {.importc: "data".}: pointer
loop* {.importc: "loop".}: PLoop
@@ -349,7 +349,7 @@ type
path* {.importc: "path".}: cstring
errorno* {.importc: "errorno".}: cint
pFS* = ptr tFS
PFS* = ptr TFS
TReq* {.pure, final, importc: "uv_req_t", header: "uv.h".} = object
typ* {.importc: "type".}: TReqType
@@ -591,85 +591,85 @@ proc process_kill*(a2: PProcess, signum: cint): cint{.
proc queue_work*(loop: PLoop, req: PWork, work_cb: WorkProc, after_work_cb: AfterWorkProc): cint{.
importc: "uv_queue_work", header: "uv.h".}
proc req_cleanup*(req: pFS){.
proc req_cleanup*(req: PFS){.
importc: "uv_fs_req_cleanup", header: "uv.h".}
proc close*(loop: PLoop, req: pFS, file: TFile, cb: FsProc): cint{.
proc close*(loop: PLoop, req: PFS, file: TFile, cb: FsProc): cint{.
importc: "uv_fs_close", header: "uv.h".}
proc open*(loop: PLoop, req: pFS, path: cstring, flags: cint, mode: cint, cb: FsProc): cint{.
proc open*(loop: PLoop, req: PFS, path: cstring, flags: cint, mode: cint, cb: FsProc): cint{.
importc: "uv_fs_open", header: "uv.h".}
proc read*(loop: PLoop, req: pFS, file: TFile, buf: pointer, length: csize, offset: coff, cb: FsProc): cint{.
proc read*(loop: PLoop, req: PFS, file: TFile, buf: pointer, length: csize, offset: coff, cb: FsProc): cint{.
importc: "uv_fs_read", header: "uv.h".}
proc unlink*(loop: PLoop, req: pFS, path: cstring, cb: FsProc): cint{.
proc unlink*(loop: PLoop, req: PFS, path: cstring, cb: FsProc): cint{.
importc: "uv_fs_unlink", header: "uv.h".}
proc write*(loop: PLoop, req: pFS, file: TFile, buf: pointer, length: csize, offset: coff, cb: FsProc): cint{.
proc write*(loop: PLoop, req: PFS, file: TFile, buf: pointer, length: csize, offset: coff, cb: FsProc): cint{.
importc: "uv_fs_write", header: "uv.h".}
proc mkdir*(loop: PLoop, req: pFS, path: cstring, mode: cint, cb: FsProc): cint{.
proc mkdir*(loop: PLoop, req: PFS, path: cstring, mode: cint, cb: FsProc): cint{.
importc: "uv_fs_mkdir", header: "uv.h".}
proc rmdir*(loop: PLoop, req: pFS, path: cstring, cb: FsProc): cint{.
proc rmdir*(loop: PLoop, req: PFS, path: cstring, cb: FsProc): cint{.
importc: "uv_fs_rmdir", header: "uv.h".}
proc readdir*(loop: PLoop, req: pFS, path: cstring, flags: cint, cb: FsProc): cint{.
proc readdir*(loop: PLoop, req: PFS, path: cstring, flags: cint, cb: FsProc): cint{.
importc: "uv_fs_readdir", header: "uv.h".}
proc stat*(loop: PLoop, req: pFS, path: cstring, cb: FsProc): cint{.
proc stat*(loop: PLoop, req: PFS, path: cstring, cb: FsProc): cint{.
importc: "uv_fs_stat", header: "uv.h".}
proc fstat*(loop: PLoop, req: pFS, file: TFile, cb: FsProc): cint{.
proc fstat*(loop: PLoop, req: PFS, file: TFile, cb: FsProc): cint{.
importc: "uv_fs_fstat", header: "uv.h".}
proc rename*(loop: PLoop, req: pFS, path: cstring, new_path: cstring, cb: FsProc): cint{.
proc rename*(loop: PLoop, req: PFS, path: cstring, new_path: cstring, cb: FsProc): cint{.
importc: "uv_fs_rename", header: "uv.h".}
proc fsync*(loop: PLoop, req: pFS, file: TFile, cb: FsProc): cint{.
proc fsync*(loop: PLoop, req: PFS, file: TFile, cb: FsProc): cint{.
importc: "uv_fs_fsync", header: "uv.h".}
proc fdatasync*(loop: PLoop, req: pFS, file: TFile, cb: FsProc): cint{.
proc fdatasync*(loop: PLoop, req: PFS, file: TFile, cb: FsProc): cint{.
importc: "uv_fs_fdatasync", header: "uv.h".}
proc ftruncate*(loop: PLoop, req: pFS, file: TFile, offset: coff, cb: FsProc): cint{.
proc ftruncate*(loop: PLoop, req: PFS, file: TFile, offset: coff, cb: FsProc): cint{.
importc: "uv_fs_ftruncate", header: "uv.h".}
proc sendfile*(loop: PLoop, req: pFS, out_fd: TFile, in_fd: TFile, in_offset: coff, length: csize, cb: FsProc): cint{.
proc sendfile*(loop: PLoop, req: PFS, out_fd: TFile, in_fd: TFile, in_offset: coff, length: csize, cb: FsProc): cint{.
importc: "uv_fs_sendfile", header: "uv.h".}
proc chmod*(loop: PLoop, req: pFS, path: cstring, mode: cint, cb: FsProc): cint{.
proc chmod*(loop: PLoop, req: PFS, path: cstring, mode: cint, cb: FsProc): cint{.
importc: "uv_fs_chmod", header: "uv.h".}
proc utime*(loop: PLoop, req: pFS, path: cstring, atime: cdouble, mtime: cdouble, cb: FsProc): cint{.
proc utime*(loop: PLoop, req: PFS, path: cstring, atime: cdouble, mtime: cdouble, cb: FsProc): cint{.
importc: "uv_fs_utime", header: "uv.h".}
proc futime*(loop: PLoop, req: pFS, file: TFile, atime: cdouble, mtime: cdouble, cb: FsProc): cint{.
proc futime*(loop: PLoop, req: PFS, file: TFile, atime: cdouble, mtime: cdouble, cb: FsProc): cint{.
importc: "uv_fs_futime", header: "uv.h".}
proc lstat*(loop: PLoop, req: pFS, path: cstring, cb: FsProc): cint{.
proc lstat*(loop: PLoop, req: PFS, path: cstring, cb: FsProc): cint{.
importc: "uv_fs_lstat", header: "uv.h".}
proc link*(loop: PLoop, req: pFS, path: cstring, new_path: cstring, cb: FsProc): cint{.
proc link*(loop: PLoop, req: PFS, path: cstring, new_path: cstring, cb: FsProc): cint{.
importc: "uv_fs_link", header: "uv.h".}
proc symlink*(loop: PLoop, req: pFS, path: cstring, new_path: cstring, flags: cint, cb: FsProc): cint{.
proc symlink*(loop: PLoop, req: PFS, path: cstring, new_path: cstring, flags: cint, cb: FsProc): cint{.
importc: "uv_fs_symlink", header: "uv.h".}
proc readlink*(loop: PLoop, req: pFS, path: cstring, cb: FsProc): cint{.
proc readlink*(loop: PLoop, req: PFS, path: cstring, cb: FsProc): cint{.
importc: "uv_fs_readlink", header: "uv.h".}
proc fchmod*(loop: PLoop, req: pFS, file: TFile, mode: cint, cb: FsProc): cint{.
proc fchmod*(loop: PLoop, req: PFS, file: TFile, mode: cint, cb: FsProc): cint{.
importc: "uv_fs_fchmod", header: "uv.h".}
proc chown*(loop: PLoop, req: pFS, path: cstring, uid: cint, gid: cint, cb: FsProc): cint{.
proc chown*(loop: PLoop, req: PFS, path: cstring, uid: cint, gid: cint, cb: FsProc): cint{.
importc: "uv_fs_chown", header: "uv.h".}
proc fchown*(loop: PLoop, req: pFS, file: TFile, uid: cint, gid: cint, cb: FsProc): cint{.
proc fchown*(loop: PLoop, req: PFS, file: TFile, uid: cint, gid: cint, cb: FsProc): cint{.
importc: "uv_fs_fchown", header: "uv.h".}
proc event_init*(loop: PLoop, handle: PFsEvent, filename: cstring, cb: FsEventProc): cint{.
proc event_init*(loop: PLoop, handle: PFSEvent, filename: cstring, cb: FsEventProc): cint{.
importc: "uv_fs_event_init", header: "uv.h".}
proc ip4_addr*(ip: cstring, port: cint): TSockAddrIn{.

View File

@@ -35,7 +35,7 @@ proc initConfigData(c: var TConfigData) =
c.pdf = @[]
c.infile = ""
c.outdir = ""
c.nimArgs = "--hint[Conf]:off "
c.nimArgs = "--hint[Conf]:off --hint[Path]:off --hint[Processing]:off "
c.authors = ""
c.projectTitle = ""
c.projectName = ""

View File

@@ -10,7 +10,7 @@ proc decodeContent(content: string): string =
if line != "":
result.add decode(line)
proc contains(x: seq[PJSonNode], s: string): bool =
proc contains(x: seq[JSonNode], s: string): bool =
for i in x:
assert i.kind == JString
if i.str == s: return true
@@ -20,7 +20,7 @@ proc processContent(content: string) =
assert jsonDoc.kind == JArray
var jsonArr = jsonDoc.elems
jsonArr.sort do (x, y: PJsonNode) -> int:
jsonArr.sort do (x, y: JsonNode) -> int:
strutils.cmpIgnoreCase(x["name"].str, y["name"].str)
var

View File

@@ -36,7 +36,7 @@ UNIX. We don't believe this to be a coincidence. - Jeremy S. Anderson."""
[Documentation]
doc: "endb;intern;apis;lib;manual;tut1;tut2;nimc;overview;filters"
doc: "endb;intern;apis;lib;manual.txt;tut1;tut2;nimc;overview;filters"
doc: "tools;niminst;nimgrep;gc;estp;idetools;docgen;koch;backends.txt"
pdf: "manual;lib;tut1;tut2;nimc;niminst;gc"
srcdoc2: "system.nim"