cleaned up various modules
This commit is contained in:
parent
4367fb26ad
commit
d4bc11b654
12 changed files with 65 additions and 64 deletions
|
|
@ -16,13 +16,13 @@ type
|
||||||
TDbConn* = PPGconn ## encapsulates a database connection
|
TDbConn* = PPGconn ## encapsulates a database connection
|
||||||
TRow* = seq[string] ## a row of a dataset. NULL database values will be
|
TRow* = seq[string] ## a row of a dataset. NULL database values will be
|
||||||
## transformed always to the empty string.
|
## transformed always to the empty string.
|
||||||
EDb* = object of EIO ## exception that is raised if a database error occurs
|
EDb* = object of IOError ## exception that is raised if a database error occurs
|
||||||
|
|
||||||
TSqlQuery* = distinct string ## an SQL query string
|
TSqlQuery* = distinct string ## an SQL query string
|
||||||
|
|
||||||
FDb* = object of FIO ## effect that denotes a database operation
|
FDb* = object of IOEffect ## effect that denotes a database operation
|
||||||
FReadDb* = object of FDB ## effect that denotes a read operation
|
FReadDb* = object of FDb ## effect that denotes a read operation
|
||||||
FWriteDb* = object of FDB ## effect that denotes a write operation
|
FWriteDb* = object of FDb ## effect that denotes a write operation
|
||||||
|
|
||||||
proc sql*(query: string): TSqlQuery {.noSideEffect, inline.} =
|
proc sql*(query: string): TSqlQuery {.noSideEffect, inline.} =
|
||||||
## constructs a TSqlQuery from the string `query`. This is supposed to be
|
## constructs a TSqlQuery from the string `query`. This is supposed to be
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import posix, strutils, os
|
import posix, strutils, os
|
||||||
|
|
||||||
|
when false:
|
||||||
type
|
type
|
||||||
Tstatfs {.importc: "struct statfs64",
|
Tstatfs {.importc: "struct statfs64",
|
||||||
header: "<sys/statfs.h>", final, pure.} = object
|
header: "<sys/statfs.h>", final, pure.} = object
|
||||||
|
|
@ -23,7 +24,7 @@ proc getSystemVersion*(): string =
|
||||||
var unix_info: TUtsname
|
var unix_info: TUtsname
|
||||||
|
|
||||||
if uname(unix_info) != 0:
|
if uname(unix_info) != 0:
|
||||||
os.OSError()
|
os.raiseOSError(osLastError())
|
||||||
|
|
||||||
if $unix_info.sysname == "Linux":
|
if $unix_info.sysname == "Linux":
|
||||||
# Linux
|
# Linux
|
||||||
|
|
|
||||||
|
|
@ -375,7 +375,7 @@ proc getFileSize*(file: string): BiggestInt =
|
||||||
var hFile = findFirstFileA(file, fileData)
|
var hFile = findFirstFileA(file, fileData)
|
||||||
|
|
||||||
if hFile == INVALID_HANDLE_VALUE:
|
if hFile == INVALID_HANDLE_VALUE:
|
||||||
raise newException(EIO, $getLastError())
|
raise newException(IOError, $getLastError())
|
||||||
|
|
||||||
return fileData.nFileSizeLow
|
return fileData.nFileSizeLow
|
||||||
|
|
||||||
|
|
@ -386,10 +386,10 @@ proc getDiskFreeSpaceEx*(lpDirectoryName: cstring, lpFreeBytesAvailableToCaller,
|
||||||
|
|
||||||
proc getPartitionInfo*(partition: string): TPartitionInfo =
|
proc getPartitionInfo*(partition: string): TPartitionInfo =
|
||||||
## Retrieves partition info, for example ``partition`` may be ``"C:\"``
|
## Retrieves partition info, for example ``partition`` may be ``"C:\"``
|
||||||
var FreeBytes, TotalBytes, TotalFreeBytes: TFiletime
|
var freeBytes, totalBytes, totalFreeBytes: TFiletime
|
||||||
var res = getDiskFreeSpaceEx(r"C:\", FreeBytes, TotalBytes,
|
discard getDiskFreeSpaceEx(r"C:\", freeBytes, totalBytes,
|
||||||
TotalFreeBytes)
|
totalFreeBytes)
|
||||||
return (FreeBytes, TotalBytes)
|
return (freeBytes, totalBytes)
|
||||||
|
|
||||||
when isMainModule:
|
when isMainModule:
|
||||||
var r = getMemoryInfo()
|
var r = getMemoryInfo()
|
||||||
|
|
|
||||||
|
|
@ -15,13 +15,13 @@
|
||||||
|
|
||||||
when defined(Windows):
|
when defined(Windows):
|
||||||
proc readLineFromStdin*(prompt: string): TaintedString {.
|
proc readLineFromStdin*(prompt: string): TaintedString {.
|
||||||
tags: [FReadIO, FWriteIO].} =
|
tags: [ReadIOEffect, WriteIOEffect].} =
|
||||||
## Reads a line from stdin.
|
## Reads a line from stdin.
|
||||||
stdout.write(prompt)
|
stdout.write(prompt)
|
||||||
result = readLine(stdin)
|
result = readLine(stdin)
|
||||||
|
|
||||||
proc readLineFromStdin*(prompt: string, line: var TaintedString): bool {.
|
proc readLineFromStdin*(prompt: string, line: var TaintedString): bool {.
|
||||||
tags: [FReadIO, FWriteIO].} =
|
tags: [ReadIOEffect, WriteIOEffect].} =
|
||||||
## Reads a `line` from stdin. `line` must not be
|
## Reads a `line` from stdin. `line` must not be
|
||||||
## ``nil``! May throw an IO exception.
|
## ``nil``! May throw an IO exception.
|
||||||
## A line of text may be delimited by ``CR``, ``LF`` or
|
## A line of text may be delimited by ``CR``, ``LF`` or
|
||||||
|
|
@ -35,7 +35,7 @@ else:
|
||||||
import readline, history
|
import readline, history
|
||||||
|
|
||||||
proc readLineFromStdin*(prompt: string): TaintedString {.
|
proc readLineFromStdin*(prompt: string): TaintedString {.
|
||||||
tags: [FReadIO, FWriteIO].} =
|
tags: [ReadIOEffect, WriteIOEffect].} =
|
||||||
var buffer = readline.readLine(prompt)
|
var buffer = readline.readLine(prompt)
|
||||||
if isNil(buffer): quit(0)
|
if isNil(buffer): quit(0)
|
||||||
result = TaintedString($buffer)
|
result = TaintedString($buffer)
|
||||||
|
|
@ -44,7 +44,7 @@ else:
|
||||||
readline.free(buffer)
|
readline.free(buffer)
|
||||||
|
|
||||||
proc readLineFromStdin*(prompt: string, line: var TaintedString): bool {.
|
proc readLineFromStdin*(prompt: string, line: var TaintedString): bool {.
|
||||||
tags: [FReadIO, FWriteIO].} =
|
tags: [ReadIOEffect, WriteIOEffect].} =
|
||||||
var buffer = readline.readLine(prompt)
|
var buffer = readline.readLine(prompt)
|
||||||
if isNil(buffer): quit(0)
|
if isNil(buffer): quit(0)
|
||||||
line = TaintedString($buffer)
|
line = TaintedString($buffer)
|
||||||
|
|
|
||||||
|
|
@ -13,18 +13,18 @@ import
|
||||||
streams, libzip, times, os
|
streams, libzip, times, os
|
||||||
|
|
||||||
type
|
type
|
||||||
TZipArchive* = object of TObject ## represents a zip archive
|
TZipArchive* = object of RootObj ## represents a zip archive
|
||||||
mode: TFileMode
|
mode: FileMode
|
||||||
w: PZip
|
w: PZip
|
||||||
|
|
||||||
|
|
||||||
proc zipError(z: var TZipArchive) =
|
proc zipError(z: var TZipArchive) =
|
||||||
var e: ref EIO
|
var e: ref IOError
|
||||||
new(e)
|
new(e)
|
||||||
e.msg = $zip_strerror(z.w)
|
e.msg = $zip_strerror(z.w)
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
proc open*(z: var TZipArchive, filename: string, mode: TFileMode = fmRead): bool =
|
proc open*(z: var TZipArchive, filename: string, mode: FileMode = fmRead): bool =
|
||||||
## Opens a zip file for reading, writing or appending. All file modes are
|
## Opens a zip file for reading, writing or appending. All file modes are
|
||||||
## supported. Returns true iff successful, false otherwise.
|
## supported. Returns true iff successful, false otherwise.
|
||||||
var err, flags: int32
|
var err, flags: int32
|
||||||
|
|
@ -72,7 +72,7 @@ proc addFile*(z: var TZipArchive, file: string) =
|
||||||
|
|
||||||
proc mySourceCallback(state, data: pointer, len: int,
|
proc mySourceCallback(state, data: pointer, len: int,
|
||||||
cmd: TZipSourceCmd): int {.cdecl.} =
|
cmd: TZipSourceCmd): int {.cdecl.} =
|
||||||
var src = cast[PStream](state)
|
var src = cast[Stream](state)
|
||||||
case cmd
|
case cmd
|
||||||
of ZIP_SOURCE_OPEN:
|
of ZIP_SOURCE_OPEN:
|
||||||
if src.setPositionImpl != nil: setPosition(src, 0) # reset
|
if src.setPositionImpl != nil: setPosition(src, 0) # reset
|
||||||
|
|
@ -93,7 +93,7 @@ proc mySourceCallback(state, data: pointer, len: int,
|
||||||
of constZIP_SOURCE_FREE: GC_unref(src)
|
of constZIP_SOURCE_FREE: GC_unref(src)
|
||||||
else: assert(false)
|
else: assert(false)
|
||||||
|
|
||||||
proc addFile*(z: var TZipArchive, dest: string, src: PStream) =
|
proc addFile*(z: var TZipArchive, dest: string, src: Stream) =
|
||||||
## Adds a file named with `dest` to the archive `z`. `dest`
|
## Adds a file named with `dest` to the archive `z`. `dest`
|
||||||
## may contain a path. The file's content is read from the `src` stream.
|
## may contain a path. The file's content is read from the `src` stream.
|
||||||
assert(z.mode != fmRead)
|
assert(z.mode != fmRead)
|
||||||
|
|
@ -107,14 +107,14 @@ proc addFile*(z: var TZipArchive, dest: string, src: PStream) =
|
||||||
# -------------- zip file stream ---------------------------------------------
|
# -------------- zip file stream ---------------------------------------------
|
||||||
|
|
||||||
type
|
type
|
||||||
TZipFileStream = object of TStream
|
TZipFileStream = object of StreamObj
|
||||||
f: PZipFile
|
f: PZipFile
|
||||||
|
|
||||||
PZipFileStream* =
|
PZipFileStream* =
|
||||||
ref TZipFileStream ## a reader stream of a file within a zip archive
|
ref TZipFileStream ## a reader stream of a file within a zip archive
|
||||||
|
|
||||||
proc fsClose(s: PStream) = zip_fclose(PZipFileStream(s).f)
|
proc fsClose(s: Stream) = zip_fclose(PZipFileStream(s).f)
|
||||||
proc fsReadData(s: PStream, buffer: pointer, bufLen: int): int =
|
proc fsReadData(s: Stream, buffer: pointer, bufLen: int): int =
|
||||||
result = zip_fread(PZipFileStream(s).f, buffer, bufLen)
|
result = zip_fread(PZipFileStream(s).f, buffer, bufLen)
|
||||||
|
|
||||||
proc newZipFileStream(f: PZipFile): PZipFileStream =
|
proc newZipFileStream(f: PZipFile): PZipFileStream =
|
||||||
|
|
@ -144,7 +144,7 @@ iterator walkFiles*(z: var TZipArchive): string =
|
||||||
inc(i)
|
inc(i)
|
||||||
|
|
||||||
|
|
||||||
proc extractFile*(z: var TZipArchive, srcFile: string, dest: PStream) =
|
proc extractFile*(z: var TZipArchive, srcFile: string, dest: Stream) =
|
||||||
## extracts a file from the zip archive `z` to the destination stream.
|
## extracts a file from the zip archive `z` to the destination stream.
|
||||||
var strm = getStream(z, srcFile)
|
var strm = getStream(z, srcFile)
|
||||||
while true:
|
while true:
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ proc ParserCreate_MM*(encoding: cstring, memsuite: ptr TMemory_Handling_Suite,
|
||||||
# Added in Expat 1.95.3.
|
# Added in Expat 1.95.3.
|
||||||
#
|
#
|
||||||
|
|
||||||
proc ParserReset*(parser: PParser, encoding: cstring): Bool{.cdecl,
|
proc ParserReset*(parser: PParser, encoding: cstring): bool{.cdecl,
|
||||||
importc: "XML_ParserReset", dynlib: expatDll.}
|
importc: "XML_ParserReset", dynlib: expatDll.}
|
||||||
# atts is array of name/value pairs, terminated by 0;
|
# atts is array of name/value pairs, terminated by 0;
|
||||||
# names and values are 0 terminated.
|
# names and values are 0 terminated.
|
||||||
|
|
@ -601,7 +601,7 @@ proc UseParserAsHandlerArg*(parser: PParser){.cdecl,
|
||||||
# XML_ERROR_FEATURE_REQUIRES_XML_DTD.
|
# XML_ERROR_FEATURE_REQUIRES_XML_DTD.
|
||||||
#
|
#
|
||||||
|
|
||||||
proc UseForeignDTD*(parser: PParser, useDTD: Bool): TError{.cdecl,
|
proc UseForeignDTD*(parser: PParser, useDTD: bool): TError{.cdecl,
|
||||||
importc: "XML_UseForeignDTD", dynlib: expatDll.}
|
importc: "XML_UseForeignDTD", dynlib: expatDll.}
|
||||||
# Sets the base to be used for resolving relative URIs in system
|
# Sets the base to be used for resolving relative URIs in system
|
||||||
# identifiers in declarations. Resolving relative identifiers is
|
# identifiers in declarations. Resolving relative identifiers is
|
||||||
|
|
@ -681,7 +681,7 @@ proc ParseBuffer*(parser: PParser, len: cint, isFinal: cint): TStatus{.cdecl,
|
||||||
# When suspended, parsing can be resumed by calling XML_ResumeParser().
|
# When suspended, parsing can be resumed by calling XML_ResumeParser().
|
||||||
#
|
#
|
||||||
|
|
||||||
proc StopParser*(parser: PParser, resumable: Bool): TStatus{.cdecl,
|
proc StopParser*(parser: PParser, resumable: bool): TStatus{.cdecl,
|
||||||
importc: "XML_StopParser", dynlib: expatDll.}
|
importc: "XML_StopParser", dynlib: expatDll.}
|
||||||
# Resumes parsing after it has been suspended with XML_StopParser().
|
# Resumes parsing after it has been suspended with XML_StopParser().
|
||||||
# Must not be called from within a handler call-back. Returns same
|
# Must not be called from within a handler call-back. Returns same
|
||||||
|
|
@ -703,7 +703,7 @@ type
|
||||||
INITIALIZED, PARSING, FINISHED, SUSPENDED
|
INITIALIZED, PARSING, FINISHED, SUSPENDED
|
||||||
TParsingStatus*{.pure, final.} = object
|
TParsingStatus*{.pure, final.} = object
|
||||||
parsing*: TParsing
|
parsing*: TParsing
|
||||||
finalBuffer*: Bool
|
finalBuffer*: bool
|
||||||
|
|
||||||
|
|
||||||
# Returns status of parser with respect to being initialized, parsing,
|
# Returns status of parser with respect to being initialized, parsing,
|
||||||
|
|
|
||||||
|
|
@ -68,9 +68,9 @@ type
|
||||||
dbName*: cstring
|
dbName*: cstring
|
||||||
status*: TConnStatusType
|
status*: TConnStatusType
|
||||||
errorMessage*: array[0..(ERROR_MSG_LENGTH) - 1, char]
|
errorMessage*: array[0..(ERROR_MSG_LENGTH) - 1, char]
|
||||||
Pfin*: TFile
|
Pfin*: File
|
||||||
Pfout*: TFile
|
Pfout*: File
|
||||||
Pfdebug*: TFile
|
Pfdebug*: File
|
||||||
sock*: int32
|
sock*: int32
|
||||||
laddr*: TSockAddr
|
laddr*: TSockAddr
|
||||||
raddr*: TSockAddr
|
raddr*: TSockAddr
|
||||||
|
|
@ -199,7 +199,7 @@ when defined(USE_SSL):
|
||||||
importc: "PQgetssl".}
|
importc: "PQgetssl".}
|
||||||
proc pqsetErrorVerbosity*(conn: PPGconn, verbosity: PGVerbosity): PGVerbosity{.
|
proc pqsetErrorVerbosity*(conn: PPGconn, verbosity: PGVerbosity): PGVerbosity{.
|
||||||
cdecl, dynlib: dllName, importc: "PQsetErrorVerbosity".}
|
cdecl, dynlib: dllName, importc: "PQsetErrorVerbosity".}
|
||||||
proc pqtrace*(conn: PPGconn, debug_port: TFile){.cdecl, dynlib: dllName,
|
proc pqtrace*(conn: PPGconn, debug_port: File){.cdecl, dynlib: dllName,
|
||||||
importc: "PQtrace".}
|
importc: "PQtrace".}
|
||||||
proc pquntrace*(conn: PPGconn){.cdecl, dynlib: dllName, importc: "PQuntrace".}
|
proc pquntrace*(conn: PPGconn){.cdecl, dynlib: dllName, importc: "PQuntrace".}
|
||||||
proc pqsetNoticeReceiver*(conn: PPGconn, theProc: PQnoticeReceiver, arg: pointer): PQnoticeReceiver{.
|
proc pqsetNoticeReceiver*(conn: PPGconn, theProc: PQnoticeReceiver, arg: pointer): PQnoticeReceiver{.
|
||||||
|
|
@ -315,12 +315,12 @@ proc pqescapeBytea*(bintext: cstring, binlen: int, bytealen: var int): cstring{.
|
||||||
cdecl, dynlib: dllName, importc: "PQescapeBytea".}
|
cdecl, dynlib: dllName, importc: "PQescapeBytea".}
|
||||||
proc pqunescapeBytea*(strtext: cstring, retbuflen: var int): cstring{.cdecl,
|
proc pqunescapeBytea*(strtext: cstring, retbuflen: var int): cstring{.cdecl,
|
||||||
dynlib: dllName, importc: "PQunescapeBytea".}
|
dynlib: dllName, importc: "PQunescapeBytea".}
|
||||||
proc pqprint*(fout: TFile, res: PPGresult, ps: PPQprintOpt){.cdecl,
|
proc pqprint*(fout: File, res: PPGresult, ps: PPQprintOpt){.cdecl,
|
||||||
dynlib: dllName, importc: "PQprint".}
|
dynlib: dllName, importc: "PQprint".}
|
||||||
proc pqdisplayTuples*(res: PPGresult, fp: TFile, fillAlign: int32,
|
proc pqdisplayTuples*(res: PPGresult, fp: File, fillAlign: int32,
|
||||||
fieldSep: cstring, printHeader: int32, quiet: int32){.
|
fieldSep: cstring, printHeader: int32, quiet: int32){.
|
||||||
cdecl, dynlib: dllName, importc: "PQdisplayTuples".}
|
cdecl, dynlib: dllName, importc: "PQdisplayTuples".}
|
||||||
proc pqprintTuples*(res: PPGresult, fout: TFile, printAttName: int32,
|
proc pqprintTuples*(res: PPGresult, fout: File, printAttName: int32,
|
||||||
terseOutput: int32, width: int32){.cdecl, dynlib: dllName,
|
terseOutput: int32, width: int32){.cdecl, dynlib: dllName,
|
||||||
importc: "PQprintTuples".}
|
importc: "PQprintTuples".}
|
||||||
proc lo_open*(conn: PPGconn, lobjId: Oid, mode: int32): int32{.cdecl,
|
proc lo_open*(conn: PPGconn, lobjId: Oid, mode: int32): int32{.cdecl,
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ proc history_get*(a2: cint): ptr THIST_ENTRY{.cdecl, importc: "history_get",
|
||||||
# Return the timestamp associated with the HIST_ENTRY * passed as an
|
# Return the timestamp associated with the HIST_ENTRY * passed as an
|
||||||
# argument
|
# argument
|
||||||
|
|
||||||
proc history_get_time*(a2: ptr THIST_ENTRY): TTime{.cdecl,
|
proc history_get_time*(a2: ptr THIST_ENTRY): Time{.cdecl,
|
||||||
importc: "history_get_time", dynlib: historyDll.}
|
importc: "history_get_time", dynlib: historyDll.}
|
||||||
# Return the number of bytes that the primary history entries are using.
|
# Return the number of bytes that the primary history entries are using.
|
||||||
# This just adds up the lengths of the_history->lines.
|
# This just adds up the lengths of the_history->lines.
|
||||||
|
|
|
||||||
|
|
@ -776,7 +776,7 @@ proc execute_next*(a2: cint): cint{.cdecl, importc: "rl_execute_next",
|
||||||
proc clear_pending_input*(): cint{.cdecl, importc: "rl_clear_pending_input",
|
proc clear_pending_input*(): cint{.cdecl, importc: "rl_clear_pending_input",
|
||||||
dynlib: readlineDll.}
|
dynlib: readlineDll.}
|
||||||
proc read_key*(): cint{.cdecl, importc: "rl_read_key", dynlib: readlineDll.}
|
proc read_key*(): cint{.cdecl, importc: "rl_read_key", dynlib: readlineDll.}
|
||||||
proc getc*(a2: TFile): cint{.cdecl, importc: "rl_getc", dynlib: readlineDll.}
|
proc getc*(a2: File): cint{.cdecl, importc: "rl_getc", dynlib: readlineDll.}
|
||||||
proc set_keyboard_input_timeout*(a2: cint): cint{.cdecl,
|
proc set_keyboard_input_timeout*(a2: cint): cint{.cdecl,
|
||||||
importc: "rl_set_keyboard_input_timeout", dynlib: readlineDll.}
|
importc: "rl_set_keyboard_input_timeout", dynlib: readlineDll.}
|
||||||
# `Public' utility functions .
|
# `Public' utility functions .
|
||||||
|
|
@ -881,8 +881,8 @@ when false:
|
||||||
# The name of the terminal to use.
|
# The name of the terminal to use.
|
||||||
var terminal_name*{.importc: "rl_terminal_name", dynlib: readlineDll.}: cstring
|
var terminal_name*{.importc: "rl_terminal_name", dynlib: readlineDll.}: cstring
|
||||||
# The input and output streams.
|
# The input and output streams.
|
||||||
var instream*{.importc: "rl_instream", dynlib: readlineDll.}: TFile
|
var instream*{.importc: "rl_instream", dynlib: readlineDll.}: File
|
||||||
var outstream*{.importc: "rl_outstream", dynlib: readlineDll.}: TFile
|
var outstream*{.importc: "rl_outstream", dynlib: readlineDll.}: File
|
||||||
# If non-zero, Readline gives values of LINES and COLUMNS from the environment
|
# If non-zero, Readline gives values of LINES and COLUMNS from the environment
|
||||||
# greater precedence than values fetched from the kernel when computing the
|
# greater precedence than values fetched from the kernel when computing the
|
||||||
# screen dimensions.
|
# screen dimensions.
|
||||||
|
|
@ -1184,8 +1184,8 @@ type
|
||||||
insmode*: cint
|
insmode*: cint
|
||||||
edmode*: cint
|
edmode*: cint
|
||||||
kseqlen*: cint
|
kseqlen*: cint
|
||||||
inf*: TFile
|
inf*: File
|
||||||
outf*: TFile
|
outf*: File
|
||||||
pendingin*: cint
|
pendingin*: cint
|
||||||
theMacro*: cstring # signal state
|
theMacro*: cstring # signal state
|
||||||
catchsigs*: cint
|
catchsigs*: cint
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ type
|
||||||
# Input function type
|
# Input function type
|
||||||
|
|
||||||
type
|
type
|
||||||
Tgetc_func* = proc (a2: TFile): cint{.cdecl.}
|
Tgetc_func* = proc (a2: File): cint{.cdecl.}
|
||||||
|
|
||||||
# Generic function that takes a character buffer (which could be the readline
|
# Generic function that takes a character buffer (which could be the readline
|
||||||
# line buffer) and an index into it (which could be rl_point) and returns
|
# line buffer) and an index into it (which could be rl_point) and returns
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ type
|
||||||
name*: cstring ## name of the file
|
name*: cstring ## name of the file
|
||||||
index*: int32 ## index within archive
|
index*: int32 ## index within archive
|
||||||
crc*: int32 ## crc of file data
|
crc*: int32 ## crc of file data
|
||||||
mtime*: TTime ## modification time
|
mtime*: Time ## modification time
|
||||||
size*: int ## size of file (uncompressed)
|
size*: int ## size of file (uncompressed)
|
||||||
compSize*: int ## size of file (compressed)
|
compSize*: int ## size of file (compressed)
|
||||||
compMethod*: int16 ## compression method used
|
compMethod*: int16 ## compression method used
|
||||||
|
|
@ -225,7 +225,7 @@ proc zip_source_buffer*(para1: PZip, para2: pointer, para3: int, para4: int32):
|
||||||
cdecl, mydll, importc: "zip_source_buffer".}
|
cdecl, mydll, importc: "zip_source_buffer".}
|
||||||
proc zip_source_file*(para1: PZip, para2: cstring, para3: int, para4: int): PZipSource {.
|
proc zip_source_file*(para1: PZip, para2: cstring, para3: int, para4: int): PZipSource {.
|
||||||
cdecl, mydll, importc: "zip_source_file".}
|
cdecl, mydll, importc: "zip_source_file".}
|
||||||
proc zip_source_filep*(para1: PZip, para2: TFile, para3: int, para4: int): PZipSource {.
|
proc zip_source_filep*(para1: PZip, para2: File, para3: int, para4: int): PZipSource {.
|
||||||
cdecl, mydll, importc: "zip_source_filep".}
|
cdecl, mydll, importc: "zip_source_filep".}
|
||||||
proc zip_source_free*(para1: PZipSource) {.cdecl, mydll,
|
proc zip_source_free*(para1: PZipSource) {.cdecl, mydll,
|
||||||
importc: "zip_source_free".}
|
importc: "zip_source_free".}
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ webdoc: "wrappers/expat;wrappers/pcre"
|
||||||
webdoc: "wrappers/tre;wrappers/openssl"
|
webdoc: "wrappers/tre;wrappers/openssl"
|
||||||
webdoc: "wrappers/libuv;wrappers/joyent_http_parser"
|
webdoc: "wrappers/libuv;wrappers/joyent_http_parser"
|
||||||
|
|
||||||
webdoc: "posix/posix;wrappers/odbcsql;impure/dialogs"
|
webdoc: "posix/posix;wrappers/odbcsql"
|
||||||
webdoc: "wrappers/zip/zlib;wrappers/zip/libzip"
|
webdoc: "wrappers/zip/zlib;wrappers/zip/libzip"
|
||||||
webdoc: "wrappers/libsvm.nim"
|
webdoc: "wrappers/libsvm.nim"
|
||||||
webdoc: "windows"
|
webdoc: "windows"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue