mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 09:54:49 +00:00
lib/wrappers/c-r - Dropped 'T' from types
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -13,9 +13,9 @@ when not defined(expatDll):
|
||||
const
|
||||
expatDll = "libexpat.so(.1|)"
|
||||
type
|
||||
TParserStruct{.pure, final.} = object
|
||||
ParserStruct{.pure, final.} = object
|
||||
|
||||
PParser* = ptr TParserStruct
|
||||
PParser* = ptr ParserStruct
|
||||
|
||||
# The XML_Status enum gives the possible return values for several
|
||||
# API functions. The preprocessor #defines are included so this
|
||||
@@ -30,11 +30,12 @@ type
|
||||
# Otherwise, the #define hackery is quite ugly and would have been
|
||||
# dropped.
|
||||
#
|
||||
{.deprecated: [TParserStruct: ParserStruct].}
|
||||
|
||||
type
|
||||
TStatus*{.size: sizeof(cint).} = enum
|
||||
Status*{.size: sizeof(cint).} = enum
|
||||
STATUS_ERROR = 0, STATUS_OK = 1, STATUS_SUSPENDED = 2
|
||||
TError*{.size: sizeof(cint).} = enum
|
||||
Error*{.size: sizeof(cint).} = enum
|
||||
ERROR_NONE, ERROR_NO_MEMORY, ERROR_SYNTAX, ERROR_NO_ELEMENTS,
|
||||
ERROR_INVALID_TOKEN, ERROR_UNCLOSED_TOKEN, ERROR_PARTIAL_CHAR,
|
||||
ERROR_TAG_MISMATCH, ERROR_DUPLICATE_ATTRIBUTE,
|
||||
@@ -52,10 +53,12 @@ type
|
||||
ERROR_ABORTED, ERROR_FINISHED, ERROR_SUSPEND_PE,
|
||||
ERROR_RESERVED_PREFIX_XML, ERROR_RESERVED_PREFIX_XMLNS,
|
||||
ERROR_RESERVED_NAMESPACE_URI
|
||||
TContent_Type*{.size: sizeof(cint).} = enum
|
||||
ContentType*{.size: sizeof(cint).} = enum
|
||||
CTYPE_EMPTY = 1, CTYPE_ANY, CTYPE_MIXED, CTYPE_NAME, CTYPE_CHOICE, CTYPE_SEQ
|
||||
TContent_Quant*{.size: sizeof(cint).} = enum
|
||||
ContentQuant*{.size: sizeof(cint).} = enum
|
||||
CQUANT_NONE, CQUANT_OPT, CQUANT_REP, CQUANT_PLUS
|
||||
{.deprecated: [TStatus: Status, TError: Error, TContent_Type: ContentType,
|
||||
TContent_Quant: ContentQuant].}
|
||||
|
||||
# If type == XML_CTYPE_EMPTY or XML_CTYPE_ANY, then quant will be
|
||||
# XML_CQUANT_NONE, and the other fields will be zero or NULL.
|
||||
@@ -76,13 +79,13 @@ type
|
||||
#
|
||||
|
||||
type
|
||||
TContent*{.pure, final.} = object
|
||||
typ*: TContentType
|
||||
quant*: TContentQuant
|
||||
Content*{.pure, final.} = object
|
||||
typ*: ContentType
|
||||
quant*: ContentQuant
|
||||
name*: cstring
|
||||
numchildren*: cint
|
||||
children*: ptr TContent
|
||||
|
||||
children*: ptr Content
|
||||
{.deprecated: [TContent: Content].}
|
||||
|
||||
# This is called for an element declaration. See above for
|
||||
# description of the model argument. It's the caller's responsibility
|
||||
@@ -90,10 +93,11 @@ type
|
||||
#
|
||||
|
||||
type
|
||||
TElementDeclHandler* = proc (userData: pointer, name: cstring,
|
||||
model: ptr TContent){.cdecl.}
|
||||
ElementDeclHandler* = proc (userData: pointer, name: cstring,
|
||||
model: ptr Content){.cdecl.}
|
||||
{.deprecated: [TElementDeclHandler: ElementDeclHandler].}
|
||||
|
||||
proc setElementDeclHandler*(parser: PParser, eldecl: TElementDeclHandler){.
|
||||
proc setElementDeclHandler*(parser: PParser, eldecl: ElementDeclHandler){.
|
||||
cdecl, importc: "XML_SetElementDeclHandler", dynlib: expatDll.}
|
||||
# The Attlist declaration handler is called for *each* attribute. So
|
||||
# a single Attlist declaration with multiple attributes declared will
|
||||
@@ -105,11 +109,12 @@ proc setElementDeclHandler*(parser: PParser, eldecl: TElementDeclHandler){.
|
||||
#
|
||||
|
||||
type
|
||||
TAttlistDeclHandler* = proc (userData: pointer, elname: cstring,
|
||||
AttlistDeclHandler* = proc (userData: pointer, elname: cstring,
|
||||
attname: cstring, attType: cstring,
|
||||
dflt: cstring, isrequired: cint){.cdecl.}
|
||||
{.deprecated: [TAttlistDeclHandler: AttlistDeclHandler].}
|
||||
|
||||
proc setAttlistDeclHandler*(parser: PParser, attdecl: TAttlistDeclHandler){.
|
||||
proc setAttlistDeclHandler*(parser: PParser, attdecl: AttlistDeclHandler){.
|
||||
cdecl, importc: "XML_SetAttlistDeclHandler", dynlib: expatDll.}
|
||||
# The XML declaration handler is called for *both* XML declarations
|
||||
# and text declarations. The way to distinguish is that the version
|
||||
@@ -121,17 +126,18 @@ proc setAttlistDeclHandler*(parser: PParser, attdecl: TAttlistDeclHandler){.
|
||||
#
|
||||
|
||||
type
|
||||
TXmlDeclHandler* = proc (userData: pointer, version: cstring,
|
||||
XmlDeclHandler* = proc (userData: pointer, version: cstring,
|
||||
encoding: cstring, standalone: cint){.cdecl.}
|
||||
{.deprecated: [TXmlDeclHandler: XmlDeclHandler].}
|
||||
|
||||
proc setXmlDeclHandler*(parser: PParser, xmldecl: TXmlDeclHandler){.cdecl,
|
||||
proc setXmlDeclHandler*(parser: PParser, xmldecl: XmlDeclHandler){.cdecl,
|
||||
importc: "XML_SetXmlDeclHandler", dynlib: expatDll.}
|
||||
type
|
||||
TMemory_Handling_Suite*{.pure, final.} = object
|
||||
Memory_Handling_Suite*{.pure, final.} = object
|
||||
mallocFcn*: proc (size: int): pointer{.cdecl.}
|
||||
reallocFcn*: proc (p: pointer, size: int): pointer{.cdecl.}
|
||||
freeFcn*: proc (p: pointer){.cdecl.}
|
||||
|
||||
{.deprecated: [TMemory_Handling_Suite: MemoryHandlingSuite].}
|
||||
|
||||
# Constructs a new parser; encoding is the encoding specified by the
|
||||
# external protocol or NULL if there is none specified.
|
||||
@@ -183,29 +189,33 @@ proc parserReset*(parser: PParser, encoding: cstring): bool{.cdecl,
|
||||
#
|
||||
|
||||
type
|
||||
TStartElementHandler* = proc (userData: pointer, name: cstring,
|
||||
StartElementHandler* = proc (userData: pointer, name: cstring,
|
||||
atts: cstringArray){.cdecl.}
|
||||
TEndElementHandler* = proc (userData: pointer, name: cstring){.cdecl.}
|
||||
|
||||
EndElementHandler* = proc (userData: pointer, name: cstring){.cdecl.}
|
||||
{.deprecated: [TStartElementHandler: StartElementHandler,
|
||||
TEndElementHandler: EndElementHandler].}
|
||||
# s is not 0 terminated.
|
||||
|
||||
type
|
||||
TCharacterDataHandler* = proc (userData: pointer, s: cstring, len: cint){.
|
||||
CharacterDataHandler* = proc (userData: pointer, s: cstring, len: cint){.
|
||||
cdecl.}
|
||||
|
||||
{.deprecated: [TCharacterDataHandler: CharacterDataHandler].}
|
||||
# target and data are 0 terminated
|
||||
|
||||
type
|
||||
TProcessingInstructionHandler* = proc (userData: pointer, target: cstring,
|
||||
ProcessingInstructionHandler* = proc (userData: pointer, target: cstring,
|
||||
data: cstring){.cdecl.}
|
||||
{.deprecated: [TProcessingInstructionHandler: ProcessingInstructionHandler].}
|
||||
|
||||
# data is 0 terminated
|
||||
|
||||
type
|
||||
TCommentHandler* = proc (userData: pointer, data: cstring){.cdecl.}
|
||||
TStartCdataSectionHandler* = proc (userData: pointer){.cdecl.}
|
||||
TEndCdataSectionHandler* = proc (userData: pointer){.cdecl.}
|
||||
|
||||
CommentHandler* = proc (userData: pointer, data: cstring){.cdecl.}
|
||||
StartCdataSectionHandler* = proc (userData: pointer){.cdecl.}
|
||||
EndCdataSectionHandler* = proc (userData: pointer){.cdecl.}
|
||||
{.deprecated: [TCommentHandler: CommentHandler,
|
||||
TStartCdataSectionHandler: StartCdataSectionHandler,
|
||||
TEndCdataSectionHandler: EndCdataSectionHandler].}
|
||||
# This is called for any characters in the XML document for which
|
||||
# there is no applicable handler. This includes both characters that
|
||||
# are part of markup which is of a kind that is not reported
|
||||
@@ -221,16 +231,17 @@ type
|
||||
#
|
||||
|
||||
type
|
||||
TDefaultHandler* = proc (userData: pointer, s: cstring, len: cint){.cdecl.}
|
||||
|
||||
DefaultHandler* = proc (userData: pointer, s: cstring, len: cint){.cdecl.}
|
||||
{.deprecated: [TDefaultHandler: DefaultHandler].}
|
||||
# This is called for the start of the DOCTYPE declaration, before
|
||||
# any DTD or internal subset is parsed.
|
||||
#
|
||||
|
||||
type
|
||||
TStartDoctypeDeclHandler* = proc (userData: pointer, doctypeName: cstring,
|
||||
StartDoctypeDeclHandler* = proc (userData: pointer, doctypeName: cstring,
|
||||
sysid: cstring, pubid: cstring,
|
||||
hasInternalSubset: cint){.cdecl.}
|
||||
{.deprecated: [TStartDoctypeDeclHandler: StartDoctypeDeclHandler].}
|
||||
|
||||
# This is called for the start of the DOCTYPE declaration when the
|
||||
# closing > is encountered, but after processing any external
|
||||
@@ -238,7 +249,8 @@ type
|
||||
#
|
||||
|
||||
type
|
||||
TEndDoctypeDeclHandler* = proc (userData: pointer){.cdecl.}
|
||||
EndDoctypeDeclHandler* = proc (userData: pointer){.cdecl.}
|
||||
{.deprecated: [TEndDoctypeDeclHandler: EndDoctypeDeclHandler].}
|
||||
|
||||
# This is called for entity declarations. The is_parameter_entity
|
||||
# argument will be non-zero if the entity is a parameter entity, zero
|
||||
@@ -260,13 +272,14 @@ type
|
||||
#
|
||||
|
||||
type
|
||||
TEntityDeclHandler* = proc (userData: pointer, entityName: cstring,
|
||||
EntityDeclHandler* = proc (userData: pointer, entityName: cstring,
|
||||
isParameterEntity: cint, value: cstring,
|
||||
valueLength: cint, base: cstring,
|
||||
systemId: cstring, publicId: cstring,
|
||||
notationName: cstring){.cdecl.}
|
||||
{.deprecated: [TEntityDeclHandler: EntityDeclHandler].}
|
||||
|
||||
proc setEntityDeclHandler*(parser: PParser, handler: TEntityDeclHandler){.cdecl,
|
||||
proc setEntityDeclHandler*(parser: PParser, handler: EntityDeclHandler){.cdecl,
|
||||
importc: "XML_SetEntityDeclHandler", dynlib: expatDll.}
|
||||
# OBSOLETE -- OBSOLETE -- OBSOLETE
|
||||
# This handler has been superceded by the EntityDeclHandler above.
|
||||
@@ -279,10 +292,11 @@ proc setEntityDeclHandler*(parser: PParser, handler: TEntityDeclHandler){.cdecl,
|
||||
#
|
||||
|
||||
type
|
||||
TUnparsedEntityDeclHandler* = proc (userData: pointer, entityName: cstring,
|
||||
UnparsedEntityDeclHandler* = proc (userData: pointer, entityName: cstring,
|
||||
base: cstring, systemId: cstring,
|
||||
publicId, notationName: cstring){.
|
||||
cdecl.}
|
||||
{.deprecated: [TUnparsedEntityDeclHandler: UnparsedEntityDeclHandler].}
|
||||
|
||||
# This is called for a declaration of notation. The base argument is
|
||||
# whatever was set by XML_SetBase. The notationName will never be
|
||||
@@ -290,9 +304,10 @@ type
|
||||
#
|
||||
|
||||
type
|
||||
TNotationDeclHandler* = proc (userData: pointer, notationName: cstring,
|
||||
NotationDeclHandler* = proc (userData: pointer, notationName: cstring,
|
||||
base: cstring, systemId: cstring,
|
||||
publicId: cstring){.cdecl.}
|
||||
{.deprecated: [TNotationDeclHandler: NotationDeclHandler].}
|
||||
|
||||
# When namespace processing is enabled, these are called once for
|
||||
# each namespace declaration. The call to the start and end element
|
||||
@@ -302,10 +317,11 @@ type
|
||||
#
|
||||
|
||||
type
|
||||
TStartNamespaceDeclHandler* = proc (userData: pointer, prefix: cstring,
|
||||
StartNamespaceDeclHandler* = proc (userData: pointer, prefix: cstring,
|
||||
uri: cstring){.cdecl.}
|
||||
TEndNamespaceDeclHandler* = proc (userData: pointer, prefix: cstring){.cdecl.}
|
||||
|
||||
EndNamespaceDeclHandler* = proc (userData: pointer, prefix: cstring){.cdecl.}
|
||||
{.deprecated: [TStartNamespaceDeclHandler: StartNamespaceDeclHandler,
|
||||
TEndNamespaceDeclHandler: EndNamespaceDeclHandler].}
|
||||
# This is called if the document is not standalone, that is, it has an
|
||||
# external subset or a reference to a parameter entity, but does not
|
||||
# have standalone="yes". If this handler returns XML_STATUS_ERROR,
|
||||
@@ -317,7 +333,8 @@ type
|
||||
#
|
||||
|
||||
type
|
||||
TNotStandaloneHandler* = proc (userData: pointer): cint{.cdecl.}
|
||||
NotStandaloneHandler* = proc (userData: pointer): cint{.cdecl.}
|
||||
{.deprecated: [TNotStandaloneHandler: NotStandaloneHandler].}
|
||||
|
||||
# This is called for a reference to an external parsed general
|
||||
# entity. The referenced entity is not automatically parsed. The
|
||||
@@ -355,10 +372,10 @@ type
|
||||
#
|
||||
|
||||
type
|
||||
TExternalEntityRefHandler* = proc (parser: PParser, context: cstring,
|
||||
ExternalEntityRefHandler* = proc (parser: PParser, context: cstring,
|
||||
base: cstring, systemId: cstring,
|
||||
publicId: cstring): cint{.cdecl.}
|
||||
|
||||
{.deprecated: [TExternalEntityRefHandler: ExternalEntityRefHandler].}
|
||||
# This is called in two situations:
|
||||
# 1) An entity reference is encountered for which no declaration
|
||||
# has been read *and* this is not an error.
|
||||
@@ -371,8 +388,9 @@ type
|
||||
#
|
||||
|
||||
type
|
||||
TSkippedEntityHandler* = proc (userData: pointer, entityName: cstring,
|
||||
SkippedEntityHandler* = proc (userData: pointer, entityName: cstring,
|
||||
isParameterEntity: cint){.cdecl.}
|
||||
{.deprecated: [TSkippedEntityHandler: SkippedEntityHandler].}
|
||||
|
||||
# This structure is filled in by the XML_UnknownEncodingHandler to
|
||||
# provide information to the parser about encodings that are unknown
|
||||
@@ -428,11 +446,12 @@ type
|
||||
#
|
||||
|
||||
type
|
||||
TEncoding*{.pure, final.} = object
|
||||
Encoding*{.pure, final.} = object
|
||||
map*: array[0..256 - 1, cint]
|
||||
data*: pointer
|
||||
convert*: proc (data: pointer, s: cstring): cint{.cdecl.}
|
||||
release*: proc (data: pointer){.cdecl.}
|
||||
{.deprecated: [TEncoding: Encoding].}
|
||||
|
||||
|
||||
# This is called for an encoding that is unknown to the parser.
|
||||
@@ -452,74 +471,75 @@ type
|
||||
#
|
||||
|
||||
type
|
||||
TUnknownEncodingHandler* = proc (encodingHandlerData: pointer, name: cstring,
|
||||
info: ptr TEncoding): cint{.cdecl.}
|
||||
UnknownEncodingHandler* = proc (encodingHandlerData: pointer, name: cstring,
|
||||
info: ptr Encoding): cint{.cdecl.}
|
||||
{.deprecated: [TUnknownEncodingHandler: UnknownEncodingHandler].}
|
||||
|
||||
proc setElementHandler*(parser: PParser, start: TStartElementHandler,
|
||||
endHandler: TEndElementHandler){.cdecl,
|
||||
proc setElementHandler*(parser: PParser, start: StartElementHandler,
|
||||
endHandler: EndElementHandler){.cdecl,
|
||||
importc: "XML_SetElementHandler", dynlib: expatDll.}
|
||||
proc setStartElementHandler*(parser: PParser, handler: TStartElementHandler){.
|
||||
proc setStartElementHandler*(parser: PParser, handler: StartElementHandler){.
|
||||
cdecl, importc: "XML_SetStartElementHandler", dynlib: expatDll.}
|
||||
proc setEndElementHandler*(parser: PParser, handler: TEndElementHandler){.cdecl,
|
||||
proc setEndElementHandler*(parser: PParser, handler: EndElementHandler){.cdecl,
|
||||
importc: "XML_SetEndElementHandler", dynlib: expatDll.}
|
||||
proc setCharacterDataHandler*(parser: PParser, handler: TCharacterDataHandler){.
|
||||
proc setCharacterDataHandler*(parser: PParser, handler: CharacterDataHandler){.
|
||||
cdecl, importc: "XML_SetCharacterDataHandler", dynlib: expatDll.}
|
||||
proc setProcessingInstructionHandler*(parser: PParser,
|
||||
handler: TProcessingInstructionHandler){.
|
||||
handler: ProcessingInstructionHandler){.
|
||||
cdecl, importc: "XML_SetProcessingInstructionHandler", dynlib: expatDll.}
|
||||
proc setCommentHandler*(parser: PParser, handler: TCommentHandler){.cdecl,
|
||||
proc setCommentHandler*(parser: PParser, handler: CommentHandler){.cdecl,
|
||||
importc: "XML_SetCommentHandler", dynlib: expatDll.}
|
||||
proc setCdataSectionHandler*(parser: PParser, start: TStartCdataSectionHandler,
|
||||
endHandler: TEndCdataSectionHandler){.cdecl,
|
||||
proc setCdataSectionHandler*(parser: PParser, start: StartCdataSectionHandler,
|
||||
endHandler: EndCdataSectionHandler){.cdecl,
|
||||
importc: "XML_SetCdataSectionHandler", dynlib: expatDll.}
|
||||
proc setStartCdataSectionHandler*(parser: PParser,
|
||||
start: TStartCdataSectionHandler){.cdecl,
|
||||
start: StartCdataSectionHandler){.cdecl,
|
||||
importc: "XML_SetStartCdataSectionHandler", dynlib: expatDll.}
|
||||
proc setEndCdataSectionHandler*(parser: PParser,
|
||||
endHandler: TEndCdataSectionHandler){.cdecl,
|
||||
endHandler: EndCdataSectionHandler){.cdecl,
|
||||
importc: "XML_SetEndCdataSectionHandler", dynlib: expatDll.}
|
||||
# This sets the default handler and also inhibits expansion of
|
||||
# internal entities. These entity references will be passed to the
|
||||
# default handler, or to the skipped entity handler, if one is set.
|
||||
#
|
||||
|
||||
proc setDefaultHandler*(parser: PParser, handler: TDefaultHandler){.cdecl,
|
||||
proc setDefaultHandler*(parser: PParser, handler: DefaultHandler){.cdecl,
|
||||
importc: "XML_SetDefaultHandler", dynlib: expatDll.}
|
||||
# This sets the default handler but does not inhibit expansion of
|
||||
# internal entities. The entity reference will not be passed to the
|
||||
# default handler.
|
||||
#
|
||||
|
||||
proc setDefaultHandlerExpand*(parser: PParser, handler: TDefaultHandler){.cdecl,
|
||||
proc setDefaultHandlerExpand*(parser: PParser, handler: DefaultHandler){.cdecl,
|
||||
importc: "XML_SetDefaultHandlerExpand", dynlib: expatDll.}
|
||||
proc setDoctypeDeclHandler*(parser: PParser, start: TStartDoctypeDeclHandler,
|
||||
endHandler: TEndDoctypeDeclHandler){.cdecl,
|
||||
proc setDoctypeDeclHandler*(parser: PParser, start: StartDoctypeDeclHandler,
|
||||
endHandler: EndDoctypeDeclHandler){.cdecl,
|
||||
importc: "XML_SetDoctypeDeclHandler", dynlib: expatDll.}
|
||||
proc setStartDoctypeDeclHandler*(parser: PParser,
|
||||
start: TStartDoctypeDeclHandler){.cdecl,
|
||||
start: StartDoctypeDeclHandler){.cdecl,
|
||||
importc: "XML_SetStartDoctypeDeclHandler", dynlib: expatDll.}
|
||||
proc setEndDoctypeDeclHandler*(parser: PParser,
|
||||
endHandler: TEndDoctypeDeclHandler){.cdecl,
|
||||
endHandler: EndDoctypeDeclHandler){.cdecl,
|
||||
importc: "XML_SetEndDoctypeDeclHandler", dynlib: expatDll.}
|
||||
proc setUnparsedEntityDeclHandler*(parser: PParser,
|
||||
handler: TUnparsedEntityDeclHandler){.cdecl,
|
||||
handler: UnparsedEntityDeclHandler){.cdecl,
|
||||
importc: "XML_SetUnparsedEntityDeclHandler", dynlib: expatDll.}
|
||||
proc setNotationDeclHandler*(parser: PParser, handler: TNotationDeclHandler){.
|
||||
proc setNotationDeclHandler*(parser: PParser, handler: NotationDeclHandler){.
|
||||
cdecl, importc: "XML_SetNotationDeclHandler", dynlib: expatDll.}
|
||||
proc setNamespaceDeclHandler*(parser: PParser,
|
||||
start: TStartNamespaceDeclHandler,
|
||||
endHandler: TEndNamespaceDeclHandler){.cdecl,
|
||||
start: StartNamespaceDeclHandler,
|
||||
endHandler: EndNamespaceDeclHandler){.cdecl,
|
||||
importc: "XML_SetNamespaceDeclHandler", dynlib: expatDll.}
|
||||
proc setStartNamespaceDeclHandler*(parser: PParser,
|
||||
start: TStartNamespaceDeclHandler){.cdecl,
|
||||
start: StartNamespaceDeclHandler){.cdecl,
|
||||
importc: "XML_SetStartNamespaceDeclHandler", dynlib: expatDll.}
|
||||
proc setEndNamespaceDeclHandler*(parser: PParser,
|
||||
endHandler: TEndNamespaceDeclHandler){.cdecl,
|
||||
endHandler: EndNamespaceDeclHandler){.cdecl,
|
||||
importc: "XML_SetEndNamespaceDeclHandler", dynlib: expatDll.}
|
||||
proc setNotStandaloneHandler*(parser: PParser, handler: TNotStandaloneHandler){.
|
||||
proc setNotStandaloneHandler*(parser: PParser, handler: NotStandaloneHandler){.
|
||||
cdecl, importc: "XML_SetNotStandaloneHandler", dynlib: expatDll.}
|
||||
proc setExternalEntityRefHandler*(parser: PParser,
|
||||
handler: TExternalEntityRefHandler){.cdecl,
|
||||
handler: ExternalEntityRefHandler){.cdecl,
|
||||
importc: "XML_SetExternalEntityRefHandler", dynlib: expatDll.}
|
||||
# If a non-NULL value for arg is specified here, then it will be
|
||||
# passed as the first argument to the external entity ref handler
|
||||
@@ -528,10 +548,10 @@ proc setExternalEntityRefHandler*(parser: PParser,
|
||||
|
||||
proc setExternalEntityRefHandlerArg*(parser: PParser, arg: pointer){.cdecl,
|
||||
importc: "XML_SetExternalEntityRefHandlerArg", dynlib: expatDll.}
|
||||
proc setSkippedEntityHandler*(parser: PParser, handler: TSkippedEntityHandler){.
|
||||
proc setSkippedEntityHandler*(parser: PParser, handler: SkippedEntityHandler){.
|
||||
cdecl, importc: "XML_SetSkippedEntityHandler", dynlib: expatDll.}
|
||||
proc setUnknownEncodingHandler*(parser: PParser,
|
||||
handler: TUnknownEncodingHandler,
|
||||
handler: UnknownEncodingHandler,
|
||||
encodingHandlerData: pointer){.cdecl,
|
||||
importc: "XML_SetUnknownEncodingHandler", dynlib: expatDll.}
|
||||
# This can be called within a handler for a start element, end
|
||||
@@ -573,7 +593,7 @@ template getUserData*(parser: expr): expr =
|
||||
# has no effect and returns XML_STATUS_ERROR.
|
||||
#
|
||||
|
||||
proc setEncoding*(parser: PParser, encoding: cstring): TStatus{.cdecl,
|
||||
proc setEncoding*(parser: PParser, encoding: cstring): Status{.cdecl,
|
||||
importc: "XML_SetEncoding", dynlib: expatDll.}
|
||||
# If this function is called, then the parser will be passed as the
|
||||
# first argument to callbacks instead of userData. The userData will
|
||||
@@ -601,7 +621,7 @@ proc useParserAsHandlerArg*(parser: PParser){.cdecl,
|
||||
# XML_ERROR_FEATURE_REQUIRES_XML_DTD.
|
||||
#
|
||||
|
||||
proc useForeignDTD*(parser: PParser, useDTD: bool): TError{.cdecl,
|
||||
proc useForeignDTD*(parser: PParser, useDTD: bool): Error{.cdecl,
|
||||
importc: "XML_UseForeignDTD", dynlib: expatDll.}
|
||||
# Sets the base to be used for resolving relative URIs in system
|
||||
# identifiers in declarations. Resolving relative identifiers is
|
||||
@@ -612,7 +632,7 @@ proc useForeignDTD*(parser: PParser, useDTD: bool): TError{.cdecl,
|
||||
# XML_STATUS_OK otherwise.
|
||||
#
|
||||
|
||||
proc setBase*(parser: PParser, base: cstring): TStatus{.cdecl,
|
||||
proc setBase*(parser: PParser, base: cstring): Status{.cdecl,
|
||||
importc: "XML_SetBase", dynlib: expatDll.}
|
||||
proc getBase*(parser: PParser): cstring{.cdecl, importc: "XML_GetBase",
|
||||
dynlib: expatDll.}
|
||||
@@ -643,11 +663,11 @@ proc getIdAttributeIndex*(parser: PParser): cint{.cdecl,
|
||||
# values.
|
||||
#
|
||||
|
||||
proc parse*(parser: PParser, s: cstring, len: cint, isFinal: cint): TStatus{.
|
||||
proc parse*(parser: PParser, s: cstring, len: cint, isFinal: cint): Status{.
|
||||
cdecl, importc: "XML_Parse", dynlib: expatDll.}
|
||||
proc getBuffer*(parser: PParser, len: cint): pointer{.cdecl,
|
||||
importc: "XML_GetBuffer", dynlib: expatDll.}
|
||||
proc parseBuffer*(parser: PParser, len: cint, isFinal: cint): TStatus{.cdecl,
|
||||
proc parseBuffer*(parser: PParser, len: cint, isFinal: cint): Status{.cdecl,
|
||||
importc: "XML_ParseBuffer", dynlib: expatDll.}
|
||||
# Stops parsing, causing XML_Parse() or XML_ParseBuffer() to return.
|
||||
# Must be called from within a call-back handler, except when aborting
|
||||
@@ -681,7 +701,7 @@ proc parseBuffer*(parser: PParser, len: cint, isFinal: cint): TStatus{.cdecl,
|
||||
# When suspended, parsing can be resumed by calling XML_ResumeParser().
|
||||
#
|
||||
|
||||
proc stopParser*(parser: PParser, resumable: bool): TStatus{.cdecl,
|
||||
proc stopParser*(parser: PParser, resumable: bool): Status{.cdecl,
|
||||
importc: "XML_StopParser", dynlib: expatDll.}
|
||||
# Resumes parsing after it has been suspended with XML_StopParser().
|
||||
# Must not be called from within a handler call-back. Returns same
|
||||
@@ -696,15 +716,16 @@ proc stopParser*(parser: PParser, resumable: bool): TStatus{.cdecl,
|
||||
# application to call XML_ResumeParser() on it at the appropriate moment.
|
||||
#
|
||||
|
||||
proc resumeParser*(parser: PParser): TStatus{.cdecl,
|
||||
proc resumeParser*(parser: PParser): Status{.cdecl,
|
||||
importc: "XML_ResumeParser", dynlib: expatDll.}
|
||||
type
|
||||
TParsing* = enum
|
||||
INITIALIZED, PARSING, FINISHED, SUSPENDED
|
||||
TParsingStatus*{.pure, final.} = object
|
||||
ParsingStatus*{.pure, final.} = object
|
||||
parsing*: TParsing
|
||||
finalBuffer*: bool
|
||||
|
||||
{.deprecated: [#TParsing: Parsing, # Naming conflict if we drop the `T`
|
||||
TParsingStatus: ParsingStatus].}
|
||||
|
||||
# Returns status of parser with respect to being initialized, parsing,
|
||||
# finished, or suspended and processing the final buffer.
|
||||
@@ -712,7 +733,7 @@ type
|
||||
# XXX with XML_FINISHED_OK or XML_FINISHED_ERROR replacing XML_FINISHED
|
||||
#
|
||||
|
||||
proc getParsingStatus*(parser: PParser, status: ptr TParsingStatus){.cdecl,
|
||||
proc getParsingStatus*(parser: PParser, status: ptr ParsingStatus){.cdecl,
|
||||
importc: "XML_GetParsingStatus", dynlib: expatDll.}
|
||||
# Creates an XML_Parser object that can parse an external general
|
||||
# entity; context is a '\0'-terminated string specifying the parse
|
||||
@@ -735,9 +756,10 @@ proc externalEntityParserCreate*(parser: PParser, context: cstring,
|
||||
encoding: cstring): PParser{.cdecl,
|
||||
importc: "XML_ExternalEntityParserCreate", dynlib: expatDll.}
|
||||
type
|
||||
TParamEntityParsing* = enum
|
||||
ParamEntityParsing* = enum
|
||||
PARAM_ENTITY_PARSING_NEVER, PARAM_ENTITY_PARSING_UNLESS_STANDALONE,
|
||||
PARAM_ENTITY_PARSING_ALWAYS
|
||||
{.deprecated: [TParamEntityParsing: ParamEntityParsing].}
|
||||
|
||||
# Controls parsing of parameter entities (including the external DTD
|
||||
# subset). If parsing of parameter entities is enabled, then
|
||||
@@ -763,13 +785,13 @@ type
|
||||
# XML_ParseBuffer, then it has no effect and will always return 0.
|
||||
#
|
||||
|
||||
proc setParamEntityParsing*(parser: PParser, parsing: TParamEntityParsing): cint{.
|
||||
proc setParamEntityParsing*(parser: PParser, parsing: ParamEntityParsing): cint{.
|
||||
cdecl, importc: "XML_SetParamEntityParsing", dynlib: expatDll.}
|
||||
# If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then
|
||||
# XML_GetErrorCode returns information about the error.
|
||||
#
|
||||
|
||||
proc getErrorCode*(parser: PParser): TError{.cdecl, importc: "XML_GetErrorCode",
|
||||
proc getErrorCode*(parser: PParser): Error{.cdecl, importc: "XML_GetErrorCode",
|
||||
dynlib: expatDll.}
|
||||
# These functions return information about the current parse
|
||||
# location. They may be called from any callback called to report
|
||||
@@ -815,7 +837,7 @@ proc getInputContext*(parser: PParser, offset: ptr cint, size: ptr cint): cstrin
|
||||
cdecl, importc: "XML_GetInputContext", dynlib: expatDll.}
|
||||
# Frees the content model passed to the element declaration handler
|
||||
|
||||
proc freeContentModel*(parser: PParser, model: ptr TContent){.cdecl,
|
||||
proc freeContentModel*(parser: PParser, model: ptr Content){.cdecl,
|
||||
importc: "XML_FreeContentModel", dynlib: expatDll.}
|
||||
# Exposing the memory handling functions used in Expat
|
||||
|
||||
@@ -831,39 +853,39 @@ proc parserFree*(parser: PParser){.cdecl, importc: "XML_ParserFree",
|
||||
dynlib: expatDll.}
|
||||
# Returns a string describing the error.
|
||||
|
||||
proc errorString*(code: TError): cstring{.cdecl, importc: "XML_ErrorString",
|
||||
proc errorString*(code: Error): cstring{.cdecl, importc: "XML_ErrorString",
|
||||
dynlib: expatDll.}
|
||||
# Return a string containing the version number of this expat
|
||||
|
||||
proc expatVersion*(): cstring{.cdecl, importc: "XML_ExpatVersion",
|
||||
dynlib: expatDll.}
|
||||
type
|
||||
TExpat_Version*{.pure, final.} = object
|
||||
Expat_Version*{.pure, final.} = object
|
||||
major*: cint
|
||||
minor*: cint
|
||||
micro*: cint
|
||||
|
||||
{.deprecated: [TExpat_Version: ExpatVersion].}
|
||||
|
||||
# Return an XML_Expat_Version structure containing numeric version
|
||||
# number information for this version of expat.
|
||||
#
|
||||
|
||||
proc expatVersionInfo*(): TExpatVersion{.cdecl,
|
||||
proc expatVersionInfo*(): ExpatVersion{.cdecl,
|
||||
importc: "XML_ExpatVersionInfo", dynlib: expatDll.}
|
||||
# Added in Expat 1.95.5.
|
||||
|
||||
type
|
||||
TFeatureEnum* = enum
|
||||
FeatureEnum* = enum
|
||||
FEATURE_END = 0, FEATURE_UNICODE, FEATURE_UNICODE_WCHAR_T, FEATURE_DTD,
|
||||
FEATURE_CONTEXT_BYTES, FEATURE_MIN_SIZE, FEATURE_SIZEOF_XML_CHAR,
|
||||
FEATURE_SIZEOF_XML_LCHAR, FEATURE_NS, FEATURE_LARGE_SIZE # Additional features must be added to the end of this enum.
|
||||
TFeature*{.pure, final.} = object
|
||||
feature*: TFeatureEnum
|
||||
Feature*{.pure, final.} = object
|
||||
feature*: FeatureEnum
|
||||
name*: cstring
|
||||
value*: int
|
||||
{.deprecated: [TFeatureEnum: FeatureEnum, TFeature: Feature].}
|
||||
|
||||
|
||||
proc getFeatureList*(): ptr TFeature{.cdecl, importc: "XML_GetFeatureList",
|
||||
proc getFeatureList*(): ptr Feature{.cdecl, importc: "XML_GetFeatureList",
|
||||
dynlib: expatDll.}
|
||||
# Expat follows the GNU/Linux convention of odd number minor version for
|
||||
# beta/development releases and even number minor version for stable
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
type
|
||||
csize = int
|
||||
|
||||
HttpDataProc* = proc (a2: ptr THttpParser, at: cstring, length: csize): cint {.cdecl.}
|
||||
HttpProc* = proc (a2: ptr THttpParser): cint {.cdecl.}
|
||||
HttpDataProc* = proc (a2: ptr HttpParser, at: cstring, length: csize): cint {.cdecl.}
|
||||
HttpProc* = proc (a2: ptr HttpParser): cint {.cdecl.}
|
||||
|
||||
THttpMethod* = enum
|
||||
HttpMethod* = enum
|
||||
HTTP_DELETE = 0, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_CONNECT,
|
||||
HTTP_OPTIONS, HTTP_TRACE, HTTP_COPY, HTTP_LOCK, HTTP_MKCOL, HTTP_MOVE,
|
||||
HTTP_PROPFIND, HTTP_PROPPATCH, HTTP_UNLOCK, HTTP_REPORT, HTTP_MKACTIVITY,
|
||||
HTTP_CHECKOUT, HTTP_MERGE, HTTP_MSEARCH, HTTP_NOTIFY, HTTP_SUBSCRIBE,
|
||||
HTTP_UNSUBSCRIBE, HTTP_PATCH
|
||||
|
||||
THttpParserType* = enum
|
||||
HttpParserType* = enum
|
||||
HTTP_REQUEST, HTTP_RESPONSE, HTTP_BOTH
|
||||
|
||||
TParserFlag* = enum
|
||||
ParserFlag* = enum
|
||||
F_CHUNKED = 1 shl 0,
|
||||
F_CONNECTION_KEEP_ALIVE = 1 shl 1,
|
||||
F_CONNECTION_CLOSE = 1 shl 2,
|
||||
@@ -22,7 +22,7 @@ type
|
||||
F_UPGRADE = 1 shl 4,
|
||||
F_SKIPBODY = 1 shl 5
|
||||
|
||||
THttpErrNo* = enum
|
||||
HttpErrNo* = enum
|
||||
HPE_OK, HPE_CB_message_begin, HPE_CB_path, HPE_CB_query_string, HPE_CB_url,
|
||||
HPE_CB_fragment, HPE_CB_header_field, HPE_CB_header_value,
|
||||
HPE_CB_headers_complete, HPE_CB_body, HPE_CB_message_complete,
|
||||
@@ -34,7 +34,7 @@ type
|
||||
HPE_INVALID_CHUNK_SIZE, HPE_INVALID_CONSTANT, HPE_INVALID_INTERNAL_STATE,
|
||||
HPE_STRICT, HPE_UNKNOWN
|
||||
|
||||
THttpParser*{.pure, final, importc: "http_parser", header: "http_parser.h".} = object
|
||||
HttpParser*{.pure, final, importc: "http_parser", header: "http_parser.h".} = object
|
||||
typ {.importc: "type".}: char
|
||||
flags {.importc: "flags".}: char
|
||||
state*{.importc: "state".}: char
|
||||
@@ -50,7 +50,7 @@ type
|
||||
upgrade {.importc: "upgrade".}: bool
|
||||
data*{.importc: "data".}: pointer
|
||||
|
||||
THttpParserSettings*{.pure, final, importc: "http_parser_settings", header: "http_parser.h".} = object
|
||||
HttpParserSettings*{.pure, final, importc: "http_parser_settings", header: "http_parser.h".} = object
|
||||
on_message_begin*{.importc: "on_message_begin".}: HttpProc
|
||||
on_url*{.importc: "on_url".}: HttpDataProc
|
||||
on_header_field*{.importc: "on_header_field".}: HttpDataProc
|
||||
@@ -58,24 +58,27 @@ type
|
||||
on_headers_complete*{.importc: "on_headers_complete".}: HttpProc
|
||||
on_body*{.importc: "on_body".}: HttpDataProc
|
||||
on_message_complete*{.importc: "on_message_complete".}: HttpProc
|
||||
{.deprecated: [THttpMethod: HttpMethod, THttpParserType: HttpParserType,
|
||||
TParserFlag: ParserFlag, THttpErrNo: HttpErrNo,
|
||||
THttpParser: HttpParser, THttpParserSettings: HttpParserSettings].}
|
||||
|
||||
proc http_parser_init*(parser: var THttpParser, typ: THttpParserType){.
|
||||
proc http_parser_init*(parser: var HttpParser, typ: HttpParserType){.
|
||||
importc: "http_parser_init", header: "http_parser.h".}
|
||||
|
||||
proc http_parser_execute*(parser: var THttpParser,
|
||||
settings: var THttpParserSettings, data: cstring,
|
||||
proc http_parser_execute*(parser: var HttpParser,
|
||||
settings: var HttpParserSettings, data: cstring,
|
||||
len: csize): csize {.
|
||||
importc: "http_parser_execute", header: "http_parser.h".}
|
||||
|
||||
proc http_should_keep_alive*(parser: var THttpParser): cint{.
|
||||
proc http_should_keep_alive*(parser: var HttpParser): cint{.
|
||||
importc: "http_should_keep_alive", header: "http_parser.h".}
|
||||
|
||||
proc http_method_str*(m: THttpMethod): cstring{.
|
||||
proc http_method_str*(m: HttpMethod): cstring{.
|
||||
importc: "http_method_str", header: "http_parser.h".}
|
||||
|
||||
proc http_errno_name*(err: THttpErrNo): cstring{.
|
||||
proc http_errno_name*(err: HttpErrNo): cstring{.
|
||||
importc: "http_errno_name", header: "http_parser.h".}
|
||||
|
||||
proc http_errno_description*(err: THttpErrNo): cstring{.
|
||||
proc http_errno_description*(err: HttpErrNo): cstring{.
|
||||
importc: "http_errno_description", header: "http_parser.h".}
|
||||
|
||||
|
||||
@@ -31,47 +31,47 @@ elif defined(unix):
|
||||
const
|
||||
libname = "libcurl.so.4"
|
||||
type
|
||||
Pcalloc_callback* = ptr Tcalloc_callback
|
||||
Pclosepolicy* = ptr Tclosepolicy
|
||||
Pforms* = ptr Tforms
|
||||
Pftpauth* = ptr Tftpauth
|
||||
Pftpmethod* = ptr Tftpmethod
|
||||
Pftpssl* = ptr Tftpssl
|
||||
PHTTP_VERSION* = ptr THTTP_VERSION
|
||||
Phttppost* = ptr Thttppost
|
||||
Pcalloc_callback* = ptr Calloc_callback
|
||||
Pclosepolicy* = ptr Closepolicy
|
||||
Pforms* = ptr Forms
|
||||
Pftpauth* = ptr Ftpauth
|
||||
Pftpmethod* = ptr Ftpmethod
|
||||
Pftpssl* = ptr Ftpssl
|
||||
PHTTP_VERSION* = ptr HTTP_VERSION
|
||||
Phttppost* = ptr Httppost
|
||||
PPcurl_httppost* = ptr Phttppost
|
||||
Pinfotype* = ptr Tinfotype
|
||||
Plock_access* = ptr Tlock_access
|
||||
Plock_data* = ptr Tlock_data
|
||||
Pmalloc_callback* = ptr Tmalloc_callback
|
||||
PNETRC_OPTION* = ptr TNETRC_OPTION
|
||||
Pproxytype* = ptr Tproxytype
|
||||
Prealloc_callback* = ptr Trealloc_callback
|
||||
Pslist* = ptr Tslist
|
||||
Psocket* = ptr Tsocket
|
||||
PSSL_VERSION* = ptr TSSL_VERSION
|
||||
Pstrdup_callback* = ptr Tstrdup_callback
|
||||
PTIMECOND* = ptr TTIMECOND
|
||||
Pversion_info_data* = ptr Tversion_info_data
|
||||
Pcode* = ptr Tcode
|
||||
PFORMcode* = ptr TFORMcode
|
||||
Pformoption* = ptr Tformoption
|
||||
PINFO* = ptr TINFO
|
||||
Piocmd* = ptr Tiocmd
|
||||
Pioerr* = ptr Tioerr
|
||||
PM* = ptr TM
|
||||
PMcode* = ptr TMcode
|
||||
PMoption* = ptr TMoption
|
||||
PMSG* = ptr TMSG
|
||||
Poption* = ptr Toption
|
||||
PSH* = ptr TSH
|
||||
PSHcode* = ptr TSHcode
|
||||
PSHoption* = ptr TSHoption
|
||||
Pversion* = ptr Tversion
|
||||
Pinfotype* = ptr Infotype
|
||||
Plock_access* = ptr Lock_access
|
||||
Plock_data* = ptr Lock_data
|
||||
Pmalloc_callback* = ptr Malloc_callback
|
||||
PNETRC_OPTION* = ptr NETRC_OPTION
|
||||
Pproxytype* = ptr Proxytype
|
||||
Prealloc_callback* = ptr Realloc_callback
|
||||
Pslist* = ptr Slist
|
||||
Psocket* = ptr Socket
|
||||
PSSL_VERSION* = ptr SSL_VERSION
|
||||
Pstrdup_callback* = ptr Strdup_callback
|
||||
PTIMECOND* = ptr TIMECOND
|
||||
Pversion_info_data* = ptr Version_info_data
|
||||
Pcode* = ptr Code
|
||||
PFORMcode* = ptr FORMcode
|
||||
Pformoption* = ptr Formoption
|
||||
PINFO* = ptr INFO
|
||||
Piocmd* = ptr Iocmd
|
||||
Pioerr* = ptr Ioerr
|
||||
PM* = ptr M
|
||||
PMcode* = ptr Mcode
|
||||
PMoption* = ptr Moption
|
||||
PMSG* = ptr MSG
|
||||
Poption* = ptr Option
|
||||
PSH* = ptr SH
|
||||
PSHcode* = ptr SHcode
|
||||
PSHoption* = ptr SHoption
|
||||
Pversion* = ptr Version
|
||||
Pfd_set* = pointer
|
||||
PCurl* = ptr TCurl
|
||||
TCurl* = pointer
|
||||
Thttppost*{.final, pure.} = object
|
||||
PCurl* = ptr Curl
|
||||
Curl* = pointer
|
||||
Httppost*{.final, pure.} = object
|
||||
next*: Phttppost
|
||||
name*: cstring
|
||||
namelength*: int32
|
||||
@@ -85,32 +85,32 @@ type
|
||||
flags*: int32
|
||||
showfilename*: cstring
|
||||
|
||||
Tprogress_callback* = proc (clientp: pointer, dltotal: float64,
|
||||
Progress_callback* = proc (clientp: pointer, dltotal: float64,
|
||||
dlnow: float64, ultotal: float64,
|
||||
ulnow: float64): int32 {.cdecl.}
|
||||
Twrite_callback* = proc (buffer: cstring, size: int, nitems: int,
|
||||
Write_callback* = proc (buffer: cstring, size: int, nitems: int,
|
||||
outstream: pointer): int{.cdecl.}
|
||||
Tread_callback* = proc (buffer: cstring, size: int, nitems: int,
|
||||
Read_callback* = proc (buffer: cstring, size: int, nitems: int,
|
||||
instream: pointer): int{.cdecl.}
|
||||
Tpasswd_callback* = proc (clientp: pointer, prompt: cstring, buffer: cstring,
|
||||
Passwd_callback* = proc (clientp: pointer, prompt: cstring, buffer: cstring,
|
||||
buflen: int32): int32{.cdecl.}
|
||||
Tioerr* = enum
|
||||
Ioerr* = enum
|
||||
IOE_OK, IOE_UNKNOWNCMD, IOE_FAILRESTART, IOE_LAST
|
||||
Tiocmd* = enum
|
||||
Iocmd* = enum
|
||||
IOCMD_NOP, IOCMD_RESTARTREAD, IOCMD_LAST
|
||||
Tioctl_callback* = proc (handle: PCurl, cmd: int32, clientp: pointer): Tioerr{.
|
||||
Ioctl_callback* = proc (handle: PCurl, cmd: int32, clientp: pointer): Ioerr{.
|
||||
cdecl.}
|
||||
Tmalloc_callback* = proc (size: int): pointer{.cdecl.}
|
||||
Tfree_callback* = proc (p: pointer){.cdecl.}
|
||||
Trealloc_callback* = proc (p: pointer, size: int): pointer{.cdecl.}
|
||||
Tstrdup_callback* = proc (str: cstring): cstring{.cdecl.}
|
||||
Tcalloc_callback* = proc (nmemb: int, size: int): pointer{.noconv.}
|
||||
Tinfotype* = enum
|
||||
Malloc_callback* = proc (size: int): pointer{.cdecl.}
|
||||
Free_callback* = proc (p: pointer){.cdecl.}
|
||||
Realloc_callback* = proc (p: pointer, size: int): pointer{.cdecl.}
|
||||
Strdup_callback* = proc (str: cstring): cstring{.cdecl.}
|
||||
Calloc_callback* = proc (nmemb: int, size: int): pointer{.noconv.}
|
||||
Infotype* = enum
|
||||
INFO_TEXT = 0, INFO_HEADER_IN, INFO_HEADER_OUT, INFO_DATA_IN, INFO_DATA_OUT,
|
||||
INFO_SSL_DATA_IN, INFO_SSL_DATA_OUT, INFO_END
|
||||
Tdebug_callback* = proc (handle: PCurl, theType: Tinfotype, data: cstring,
|
||||
Debug_callback* = proc (handle: PCurl, theType: Infotype, data: cstring,
|
||||
size: int, userptr: pointer): int32{.cdecl.}
|
||||
Tcode* = enum
|
||||
Code* = enum
|
||||
E_OK = 0, E_UNSUPPORTED_PROTOCOL, E_FAILED_INIT, E_URL_MALFORMAT,
|
||||
E_URL_MALFORMAT_USER, E_COULDNT_RESOLVE_PROXY, E_COULDNT_RESOLVE_HOST,
|
||||
E_COULDNT_CONNECT, E_FTP_WEIRD_SERVER_REPLY, E_FTP_ACCESS_DENIED,
|
||||
@@ -135,18 +135,18 @@ type
|
||||
E_LOGIN_DENIED, E_TFTP_NOTFOUND, E_TFTP_PERM, E_TFTP_DISKFULL,
|
||||
E_TFTP_ILLEGAL, E_TFTP_UNKNOWNID, E_TFTP_EXISTS, E_TFTP_NOSUCHUSER,
|
||||
E_CONV_FAILED, E_CONV_REQD, LAST
|
||||
Tconv_callback* = proc (buffer: cstring, len: int): Tcode{.cdecl.}
|
||||
Tssl_ctx_callback* = proc (curl: PCurl, ssl_ctx, userptr: pointer): Tcode{.cdecl.}
|
||||
Tproxytype* = enum
|
||||
Conv_callback* = proc (buffer: cstring, len: int): Code{.cdecl.}
|
||||
Ssl_ctx_callback* = proc (curl: PCurl, ssl_ctx, userptr: pointer): Code{.cdecl.}
|
||||
Proxytype* = enum
|
||||
PROXY_HTTP = 0, PROXY_SOCKS4 = 4, PROXY_SOCKS5 = 5
|
||||
Tftpssl* = enum
|
||||
Ftpssl* = enum
|
||||
FTPSSL_NONE, FTPSSL_TRY, FTPSSL_CONTROL, FTPSSL_ALL, FTPSSL_LAST
|
||||
Tftpauth* = enum
|
||||
Ftpauth* = enum
|
||||
FTPAUTH_DEFAULT, FTPAUTH_SSL, FTPAUTH_TLS, FTPAUTH_LAST
|
||||
Tftpmethod* = enum
|
||||
Ftpmethod* = enum
|
||||
FTPMETHOD_DEFAULT, FTPMETHOD_MULTICWD, FTPMETHOD_NOCWD, FTPMETHOD_SINGLECWD,
|
||||
FTPMETHOD_LAST
|
||||
Toption* = enum
|
||||
Option* = enum
|
||||
OPT_PORT = 0 + 3, OPT_TIMEOUT = 0 + 13, OPT_INFILESIZE = 0 + 14,
|
||||
OPT_LOW_SPEED_LIMIT = 0 + 19, OPT_LOW_SPEED_TIME = 0 + 20,
|
||||
OPT_RESUME_FROM = 0 + 21, OPT_CRLF = 0 + 27, OPT_SSLVERSION = 0 + 32,
|
||||
@@ -211,37 +211,37 @@ type
|
||||
OPT_MAXFILESIZE_LARGE = 30000 + 117, OPT_POSTFIELDSIZE_LARGE = 30000 + 120,
|
||||
OPT_MAX_SEND_SPEED_LARGE = 30000 + 145,
|
||||
OPT_MAX_RECV_SPEED_LARGE = 30000 + 146
|
||||
THTTP_VERSION* = enum
|
||||
HTTP_VERSION* = enum
|
||||
HTTP_VERSION_NONE, HTTP_VERSION_1_0, HTTP_VERSION_1_1, HTTP_VERSION_LAST
|
||||
TNETRC_OPTION* = enum
|
||||
NETRC_OPTION* = enum
|
||||
NETRC_IGNORED, NETRC_OPTIONAL, NETRC_REQUIRED, NETRC_LAST
|
||||
TSSL_VERSION* = enum
|
||||
SSL_VERSION* = enum
|
||||
SSLVERSION_DEFAULT, SSLVERSION_TLSv1, SSLVERSION_SSLv2, SSLVERSION_SSLv3,
|
||||
SSLVERSION_LAST
|
||||
TTIMECOND* = enum
|
||||
TIMECOND* = enum
|
||||
TIMECOND_NONE, TIMECOND_IFMODSINCE, TIMECOND_IFUNMODSINCE, TIMECOND_LASTMOD,
|
||||
TIMECOND_LAST
|
||||
Tformoption* = enum
|
||||
Formoption* = enum
|
||||
FORM_NOTHING, FORM_COPYNAME, FORM_PTRNAME, FORM_NAMELENGTH,
|
||||
FORM_COPYCONTENTS, FORM_PTRCONTENTS, FORM_CONTENTSLENGTH, FORM_FILECONTENT,
|
||||
FORM_ARRAY, FORM_OBSOLETE, FORM_FILE, FORM_BUFFER, FORM_BUFFERPTR,
|
||||
FORM_BUFFERLENGTH, FORM_CONTENTTYPE, FORM_CONTENTHEADER, FORM_FILENAME,
|
||||
FORM_END, FORM_OBSOLETE2, FORM_LASTENTRY
|
||||
Tforms*{.pure, final.} = object
|
||||
option*: Tformoption
|
||||
Forms*{.pure, final.} = object
|
||||
option*: Formoption
|
||||
value*: cstring
|
||||
|
||||
TFORMcode* = enum
|
||||
FORMcode* = enum
|
||||
FORMADD_OK, FORMADD_MEMORY, FORMADD_OPTION_TWICE, FORMADD_NULL,
|
||||
FORMADD_UNKNOWN_OPTION, FORMADD_INCOMPLETE, FORMADD_ILLEGAL_ARRAY,
|
||||
FORMADD_DISABLED, FORMADD_LAST
|
||||
Tformget_callback* = proc (arg: pointer, buf: cstring, length: int): int{.
|
||||
Formget_callback* = proc (arg: pointer, buf: cstring, length: int): int{.
|
||||
cdecl.}
|
||||
Tslist*{.pure, final.} = object
|
||||
Slist*{.pure, final.} = object
|
||||
data*: cstring
|
||||
next*: Pslist
|
||||
|
||||
TINFO* = enum
|
||||
INFO* = enum
|
||||
INFO_NONE = 0, INFO_LASTONE = 30, INFO_EFFECTIVE_URL = 0x00100000 + 1,
|
||||
INFO_CONTENT_TYPE = 0x00100000 + 18, INFO_PRIVATE = 0x00100000 + 21,
|
||||
INFO_FTP_ENTRY_PATH = 0x00100000 + 30, INFO_RESPONSE_CODE = 0x00200000 + 2,
|
||||
@@ -261,31 +261,31 @@ type
|
||||
INFO_STARTTRANSFER_TIME = 0x00300000 + 17,
|
||||
INFO_REDIRECT_TIME = 0x00300000 + 19, INFO_SSL_ENGINES = 0x00400000 + 27,
|
||||
INFO_COOKIELIST = 0x00400000 + 28
|
||||
Tclosepolicy* = enum
|
||||
Closepolicy* = enum
|
||||
CLOSEPOLICY_NONE, CLOSEPOLICY_OLDEST, CLOSEPOLICY_LEAST_RECENTLY_USED,
|
||||
CLOSEPOLICY_LEAST_TRAFFIC, CLOSEPOLICY_SLOWEST, CLOSEPOLICY_CALLBACK,
|
||||
CLOSEPOLICY_LAST
|
||||
Tlock_data* = enum
|
||||
Lock_data* = enum
|
||||
LOCK_DATA_NONE = 0, LOCK_DATA_SHARE, LOCK_DATA_COOKIE, LOCK_DATA_DNS,
|
||||
LOCK_DATA_SSL_SESSION, LOCK_DATA_CONNECT, LOCK_DATA_LAST
|
||||
Tlock_access* = enum
|
||||
Lock_access* = enum
|
||||
LOCK_ACCESS_NONE = 0, LOCK_ACCESS_SHARED = 1, LOCK_ACCESS_SINGLE = 2,
|
||||
LOCK_ACCESS_LAST
|
||||
Tlock_function* = proc (handle: PCurl, data: Tlock_data,
|
||||
locktype: Tlock_access,
|
||||
Lock_function* = proc (handle: PCurl, data: Lock_data,
|
||||
locktype: Lock_access,
|
||||
userptr: pointer){.cdecl.}
|
||||
Tunlock_function* = proc (handle: PCurl, data: Tlock_data, userptr: pointer){.
|
||||
Unlock_function* = proc (handle: PCurl, data: Lock_data, userptr: pointer){.
|
||||
cdecl.}
|
||||
TSH* = pointer
|
||||
TSHcode* = enum
|
||||
SH* = pointer
|
||||
SHcode* = enum
|
||||
SHE_OK, SHE_BAD_OPTION, SHE_IN_USE, SHE_INVALID, SHE_NOMEM, SHE_LAST
|
||||
TSHoption* = enum
|
||||
SHoption* = enum
|
||||
SHOPT_NONE, SHOPT_SHARE, SHOPT_UNSHARE, SHOPT_LOCKFUNC, SHOPT_UNLOCKFUNC,
|
||||
SHOPT_USERDATA, SHOPT_LAST
|
||||
Tversion* = enum
|
||||
Version* = enum
|
||||
VERSION_FIRST, VERSION_SECOND, VERSION_THIRD, VERSION_LAST
|
||||
Tversion_info_data*{.pure, final.} = object
|
||||
age*: Tversion
|
||||
Version_info_data*{.pure, final.} = object
|
||||
age*: Version
|
||||
version*: cstring
|
||||
version_num*: int32
|
||||
host*: cstring
|
||||
@@ -299,15 +299,15 @@ type
|
||||
libidn*: cstring
|
||||
iconv_ver_num*: int32
|
||||
|
||||
TM* = pointer
|
||||
Tsocket* = int32
|
||||
TMcode* = enum
|
||||
M* = pointer
|
||||
Socket* = int32
|
||||
Mcode* = enum
|
||||
M_CALL_MULTI_PERFORM = - 1, M_OK = 0, M_BAD_HANDLE, M_BAD_EASY_HANDLE,
|
||||
M_OUT_OF_MEMORY, M_INTERNAL_ERROR, M_BAD_SOCKET, M_UNKNOWN_OPTION, M_LAST
|
||||
TMSGEnum* = enum
|
||||
MSGEnum* = enum
|
||||
MSG_NONE, MSG_DONE, MSG_LAST
|
||||
TMsg*{.pure, final.} = object
|
||||
msg*: TMSGEnum
|
||||
Msg*{.pure, final.} = object
|
||||
msg*: MSGEnum
|
||||
easy_handle*: PCurl
|
||||
whatever*: pointer #data : record
|
||||
# case longint of
|
||||
@@ -315,11 +315,29 @@ type
|
||||
# 1 : ( result : CURLcode );
|
||||
# end;
|
||||
|
||||
Tsocket_callback* = proc (easy: PCurl, s: Tsocket, what: int32,
|
||||
Socket_callback* = proc (easy: PCurl, s: Socket, what: int32,
|
||||
userp, socketp: pointer): int32{.cdecl.}
|
||||
TMoption* = enum
|
||||
Moption* = enum
|
||||
MOPT_SOCKETDATA = 10000 + 2, MOPT_LASTENTRY = 10000 + 3,
|
||||
MOPT_SOCKETFUNCTION = 20000 + 1
|
||||
{.deprecated: [TMsg: Msg, TCurl: Curl, Thttppost: Httppost,
|
||||
Tprogress_callback: Progress_callback, Twrite_callback: Write_callback,
|
||||
Tread_callback: Read_callback, Tpasswd_callback: Passwd_callback, Tioerr: Ioerr,
|
||||
Tiocmd: Iocmd, Tioctl_callback: Ioctl_callback, Tmalloc_callback: Malloc_callback,
|
||||
Tfree_callback: Free_callback, Trealloc_callback: Realloc_callback,
|
||||
Tstrdup_callback: Strdup_callback, Tcalloc_callback: Calloc_callback,
|
||||
Tinfotype: Infotype, Tdebug_callback: Debug_callback, Tcode: Code,
|
||||
Tconv_callback: Conv_callback, Tssl_ctx_callback: Ssl_ctx_callback,
|
||||
Tproxytype: Proxytype, Tftpssl: Ftpssl, Tftpauth: Ftpauth, Tftpmethod: Ftpmethod,
|
||||
Toption: Option, THTTP_VERSION: HTTP_VERSION, TNETRC_OPTION: NETRC_OPTION,
|
||||
TSSL_VERSION: SSL_VERSION, TTIMECOND: TIMECOND, Tformoption: Formoption,
|
||||
Tforms: Forms, TFORMcode: FORMcode, Tformget_callback: Formget_callback,
|
||||
Tslist: Slist, TINFO: INFO, Tclosepolicy: Closepolicy, Tlock_data: Lock_data,
|
||||
Tlock_access: Lock_access, Tlock_function: Lock_function,
|
||||
Tunlock_function: Unlock_function, TSH: Sh, TSHcode: SHcode, TSHoption: SHoption,
|
||||
Tversion: Version, Tversion_info_data: Version_info_data, TM: M, Tsocket: Socket,
|
||||
TMcode: Mcode, TMSGEnum: MsGEnum, Tsocket_callback: Socket_callback,
|
||||
TMoption: Moption].}
|
||||
|
||||
const
|
||||
OPT_SSLKEYPASSWD* = OPT_SSLCERTPASSWD
|
||||
@@ -413,9 +431,9 @@ proc strequal*(s1, s2: cstring): int32{.cdecl, dynlib: libname,
|
||||
importc: "curl_strequal".}
|
||||
proc strnequal*(s1, s2: cstring, n: int): int32{.cdecl, dynlib: libname,
|
||||
importc: "curl_strnequal".}
|
||||
proc formadd*(httppost, last_post: PPcurl_httppost): TFORMcode{.cdecl, varargs,
|
||||
proc formadd*(httppost, last_post: PPcurl_httppost): FORMcode{.cdecl, varargs,
|
||||
dynlib: libname, importc: "curl_formadd".}
|
||||
proc formget*(form: Phttppost, arg: pointer, append: Tformget_callback): int32{.
|
||||
proc formget*(form: Phttppost, arg: pointer, append: Formget_callback): int32{.
|
||||
cdecl, dynlib: libname, importc: "curl_formget".}
|
||||
proc formfree*(form: Phttppost){.cdecl, dynlib: libname,
|
||||
importc: "curl_formfree".}
|
||||
@@ -431,11 +449,11 @@ proc easy_unescape*(handle: PCurl, str: cstring, len: int32, outlength: var int3
|
||||
proc unescape*(str: cstring, len: int32): cstring{.cdecl, dynlib: libname,
|
||||
importc: "curl_unescape".}
|
||||
proc free*(p: pointer){.cdecl, dynlib: libname, importc: "curl_free".}
|
||||
proc global_init*(flags: int32): Tcode{.cdecl, dynlib: libname,
|
||||
proc global_init*(flags: int32): Code{.cdecl, dynlib: libname,
|
||||
importc: "curl_global_init".}
|
||||
proc global_init_mem*(flags: int32, m: Tmalloc_callback, f: Tfree_callback,
|
||||
r: Trealloc_callback, s: Tstrdup_callback,
|
||||
c: Tcalloc_callback): Tcode{.cdecl, dynlib: libname,
|
||||
proc global_init_mem*(flags: int32, m: Malloc_callback, f: Free_callback,
|
||||
r: Realloc_callback, s: Strdup_callback,
|
||||
c: Calloc_callback): Code{.cdecl, dynlib: libname,
|
||||
importc: "curl_global_init_mem".}
|
||||
proc global_cleanup*(){.cdecl, dynlib: libname, importc: "curl_global_cleanup".}
|
||||
proc slist_append*(slist: Pslist, p: cstring): Pslist{.cdecl, dynlib: libname,
|
||||
@@ -445,50 +463,50 @@ proc slist_free_all*(para1: Pslist){.cdecl, dynlib: libname,
|
||||
proc getdate*(p: cstring, unused: ptr Time): Time{.cdecl, dynlib: libname,
|
||||
importc: "curl_getdate".}
|
||||
proc share_init*(): PSH{.cdecl, dynlib: libname, importc: "curl_share_init".}
|
||||
proc share_setopt*(para1: PSH, option: TSHoption): TSHcode{.cdecl, varargs,
|
||||
proc share_setopt*(para1: PSH, option: SHoption): SHcode{.cdecl, varargs,
|
||||
dynlib: libname, importc: "curl_share_setopt".}
|
||||
proc share_cleanup*(para1: PSH): TSHcode{.cdecl, dynlib: libname,
|
||||
proc share_cleanup*(para1: PSH): SHcode{.cdecl, dynlib: libname,
|
||||
importc: "curl_share_cleanup".}
|
||||
proc version_info*(para1: Tversion): Pversion_info_data{.cdecl, dynlib: libname,
|
||||
proc version_info*(para1: Version): Pversion_info_data{.cdecl, dynlib: libname,
|
||||
importc: "curl_version_info".}
|
||||
proc easy_strerror*(para1: Tcode): cstring{.cdecl, dynlib: libname,
|
||||
proc easy_strerror*(para1: Code): cstring{.cdecl, dynlib: libname,
|
||||
importc: "curl_easy_strerror".}
|
||||
proc share_strerror*(para1: TSHcode): cstring{.cdecl, dynlib: libname,
|
||||
proc share_strerror*(para1: SHcode): cstring{.cdecl, dynlib: libname,
|
||||
importc: "curl_share_strerror".}
|
||||
proc easy_init*(): PCurl{.cdecl, dynlib: libname, importc: "curl_easy_init".}
|
||||
proc easy_setopt*(curl: PCurl, option: Toption): Tcode{.cdecl, varargs, dynlib: libname,
|
||||
proc easy_setopt*(curl: PCurl, option: Option): Code{.cdecl, varargs, dynlib: libname,
|
||||
importc: "curl_easy_setopt".}
|
||||
proc easy_perform*(curl: PCurl): Tcode{.cdecl, dynlib: libname,
|
||||
proc easy_perform*(curl: PCurl): Code{.cdecl, dynlib: libname,
|
||||
importc: "curl_easy_perform".}
|
||||
proc easy_cleanup*(curl: PCurl){.cdecl, dynlib: libname, importc: "curl_easy_cleanup".}
|
||||
proc easy_getinfo*(curl: PCurl, info: TINFO): Tcode{.cdecl, varargs, dynlib: libname,
|
||||
proc easy_getinfo*(curl: PCurl, info: INFO): Code{.cdecl, varargs, dynlib: libname,
|
||||
importc: "curl_easy_getinfo".}
|
||||
proc easy_duphandle*(curl: PCurl): PCurl{.cdecl, dynlib: libname,
|
||||
importc: "curl_easy_duphandle".}
|
||||
proc easy_reset*(curl: PCurl){.cdecl, dynlib: libname, importc: "curl_easy_reset".}
|
||||
proc multi_init*(): PM{.cdecl, dynlib: libname, importc: "curl_multi_init".}
|
||||
proc multi_add_handle*(multi_handle: PM, handle: PCurl): TMcode{.cdecl,
|
||||
proc multi_add_handle*(multi_handle: PM, handle: PCurl): Mcode{.cdecl,
|
||||
dynlib: libname, importc: "curl_multi_add_handle".}
|
||||
proc multi_remove_handle*(multi_handle: PM, handle: PCurl): TMcode{.cdecl,
|
||||
proc multi_remove_handle*(multi_handle: PM, handle: PCurl): Mcode{.cdecl,
|
||||
dynlib: libname, importc: "curl_multi_remove_handle".}
|
||||
proc multi_fdset*(multi_handle: PM, read_fd_set: Pfd_set, write_fd_set: Pfd_set,
|
||||
exc_fd_set: Pfd_set, max_fd: var int32): TMcode{.cdecl,
|
||||
exc_fd_set: Pfd_set, max_fd: var int32): Mcode{.cdecl,
|
||||
dynlib: libname, importc: "curl_multi_fdset".}
|
||||
proc multi_perform*(multi_handle: PM, running_handles: var int32): TMcode{.
|
||||
proc multi_perform*(multi_handle: PM, running_handles: var int32): Mcode{.
|
||||
cdecl, dynlib: libname, importc: "curl_multi_perform".}
|
||||
proc multi_cleanup*(multi_handle: PM): TMcode{.cdecl, dynlib: libname,
|
||||
proc multi_cleanup*(multi_handle: PM): Mcode{.cdecl, dynlib: libname,
|
||||
importc: "curl_multi_cleanup".}
|
||||
proc multi_info_read*(multi_handle: PM, msgs_in_queue: var int32): PMsg{.cdecl,
|
||||
dynlib: libname, importc: "curl_multi_info_read".}
|
||||
proc multi_strerror*(para1: TMcode): cstring{.cdecl, dynlib: libname,
|
||||
proc multi_strerror*(para1: Mcode): cstring{.cdecl, dynlib: libname,
|
||||
importc: "curl_multi_strerror".}
|
||||
proc multi_socket*(multi_handle: PM, s: Tsocket, running_handles: var int32): TMcode{.
|
||||
proc multi_socket*(multi_handle: PM, s: Socket, running_handles: var int32): Mcode{.
|
||||
cdecl, dynlib: libname, importc: "curl_multi_socket".}
|
||||
proc multi_socket_all*(multi_handle: PM, running_handles: var int32): TMcode{.
|
||||
proc multi_socket_all*(multi_handle: PM, running_handles: var int32): Mcode{.
|
||||
cdecl, dynlib: libname, importc: "curl_multi_socket_all".}
|
||||
proc multi_timeout*(multi_handle: PM, milliseconds: var int32): TMcode{.cdecl,
|
||||
proc multi_timeout*(multi_handle: PM, milliseconds: var int32): Mcode{.cdecl,
|
||||
dynlib: libname, importc: "curl_multi_timeout".}
|
||||
proc multi_setopt*(multi_handle: PM, option: TMoption): TMcode{.cdecl, varargs,
|
||||
proc multi_setopt*(multi_handle: PM, option: Moption): Mcode{.cdecl, varargs,
|
||||
dynlib: libname, importc: "curl_multi_setopt".}
|
||||
proc multi_assign*(multi_handle: PM, sockfd: Tsocket, sockp: pointer): TMcode{.
|
||||
proc multi_assign*(multi_handle: PM, sockfd: Socket, sockp: pointer): Mcode{.
|
||||
cdecl, dynlib: libname, importc: "curl_multi_assign".}
|
||||
|
||||
@@ -58,8 +58,9 @@ else:
|
||||
{.pragma: mylib, dynlib: "libffi.so".}
|
||||
|
||||
type
|
||||
TArg* = int
|
||||
TSArg* = int
|
||||
Arg* = int
|
||||
SArg* = int
|
||||
{deprecated: [TArg: Arg, TSArg: SArg].}
|
||||
|
||||
when defined(windows) and defined(x86):
|
||||
type
|
||||
@@ -105,67 +106,71 @@ const
|
||||
tkSMALL_STRUCT_4B* = (tkLAST + 3)
|
||||
|
||||
type
|
||||
TType* = object
|
||||
Type* = object
|
||||
size*: int
|
||||
alignment*: uint16
|
||||
typ*: uint16
|
||||
elements*: ptr ptr TType
|
||||
elements*: ptr ptr Type
|
||||
{.deprecated: [TType: Type].}
|
||||
|
||||
var
|
||||
type_void* {.importc: "ffi_type_void", mylib.}: TType
|
||||
type_uint8* {.importc: "ffi_type_uint8", mylib.}: TType
|
||||
type_sint8* {.importc: "ffi_type_sint8", mylib.}: TType
|
||||
type_uint16* {.importc: "ffi_type_uint16", mylib.}: TType
|
||||
type_sint16* {.importc: "ffi_type_sint16", mylib.}: TType
|
||||
type_uint32* {.importc: "ffi_type_uint32", mylib.}: TType
|
||||
type_sint32* {.importc: "ffi_type_sint32", mylib.}: TType
|
||||
type_uint64* {.importc: "ffi_type_uint64", mylib.}: TType
|
||||
type_sint64* {.importc: "ffi_type_sint64", mylib.}: TType
|
||||
type_float* {.importc: "ffi_type_float", mylib.}: TType
|
||||
type_double* {.importc: "ffi_type_double", mylib.}: TType
|
||||
type_pointer* {.importc: "ffi_type_pointer", mylib.}: TType
|
||||
type_longdouble* {.importc: "ffi_type_longdouble", mylib.}: TType
|
||||
type_void* {.importc: "ffi_type_void", mylib.}: Type
|
||||
type_uint8* {.importc: "ffi_type_uint8", mylib.}: Type
|
||||
type_sint8* {.importc: "ffi_type_sint8", mylib.}: Type
|
||||
type_uint16* {.importc: "ffi_type_uint16", mylib.}: Type
|
||||
type_sint16* {.importc: "ffi_type_sint16", mylib.}: Type
|
||||
type_uint32* {.importc: "ffi_type_uint32", mylib.}: Type
|
||||
type_sint32* {.importc: "ffi_type_sint32", mylib.}: Type
|
||||
type_uint64* {.importc: "ffi_type_uint64", mylib.}: Type
|
||||
type_sint64* {.importc: "ffi_type_sint64", mylib.}: Type
|
||||
type_float* {.importc: "ffi_type_float", mylib.}: Type
|
||||
type_double* {.importc: "ffi_type_double", mylib.}: Type
|
||||
type_pointer* {.importc: "ffi_type_pointer", mylib.}: Type
|
||||
type_longdouble* {.importc: "ffi_type_longdouble", mylib.}: Type
|
||||
|
||||
type
|
||||
Tstatus* {.size: sizeof(cint).} = enum
|
||||
Status* {.size: sizeof(cint).} = enum
|
||||
OK, BAD_TYPEDEF, BAD_ABI
|
||||
TTypeKind* = cuint
|
||||
TypeKind* = cuint
|
||||
TCif* {.pure, final.} = object
|
||||
abi*: TABI
|
||||
nargs*: cuint
|
||||
arg_types*: ptr ptr TType
|
||||
rtype*: ptr TType
|
||||
arg_types*: ptr ptr Type
|
||||
rtype*: ptr Type
|
||||
bytes*: cuint
|
||||
flags*: cuint
|
||||
{.deprecated: [Tstatus: Status].}
|
||||
|
||||
type
|
||||
TRaw* = object
|
||||
sint*: TSArg
|
||||
Raw* = object
|
||||
sint*: SArg
|
||||
{.deprecated: [TRaw: Raw].}
|
||||
|
||||
proc raw_call*(cif: var Tcif; fn: proc () {.cdecl.}; rvalue: pointer;
|
||||
avalue: ptr TRaw) {.cdecl, importc: "ffi_raw_call", mylib.}
|
||||
proc ptrarray_to_raw*(cif: var Tcif; args: ptr pointer; raw: ptr TRaw) {.cdecl,
|
||||
avalue: ptr Raw) {.cdecl, importc: "ffi_raw_call", mylib.}
|
||||
proc ptrarray_to_raw*(cif: var Tcif; args: ptr pointer; raw: ptr Raw) {.cdecl,
|
||||
importc: "ffi_ptrarray_to_raw", mylib.}
|
||||
proc raw_to_ptrarray*(cif: var Tcif; raw: ptr TRaw; args: ptr pointer) {.cdecl,
|
||||
proc raw_to_ptrarray*(cif: var Tcif; raw: ptr Raw; args: ptr pointer) {.cdecl,
|
||||
importc: "ffi_raw_to_ptrarray", mylib.}
|
||||
proc raw_size*(cif: var Tcif): int {.cdecl, importc: "ffi_raw_size", mylib.}
|
||||
|
||||
proc prep_cif*(cif: var Tcif; abi: TABI; nargs: cuint; rtype: ptr TType;
|
||||
atypes: ptr ptr TType): TStatus {.cdecl, importc: "ffi_prep_cif",
|
||||
proc prep_cif*(cif: var Tcif; abi: TABI; nargs: cuint; rtype: ptr Type;
|
||||
atypes: ptr ptr Type): Status {.cdecl, importc: "ffi_prep_cif",
|
||||
mylib.}
|
||||
proc call*(cif: var Tcif; fn: proc () {.cdecl.}; rvalue: pointer;
|
||||
avalue: ptr pointer) {.cdecl, importc: "ffi_call", mylib.}
|
||||
|
||||
# the same with an easier interface:
|
||||
type
|
||||
TParamList* = array[0..100, ptr TType]
|
||||
TArgList* = array[0..100, pointer]
|
||||
ParamList* = array[0..100, ptr Type]
|
||||
ArgList* = array[0..100, pointer]
|
||||
{.deprecated: [TParamList: ParamList, TArgList: ArgList].}
|
||||
|
||||
proc prep_cif*(cif: var Tcif; abi: TABI; nargs: cuint; rtype: ptr TType;
|
||||
atypes: TParamList): TStatus {.cdecl, importc: "ffi_prep_cif",
|
||||
proc prep_cif*(cif: var Tcif; abi: TABI; nargs: cuint; rtype: ptr Type;
|
||||
atypes: ParamList): Status {.cdecl, importc: "ffi_prep_cif",
|
||||
mylib.}
|
||||
proc call*(cif: var Tcif; fn, rvalue: pointer;
|
||||
avalue: TArgList) {.cdecl, importc: "ffi_call", mylib.}
|
||||
avalue: ArgList) {.cdecl, importc: "ffi_call", mylib.}
|
||||
|
||||
# Useful for eliminating compiler warnings
|
||||
##define FFI_FN(f) ((void (*)(void))f)
|
||||
|
||||
@@ -21,24 +21,24 @@ else:
|
||||
const svmdll* = "libsvm.so"
|
||||
|
||||
type
|
||||
Tnode*{.pure, final.} = object
|
||||
Node*{.pure, final.} = object
|
||||
index*: cint
|
||||
value*: cdouble
|
||||
|
||||
Tproblem*{.pure, final.} = object
|
||||
Problem*{.pure, final.} = object
|
||||
L*: cint
|
||||
y*: ptr cdouble
|
||||
x*: ptr ptr Tnode
|
||||
x*: ptr ptr Node
|
||||
|
||||
Ttype*{.size: sizeof(cint).} = enum
|
||||
Type*{.size: sizeof(cint).} = enum
|
||||
C_SVC, NU_SVC, ONE_CLASS, EPSILON_SVR, NU_SVR
|
||||
|
||||
TKernelType*{.size: sizeof(cint).} = enum
|
||||
KernelType*{.size: sizeof(cint).} = enum
|
||||
LINEAR, POLY, RBF, SIGMOID, PRECOMPUTED
|
||||
|
||||
Tparameter*{.pure, final.} = object
|
||||
typ*: TType
|
||||
kernelType*: TKernelType
|
||||
Parameter*{.pure, final.} = object
|
||||
typ*: Type
|
||||
kernelType*: KernelType
|
||||
degree*: cint # for poly
|
||||
gamma*: cdouble # for poly/rbf/sigmoid
|
||||
coef0*: cdouble # for poly/sigmoid
|
||||
@@ -53,18 +53,19 @@ type
|
||||
p*: cdouble # for EPSILON_SVR
|
||||
shrinking*: cint # use the shrinking heuristics
|
||||
probability*: cint # do probability estimates
|
||||
|
||||
{.deprecated: [Tnode: Node, Tproblem: Problem, Ttype: Type,
|
||||
TKernelType: KernelType, Tparameter: Parameter].}
|
||||
|
||||
#
|
||||
# svm_model
|
||||
#
|
||||
|
||||
type
|
||||
TModel*{.pure, final.} = object
|
||||
param*: Tparameter # parameter
|
||||
Model*{.pure, final.} = object
|
||||
param*: Parameter # parameter
|
||||
nr_class*: cint # number of classes, = 2 in regression/one class svm
|
||||
L*: cint # total #SV
|
||||
SV*: ptr ptr Tnode # SVs (SV[l])
|
||||
SV*: ptr ptr Node # SVs (SV[l])
|
||||
sv_coef*: ptr ptr cdouble # coefficients for SVs in decision functions (sv_coef[k-1][l])
|
||||
rho*: ptr cdouble # constants in decision functions (rho[k*(k-1)/2])
|
||||
probA*: ptr cdouble # pariwise probability information
|
||||
@@ -74,42 +75,42 @@ type
|
||||
# nSV[0] + nSV[1] + ... + nSV[k-1] = l
|
||||
# XXX
|
||||
free_sv*: cint # 1 if svm_model is created by svm_load_model
|
||||
# 0 if svm_model is created by svm_train
|
||||
|
||||
# 0 if svm_model is created by svm_train
|
||||
{.deprecated: [TModel: Model].}
|
||||
|
||||
proc train*(prob: ptr Tproblem, param: ptr Tparameter): ptr Tmodel{.cdecl,
|
||||
proc train*(prob: ptr Problem, param: ptr Parameter): ptr Model{.cdecl,
|
||||
importc: "svm_train", dynlib: svmdll.}
|
||||
proc cross_validation*(prob: ptr Tproblem, param: ptr Tparameter, nr_fold: cint,
|
||||
proc cross_validation*(prob: ptr Problem, param: ptr Parameter, nr_fold: cint,
|
||||
target: ptr cdouble){.cdecl,
|
||||
importc: "svm_cross_validation", dynlib: svmdll.}
|
||||
proc save_model*(model_file_name: cstring, model: ptr Tmodel): cint{.cdecl,
|
||||
proc save_model*(model_file_name: cstring, model: ptr Model): cint{.cdecl,
|
||||
importc: "svm_save_model", dynlib: svmdll.}
|
||||
proc load_model*(model_file_name: cstring): ptr Tmodel{.cdecl,
|
||||
proc load_model*(model_file_name: cstring): ptr Model{.cdecl,
|
||||
importc: "svm_load_model", dynlib: svmdll.}
|
||||
proc get_svm_type*(model: ptr Tmodel): cint{.cdecl, importc: "svm_get_svm_type",
|
||||
proc get_svm_type*(model: ptr Model): cint{.cdecl, importc: "svm_get_svm_type",
|
||||
dynlib: svmdll.}
|
||||
proc get_nr_class*(model: ptr Tmodel): cint{.cdecl, importc: "svm_get_nr_class",
|
||||
proc get_nr_class*(model: ptr Model): cint{.cdecl, importc: "svm_get_nr_class",
|
||||
dynlib: svmdll.}
|
||||
proc get_labels*(model: ptr Tmodel, label: ptr cint){.cdecl,
|
||||
proc get_labels*(model: ptr Model, label: ptr cint){.cdecl,
|
||||
importc: "svm_get_labels", dynlib: svmdll.}
|
||||
proc get_svr_probability*(model: ptr Tmodel): cdouble{.cdecl,
|
||||
proc get_svr_probability*(model: ptr Model): cdouble{.cdecl,
|
||||
importc: "svm_get_svr_probability", dynlib: svmdll.}
|
||||
proc predict_values*(model: ptr Tmodel, x: ptr Tnode, dec_values: ptr cdouble): cdouble{.
|
||||
proc predict_values*(model: ptr Model, x: ptr Node, dec_values: ptr cdouble): cdouble{.
|
||||
cdecl, importc: "svm_predict_values", dynlib: svmdll.}
|
||||
proc predict*(model: ptr Tmodel, x: ptr Tnode): cdouble{.cdecl,
|
||||
proc predict*(model: ptr Model, x: ptr Node): cdouble{.cdecl,
|
||||
importc: "svm_predict", dynlib: svmdll.}
|
||||
proc predict_probability*(model: ptr Tmodel, x: ptr Tnode,
|
||||
proc predict_probability*(model: ptr Model, x: ptr Node,
|
||||
prob_estimates: ptr cdouble): cdouble{.cdecl,
|
||||
importc: "svm_predict_probability", dynlib: svmdll.}
|
||||
proc free_model_content*(model_ptr: ptr Tmodel){.cdecl,
|
||||
proc free_model_content*(model_ptr: ptr Model){.cdecl,
|
||||
importc: "svm_free_model_content", dynlib: svmdll.}
|
||||
proc free_and_destroy_model*(model_ptr_ptr: ptr ptr Tmodel){.cdecl,
|
||||
proc free_and_destroy_model*(model_ptr_ptr: ptr ptr Model){.cdecl,
|
||||
importc: "svm_free_and_destroy_model", dynlib: svmdll.}
|
||||
proc destroy_param*(param: ptr Tparameter){.cdecl, importc: "svm_destroy_param",
|
||||
proc destroy_param*(param: ptr Parameter){.cdecl, importc: "svm_destroy_param",
|
||||
dynlib: svmdll.}
|
||||
proc check_parameter*(prob: ptr Tproblem, param: ptr Tparameter): cstring{.
|
||||
proc check_parameter*(prob: ptr Problem, param: ptr Parameter): cstring{.
|
||||
cdecl, importc: "svm_check_parameter", dynlib: svmdll.}
|
||||
proc check_probability_model*(model: ptr Tmodel): cint{.cdecl,
|
||||
proc check_probability_model*(model: ptr Model): cint{.cdecl,
|
||||
importc: "svm_check_probability_model", dynlib: svmdll.}
|
||||
|
||||
proc set_print_string_function*(print_func: proc (arg: cstring) {.cdecl.}){.
|
||||
|
||||
@@ -10,15 +10,15 @@ else:
|
||||
import posix
|
||||
|
||||
type
|
||||
TPort* = distinct int16 ## port type
|
||||
Port* = distinct int16 ## port type
|
||||
|
||||
cssize = int
|
||||
coff = int
|
||||
csize = int
|
||||
|
||||
AllocProc* = proc (handle: PHandle, suggested_size: csize): TBuf {.cdecl.}
|
||||
ReadProc* = proc (stream: PStream, nread: cssize, buf: TBuf) {.cdecl.}
|
||||
ReadProc2* = proc (stream: PPipe, nread: cssize, buf: TBuf, pending: THandleType) {.cdecl.}
|
||||
AllocProc* = proc (handle: PHandle, suggested_size: csize): Buf {.cdecl.}
|
||||
ReadProc* = proc (stream: PStream, nread: cssize, buf: Buf) {.cdecl.}
|
||||
ReadProc2* = proc (stream: PPipe, nread: cssize, buf: Buf, pending: HandleType) {.cdecl.}
|
||||
WriteProc* = proc (req: PWrite, status: cint) {.cdecl.}
|
||||
ConnectProc* = proc (req: PConnect, status: cint) {.cdecl.}
|
||||
ShutdownProc* = proc (req: PShutdown, status: cint) {.cdecl.}
|
||||
@@ -41,7 +41,7 @@ type
|
||||
|
||||
FsEventProc* = proc (handle: PFsEvent, filename: cstring, events: cint, status: cint)
|
||||
|
||||
TErrorCode* {.size: sizeof(cint).} = enum
|
||||
ErrorCode* {.size: sizeof(cint).} = enum
|
||||
UNKNOWN = - 1, OK = 0, EOF, EACCESS, EAGAIN, EADDRINUSE, EADDRNOTAVAIL,
|
||||
EAFNOSUPPORT, EALREADY, EBADF, EBUSY, ECONNABORTED, ECONNREFUSED,
|
||||
ECONNRESET, EDESTADDRREQ, EFAULT, EHOSTUNREACH, EINTR, EINVAL, EISCONN,
|
||||
@@ -50,11 +50,11 @@ type
|
||||
EPROTONOSUPPORT, EPROTOTYPE, ETIMEDOUT, ECHARSET, EAIFAMNOSUPPORT,
|
||||
EAINONAME, EAISERVICE, EAISOCKTYPE, ESHUTDOWN, EEXIST
|
||||
|
||||
THandleType* {.size: sizeof(cint).} = enum
|
||||
HandleType* {.size: sizeof(cint).} = enum
|
||||
UNKNOWN_HANDLE = 0, TCP, UDP, NAMED_PIPE, TTY, FILE, TIMER, PREPARE, CHECK,
|
||||
IDLE, ASYNC, ARES_TASK, ARES_EVENT, PROCESS, FS_EVENT
|
||||
|
||||
TReqType* {.size: sizeof(cint).} = enum
|
||||
ReqType* {.size: sizeof(cint).} = enum
|
||||
rUNKNOWN_REQ = 0,
|
||||
rCONNECT,
|
||||
rACCEPT,
|
||||
@@ -68,57 +68,57 @@ type
|
||||
rGETADDRINFO,
|
||||
rREQ_TYPE_PRIVATE
|
||||
|
||||
TErr* {.pure, final, importc: "uv_err_t", header: "uv.h".} = object
|
||||
code* {.importc: "code".}: TErrorCode
|
||||
Err* {.pure, final, importc: "uv_err_t", header: "uv.h".} = object
|
||||
code* {.importc: "code".}: ErrorCode
|
||||
sys_errno* {.importc: "sys_errno_".}: cint
|
||||
|
||||
TFsEventType* = enum
|
||||
FsEventType* = enum
|
||||
evRENAME = 1,
|
||||
evCHANGE = 2
|
||||
|
||||
TFsEvent* {.pure, final, importc: "uv_fs_event_t", header: "uv.h".} = object
|
||||
loop* {.importc: "loop".}: PLoop
|
||||
typ* {.importc: "type".}: THandleType
|
||||
typ* {.importc: "type".}: HandleType
|
||||
close_cb* {.importc: "close_cb".}: CloseProc
|
||||
data* {.importc: "data".}: pointer
|
||||
filename {.importc: "filename".}: cstring
|
||||
|
||||
PFsEvent* = ptr TFsEvent
|
||||
|
||||
TFsEvents* {.pure, final, importc: "uv_fs_event_t", header: "uv.h".} = object
|
||||
FsEvents* {.pure, final, importc: "uv_fs_event_t", header: "uv.h".} = object
|
||||
loop* {.importc: "loop".}: PLoop
|
||||
typ* {.importc: "type".}: THandleType
|
||||
typ* {.importc: "type".}: HandleType
|
||||
close_cb* {.importc: "close_cb".}: CloseProc
|
||||
data* {.importc: "data".}: pointer
|
||||
filename* {.importc: "filename".}: cstring
|
||||
|
||||
TBuf* {.pure, final, importc: "uv_buf_t", header: "uv.h"} = object
|
||||
Buf* {.pure, final, importc: "uv_buf_t", header: "uv.h"} = object
|
||||
base* {.importc: "base".}: cstring
|
||||
len* {.importc: "len".}: csize
|
||||
|
||||
TAnyHandle* {.pure, final, importc: "uv_any_handle", header: "uv.h".} = object
|
||||
AnyHandle* {.pure, final, importc: "uv_any_handle", header: "uv.h".} = object
|
||||
tcp* {.importc: "tcp".}: TTcp
|
||||
pipe* {.importc: "pipe".}: TPipe
|
||||
pipe* {.importc: "pipe".}: Pipe
|
||||
prepare* {.importc: "prepare".}: TPrepare
|
||||
check* {.importc: "check".}: TCheck
|
||||
idle* {.importc: "idle".}: TIdle
|
||||
async* {.importc: "async".}: TAsync
|
||||
timer* {.importc: "timer".}: TTimer
|
||||
getaddrinfo* {.importc: "getaddrinfo".}: TGetaddrinfo
|
||||
fs_event* {.importc: "fs_event".}: TFsEvents
|
||||
getaddrinfo* {.importc: "getaddrinfo".}: Getaddrinfo
|
||||
fs_event* {.importc: "fs_event".}: FsEvents
|
||||
|
||||
TAnyReq* {.pure, final, importc: "uv_any_req", header: "uv.h".} = object
|
||||
req* {.importc: "req".}: TReq
|
||||
write* {.importc: "write".}: TWrite
|
||||
connect* {.importc: "connect".}: TConnect
|
||||
shutdown* {.importc: "shutdown".}: TShutdown
|
||||
fs_req* {.importc: "fs_req".}: Tfs
|
||||
work_req* {.importc: "work_req".}: TWork
|
||||
AnyReq* {.pure, final, importc: "uv_any_req", header: "uv.h".} = object
|
||||
req* {.importc: "req".}: Req
|
||||
write* {.importc: "write".}: Write
|
||||
connect* {.importc: "connect".}: Connect
|
||||
shutdown* {.importc: "shutdown".}: Shutdown
|
||||
fs_req* {.importc: "fs_req".}: Fs
|
||||
work_req* {.importc: "work_req".}: Work
|
||||
|
||||
## better import this
|
||||
uint64 = int64
|
||||
|
||||
TCounters* {.pure, final, importc: "uv_counters_t", header: "uv.h".} = object
|
||||
Counters* {.pure, final, importc: "uv_counters_t", header: "uv.h".} = object
|
||||
eio_init* {.importc: "eio_init".}: uint64
|
||||
req_init* {.importc: "req_init".}: uint64
|
||||
handle_init* {.importc: "handle_init".}: uint64
|
||||
@@ -135,36 +135,36 @@ type
|
||||
process_init* {.importc: "process_init".}: uint64
|
||||
fs_event_init* {.importc: "fs_event_init".}: uint64
|
||||
|
||||
TLoop* {.pure, final, importc: "uv_loop_t", header: "uv.h".} = object
|
||||
Loop* {.pure, final, importc: "uv_loop_t", header: "uv.h".} = object
|
||||
# ares_handles_* {.importc: "uv_ares_handles_".}: pointer # XXX: This seems to be a private field?
|
||||
eio_want_poll_notifier* {.importc: "uv_eio_want_poll_notifier".}: TAsync
|
||||
eio_done_poll_notifier* {.importc: "uv_eio_done_poll_notifier".}: TAsync
|
||||
eio_poller* {.importc: "uv_eio_poller".}: TIdle
|
||||
counters* {.importc: "counters".}: TCounters
|
||||
last_err* {.importc: "last_err".}: TErr
|
||||
counters* {.importc: "counters".}: Counters
|
||||
last_err* {.importc: "last_err".}: Err
|
||||
data* {.importc: "data".}: pointer
|
||||
|
||||
PLoop* = ptr TLoop
|
||||
PLoop* = ptr Loop
|
||||
|
||||
TShutdown* {.pure, final, importc: "uv_shutdown_t", header: "uv.h".} = object
|
||||
typ* {.importc: "type".}: TReqType
|
||||
Shutdown* {.pure, final, importc: "uv_shutdown_t", header: "uv.h".} = object
|
||||
typ* {.importc: "type".}: ReqType
|
||||
data* {.importc: "data".}: pointer
|
||||
handle* {.importc: "handle".}: PStream
|
||||
cb* {.importc: "cb".}: ShutdownProc
|
||||
|
||||
PShutdown* = ptr TShutdown
|
||||
PShutdown* = ptr Shutdown
|
||||
|
||||
THandle* {.pure, final, importc: "uv_handle_t", header: "uv.h".} = object
|
||||
Handle* {.pure, final, importc: "uv_handle_t", header: "uv.h".} = object
|
||||
loop* {.importc: "loop".}: PLoop
|
||||
typ* {.importc: "type".}: THandleType
|
||||
typ* {.importc: "type".}: HandleType
|
||||
close_cb* {.importc: "close_cb".}: CloseProc
|
||||
data* {.importc: "data".}: pointer
|
||||
|
||||
PHandle* = ptr THandle
|
||||
PHandle* = ptr Handle
|
||||
|
||||
TStream* {.pure, final, importc: "uv_stream_t", header: "uv.h".} = object
|
||||
Stream* {.pure, final, importc: "uv_stream_t", header: "uv.h".} = object
|
||||
loop* {.importc: "loop".}: PLoop
|
||||
typ* {.importc: "type".}: THandleType
|
||||
typ* {.importc: "type".}: HandleType
|
||||
alloc_cb* {.importc: "alloc_cb".}: AllocProc
|
||||
read_cb* {.importc: "read_cb".}: ReadProc
|
||||
read2_cb* {.importc: "read2_cb".}: ReadProc2
|
||||
@@ -172,20 +172,20 @@ type
|
||||
data* {.importc: "data".}: pointer
|
||||
write_queue_size* {.importc: "write_queue_size".}: csize
|
||||
|
||||
PStream* = ptr TStream
|
||||
PStream* = ptr Stream
|
||||
|
||||
TWrite* {.pure, final, importc: "uv_write_t", header: "uv.h".} = object
|
||||
typ* {.importc: "type".}: TReqType
|
||||
Write* {.pure, final, importc: "uv_write_t", header: "uv.h".} = object
|
||||
typ* {.importc: "type".}: ReqType
|
||||
data* {.importc: "data".}: pointer
|
||||
cb* {.importc: "cb".}: WriteProc
|
||||
send_handle* {.importc: "send_handle".}: PStream
|
||||
handle* {.importc: "handle".}: PStream
|
||||
|
||||
PWrite* = ptr TWrite
|
||||
PWrite* = ptr Write
|
||||
|
||||
TTcp* {.pure, final, importc: "uv_tcp_t", header: "uv.h".} = object
|
||||
loop* {.importc: "loop".}: PLoop
|
||||
typ* {.importc: "type".}: THandleType
|
||||
typ* {.importc: "type".}: HandleType
|
||||
alloc_cb* {.importc: "alloc_cb".}: AllocProc
|
||||
read_cb* {.importc: "read_cb".}: ReadProc
|
||||
read2_cb* {.importc: "read2_cb".}: ReadProc2
|
||||
@@ -195,42 +195,42 @@ type
|
||||
|
||||
PTcp* = ptr TTcp
|
||||
|
||||
TConnect* {.pure, final, importc: "uv_connect_t", header: "uv.h".} = object
|
||||
typ* {.importc: "type".}: TReqType
|
||||
Connect* {.pure, final, importc: "uv_connect_t", header: "uv.h".} = object
|
||||
typ* {.importc: "type".}: ReqType
|
||||
data* {.importc: "data".}: pointer
|
||||
cb* {.importc: "cb".}: ConnectProc
|
||||
handle* {.importc: "handle".}: PStream
|
||||
|
||||
PConnect* = ptr TConnect
|
||||
PConnect* = ptr Connect
|
||||
|
||||
TUdpFlags* = enum
|
||||
UdpFlags* = enum
|
||||
UDP_IPV6ONLY = 1, UDP_PARTIAL = 2
|
||||
|
||||
## XXX: better import this
|
||||
cunsigned = int
|
||||
|
||||
UdpSendProc* = proc (req: PUdpSend, status: cint)
|
||||
UdpRecvProc* = proc (handle: PUdp, nread: cssize, buf: TBuf, adr: ptr SockAddr, flags: cunsigned)
|
||||
UdpRecvProc* = proc (handle: PUdp, nread: cssize, buf: Buf, adr: ptr SockAddr, flags: cunsigned)
|
||||
|
||||
TUdp* {.pure, final, importc: "uv_udp_t", header: "uv.h".} = object
|
||||
loop* {.importc: "loop".}: PLoop
|
||||
typ* {.importc: "type".}: THandleType
|
||||
typ* {.importc: "type".}: HandleType
|
||||
close_cb* {.importc: "close_cb".}: CloseProc
|
||||
data* {.importc: "data".}: pointer
|
||||
|
||||
PUdp* = ptr TUdp
|
||||
|
||||
TUdpSend* {.pure, final, importc: "uv_udp_send_t", header: "uv.h".} = object
|
||||
typ* {.importc: "type".}: TReqType
|
||||
UdpSend* {.pure, final, importc: "uv_udp_send_t", header: "uv.h".} = object
|
||||
typ* {.importc: "type".}: ReqType
|
||||
data* {.importc: "data".}: pointer
|
||||
handle* {.importc: "handle".}: PUdp
|
||||
cb* {.importc: "cb".}: UdpSendProc
|
||||
|
||||
PUdpSend* = ptr TUdpSend
|
||||
PUdpSend* = ptr UdpSend
|
||||
|
||||
tTTy* {.pure, final, importc: "uv_tty_t", header: "uv.h".} = object
|
||||
loop* {.importc: "loop".}: PLoop
|
||||
typ* {.importc: "type".}: THandleType
|
||||
typ* {.importc: "type".}: HandleType
|
||||
alloc_cb* {.importc: "alloc_cb".}: AllocProc
|
||||
read_cb* {.importc: "read_cb".}: ReadProc
|
||||
read2_cb* {.importc: "read2_cb".}: ReadProc2
|
||||
@@ -240,9 +240,9 @@ type
|
||||
|
||||
pTTy* = ptr tTTy
|
||||
|
||||
TPipe* {.pure, final, importc: "uv_pipe_t", header: "uv.h".} = object
|
||||
Pipe* {.pure, final, importc: "uv_pipe_t", header: "uv.h".} = object
|
||||
loop* {.importc: "loop".}: PLoop
|
||||
typ* {.importc: "type".}: THandleType
|
||||
typ* {.importc: "type".}: HandleType
|
||||
alloc_cb* {.importc: "alloc_cb".}: AllocProc
|
||||
read_cb* {.importc: "read_cb".}: ReadProc
|
||||
read2_cb* {.importc: "read2_cb".}: ReadProc2
|
||||
@@ -251,11 +251,11 @@ type
|
||||
write_queue_size* {.importc: "write_queue_size".}: csize
|
||||
ipc {.importc: "ipc".}: int
|
||||
|
||||
PPipe* = ptr TPipe
|
||||
PPipe* = ptr Pipe
|
||||
|
||||
TPrepare* {.pure, final, importc: "uv_prepare_t", header: "uv.h".} = object
|
||||
loop* {.importc: "loop".}: PLoop
|
||||
typ* {.importc: "type".}: THandleType
|
||||
typ* {.importc: "type".}: HandleType
|
||||
close_cb* {.importc: "close_cb".}: CloseProc
|
||||
data* {.importc: "data".}: pointer
|
||||
|
||||
@@ -263,7 +263,7 @@ type
|
||||
|
||||
TCheck* {.pure, final, importc: "uv_check_t", header: "uv.h".} = object
|
||||
loop* {.importc: "loop".}: PLoop
|
||||
typ* {.importc: "type".}: THandleType
|
||||
typ* {.importc: "type".}: HandleType
|
||||
close_cb* {.importc: "close_cb".}: CloseProc
|
||||
data* {.importc: "data".}: pointer
|
||||
|
||||
@@ -271,7 +271,7 @@ type
|
||||
|
||||
TIdle* {.pure, final, importc: "uv_idle_t", header: "uv.h".} = object
|
||||
loop* {.importc: "loop".}: PLoop
|
||||
typ* {.importc: "type".}: THandleType
|
||||
typ* {.importc: "type".}: HandleType
|
||||
close_cb* {.importc: "close_cb".}: CloseProc
|
||||
data* {.importc: "data".}: pointer
|
||||
|
||||
@@ -279,7 +279,7 @@ type
|
||||
|
||||
TAsync* {.pure, final, importc: "uv_async_t", header: "uv.h".} = object
|
||||
loop* {.importc: "loop".}: PLoop
|
||||
typ* {.importc: "type".}: THandleType
|
||||
typ* {.importc: "type".}: HandleType
|
||||
close_cb* {.importc: "close_cb".}: CloseProc
|
||||
data* {.importc: "data".}: pointer
|
||||
|
||||
@@ -287,20 +287,20 @@ type
|
||||
|
||||
TTimer* {.pure, final, importc: "uv_timer_t", header: "uv.h".} = object
|
||||
loop* {.importc: "loop".}: PLoop
|
||||
typ* {.importc: "type".}: THandleType
|
||||
typ* {.importc: "type".}: HandleType
|
||||
close_cb* {.importc: "close_cb".}: CloseProc
|
||||
data* {.importc: "data".}: pointer
|
||||
|
||||
PTimer* = ptr TTimer
|
||||
|
||||
TGetAddrInfo* {.pure, final, importc: "uv_getaddrinfo_t", header: "uv.h".} = object
|
||||
typ* {.importc: "type".}: TReqType
|
||||
GetAddrInfo* {.pure, final, importc: "uv_getaddrinfo_t", header: "uv.h".} = object
|
||||
typ* {.importc: "type".}: ReqType
|
||||
data* {.importc: "data".}: pointer
|
||||
loop* {.importc: "loop".}: PLoop
|
||||
|
||||
PGetAddrInfo* = ptr TGetAddrInfo
|
||||
PGetAddrInfo* = ptr GetAddrInfo
|
||||
|
||||
TProcessOptions* {.pure, final, importc: "uv_process_options_t", header: "uv.h".} = object
|
||||
ProcessOptions* {.pure, final, importc: "uv_process_options_t", header: "uv.h".} = object
|
||||
exit_cb* {.importc: "exit_cb".}: ExitProc
|
||||
file* {.importc: "file".}: cstring
|
||||
args* {.importc: "args".}: cstringArray
|
||||
@@ -311,11 +311,11 @@ type
|
||||
stdout_stream* {.importc: "stdout_stream".}: PPipe
|
||||
stderr_stream* {.importc: "stderr_stream".}: PPipe
|
||||
|
||||
PProcessOptions* = ptr TProcessOptions
|
||||
PProcessOptions* = ptr ProcessOptions
|
||||
|
||||
TProcess* {.pure, final, importc: "uv_process_t", header: "uv.h".} = object
|
||||
loop* {.importc: "loop".}: PLoop
|
||||
typ* {.importc: "type".}: THandleType
|
||||
typ* {.importc: "type".}: HandleType
|
||||
close_cb* {.importc: "close_cb".}: CloseProc
|
||||
data* {.importc: "data".}: pointer
|
||||
exit_cb* {.importc: "exit_cb".}: ExitProc
|
||||
@@ -323,47 +323,47 @@ type
|
||||
|
||||
PProcess* = ptr TProcess
|
||||
|
||||
TWork* {.pure, final, importc: "uv_work_t", header: "uv.h".} = object
|
||||
typ* {.importc: "type".}: TReqType
|
||||
Work* {.pure, final, importc: "uv_work_t", header: "uv.h".} = object
|
||||
typ* {.importc: "type".}: ReqType
|
||||
data* {.importc: "data".}: pointer
|
||||
loop* {.importc: "loop".}: PLoop
|
||||
work_cb* {.importc: "work_cb".}: WorkProc
|
||||
after_work_cb* {.importc: "after_work_cb".}: AfterWorkProc
|
||||
|
||||
PWork* = ptr TWork
|
||||
PWork* = ptr Work
|
||||
|
||||
TFsType* {.size: sizeof(cint).} = enum
|
||||
FsType* {.size: sizeof(cint).} = enum
|
||||
FS_UNKNOWN = - 1, FS_CUSTOM, FS_OPEN, FS_CLOSE, FS_READ, FS_WRITE,
|
||||
FS_SENDFILE, FS_STAT, FS_LSTAT, FS_FSTAT, FS_FTRUNCATE, FS_UTIME, FS_FUTIME,
|
||||
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
|
||||
typ* {.importc: "type".}: TReqType
|
||||
FS* {.pure, final, importc: "uv_fs_t", header: "uv.h".} = object
|
||||
typ* {.importc: "type".}: ReqType
|
||||
data* {.importc: "data".}: pointer
|
||||
loop* {.importc: "loop".}: PLoop
|
||||
fs_type* {.importc: "fs_type".}: TFsType
|
||||
fs_type* {.importc: "fs_type".}: FsType
|
||||
cb* {.importc: "cb".}: FsProc
|
||||
result* {.importc: "result".}: cssize
|
||||
fsPtr* {.importc: "ptr".}: pointer
|
||||
path* {.importc: "path".}: cstring
|
||||
errorno* {.importc: "errorno".}: cint
|
||||
|
||||
PFS* = ptr TFS
|
||||
PFS* = ptr FS
|
||||
|
||||
TReq* {.pure, final, importc: "uv_req_t", header: "uv.h".} = object
|
||||
typ* {.importc: "type".}: TReqType
|
||||
Req* {.pure, final, importc: "uv_req_t", header: "uv.h".} = object
|
||||
typ* {.importc: "type".}: ReqType
|
||||
data* {.importc: "data".}: pointer
|
||||
|
||||
PReq* = ptr TReq
|
||||
PReq* = ptr Req
|
||||
|
||||
TAresOptions* {.pure, final, importc: "ares_options", header: "uv.h".} = object
|
||||
AresOptions* {.pure, final, importc: "ares_options", header: "uv.h".} = object
|
||||
flags* {.importc: "flags".}: int
|
||||
timeout* {.importc: "timeout".}: int
|
||||
tries* {.importc: "tries".}: int
|
||||
ndots* {.importc: "ndots".}: int
|
||||
udp_port* {.importc: "udp_port".}: TPort
|
||||
tcp_port* {.importc: "tcp_port".}: TPort
|
||||
udp_port* {.importc: "udp_port".}: Port
|
||||
tcp_port* {.importc: "tcp_port".}: Port
|
||||
socket_send_buffer_size* {.importc: "socket_send_buffer_size".}: int
|
||||
socket_recv_buffer_size* {.importc: "socket_receive_buffer_size".}: int
|
||||
servers* {.importc: "servers".}: ptr InAddr
|
||||
@@ -378,8 +378,30 @@ type
|
||||
#struct apattern *sortlist;
|
||||
#int nsort;
|
||||
|
||||
PAresOptions* = ptr TAresOptions
|
||||
PAresOptions* = ptr AresOptions
|
||||
PAresChannel* = pointer
|
||||
{.deprecated: [THandle: Handle, THandleType: HandleType, TAnyHandle: AnyHandle,
|
||||
TAnyReq: AnyReq, TPort: Port, TErrorCode: ErrorCode, TReqType: ReqType,
|
||||
TErr: Err, TFsEventType: FsEventType,
|
||||
# TFsEvent: FsEvent, # Name conflict if we drop `T`
|
||||
TFsEvents: FsEvents, TBuf: Buf, TCounters: Counters, TLoop: Loop,
|
||||
TShutdown: Shutdown, TStream: Stream, TWrite: Write,
|
||||
# TTcp: Tcp, # Name conflict if we drop `T`
|
||||
TConnect: Connect,
|
||||
TUdpFlags: UdpFlags,
|
||||
# TUdp: Udp, # Name conflict if we drop `T`
|
||||
TUdpSend: UdpSend,
|
||||
# tTTy: TTy, # Name conflict if we drop `T`
|
||||
TPipe: Pipe,
|
||||
# TPrepare: Prepare, # Name conflict if we drop `T`
|
||||
# TCheck: Check, # Name conflict if we drop `T`
|
||||
# TIdle: Idle, # Name conflict if we drop `T`
|
||||
# TAsync: Async, # Name conflict if we drop `T`
|
||||
# TTimer: Timer, # Name conflict if we drop `T`
|
||||
TGetAddrInfo: GetAddrInfo, TProcessOptions: ProcessOptions,
|
||||
# TProcess: Process, # Name conflict if we drop `T`
|
||||
TWork: Work,
|
||||
TFsType: FsType, TFS: FS, TReq: Req, TAresOptions: AresOptions].}
|
||||
|
||||
proc loop_new*(): PLoop{.
|
||||
importc: "uv_loop_new", header: "uv.h".}
|
||||
@@ -405,13 +427,13 @@ proc update_time*(a2: PLoop){.
|
||||
proc now*(a2: PLoop): int64{.
|
||||
importc: "uv_now", header: "uv.h".}
|
||||
|
||||
proc last_error*(a2: PLoop): TErr{.
|
||||
proc last_error*(a2: PLoop): Err{.
|
||||
importc: "uv_last_error", header: "uv.h".}
|
||||
|
||||
proc strerror*(err: TErr): cstring{.
|
||||
proc strerror*(err: Err): cstring{.
|
||||
importc: "uv_strerror", header: "uv.h".}
|
||||
|
||||
proc err_name*(err: TErr): cstring{.
|
||||
proc err_name*(err: Err): cstring{.
|
||||
importc: "uv_err_name", header: "uv.h".}
|
||||
|
||||
proc shutdown*(req: PShutdown, handle: PStream, cb: ShutdownProc): cint{.
|
||||
@@ -423,7 +445,7 @@ proc is_active*(handle: PHandle): cint{.
|
||||
proc close*(handle: PHandle, close_cb: CloseProc){.
|
||||
importc: "uv_close", header: "uv.h".}
|
||||
|
||||
proc buf_init*(base: cstring, len: csize): TBuf{.
|
||||
proc buf_init*(base: cstring, len: csize): Buf{.
|
||||
importc: "uv_buf_init", header: "uv.h".}
|
||||
|
||||
proc listen*(stream: PStream, backlog: cint, cb: ConnectionProc): cint{.
|
||||
@@ -441,10 +463,10 @@ proc read_start*(a2: PStream, alloc_cb: AllocProc, read_cb: ReadProc2): cint{.
|
||||
proc read_stop*(a2: PStream): cint{.
|
||||
importc: "uv_read_stop", header: "uv.h".}
|
||||
|
||||
proc write*(req: PWrite, handle: PStream, bufs: ptr TBuf, bufcnt: cint, cb: WriteProc): cint{.
|
||||
proc write*(req: PWrite, handle: PStream, bufs: ptr Buf, bufcnt: cint, cb: WriteProc): cint{.
|
||||
importc: "uv_write", header: "uv.h".}
|
||||
|
||||
proc write*(req: PWrite, handle: PStream, bufs: ptr TBuf, bufcnt: cint, send_handle: PStream, cb: WriteProc): cint{.
|
||||
proc write*(req: PWrite, handle: PStream, bufs: ptr Buf, bufcnt: cint, send_handle: PStream, cb: WriteProc): cint{.
|
||||
importc: "uv_write2", header: "uv.h".}
|
||||
|
||||
proc tcp_init*(a2: PLoop, handle: PTcp): cint{.
|
||||
@@ -480,10 +502,10 @@ proc udp_bind6*(handle: PUdp, adr: TSockAddrIn6, flags: cunsigned): cint{.
|
||||
proc udp_getsockname*(handle: PUdp, name: ptr SockAddr, namelen: var cint): cint{.
|
||||
importc: "uv_udp_getsockname", header: "uv.h".}
|
||||
|
||||
proc udp_send*(req: PUdpSend, handle: PUdp, bufs: ptr TBuf, bufcnt: cint, adr: SockAddrIn, send_cb: UdpSendProc): cint{.
|
||||
proc udp_send*(req: PUdpSend, handle: PUdp, bufs: ptr Buf, bufcnt: cint, adr: SockAddrIn, send_cb: UdpSendProc): cint{.
|
||||
importc: "uv_udp_send", header: "uv.h".}
|
||||
|
||||
proc udp_send6*(req: PUdpSend, handle: PUdp, bufs: ptr TBuf, bufcnt: cint, adr: TSockAddrIn6, send_cb: UdpSendProc): cint{.
|
||||
proc udp_send6*(req: PUdpSend, handle: PUdp, bufs: ptr Buf, bufcnt: cint, adr: TSockAddrIn6, send_cb: UdpSendProc): cint{.
|
||||
importc: "uv_udp_send6", header: "uv.h".}
|
||||
|
||||
proc udp_recv_start*(handle: PUdp, alloc_cb: AllocProc, recv_cb: UdpRecvProc): cint{.
|
||||
@@ -504,7 +526,7 @@ proc tty_get_winsize*(a2: pTTy, width: var cint, height: var cint): cint{.
|
||||
proc tty_reset_mode*() {.
|
||||
importc: "uv_tty_reset_mode", header: "uv.h".}
|
||||
|
||||
proc guess_handle*(file: File): THandleType{.
|
||||
proc guess_handle*(file: File): HandleType{.
|
||||
importc: "uv_guess_handle", header: "uv.h".}
|
||||
|
||||
proc pipe_init*(a2: PLoop, handle: PPipe, ipc: int): cint{.
|
||||
@@ -582,7 +604,7 @@ proc getaddrinfo*(a2: PLoop, handle: PGetAddrInfo,getaddrinfo_cb: GetAddrInfoPro
|
||||
proc freeaddrinfo*(ai: ptr AddrInfo){.
|
||||
importc: "uv_freeaddrinfo", header: "uv.h".}
|
||||
|
||||
proc spawn*(a2: PLoop, a3: PProcess, options: TProcessOptions): cint{.
|
||||
proc spawn*(a2: PLoop, a3: PProcess, options: ProcessOptions): cint{.
|
||||
importc: "uv_spawn", header: "uv.h".}
|
||||
|
||||
proc process_kill*(a2: PProcess, signum: cint): cint{.
|
||||
|
||||
@@ -51,7 +51,7 @@ const
|
||||
SERVICENAME* = "MySQL"
|
||||
|
||||
type
|
||||
Tenum_server_command* = enum
|
||||
Enum_server_command* = enum
|
||||
COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST, COM_CREATE_DB,
|
||||
COM_DROP_DB, COM_REFRESH, COM_SHUTDOWN, COM_STATISTICS, COM_PROCESS_INFO,
|
||||
COM_CONNECT, COM_PROCESS_KILL, COM_DEBUG, COM_PING, COM_TIME,
|
||||
@@ -59,6 +59,7 @@ type
|
||||
COM_CONNECT_OUT, COM_REGISTER_SLAVE, COM_STMT_PREPARE, COM_STMT_EXECUTE,
|
||||
COM_STMT_SEND_LONG_DATA, COM_STMT_CLOSE, COM_STMT_RESET, COM_SET_OPTION,
|
||||
COM_STMT_FETCH, COM_END
|
||||
{.deprecated: [Tenum_server_command: Enum_server_command].}
|
||||
|
||||
const
|
||||
SCRAMBLE_LENGTH* = 20 # Length of random string sent by server on handshake;
|
||||
@@ -150,8 +151,8 @@ const
|
||||
MAX_BLOB_WIDTH* = 8192 # Default width for blob
|
||||
|
||||
type
|
||||
Pst_net* = ptr Tst_net
|
||||
Tst_net*{.final.} = object
|
||||
Pst_net* = ptr St_net
|
||||
St_net*{.final.} = object
|
||||
vio*: PVio
|
||||
buff*: cstring
|
||||
buff_end*: cstring
|
||||
@@ -191,14 +192,15 @@ type
|
||||
report_error*: my_bool # We should report error (we have unreported error)
|
||||
return_errno*: my_bool
|
||||
|
||||
TNET* = Tst_net
|
||||
PNET* = ptr TNET
|
||||
NET* = St_net
|
||||
PNET* = ptr NET
|
||||
{.deprecated: [Tst_net: St_net, TNET: NET].}
|
||||
|
||||
const
|
||||
packet_error* = - 1
|
||||
|
||||
type
|
||||
Tenum_field_types* = enum # For backward compatibility
|
||||
Enum_field_types* = enum # For backward compatibility
|
||||
TYPE_DECIMAL, TYPE_TINY, TYPE_SHORT, TYPE_LONG, TYPE_FLOAT, TYPE_DOUBLE,
|
||||
TYPE_NULL, TYPE_TIMESTAMP, TYPE_LONGLONG, TYPE_INT24, TYPE_DATE, TYPE_TIME,
|
||||
TYPE_DATETIME, TYPE_YEAR, TYPE_NEWDATE, TYPE_VARCHAR, TYPE_BIT,
|
||||
@@ -206,6 +208,7 @@ type
|
||||
TYPE_TINY_BLOB = 249, TYPE_MEDIUM_BLOB = 250, TYPE_LONG_BLOB = 251,
|
||||
TYPE_BLOB = 252, TYPE_VAR_STRING = 253, TYPE_STRING = 254,
|
||||
TYPE_GEOMETRY = 255
|
||||
{.deprecated: [Tenum_field_types: Enum_field_types].}
|
||||
|
||||
const
|
||||
CLIENT_MULTI_QUERIES* = CLIENT_MULTI_STATEMENTS
|
||||
@@ -244,16 +247,19 @@ const
|
||||
SHUTDOWN_KILLABLE_UPDATE* = chr(1 shl 3)
|
||||
|
||||
type
|
||||
Tenum_shutdown_level* = enum
|
||||
Enum_shutdown_level* = enum
|
||||
SHUTDOWN_DEFAULT = 0, SHUTDOWN_WAIT_CONNECTIONS = 1,
|
||||
SHUTDOWN_WAIT_TRANSACTIONS = 2, SHUTDOWN_WAIT_UPDATES = 8,
|
||||
SHUTDOWN_WAIT_ALL_BUFFERS = 16, SHUTDOWN_WAIT_CRITICAL_BUFFERS = 17,
|
||||
KILL_QUERY = 254, KILL_CONNECTION = 255
|
||||
Tenum_cursor_type* = enum # options for mysql_set_option
|
||||
Enum_cursor_type* = enum # options for mysql_set_option
|
||||
CURSOR_TYPE_NO_CURSOR = 0, CURSOR_TYPE_READ_ONLY = 1,
|
||||
CURSOR_TYPE_FOR_UPDATE = 2, CURSOR_TYPE_SCROLLABLE = 4
|
||||
Tenum_mysql_set_option* = enum
|
||||
Enum_mysql_set_option* = enum
|
||||
OPTION_MULTI_STATEMENTS_ON, OPTION_MULTI_STATEMENTS_OFF
|
||||
{.deprecated: [Tenum_shutdown_level: Enum_shutdown_level,
|
||||
Tenum_cursor_type: Enum_cursor_type,
|
||||
Tenum_mysql_set_option: Enum_mysql_set_option].}
|
||||
|
||||
proc my_net_init*(net: PNET, vio: PVio): my_bool{.cdecl, dynlib: lib,
|
||||
importc: "my_net_init".}
|
||||
@@ -275,24 +281,25 @@ proc my_net_read*(net: PNET): int{.cdecl, dynlib: lib, importc: "my_net_read".}
|
||||
# The following function is not meant for normal usage
|
||||
# Currently it's used internally by manager.c
|
||||
type
|
||||
Psockaddr* = ptr Tsockaddr
|
||||
Tsockaddr*{.final.} = object # undefined structure
|
||||
Psockaddr* = ptr Sockaddr
|
||||
Sockaddr*{.final.} = object # undefined structure
|
||||
{.deprecated: [Tsockaddr: Sockaddr].}
|
||||
|
||||
proc my_connect*(s: my_socket, name: Psockaddr, namelen: cuint, timeout: cuint): cint{.
|
||||
cdecl, dynlib: lib, importc: "my_connect".}
|
||||
type
|
||||
Prand_struct* = ptr Trand_struct
|
||||
Trand_struct*{.final.} = object # The following is for user defined functions
|
||||
Prand_struct* = ptr Rand_struct
|
||||
Rand_struct*{.final.} = object # The following is for user defined functions
|
||||
seed1*: int
|
||||
seed2*: int
|
||||
max_value*: int
|
||||
max_value_dbl*: cdouble
|
||||
|
||||
TItem_result* = enum
|
||||
Item_result* = enum
|
||||
STRING_RESULT, REAL_RESULT, INT_RESULT, ROW_RESULT, DECIMAL_RESULT
|
||||
PItem_result* = ptr TItem_result
|
||||
Pst_udf_args* = ptr Tst_udf_args
|
||||
Tst_udf_args*{.final.} = object
|
||||
PItem_result* = ptr Item_result
|
||||
Pst_udf_args* = ptr St_udf_args
|
||||
St_udf_args*{.final.} = object
|
||||
arg_count*: cuint # Number of arguments
|
||||
arg_type*: PItem_result # Pointer to item_results
|
||||
args*: cstringArray # Pointer to item_results
|
||||
@@ -301,18 +308,21 @@ type
|
||||
attributes*: cstringArray # Pointer to attribute name
|
||||
attribute_lengths*: ptr int # Length of attribute arguments
|
||||
|
||||
TUDF_ARGS* = Tst_udf_args
|
||||
PUDF_ARGS* = ptr TUDF_ARGS # This holds information about the result
|
||||
Pst_udf_init* = ptr Tst_udf_init
|
||||
Tst_udf_init*{.final.} = object
|
||||
UDF_ARGS* = St_udf_args
|
||||
PUDF_ARGS* = ptr UDF_ARGS # This holds information about the result
|
||||
Pst_udf_init* = ptr St_udf_init
|
||||
St_udf_init*{.final.} = object
|
||||
maybe_null*: my_bool # 1 if function can return NULL
|
||||
decimals*: cuint # for real functions
|
||||
max_length*: int # For string functions
|
||||
theptr*: cstring # free pointer for function data
|
||||
const_item*: my_bool # free pointer for function data
|
||||
|
||||
TUDF_INIT* = Tst_udf_init
|
||||
PUDF_INIT* = ptr TUDF_INIT # Constants when using compression
|
||||
UDF_INIT* = St_udf_init
|
||||
PUDF_INIT* = ptr UDF_INIT # Constants when using compression
|
||||
{.deprecated: [Trand_stuct: Rand_struct, TItem_result: Item_result,
|
||||
Tst_udf_args: St_udf_args, TUDF_ARGS: UDF_ARGS,
|
||||
Tst_udf_init: St_udf_init, TUDF_INIT: UDF_INIT].}
|
||||
|
||||
const
|
||||
NET_HEADER_SIZE* = 4 # standard header size
|
||||
@@ -386,8 +396,8 @@ const
|
||||
CLIENT_NET_WRITE_TIMEOUT* = 365 * 24 * 3600 # Timeout on write
|
||||
|
||||
type
|
||||
Pst_mysql_field* = ptr Tst_mysql_field
|
||||
Tst_mysql_field*{.final.} = object
|
||||
Pst_mysql_field* = ptr St_mysql_field
|
||||
St_mysql_field*{.final.} = object
|
||||
name*: cstring # Name of column
|
||||
org_name*: cstring # Original column name, if an alias
|
||||
table*: cstring # Table of column if column was a field
|
||||
@@ -407,19 +417,21 @@ type
|
||||
flags*: cuint # Div flags
|
||||
decimals*: cuint # Number of decimals in field
|
||||
charsetnr*: cuint # Character set
|
||||
ftype*: Tenum_field_types # Type of field. See mysql_com.h for types
|
||||
ftype*: Enum_field_types # Type of field. See mysql_com.h for types
|
||||
|
||||
TFIELD* = Tst_mysql_field
|
||||
PFIELD* = ptr TFIELD
|
||||
PROW* = ptr TROW # return data as array of strings
|
||||
TROW* = cstringArray
|
||||
PFIELD_OFFSET* = ptr TFIELD_OFFSET # offset to current field
|
||||
TFIELD_OFFSET* = cuint
|
||||
FIELD* = St_mysql_field
|
||||
PFIELD* = ptr FIELD
|
||||
PROW* = ptr ROW # return data as array of strings
|
||||
ROW* = cstringArray
|
||||
PFIELD_OFFSET* = ptr FIELD_OFFSET # offset to current field
|
||||
FIELD_OFFSET* = cuint
|
||||
{.deprecated: [Tst_mysql_field: St_mysql_field, TFIELD: FIELD, TROW: ROW,
|
||||
TFIELD_OFFSET: FIELD_OFFSET].}
|
||||
|
||||
proc IS_PRI_KEY*(n: int32): bool
|
||||
proc IS_NOT_NULL*(n: int32): bool
|
||||
proc IS_BLOB*(n: int32): bool
|
||||
proc IS_NUM*(t: Tenum_field_types): bool
|
||||
proc IS_NUM*(t: Enum_field_types): bool
|
||||
proc INTERNAL_NUM_FIELD*(f: Pst_mysql_field): bool
|
||||
proc IS_NUM_FIELD*(f: Pst_mysql_field): bool
|
||||
type
|
||||
@@ -430,32 +442,34 @@ const
|
||||
COUNT_ERROR* = not (my_ulonglong(0))
|
||||
|
||||
type
|
||||
Pst_mysql_rows* = ptr Tst_mysql_rows
|
||||
Tst_mysql_rows*{.final.} = object
|
||||
Pst_mysql_rows* = ptr St_mysql_rows
|
||||
St_mysql_rows*{.final.} = object
|
||||
next*: Pst_mysql_rows # list of rows
|
||||
data*: TROW
|
||||
data*: ROW
|
||||
len*: int
|
||||
|
||||
TROWS* = Tst_mysql_rows
|
||||
PROWS* = ptr TROWS
|
||||
PROW_OFFSET* = ptr TROW_OFFSET # offset to current row
|
||||
TROW_OFFSET* = TROWS
|
||||
ROWS* = St_mysql_rows
|
||||
PROWS* = ptr ROWS
|
||||
PROW_OFFSET* = ptr ROW_OFFSET # offset to current row
|
||||
ROW_OFFSET* = ROWS
|
||||
{.deprecated: [Tst_mysql_rows: St_mysql_rows, TROWS: ROWS,
|
||||
TROW_OFFSET: ROW_OFFSET].}
|
||||
|
||||
const
|
||||
ALLOC_MAX_BLOCK_TO_DROP* = 4096
|
||||
ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP* = 10 # struct for once_alloc (block)
|
||||
|
||||
type
|
||||
Pst_used_mem* = ptr Tst_used_mem
|
||||
Tst_used_mem*{.final.} = object
|
||||
Pst_used_mem* = ptr St_used_mem
|
||||
St_used_mem*{.final.} = object
|
||||
next*: Pst_used_mem # Next block in use
|
||||
left*: cuint # memory left in block
|
||||
size*: cuint # size of block
|
||||
|
||||
TUSED_MEM* = Tst_used_mem
|
||||
PUSED_MEM* = ptr TUSED_MEM
|
||||
Pst_mem_root* = ptr Tst_mem_root
|
||||
Tst_mem_root*{.final.} = object
|
||||
USED_MEM* = St_used_mem
|
||||
PUSED_MEM* = ptr USED_MEM
|
||||
Pst_mem_root* = ptr St_mem_root
|
||||
St_mem_root*{.final.} = object
|
||||
free*: PUSED_MEM # blocks with free memory in it
|
||||
used*: PUSED_MEM # blocks almost without free memory
|
||||
pre_alloc*: PUSED_MEM # preallocated block
|
||||
@@ -467,27 +481,30 @@ type
|
||||
first_block_usage*: cuint
|
||||
error_handler*: proc (){.cdecl.}
|
||||
|
||||
TMEM_ROOT* = Tst_mem_root
|
||||
PMEM_ROOT* = ptr TMEM_ROOT # ------------ Stop of declaration in "my_alloc.h" ----------------------
|
||||
MEM_ROOT* = St_mem_root
|
||||
PMEM_ROOT* = ptr MEM_ROOT # ------------ Stop of declaration in "my_alloc.h" ----------------------
|
||||
{.deprecated: [Tst_used_mem: St_used_mem, TUSED_MEM: USED_MEM,
|
||||
Tst_mem_root: St_mem_root, TMEM_ROOT: MEM_ROOT].}
|
||||
|
||||
type
|
||||
Pst_mysql_data* = ptr Tst_mysql_data
|
||||
Tst_mysql_data*{.final.} = object
|
||||
Pst_mysql_data* = ptr St_mysql_data
|
||||
St_mysql_data*{.final.} = object
|
||||
rows*: my_ulonglong
|
||||
fields*: cuint
|
||||
data*: PROWS
|
||||
alloc*: TMEM_ROOT
|
||||
alloc*: MEM_ROOT
|
||||
prev_ptr*: ptr PROWS
|
||||
|
||||
TDATA* = Tst_mysql_data
|
||||
PDATA* = ptr TDATA
|
||||
Toption* = enum
|
||||
DATA* = St_mysql_data
|
||||
PDATA* = ptr DATA
|
||||
Option* = enum
|
||||
OPT_CONNECT_TIMEOUT, OPT_COMPRESS, OPT_NAMED_PIPE, INIT_COMMAND,
|
||||
READ_DEFAULT_FILE, READ_DEFAULT_GROUP, SET_CHARSET_DIR, SET_CHARSET_NAME,
|
||||
OPT_LOCAL_INFILE, OPT_PROTOCOL, SHARED_MEMORY_BASE_NAME, OPT_READ_TIMEOUT,
|
||||
OPT_WRITE_TIMEOUT, OPT_USE_RESULT, OPT_USE_REMOTE_CONNECTION,
|
||||
OPT_USE_EMBEDDED_CONNECTION, OPT_GUESS_CONNECTION, SET_CLIENT_IP,
|
||||
SECURE_AUTH, REPORT_DATA_TRUNCATION, OPT_RECONNECT
|
||||
{.deprecated: [Tst_mysql_data: St_mysql_data, TDATA: DATA, Toption: Option].}
|
||||
|
||||
const
|
||||
MAX_MYSQL_MANAGER_ERR* = 256
|
||||
@@ -499,17 +516,17 @@ const
|
||||
MANAGER_INTERNAL_ERR* = 500
|
||||
|
||||
type
|
||||
Tst_dynamic_array*{.final.} = object
|
||||
St_dynamic_array*{.final.} = object
|
||||
buffer*: cstring
|
||||
elements*: cuint
|
||||
max_element*: cuint
|
||||
alloc_increment*: cuint
|
||||
size_of_element*: cuint
|
||||
|
||||
TDYNAMIC_ARRAY* = Tst_dynamic_array
|
||||
Pst_dynamic_array* = ptr Tst_dynamic_array
|
||||
Pst_mysql_options* = ptr Tst_mysql_options
|
||||
Tst_mysql_options*{.final.} = object
|
||||
DYNAMIC_ARRAY* = St_dynamic_array
|
||||
Pst_dynamic_array* = ptr St_dynamic_array
|
||||
Pst_mysql_options* = ptr St_mysql_options
|
||||
St_mysql_options*{.final.} = object
|
||||
connect_timeout*: cuint
|
||||
read_timeout*: cuint
|
||||
write_timeout*: cuint
|
||||
@@ -543,7 +560,7 @@ type
|
||||
# a read that is replication-aware
|
||||
no_master_reads*: my_bool
|
||||
separate_thread*: my_bool
|
||||
methods_to_use*: Toption
|
||||
methods_to_use*: Option
|
||||
client_ip*: cstring
|
||||
secure_auth*: my_bool # Refuse client connecting to server if it uses old (pre-4.1.1) protocol
|
||||
report_data_truncation*: my_bool # 0 - never report, 1 - always report (default)
|
||||
@@ -555,16 +572,16 @@ type
|
||||
local_infile_error*: proc (para1: pointer, para2: cstring, para3: cuint): cint
|
||||
local_infile_userdata*: pointer
|
||||
|
||||
Tstatus* = enum
|
||||
Status* = enum
|
||||
STATUS_READY, STATUS_GET_RESULT, STATUS_USE_RESULT
|
||||
Tprotocol_type* = enum # There are three types of queries - the ones that have to go to
|
||||
Protocol_type* = enum # There are three types of queries - the ones that have to go to
|
||||
# the master, the ones that go to a slave, and the administrative
|
||||
# type which must happen on the pivot connectioin
|
||||
PROTOCOL_DEFAULT, PROTOCOL_TCP, PROTOCOL_SOCKET, PROTOCOL_PIPE,
|
||||
PROTOCOL_MEMORY
|
||||
Trpl_type* = enum
|
||||
Rpl_type* = enum
|
||||
RPL_MASTER, RPL_SLAVE, RPL_ADMIN
|
||||
Tcharset_info_st*{.final.} = object
|
||||
Charset_info_st*{.final.} = object
|
||||
number*: cuint
|
||||
primary_number*: cuint
|
||||
binary_number*: cuint
|
||||
@@ -592,10 +609,10 @@ type
|
||||
cset*: pointer # was ^MY_CHARSET_HANDLER
|
||||
coll*: pointer # was ^MY_COLLATION_HANDLER;
|
||||
|
||||
TCHARSET_INFO* = Tcharset_info_st
|
||||
Pcharset_info_st* = ptr Tcharset_info_st
|
||||
Pcharacter_set* = ptr Tcharacter_set
|
||||
Tcharacter_set*{.final.} = object
|
||||
CHARSET_INFO* = Charset_info_st
|
||||
Pcharset_info_st* = ptr Charset_info_st
|
||||
Pcharacter_set* = ptr Character_set
|
||||
Character_set*{.final.} = object
|
||||
number*: cuint
|
||||
state*: cuint
|
||||
csname*: cstring
|
||||
@@ -605,12 +622,12 @@ type
|
||||
mbminlen*: cuint
|
||||
mbmaxlen*: cuint
|
||||
|
||||
TMY_CHARSET_INFO* = Tcharacter_set
|
||||
PMY_CHARSET_INFO* = ptr TMY_CHARSET_INFO
|
||||
Pst_mysql_methods* = ptr Tst_mysql_methods
|
||||
Pst_mysql* = ptr Tst_mysql
|
||||
Tst_mysql*{.final.} = object
|
||||
net*: TNET # Communication parameters
|
||||
MY_CHARSET_INFO* = Character_set
|
||||
PMY_CHARSET_INFO* = ptr MY_CHARSET_INFO
|
||||
Pst_mysql_methods* = ptr St_mysql_methods
|
||||
Pst_mysql* = ptr St_mysql
|
||||
St_mysql*{.final.} = object
|
||||
net*: NET # Communication parameters
|
||||
connector_fd*: gptr # ConnectorFd for SSL
|
||||
host*: cstring
|
||||
user*: cstring
|
||||
@@ -622,7 +639,7 @@ type
|
||||
db*: cstring
|
||||
charset*: Pcharset_info_st
|
||||
fields*: PFIELD
|
||||
field_alloc*: TMEM_ROOT
|
||||
field_alloc*: MEM_ROOT
|
||||
affected_rows*: my_ulonglong
|
||||
insert_id*: my_ulonglong # id if insert on table with NEXTNR
|
||||
extra_info*: my_ulonglong # Used by mysqlshow, not used by mysql 5.0 and up
|
||||
@@ -636,8 +653,8 @@ type
|
||||
server_status*: cuint
|
||||
server_language*: cuint
|
||||
warning_count*: cuint
|
||||
options*: Tst_mysql_options
|
||||
status*: Tstatus
|
||||
options*: St_mysql_options
|
||||
status*: Status
|
||||
free_me*: my_bool # If free in mysql_close
|
||||
reconnect*: my_bool # set to 1 if automatic reconnect
|
||||
scramble*: array[0..(SCRAMBLE_LENGTH + 1) - 1, char] # session-wide random string
|
||||
@@ -655,37 +672,37 @@ type
|
||||
# from mysql_stmt_close if close had to cancel result set of this object.
|
||||
unbuffered_fetch_owner*: Pmy_bool
|
||||
|
||||
TMySQL* = Tst_mysql
|
||||
PMySQL* = ptr TMySQL
|
||||
Pst_mysql_res* = ptr Tst_mysql_res
|
||||
Tst_mysql_res*{.final.} = object
|
||||
MySQL* = St_mysql
|
||||
PMySQL* = ptr MySQL
|
||||
Pst_mysql_res* = ptr St_mysql_res
|
||||
St_mysql_res*{.final.} = object
|
||||
row_count*: my_ulonglong
|
||||
fields*: PFIELD
|
||||
data*: PDATA
|
||||
data_cursor*: PROWS
|
||||
lengths*: ptr int # column lengths of current row
|
||||
handle*: PMySQL # for unbuffered reads
|
||||
field_alloc*: TMEM_ROOT
|
||||
field_alloc*: MEM_ROOT
|
||||
field_count*: cuint
|
||||
current_field*: cuint
|
||||
row*: TROW # If unbuffered read
|
||||
current_row*: TROW # buffer to current row
|
||||
row*: ROW # If unbuffered read
|
||||
current_row*: ROW # buffer to current row
|
||||
eof*: my_bool # Used by mysql_fetch_row
|
||||
unbuffered_fetch_cancelled*: my_bool # mysql_stmt_close() had to cancel this result
|
||||
methods*: Pst_mysql_methods
|
||||
|
||||
TRES* = Tst_mysql_res
|
||||
PRES* = ptr TRES
|
||||
Pst_mysql_stmt* = ptr Tst_mysql_stmt
|
||||
PSTMT* = ptr TSTMT
|
||||
Tst_mysql_methods*{.final.} = object
|
||||
RES* = St_mysql_res
|
||||
PRES* = ptr RES
|
||||
Pst_mysql_stmt* = ptr St_mysql_stmt
|
||||
PSTMT* = ptr STMT
|
||||
St_mysql_methods*{.final.} = object
|
||||
read_query_result*: proc (MySQL: PMySQL): my_bool{.cdecl.}
|
||||
advanced_command*: proc (MySQL: PMySQL, command: Tenum_server_command, header: cstring,
|
||||
advanced_command*: proc (MySQL: PMySQL, command: Enum_server_command, header: cstring,
|
||||
header_length: int, arg: cstring, arg_length: int,
|
||||
skip_check: my_bool): my_bool
|
||||
read_rows*: proc (MySQL: PMySQL, fields: PFIELD, fields_count: cuint): PDATA
|
||||
use_result*: proc (MySQL: PMySQL): PRES
|
||||
fetch_lengths*: proc (fto: ptr int, column: TROW, field_count: cuint)
|
||||
fetch_lengths*: proc (fto: ptr int, column: ROW, field_count: cuint)
|
||||
flush_use_result*: proc (MySQL: PMySQL)
|
||||
list_fields*: proc (MySQL: PMySQL): PFIELD
|
||||
read_prepare_result*: proc (MySQL: PMySQL, stmt: PSTMT): my_bool
|
||||
@@ -698,11 +715,11 @@ type
|
||||
read_change_user_result*: proc (MySQL: PMySQL, buff: cstring, passwd: cstring): cint
|
||||
read_rowsfrom_cursor*: proc (stmt: PSTMT): cint
|
||||
|
||||
TMETHODS* = Tst_mysql_methods
|
||||
PMETHODS* = ptr TMETHODS
|
||||
Pst_mysql_manager* = ptr Tst_mysql_manager
|
||||
Tst_mysql_manager*{.final.} = object
|
||||
net*: TNET
|
||||
METHODS* = St_mysql_methods
|
||||
PMETHODS* = ptr METHODS
|
||||
Pst_mysql_manager* = ptr St_mysql_manager
|
||||
St_mysql_manager*{.final.} = object
|
||||
net*: NET
|
||||
host*: cstring
|
||||
user*: cstring
|
||||
passwd*: cstring
|
||||
@@ -717,24 +734,24 @@ type
|
||||
net_buf_size*: cint
|
||||
last_error*: array[0..(MAX_MYSQL_MANAGER_ERR) - 1, char]
|
||||
|
||||
TMANAGER* = Tst_mysql_manager
|
||||
PMANAGER* = ptr TMANAGER
|
||||
Pst_mysql_parameters* = ptr Tst_mysql_parameters
|
||||
Tst_mysql_parameters*{.final.} = object
|
||||
MANAGER* = St_mysql_manager
|
||||
PMANAGER* = ptr MANAGER
|
||||
Pst_mysql_parameters* = ptr St_mysql_parameters
|
||||
St_mysql_parameters*{.final.} = object
|
||||
p_max_allowed_packet*: ptr int
|
||||
p_net_buffer_length*: ptr int
|
||||
|
||||
TPARAMETERS* = Tst_mysql_parameters
|
||||
PPARAMETERS* = ptr TPARAMETERS
|
||||
Tenum_mysql_stmt_state* = enum
|
||||
PARAMETERS* = St_mysql_parameters
|
||||
PPARAMETERS* = ptr PARAMETERS
|
||||
Enum_mysql_stmt_state* = enum
|
||||
STMT_INIT_DONE = 1, STMT_PREPARE_DONE, STMT_EXECUTE_DONE, STMT_FETCH_DONE
|
||||
Pst_mysql_bind* = ptr Tst_mysql_bind
|
||||
Tst_mysql_bind*{.final.} = object
|
||||
Pst_mysql_bind* = ptr St_mysql_bind
|
||||
St_mysql_bind*{.final.} = object
|
||||
len*: int # output length pointer
|
||||
is_null*: Pmy_bool # Pointer to null indicator
|
||||
buffer*: pointer # buffer to get/put data
|
||||
error*: PMy_bool # set this if you want to track data truncations happened during fetch
|
||||
buffer_type*: Tenum_field_types # buffer type
|
||||
buffer_type*: Enum_field_types # buffer type
|
||||
buffer_length*: int # buffer length, must be set for str/binary
|
||||
# Following are for internal use. Set by mysql_stmt_bind_param
|
||||
row_ptr*: ptr byte # for the current data position
|
||||
@@ -750,15 +767,15 @@ type
|
||||
fetch_result*: proc (para1: Pst_mysql_bind, para2: PFIELD, row: PPbyte)
|
||||
skip_result*: proc (para1: Pst_mysql_bind, para2: PFIELD, row: PPbyte)
|
||||
|
||||
TBIND* = Tst_mysql_bind
|
||||
PBIND* = ptr TBIND # statement handler
|
||||
Tst_mysql_stmt*{.final.} = object
|
||||
mem_root*: TMEM_ROOT # root allocations
|
||||
BIND* = St_mysql_bind
|
||||
PBIND* = ptr BIND # statement handler
|
||||
St_mysql_stmt*{.final.} = object
|
||||
mem_root*: MEM_ROOT # root allocations
|
||||
mysql*: PMySQL # connection handle
|
||||
params*: PBIND # input parameters
|
||||
`bind`*: PBIND # input parameters
|
||||
fields*: PFIELD # result set metadata
|
||||
result*: TDATA # cached result set
|
||||
result*: DATA # cached result set
|
||||
data_cursor*: PROWS # current row in cached result
|
||||
affected_rows*: my_ulonglong # copy of mysql->affected_rows after statement execution
|
||||
insert_id*: my_ulonglong
|
||||
@@ -771,7 +788,7 @@ type
|
||||
last_errno*: cuint # error code
|
||||
param_count*: cuint # input parameter count
|
||||
field_count*: cuint # number of columns in result set
|
||||
state*: Tenum_mysql_stmt_state # statement state
|
||||
state*: Enum_mysql_stmt_state # statement state
|
||||
last_error*: array[0..(ERRMSG_SIZE) - 1, char] # error message
|
||||
sqlstate*: array[0..(SQLSTATE_LENGTH + 1) - 1, char]
|
||||
send_types_to_server*: my_bool # Types of input parameters should be sent to server
|
||||
@@ -780,10 +797,23 @@ type
|
||||
unbuffered_fetch_cancelled*: my_bool
|
||||
update_max_length*: my_bool
|
||||
|
||||
TSTMT* = Tst_mysql_stmt
|
||||
STMT* = St_mysql_stmt
|
||||
|
||||
Tenum_stmt_attr_type* = enum
|
||||
Enum_stmt_attr_type* = enum
|
||||
STMT_ATTR_UPDATE_MAX_LENGTH, STMT_ATTR_CURSOR_TYPE, STMT_ATTR_PREFETCH_ROWS
|
||||
{.deprecated: [Tst_dynamic_array: St_dynamic_array, Tst_mysql_options: St_mysql_options,
|
||||
TDYNAMIC_ARRAY: DYNAMIC_ARRAY, Tprotocol_type: Protocol_type,
|
||||
Trpl_type: Rpl_type, Tcharset_info_st: Charset_info_st,
|
||||
TCHARSET_INFO: CHARSET_INFO, Tcharacter_set: Character_set,
|
||||
TMY_CHARSET_INFO: MY_CHARSET_INFO, Tst_mysql: St_mysql,
|
||||
Tst_mysql_methods: St_mysql_methods, TMySql: MySql,
|
||||
Tst_mysql_res: St_mysql_res, TMETHODS: METHODS, TRES: RES,
|
||||
Tst_mysql_manager: St_mysql_manager, TMANAGER: MANAGER,
|
||||
Tst_mysql_parameters: St_mysql_parameters, TPARAMETERS: PARAMETERS,
|
||||
Tenum_mysql_stmt_state: Enum_mysql_stmt_state,
|
||||
Tst_mysql_bind: St_mysql_bind, TBIND: BIND, Tst_mysql_stmt: St_mysql_stmt,
|
||||
TSTMT: STMT, Tenum_stmt_attr_type: Enum_stmt_attr_type,
|
||||
Tstatus: Status].}
|
||||
|
||||
proc server_init*(argc: cint, argv: cstringArray, groups: cstringArray): cint{.
|
||||
cdecl, dynlib: lib, importc: "mysql_server_init".}
|
||||
@@ -817,9 +847,9 @@ proc fetch_field_direct*(res: PRES, fieldnr: cuint): PFIELD{.stdcall,
|
||||
dynlib: lib, importc: "mysql_fetch_field_direct".}
|
||||
proc fetch_fields*(res: PRES): PFIELD{.stdcall, dynlib: lib,
|
||||
importc: "mysql_fetch_fields".}
|
||||
proc row_tell*(res: PRES): TROW_OFFSET{.stdcall, dynlib: lib,
|
||||
proc row_tell*(res: PRES): ROW_OFFSET{.stdcall, dynlib: lib,
|
||||
importc: "mysql_row_tell".}
|
||||
proc field_tell*(res: PRES): TFIELD_OFFSET{.stdcall, dynlib: lib,
|
||||
proc field_tell*(res: PRES): FIELD_OFFSET{.stdcall, dynlib: lib,
|
||||
importc: "mysql_field_tell".}
|
||||
proc field_count*(MySQL: PMySQL): cuint{.stdcall, dynlib: lib,
|
||||
importc: "mysql_field_count".}
|
||||
@@ -895,7 +925,7 @@ proc disable_reads_from_master*(MySQL: PMySQL){.stdcall, dynlib: lib, importc: "
|
||||
# get the value of the master read flag
|
||||
proc reads_from_master_enabled*(MySQL: PMySQL): my_bool{.stdcall, dynlib: lib,
|
||||
importc: "mysql_reads_from_master_enabled".}
|
||||
proc rpl_query_type*(q: cstring, length: cint): Trpl_type{.stdcall, dynlib: lib,
|
||||
proc rpl_query_type*(q: cstring, length: cint): Rpl_type{.stdcall, dynlib: lib,
|
||||
importc: "mysql_rpl_query_type".}
|
||||
# discover the master and its slaves
|
||||
proc rpl_probe*(MySQL: PMySQL): my_bool{.stdcall, dynlib: lib, importc: "mysql_rpl_probe".}
|
||||
@@ -904,14 +934,14 @@ proc set_master*(MySQL: PMySQL, host: cstring, port: cuint, user: cstring, passw
|
||||
stdcall, dynlib: lib, importc: "mysql_set_master".}
|
||||
proc add_slave*(MySQL: PMySQL, host: cstring, port: cuint, user: cstring, passwd: cstring): cint{.
|
||||
stdcall, dynlib: lib, importc: "mysql_add_slave".}
|
||||
proc shutdown*(MySQL: PMySQL, shutdown_level: Tenum_shutdown_level): cint{.stdcall,
|
||||
proc shutdown*(MySQL: PMySQL, shutdown_level: Enum_shutdown_level): cint{.stdcall,
|
||||
dynlib: lib, importc: "mysql_shutdown".}
|
||||
proc dump_debug_info*(MySQL: PMySQL): cint{.stdcall, dynlib: lib,
|
||||
importc: "mysql_dump_debug_info".}
|
||||
proc refresh*(sql: PMySQL, refresh_options: cuint): cint{.stdcall, dynlib: lib,
|
||||
importc: "mysql_refresh".}
|
||||
proc kill*(MySQL: PMySQL, pid: int): cint{.stdcall, dynlib: lib, importc: "mysql_kill".}
|
||||
proc set_server_option*(MySQL: PMySQL, option: Tenum_mysql_set_option): cint{.stdcall,
|
||||
proc set_server_option*(MySQL: PMySQL, option: Enum_mysql_set_option): cint{.stdcall,
|
||||
dynlib: lib, importc: "mysql_set_server_option".}
|
||||
proc ping*(MySQL: PMySQL): cint{.stdcall, dynlib: lib, importc: "mysql_ping".}
|
||||
proc stat*(MySQL: PMySQL): cstring{.stdcall, dynlib: lib, importc: "mysql_stat".}
|
||||
@@ -933,17 +963,17 @@ proc list_tables*(MySQL: PMySQL, wild: cstring): PRES{.stdcall, dynlib: lib,
|
||||
importc: "mysql_list_tables".}
|
||||
proc list_processes*(MySQL: PMySQL): PRES{.stdcall, dynlib: lib,
|
||||
importc: "mysql_list_processes".}
|
||||
proc options*(MySQL: PMySQL, option: Toption, arg: cstring): cint{.stdcall, dynlib: lib,
|
||||
proc options*(MySQL: PMySQL, option: Option, arg: cstring): cint{.stdcall, dynlib: lib,
|
||||
importc: "mysql_options".}
|
||||
proc free_result*(result: PRES){.stdcall, dynlib: lib,
|
||||
importc: "mysql_free_result".}
|
||||
proc data_seek*(result: PRES, offset: my_ulonglong){.stdcall, dynlib: lib,
|
||||
importc: "mysql_data_seek".}
|
||||
proc row_seek*(result: PRES, offset: TROW_OFFSET): TROW_OFFSET{.stdcall,
|
||||
proc row_seek*(result: PRES, offset: ROW_OFFSET): ROW_OFFSET{.stdcall,
|
||||
dynlib: lib, importc: "mysql_row_seek".}
|
||||
proc field_seek*(result: PRES, offset: TFIELD_OFFSET): TFIELD_OFFSET{.stdcall,
|
||||
proc field_seek*(result: PRES, offset: FIELD_OFFSET): FIELD_OFFSET{.stdcall,
|
||||
dynlib: lib, importc: "mysql_field_seek".}
|
||||
proc fetch_row*(result: PRES): TROW{.stdcall, dynlib: lib,
|
||||
proc fetch_row*(result: PRES): ROW{.stdcall, dynlib: lib,
|
||||
importc: "mysql_fetch_row".}
|
||||
proc fetch_lengths*(result: PRES): ptr int{.stdcall, dynlib: lib,
|
||||
importc: "mysql_fetch_lengths".}
|
||||
@@ -990,9 +1020,9 @@ proc stmt_store_result*(stmt: PSTMT): cint{.stdcall, dynlib: lib,
|
||||
importc: "mysql_stmt_store_result".}
|
||||
proc stmt_param_count*(stmt: PSTMT): int{.stdcall, dynlib: lib,
|
||||
importc: "mysql_stmt_param_count".}
|
||||
proc stmt_attr_set*(stmt: PSTMT, attr_type: Tenum_stmt_attr_type, attr: pointer): my_bool{.
|
||||
proc stmt_attr_set*(stmt: PSTMT, attr_type: Enum_stmt_attr_type, attr: pointer): my_bool{.
|
||||
stdcall, dynlib: lib, importc: "mysql_stmt_attr_set".}
|
||||
proc stmt_attr_get*(stmt: PSTMT, attr_type: Tenum_stmt_attr_type, attr: pointer): my_bool{.
|
||||
proc stmt_attr_get*(stmt: PSTMT, attr_type: Enum_stmt_attr_type, attr: pointer): my_bool{.
|
||||
stdcall, dynlib: lib, importc: "mysql_stmt_attr_get".}
|
||||
proc stmt_bind_param*(stmt: PSTMT, bnd: PBIND): my_bool{.stdcall, dynlib: lib,
|
||||
importc: "mysql_stmt_bind_param".}
|
||||
@@ -1017,9 +1047,9 @@ proc stmt_error*(stmt: PSTMT): cstring{.stdcall, dynlib: lib,
|
||||
importc: "mysql_stmt_error".}
|
||||
proc stmt_sqlstate*(stmt: PSTMT): cstring{.stdcall, dynlib: lib,
|
||||
importc: "mysql_stmt_sqlstate".}
|
||||
proc stmt_row_seek*(stmt: PSTMT, offset: TROW_OFFSET): TROW_OFFSET{.stdcall,
|
||||
proc stmt_row_seek*(stmt: PSTMT, offset: ROW_OFFSET): ROW_OFFSET{.stdcall,
|
||||
dynlib: lib, importc: "mysql_stmt_row_seek".}
|
||||
proc stmt_row_tell*(stmt: PSTMT): TROW_OFFSET{.stdcall, dynlib: lib,
|
||||
proc stmt_row_tell*(stmt: PSTMT): ROW_OFFSET{.stdcall, dynlib: lib,
|
||||
importc: "mysql_stmt_row_tell".}
|
||||
proc stmt_data_seek*(stmt: PSTMT, offset: my_ulonglong){.stdcall, dynlib: lib,
|
||||
importc: "mysql_stmt_data_seek".}
|
||||
@@ -1066,7 +1096,7 @@ proc IS_BLOB(n: int32): bool =
|
||||
proc IS_NUM_FIELD(f: Pst_mysql_field): bool =
|
||||
result = (f.flags and NUM_FLAG) != 0
|
||||
|
||||
proc IS_NUM(t: Tenum_field_types): bool =
|
||||
proc IS_NUM(t: Enum_field_types): bool =
|
||||
result = (t <= FIELD_TYPE_INT24) or (t == FIELD_TYPE_YEAR) or
|
||||
(t == FIELD_TYPE_NEWDECIMAL)
|
||||
|
||||
|
||||
@@ -30,28 +30,39 @@ else:
|
||||
type
|
||||
TSqlChar* = char
|
||||
TSqlSmallInt* = int16
|
||||
TSqlUSmallInt* = int16
|
||||
TSqlHandle* = pointer
|
||||
TSqlHEnv* = TSqlHandle
|
||||
TSqlHDBC* = TSqlHandle
|
||||
TSqlHStmt* = TSqlHandle
|
||||
TSqlHDesc* = TSqlHandle
|
||||
SqlUSmallInt* = int16
|
||||
SqlHandle* = pointer
|
||||
SqlHEnv* = SqlHandle
|
||||
SqlHDBC* = SqlHandle
|
||||
SqlHStmt* = SqlHandle
|
||||
SqlHDesc* = SqlHandle
|
||||
TSqlInteger* = int
|
||||
TSqlUInteger* = int
|
||||
TSqlPointer* = pointer
|
||||
SqlUInteger* = int
|
||||
SqlPointer* = pointer
|
||||
TSqlReal* = cfloat
|
||||
TSqlDouble* = cdouble
|
||||
TSqlFloat* = cdouble
|
||||
TSqlHWND* = pointer
|
||||
SqlHWND* = pointer
|
||||
PSQLCHAR* = cstring
|
||||
PSQLINTEGER* = ptr TSqlInteger
|
||||
PSQLUINTEGER* = ptr TSqlUInteger
|
||||
PSQLUINTEGER* = ptr SqlUInteger
|
||||
PSQLSMALLINT* = ptr TSqlSmallInt
|
||||
PSQLUSMALLINT* = ptr TSqlUSmallInt
|
||||
PSQLUSMALLINT* = ptr SqlUSmallInt
|
||||
PSQLREAL* = ptr TSqlReal
|
||||
PSQLDOUBLE* = ptr TSqlDouble
|
||||
PSQLFLOAT* = ptr TSqlFloat
|
||||
PSQLHANDLE* = ptr TSqlHandle
|
||||
PSQLHANDLE* = ptr SqlHandle
|
||||
{.deprecated: [
|
||||
# TSqlChar: TSqlChar, # Name conflict if we drop`T`
|
||||
# TSqlSmallInt: TSqlSmallInt, # Name conflict if we drop`T`
|
||||
TSqlUSmallInt: SqlUSmallInt, TSqlHandle: SqlHandle, TSqlHEnv: SqlHEnv,
|
||||
TSqlHDBC: SqlHDBC, TSqlHStmt: SqlHStmt, TSqlHDesc: SqlHDesc,
|
||||
# TSqlInteger: TSqlInteger, # Name conflict if we drop `T`
|
||||
TSqlUInteger: SqlUInteger, TSqlPointer: SqlPointer,
|
||||
# TSqlReal: TSqlReal, # Name conflict if we drop`T`
|
||||
# TSqlDouble: TSqlDouble, # Name conflict if we drop`T`
|
||||
# TSqlFloat: TSqlFloat, # Name conflict if we drop `T`
|
||||
TSqlHWND: SqlHWND].}
|
||||
|
||||
const # SQL data type codes
|
||||
SQL_UNKNOWN_TYPE* = 0
|
||||
@@ -199,24 +210,24 @@ const
|
||||
type
|
||||
SQL_DATE_STRUCT* {.final, pure.} = object
|
||||
Year*: TSqlSmallInt
|
||||
Month*: TSqlUSmallInt
|
||||
Day*: TSqlUSmallInt
|
||||
Month*: SqlUSmallInt
|
||||
Day*: SqlUSmallInt
|
||||
|
||||
PSQL_DATE_STRUCT* = ptr SQL_DATE_STRUCT
|
||||
SQL_TIME_STRUCT* {.final, pure.} = object
|
||||
Hour*: TSqlUSmallInt
|
||||
Minute*: TSqlUSmallInt
|
||||
Second*: TSqlUSmallInt
|
||||
Hour*: SqlUSmallInt
|
||||
Minute*: SqlUSmallInt
|
||||
Second*: SqlUSmallInt
|
||||
|
||||
PSQL_TIME_STRUCT* = ptr SQL_TIME_STRUCT
|
||||
SQL_TIMESTAMP_STRUCT* {.final, pure.} = object
|
||||
Year*: TSqlUSmallInt
|
||||
Month*: TSqlUSmallInt
|
||||
Day*: TSqlUSmallInt
|
||||
Hour*: TSqlUSmallInt
|
||||
Minute*: TSqlUSmallInt
|
||||
Second*: TSqlUSmallInt
|
||||
Fraction*: TSqlUInteger
|
||||
Year*: SqlUSmallInt
|
||||
Month*: SqlUSmallInt
|
||||
Day*: SqlUSmallInt
|
||||
Hour*: SqlUSmallInt
|
||||
Minute*: SqlUSmallInt
|
||||
Second*: SqlUSmallInt
|
||||
Fraction*: SqlUInteger
|
||||
|
||||
PSQL_TIMESTAMP_STRUCT* = ptr SQL_TIMESTAMP_STRUCT
|
||||
|
||||
@@ -509,11 +520,11 @@ const
|
||||
SQL_FETCH_PRIOR* = 4
|
||||
SQL_FETCH_ABSOLUTE* = 5
|
||||
SQL_FETCH_RELATIVE* = 6
|
||||
SQL_NULL_HENV* = TSqlHEnv(nil)
|
||||
SQL_NULL_HDBC* = TSqlHDBC(nil)
|
||||
SQL_NULL_HSTMT* = TSqlHStmt(nil)
|
||||
SQL_NULL_HDESC* = TSqlHDesc(nil) #* null handle used in place of parent handle when allocating HENV */
|
||||
SQL_NULL_HANDLE* = TSqlHandle(nil) #* Values that may appear in the result set of SQLSpecialColumns() */
|
||||
SQL_NULL_HENV* = SqlHEnv(nil)
|
||||
SQL_NULL_HDBC* = SqlHDBC(nil)
|
||||
SQL_NULL_HSTMT* = SqlHStmt(nil)
|
||||
SQL_NULL_HDESC* = SqlHDesc(nil) #* null handle used in place of parent handle when allocating HENV */
|
||||
SQL_NULL_HANDLE* = SqlHandle(nil) #* Values that may appear in the result set of SQLSpecialColumns() */
|
||||
SQL_SCOPE_CURROW* = 0
|
||||
SQL_SCOPE_TRANSACTION* = 1
|
||||
SQL_SCOPE_SESSION* = 2 #* Column types and scopes in SQLSpecialColumns. */
|
||||
@@ -622,167 +633,167 @@ const
|
||||
ODBC_CONFIG_SYS_DSN* = 5
|
||||
ODBC_REMOVE_SYS_DSN* = 6
|
||||
|
||||
proc SQLAllocHandle*(HandleType: TSqlSmallInt, InputHandle: TSqlHandle,
|
||||
OutputHandlePtr: var TSqlHandle): TSqlSmallInt{.
|
||||
proc SQLAllocHandle*(HandleType: TSqlSmallInt, InputHandle: SqlHandle,
|
||||
OutputHandlePtr: var SqlHandle): TSqlSmallInt{.
|
||||
dynlib: odbclib, importc.}
|
||||
proc SQLSetEnvAttr*(EnvironmentHandle: TSqlHEnv, Attribute: TSqlInteger,
|
||||
Value: TSqlPointer, StringLength: TSqlInteger): TSqlSmallInt{.
|
||||
proc SQLSetEnvAttr*(EnvironmentHandle: SqlHEnv, Attribute: TSqlInteger,
|
||||
Value: SqlPointer, StringLength: TSqlInteger): TSqlSmallInt{.
|
||||
dynlib: odbclib, importc.}
|
||||
proc SQLGetEnvAttr*(EnvironmentHandle: TSqlHEnv, Attribute: TSqlInteger,
|
||||
Value: TSqlPointer, BufferLength: TSqlInteger,
|
||||
proc SQLGetEnvAttr*(EnvironmentHandle: SqlHEnv, Attribute: TSqlInteger,
|
||||
Value: SqlPointer, BufferLength: TSqlInteger,
|
||||
StringLength: PSQLINTEGER): TSqlSmallInt{.dynlib: odbclib,
|
||||
importc.}
|
||||
proc SQLFreeHandle*(HandleType: TSqlSmallInt, Handle: TSqlHandle): TSqlSmallInt{.
|
||||
proc SQLFreeHandle*(HandleType: TSqlSmallInt, Handle: SqlHandle): TSqlSmallInt{.
|
||||
dynlib: odbclib, importc.}
|
||||
proc SQLGetDiagRec*(HandleType: TSqlSmallInt, Handle: TSqlHandle,
|
||||
proc SQLGetDiagRec*(HandleType: TSqlSmallInt, Handle: SqlHandle,
|
||||
RecNumber: TSqlSmallInt, Sqlstate: PSQLCHAR,
|
||||
NativeError: var TSqlInteger, MessageText: PSQLCHAR,
|
||||
BufferLength: TSqlSmallInt, TextLength: var TSqlSmallInt): TSqlSmallInt{.
|
||||
dynlib: odbclib, importc.}
|
||||
proc SQLGetDiagField*(HandleType: TSqlSmallInt, Handle: TSqlHandle,
|
||||
proc SQLGetDiagField*(HandleType: TSqlSmallInt, Handle: SqlHandle,
|
||||
RecNumber: TSqlSmallInt, DiagIdentifier: TSqlSmallInt,
|
||||
DiagInfoPtr: TSqlPointer, BufferLength: TSqlSmallInt,
|
||||
DiagInfoPtr: SqlPointer, BufferLength: TSqlSmallInt,
|
||||
StringLengthPtr: var TSqlSmallInt): TSqlSmallInt{.
|
||||
dynlib: odbclib, importc.}
|
||||
proc SQLConnect*(ConnectionHandle: TSqlHDBC, ServerName: PSQLCHAR,
|
||||
proc SQLConnect*(ConnectionHandle: SqlHDBC, ServerName: PSQLCHAR,
|
||||
NameLength1: TSqlSmallInt, UserName: PSQLCHAR,
|
||||
NameLength2: TSqlSmallInt, Authentication: PSQLCHAR,
|
||||
NameLength3: TSqlSmallInt): TSqlSmallInt{.dynlib: odbclib, importc.}
|
||||
proc SQLDisconnect*(ConnectionHandle: TSqlHDBC): TSqlSmallInt{.dynlib: odbclib,
|
||||
proc SQLDisconnect*(ConnectionHandle: SqlHDBC): TSqlSmallInt{.dynlib: odbclib,
|
||||
importc.}
|
||||
proc SQLDriverConnect*(hdbc: TSqlHDBC, hwnd: TSqlHWND, szCsin: cstring,
|
||||
proc SQLDriverConnect*(hdbc: SqlHDBC, hwnd: SqlHWND, szCsin: cstring,
|
||||
szCLen: TSqlSmallInt, szCsout: cstring,
|
||||
cbCSMax: TSqlSmallInt, cbCsOut: var TSqlSmallInt,
|
||||
f: TSqlUSmallInt): TSqlSmallInt{.dynlib: odbclib, importc.}
|
||||
proc SQLBrowseConnect*(hdbc: TSqlHDBC, szConnStrIn: PSQLCHAR,
|
||||
f: SqlUSmallInt): TSqlSmallInt{.dynlib: odbclib, importc.}
|
||||
proc SQLBrowseConnect*(hdbc: SqlHDBC, szConnStrIn: PSQLCHAR,
|
||||
cbConnStrIn: TSqlSmallInt, szConnStrOut: PSQLCHAR,
|
||||
cbConnStrOutMax: TSqlSmallInt,
|
||||
cbConnStrOut: var TSqlSmallInt): TSqlSmallInt{.
|
||||
dynlib: odbclib, importc.}
|
||||
proc SQLExecDirect*(StatementHandle: TSqlHStmt, StatementText: PSQLCHAR,
|
||||
proc SQLExecDirect*(StatementHandle: SqlHStmt, StatementText: PSQLCHAR,
|
||||
TextLength: TSqlInteger): TSqlSmallInt{.dynlib: odbclib, importc.}
|
||||
proc SQLPrepare*(StatementHandle: TSqlHStmt, StatementText: PSQLCHAR,
|
||||
proc SQLPrepare*(StatementHandle: SqlHStmt, StatementText: PSQLCHAR,
|
||||
TextLength: TSqlInteger): TSqlSmallInt{.dynlib: odbclib, importc.}
|
||||
proc SQLCloseCursor*(StatementHandle: TSqlHStmt): TSqlSmallInt{.dynlib: odbclib,
|
||||
proc SQLCloseCursor*(StatementHandle: SqlHStmt): TSqlSmallInt{.dynlib: odbclib,
|
||||
importc.}
|
||||
proc SQLExecute*(StatementHandle: TSqlHStmt): TSqlSmallInt{.dynlib: odbclib, importc.}
|
||||
proc SQLFetch*(StatementHandle: TSqlHStmt): TSqlSmallInt{.dynlib: odbclib, importc.}
|
||||
proc SQLNumResultCols*(StatementHandle: TSqlHStmt, ColumnCount: var TSqlSmallInt): TSqlSmallInt{.
|
||||
proc SQLExecute*(StatementHandle: SqlHStmt): TSqlSmallInt{.dynlib: odbclib, importc.}
|
||||
proc SQLFetch*(StatementHandle: SqlHStmt): TSqlSmallInt{.dynlib: odbclib, importc.}
|
||||
proc SQLNumResultCols*(StatementHandle: SqlHStmt, ColumnCount: var TSqlSmallInt): TSqlSmallInt{.
|
||||
dynlib: odbclib, importc.}
|
||||
proc SQLDescribeCol*(StatementHandle: TSqlHStmt, ColumnNumber: TSqlUSmallInt,
|
||||
proc SQLDescribeCol*(StatementHandle: SqlHStmt, ColumnNumber: SqlUSmallInt,
|
||||
ColumnName: PSQLCHAR, BufferLength: TSqlSmallInt,
|
||||
NameLength: var TSqlSmallInt, DataType: var TSqlSmallInt,
|
||||
ColumnSize: var TSqlUInteger,
|
||||
ColumnSize: var SqlUInteger,
|
||||
DecimalDigits: var TSqlSmallInt, Nullable: var TSqlSmallInt): TSqlSmallInt{.
|
||||
dynlib: odbclib, importc.}
|
||||
proc SQLFetchScroll*(StatementHandle: TSqlHStmt, FetchOrientation: TSqlSmallInt,
|
||||
proc SQLFetchScroll*(StatementHandle: SqlHStmt, FetchOrientation: TSqlSmallInt,
|
||||
FetchOffset: TSqlInteger): TSqlSmallInt{.dynlib: odbclib,
|
||||
importc.}
|
||||
proc SQLExtendedFetch*(hstmt: TSqlHStmt, fFetchType: TSqlUSmallInt,
|
||||
proc SQLExtendedFetch*(hstmt: SqlHStmt, fFetchType: SqlUSmallInt,
|
||||
irow: TSqlInteger, pcrow: PSQLUINTEGER,
|
||||
rgfRowStatus: PSQLUSMALLINT): TSqlSmallInt{.dynlib: odbclib,
|
||||
importc.}
|
||||
proc SQLGetData*(StatementHandle: TSqlHStmt, ColumnNumber: TSqlUSmallInt,
|
||||
TargetType: TSqlSmallInt, TargetValue: TSqlPointer,
|
||||
proc SQLGetData*(StatementHandle: SqlHStmt, ColumnNumber: SqlUSmallInt,
|
||||
TargetType: TSqlSmallInt, TargetValue: SqlPointer,
|
||||
BufferLength: TSqlInteger, StrLen_or_Ind: PSQLINTEGER): TSqlSmallInt{.
|
||||
dynlib: odbclib, importc.}
|
||||
proc SQLSetStmtAttr*(StatementHandle: TSqlHStmt, Attribute: TSqlInteger,
|
||||
Value: TSqlPointer, StringLength: TSqlInteger): TSqlSmallInt{.
|
||||
proc SQLSetStmtAttr*(StatementHandle: SqlHStmt, Attribute: TSqlInteger,
|
||||
Value: SqlPointer, StringLength: TSqlInteger): TSqlSmallInt{.
|
||||
dynlib: odbclib, importc.}
|
||||
proc SQLGetStmtAttr*(StatementHandle: TSqlHStmt, Attribute: TSqlInteger,
|
||||
Value: TSqlPointer, BufferLength: TSqlInteger,
|
||||
proc SQLGetStmtAttr*(StatementHandle: SqlHStmt, Attribute: TSqlInteger,
|
||||
Value: SqlPointer, BufferLength: TSqlInteger,
|
||||
StringLength: PSQLINTEGER): TSqlSmallInt{.dynlib: odbclib,
|
||||
importc.}
|
||||
proc SQLGetInfo*(ConnectionHandle: TSqlHDBC, InfoType: TSqlUSmallInt,
|
||||
InfoValue: TSqlPointer, BufferLength: TSqlSmallInt,
|
||||
proc SQLGetInfo*(ConnectionHandle: SqlHDBC, InfoType: SqlUSmallInt,
|
||||
InfoValue: SqlPointer, BufferLength: TSqlSmallInt,
|
||||
StringLength: PSQLSMALLINT): TSqlSmallInt{.dynlib: odbclib,
|
||||
importc.}
|
||||
proc SQLBulkOperations*(StatementHandle: TSqlHStmt, Operation: TSqlSmallInt): TSqlSmallInt{.
|
||||
proc SQLBulkOperations*(StatementHandle: SqlHStmt, Operation: TSqlSmallInt): TSqlSmallInt{.
|
||||
dynlib: odbclib, importc.}
|
||||
proc SQLPutData*(StatementHandle: TSqlHStmt, Data: TSqlPointer,
|
||||
proc SQLPutData*(StatementHandle: SqlHStmt, Data: SqlPointer,
|
||||
StrLen_or_Ind: TSqlInteger): TSqlSmallInt{.dynlib: odbclib, importc.}
|
||||
proc SQLBindCol*(StatementHandle: TSqlHStmt, ColumnNumber: TSqlUSmallInt,
|
||||
TargetType: TSqlSmallInt, TargetValue: TSqlPointer,
|
||||
proc SQLBindCol*(StatementHandle: SqlHStmt, ColumnNumber: SqlUSmallInt,
|
||||
TargetType: TSqlSmallInt, TargetValue: SqlPointer,
|
||||
BufferLength: TSqlInteger, StrLen_or_Ind: PSQLINTEGER): TSqlSmallInt{.
|
||||
dynlib: odbclib, importc.}
|
||||
proc SQLSetPos*(hstmt: TSqlHStmt, irow: TSqlUSmallInt, fOption: TSqlUSmallInt,
|
||||
fLock: TSqlUSmallInt): TSqlSmallInt{.dynlib: odbclib, importc.}
|
||||
proc SQLDataSources*(EnvironmentHandle: TSqlHEnv, Direction: TSqlUSmallInt,
|
||||
proc SQLSetPos*(hstmt: SqlHStmt, irow: SqlUSmallInt, fOption: SqlUSmallInt,
|
||||
fLock: SqlUSmallInt): TSqlSmallInt{.dynlib: odbclib, importc.}
|
||||
proc SQLDataSources*(EnvironmentHandle: SqlHEnv, Direction: SqlUSmallInt,
|
||||
ServerName: PSQLCHAR, BufferLength1: TSqlSmallInt,
|
||||
NameLength1: PSQLSMALLINT, Description: PSQLCHAR,
|
||||
BufferLength2: TSqlSmallInt, NameLength2: PSQLSMALLINT): TSqlSmallInt{.
|
||||
dynlib: odbclib, importc.}
|
||||
proc SQLDrivers*(EnvironmentHandle: TSqlHEnv, Direction: TSqlUSmallInt,
|
||||
proc SQLDrivers*(EnvironmentHandle: SqlHEnv, Direction: SqlUSmallInt,
|
||||
DriverDescription: PSQLCHAR, BufferLength1: TSqlSmallInt,
|
||||
DescriptionLength1: PSQLSMALLINT, DriverAttributes: PSQLCHAR,
|
||||
BufferLength2: TSqlSmallInt, AttributesLength2: PSQLSMALLINT): TSqlSmallInt{.
|
||||
dynlib: odbclib, importc.}
|
||||
proc SQLSetConnectAttr*(ConnectionHandle: TSqlHDBC, Attribute: TSqlInteger,
|
||||
Value: TSqlPointer, StringLength: TSqlInteger): TSqlSmallInt{.
|
||||
proc SQLSetConnectAttr*(ConnectionHandle: SqlHDBC, Attribute: TSqlInteger,
|
||||
Value: SqlPointer, StringLength: TSqlInteger): TSqlSmallInt{.
|
||||
dynlib: odbclib, importc.}
|
||||
proc SQLGetCursorName*(StatementHandle: TSqlHStmt, CursorName: PSQLCHAR,
|
||||
proc SQLGetCursorName*(StatementHandle: SqlHStmt, CursorName: PSQLCHAR,
|
||||
BufferLength: TSqlSmallInt, NameLength: PSQLSMALLINT): TSqlSmallInt{.
|
||||
dynlib: odbclib, importc.}
|
||||
proc SQLSetCursorName*(StatementHandle: TSqlHStmt, CursorName: PSQLCHAR,
|
||||
proc SQLSetCursorName*(StatementHandle: SqlHStmt, CursorName: PSQLCHAR,
|
||||
NameLength: TSqlSmallInt): TSqlSmallInt{.dynlib: odbclib,
|
||||
importc.}
|
||||
proc SQLRowCount*(StatementHandle: TSqlHStmt, RowCount: var TSqlInteger): TSqlSmallInt{.
|
||||
proc SQLRowCount*(StatementHandle: SqlHStmt, RowCount: var TSqlInteger): TSqlSmallInt{.
|
||||
dynlib: odbclib, importc.}
|
||||
proc SQLBindParameter*(hstmt: TSqlHStmt, ipar: TSqlUSmallInt,
|
||||
proc SQLBindParameter*(hstmt: SqlHStmt, ipar: SqlUSmallInt,
|
||||
fParamType: TSqlSmallInt, fCType: TSqlSmallInt,
|
||||
fSqlType: TSqlSmallInt, cbColDef: TSqlUInteger,
|
||||
ibScale: TSqlSmallInt, rgbValue: TSqlPointer,
|
||||
fSqlType: TSqlSmallInt, cbColDef: SqlUInteger,
|
||||
ibScale: TSqlSmallInt, rgbValue: SqlPointer,
|
||||
cbValueMax: TSqlInteger, pcbValue: PSQLINTEGER): TSqlSmallInt{.
|
||||
dynlib: odbclib, importc.}
|
||||
proc SQLFreeStmt*(StatementHandle: TSqlHStmt, Option: TSqlUSmallInt): TSqlSmallInt{.
|
||||
proc SQLFreeStmt*(StatementHandle: SqlHStmt, Option: SqlUSmallInt): TSqlSmallInt{.
|
||||
dynlib: odbclib, importc.}
|
||||
proc SQLColAttribute*(StatementHandle: TSqlHStmt, ColumnNumber: TSqlUSmallInt,
|
||||
FieldIdentifier: TSqlUSmallInt,
|
||||
proc SQLColAttribute*(StatementHandle: SqlHStmt, ColumnNumber: SqlUSmallInt,
|
||||
FieldIdentifier: SqlUSmallInt,
|
||||
CharacterAttribute: PSQLCHAR, BufferLength: TSqlSmallInt,
|
||||
StringLength: PSQLSMALLINT,
|
||||
NumericAttribute: TSqlPointer): TSqlSmallInt{.
|
||||
NumericAttribute: SqlPointer): TSqlSmallInt{.
|
||||
dynlib: odbclib, importc.}
|
||||
proc SQLEndTran*(HandleType: TSqlSmallInt, Handle: TSqlHandle,
|
||||
proc SQLEndTran*(HandleType: TSqlSmallInt, Handle: SqlHandle,
|
||||
CompletionType: TSqlSmallInt): TSqlSmallInt{.dynlib: odbclib,
|
||||
importc.}
|
||||
proc SQLTables*(hstmt: TSqlHStmt, szTableQualifier: PSQLCHAR,
|
||||
proc SQLTables*(hstmt: SqlHStmt, szTableQualifier: PSQLCHAR,
|
||||
cbTableQualifier: TSqlSmallInt, szTableOwner: PSQLCHAR,
|
||||
cbTableOwner: TSqlSmallInt, szTableName: PSQLCHAR,
|
||||
cbTableName: TSqlSmallInt, szTableType: PSQLCHAR,
|
||||
cbTableType: TSqlSmallInt): TSqlSmallInt{.dynlib: odbclib, importc.}
|
||||
proc SQLColumns*(hstmt: TSqlHStmt, szTableQualifier: PSQLCHAR,
|
||||
proc SQLColumns*(hstmt: SqlHStmt, szTableQualifier: PSQLCHAR,
|
||||
cbTableQualifier: TSqlSmallInt, szTableOwner: PSQLCHAR,
|
||||
cbTableOwner: TSqlSmallInt, szTableName: PSQLCHAR,
|
||||
cbTableName: TSqlSmallInt, szColumnName: PSQLCHAR,
|
||||
cbColumnName: TSqlSmallInt): TSqlSmallInt{.dynlib: odbclib, importc.}
|
||||
proc SQLSpecialColumns*(StatementHandle: TSqlHStmt, IdentifierType: TSqlUSmallInt,
|
||||
proc SQLSpecialColumns*(StatementHandle: SqlHStmt, IdentifierType: SqlUSmallInt,
|
||||
CatalogName: PSQLCHAR, NameLength1: TSqlSmallInt,
|
||||
SchemaName: PSQLCHAR, NameLength2: TSqlSmallInt,
|
||||
TableName: PSQLCHAR, NameLength3: TSqlSmallInt,
|
||||
Scope: TSqlUSmallInt,
|
||||
Nullable: TSqlUSmallInt): TSqlSmallInt{.
|
||||
Scope: SqlUSmallInt,
|
||||
Nullable: SqlUSmallInt): TSqlSmallInt{.
|
||||
dynlib: odbclib, importc.}
|
||||
proc SQLProcedures*(hstmt: TSqlHStmt, szTableQualifier: PSQLCHAR,
|
||||
proc SQLProcedures*(hstmt: SqlHStmt, szTableQualifier: PSQLCHAR,
|
||||
cbTableQualifier: TSqlSmallInt, szTableOwner: PSQLCHAR,
|
||||
cbTableOwner: TSqlSmallInt, szTableName: PSQLCHAR,
|
||||
cbTableName: TSqlSmallInt): TSqlSmallInt{.dynlib: odbclib,
|
||||
importc.}
|
||||
proc SQLPrimaryKeys*(hstmt: TSqlHStmt, CatalogName: PSQLCHAR,
|
||||
proc SQLPrimaryKeys*(hstmt: SqlHStmt, CatalogName: PSQLCHAR,
|
||||
NameLength1: TSqlSmallInt, SchemaName: PSQLCHAR,
|
||||
NameLength2: TSqlSmallInt, TableName: PSQLCHAR,
|
||||
NameLength3: TSqlSmallInt): TSqlSmallInt{.dynlib: odbclib,
|
||||
importc.}
|
||||
proc SQLProcedureColumns*(hstmt: TSqlHStmt, CatalogName: PSQLCHAR,
|
||||
proc SQLProcedureColumns*(hstmt: SqlHStmt, CatalogName: PSQLCHAR,
|
||||
NameLength1: TSqlSmallInt, SchemaName: PSQLCHAR,
|
||||
NameLength2: TSqlSmallInt, ProcName: PSQLCHAR,
|
||||
NameLength3: TSqlSmallInt, ColumnName: PSQLCHAR,
|
||||
NameLength4: TSqlSmallInt): TSqlSmallInt{.dynlib: odbclib,
|
||||
importc.}
|
||||
proc SQLStatistics*(hstmt: TSqlHStmt, CatalogName: PSQLCHAR,
|
||||
proc SQLStatistics*(hstmt: SqlHStmt, CatalogName: PSQLCHAR,
|
||||
NameLength1: TSqlSmallInt, SchemaName: PSQLCHAR,
|
||||
NameLength2: TSqlSmallInt, TableName: PSQLCHAR,
|
||||
NameLength3: TSqlSmallInt, Unique: TSqlUSmallInt,
|
||||
Reserved: TSqlUSmallInt): TSqlSmallInt {.
|
||||
NameLength3: TSqlSmallInt, Unique: SqlUSmallInt,
|
||||
Reserved: SqlUSmallInt): TSqlSmallInt {.
|
||||
dynlib: odbclib, importc.}
|
||||
|
||||
{.pop.}
|
||||
|
||||
@@ -406,15 +406,15 @@ type
|
||||
button*: array[0..3 - 1, cshort] # state of each button
|
||||
changes*: cint # flags indicating what has changed with the mouse
|
||||
|
||||
TMEVENT*{.pure, final.} = object
|
||||
MEVENT*{.pure, final.} = object
|
||||
id*: cshort # unused, always 0
|
||||
x*: cint
|
||||
y*: cint
|
||||
z*: cint # x, y same as MOUSE_STATUS; z unused
|
||||
z*: cint # x, y same as TMOUSE_STATUS; z unused
|
||||
bstate*: cunsignedlong # equivalent to changes + button[], but
|
||||
# in the same format as used for mousemask()
|
||||
# in the same format as used for mousemask()
|
||||
|
||||
TWINDOW*{.pure, final.} = object
|
||||
WINDOW*{.pure, final.} = object
|
||||
cury*: cint # current pseudo-cursor
|
||||
curx*: cint
|
||||
maxy*: cint # max window coordinates
|
||||
@@ -439,26 +439,30 @@ type
|
||||
delayms*: cint # milliseconds of delay for getch()
|
||||
parx*: cint
|
||||
pary*: cint # coords relative to parent (0,0)
|
||||
parent*: ptr TWINDOW # subwin's pointer to parent win
|
||||
parent*: ptr WINDOW # subwin's pointer to parent win
|
||||
|
||||
TPANELOBS*{.pure, final.} = object
|
||||
above*: ptr TPANELOBS
|
||||
pan*: ptr TPANEL
|
||||
PANELOBS*{.pure, final.} = object
|
||||
above*: ptr PANELOBS
|
||||
pan*: ptr PANEL
|
||||
|
||||
TPANEL*{.pure, final.} = object
|
||||
win*: ptr TWINDOW
|
||||
PANEL*{.pure, final.} = object
|
||||
win*: ptr WINDOW
|
||||
wstarty*: cint
|
||||
wendy*: cint
|
||||
wstartx*: cint
|
||||
wendx*: cint
|
||||
below*: ptr TPANEL
|
||||
above*: ptr TPANEL
|
||||
below*: ptr PANEL
|
||||
above*: ptr PANEL
|
||||
user*: pointer
|
||||
obscure*: ptr TPANELOBS
|
||||
obscure*: ptr PANELOBS
|
||||
{.deprecated: [
|
||||
#TMOUSE_STATUS: MOUSE_STATUS, # Name conflict when we drop the `T`
|
||||
TMEVENT: MEVENT, TWINDOW: WINDOW,
|
||||
TPANELOBS: PANELOBS, TPANEL:PANEL].}
|
||||
|
||||
when unixOS:
|
||||
type
|
||||
TSCREEN*{.pure, final.} = object
|
||||
SCREEN*{.pure, final.} = object
|
||||
alive*: cunsignedchar # if initscr() called, and not endwin()
|
||||
autocr*: cunsignedchar # if cr -> lf
|
||||
cbreak*: cunsignedchar # if terminal unbuffered
|
||||
@@ -481,7 +485,7 @@ when unixOS:
|
||||
map_mbe_to_key*: cunsignedlong # map mouse buttons to slk
|
||||
mouse_wait*: cint # time to wait (in ms) for a button release after a press
|
||||
slklines*: cint # lines in use by slk_init()
|
||||
slk_winptr*: ptr TWINDOW # window for slk
|
||||
slk_winptr*: ptr WINDOW # window for slk
|
||||
linesrippedoff*: cint # lines ripped off via ripoffline()
|
||||
linesrippedoffontop*: cint # lines ripped off on top via ripoffline()
|
||||
delaytenths*: cint # 1/10ths second to wait block getch() for
|
||||
@@ -499,9 +503,10 @@ when unixOS:
|
||||
sb_cur_y*: cint
|
||||
sb_cur_x*: cint
|
||||
line_color*: cshort # color of line attributes - default -1
|
||||
{.deprecated: [TSCREEN: SCREEN].}
|
||||
else:
|
||||
type
|
||||
TSCREEN*{.pure, final.} = object
|
||||
SCREEN*{.pure, final.} = object
|
||||
alive*: cunsignedchar # if initscr() called, and not endwin()
|
||||
autocr*: cunsignedchar # if cr -> lf
|
||||
cbreak*: cunsignedchar # if terminal unbuffered
|
||||
@@ -524,7 +529,7 @@ else:
|
||||
map_mbe_to_key*: cunsignedlong # map mouse buttons to slk
|
||||
mouse_wait*: cint # time to wait (in ms) for a button release after a press
|
||||
slklines*: cint # lines in use by slk_init()
|
||||
slk_winptr*: ptr TWINDOW # window for slk
|
||||
slk_winptr*: ptr WINDOW # window for slk
|
||||
linesrippedoff*: cint # lines ripped off via ripoffline()
|
||||
linesrippedoffontop*: cint # lines ripped off on top via ripoffline()
|
||||
delaytenths*: cint # 1/10ths second to wait block getch() for
|
||||
@@ -534,14 +539,15 @@ else:
|
||||
return_key_modifiers*: cunsignedchar # TRUE if modifier keys are returned as "real" keys
|
||||
key_code*: cunsignedchar # TRUE if last key is a special key;
|
||||
line_color*: cshort # color of line attributes - default -1
|
||||
{.deprecated: [TSCREEN: SCREEN].}
|
||||
|
||||
var
|
||||
LINES*{.importc: "LINES", dynlib: pdcursesdll.}: cint
|
||||
COLS*{.importc: "COLS", dynlib: pdcursesdll.}: cint
|
||||
stdscr*{.importc: "stdscr", dynlib: pdcursesdll.}: ptr TWINDOW
|
||||
curscr*{.importc: "curscr", dynlib: pdcursesdll.}: ptr TWINDOW
|
||||
SP*{.importc: "SP", dynlib: pdcursesdll.}: ptr TSCREEN
|
||||
Mouse_status*{.importc: "Mouse_status", dynlib: pdcursesdll.}: TMOUSE_STATUS
|
||||
stdscr*{.importc: "stdscr", dynlib: pdcursesdll.}: ptr WINDOW
|
||||
curscr*{.importc: "curscr", dynlib: pdcursesdll.}: ptr WINDOW
|
||||
SP*{.importc: "SP", dynlib: pdcursesdll.}: ptr SCREEN
|
||||
Mouse_status*{.importc: "Mouse_status", dynlib: pdcursesdll.}: MOUSE_STATUS
|
||||
COLORS*{.importc: "COLORS", dynlib: pdcursesdll.}: cint
|
||||
COLOR_PAIRS*{.importc: "COLOR_PAIRS", dynlib: pdcursesdll.}: cint
|
||||
TABSIZE*{.importc: "TABSIZE", dynlib: pdcursesdll.}: cint
|
||||
@@ -690,14 +696,14 @@ proc border*(a2: cunsignedlong; a3: cunsignedlong; a4: cunsignedlong;
|
||||
a5: cunsignedlong; a6: cunsignedlong; a7: cunsignedlong;
|
||||
a8: cunsignedlong; a9: cunsignedlong): cint{.extdecl,
|
||||
importc: "border", dynlib: pdcursesdll.}
|
||||
proc box*(a2: ptr TWINDOW; a3: cunsignedlong; a4: cunsignedlong): cint{.extdecl,
|
||||
proc box*(a2: ptr WINDOW; a3: cunsignedlong; a4: cunsignedlong): cint{.extdecl,
|
||||
importc: "box", dynlib: pdcursesdll.}
|
||||
proc can_change_color*(): cunsignedchar{.extdecl, importc: "can_change_color",
|
||||
dynlib: pdcursesdll.}
|
||||
proc cbreak*(): cint{.extdecl, importc: "cbreak", dynlib: pdcursesdll.}
|
||||
proc chgat*(a2: cint; a3: cunsignedlong; a4: cshort; a5: pointer): cint{.extdecl,
|
||||
importc: "chgat", dynlib: pdcursesdll.}
|
||||
proc clearok*(a2: ptr TWINDOW; a3: cunsignedchar): cint{.extdecl,
|
||||
proc clearok*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl,
|
||||
importc: "clearok", dynlib: pdcursesdll.}
|
||||
proc clear*(): cint{.extdecl, importc: "clear", dynlib: pdcursesdll.}
|
||||
proc clrtobot*(): cint{.extdecl, importc: "clrtobot", dynlib: pdcursesdll.}
|
||||
@@ -706,7 +712,7 @@ proc color_content*(a2: cshort; a3: ptr cshort; a4: ptr cshort; a5: ptr cshort):
|
||||
extdecl, importc: "color_content", dynlib: pdcursesdll.}
|
||||
proc color_set*(a2: cshort; a3: pointer): cint{.extdecl, importc: "color_set",
|
||||
dynlib: pdcursesdll.}
|
||||
proc copywin*(a2: ptr TWINDOW; a3: ptr TWINDOW; a4: cint; a5: cint; a6: cint;
|
||||
proc copywin*(a2: ptr WINDOW; a3: ptr WINDOW; a4: cint; a5: cint; a6: cint;
|
||||
a7: cint; a8: cint; a9: cint; a10: cint): cint{.extdecl,
|
||||
importc: "copywin", dynlib: pdcursesdll.}
|
||||
proc curs_set*(a2: cint): cint{.extdecl, importc: "curs_set", dynlib: pdcursesdll.}
|
||||
@@ -718,14 +724,14 @@ proc delay_output*(a2: cint): cint{.extdecl, importc: "delay_output",
|
||||
dynlib: pdcursesdll.}
|
||||
proc delch*(): cint{.extdecl, importc: "delch", dynlib: pdcursesdll.}
|
||||
proc deleteln*(): cint{.extdecl, importc: "deleteln", dynlib: pdcursesdll.}
|
||||
proc delscreen*(a2: ptr TSCREEN){.extdecl, importc: "delscreen",
|
||||
proc delscreen*(a2: ptr SCREEN){.extdecl, importc: "delscreen",
|
||||
dynlib: pdcursesdll.}
|
||||
proc delwin*(a2: ptr TWINDOW): cint{.extdecl, importc: "delwin",
|
||||
proc delwin*(a2: ptr WINDOW): cint{.extdecl, importc: "delwin",
|
||||
dynlib: pdcursesdll.}
|
||||
proc derwin*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cint; a6: cint): ptr TWINDOW{.
|
||||
proc derwin*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cint; a6: cint): ptr WINDOW{.
|
||||
extdecl, importc: "derwin", dynlib: pdcursesdll.}
|
||||
proc doupdate*(): cint{.extdecl, importc: "doupdate", dynlib: pdcursesdll.}
|
||||
proc dupwin*(a2: ptr TWINDOW): ptr TWINDOW{.extdecl, importc: "dupwin",
|
||||
proc dupwin*(a2: ptr WINDOW): ptr WINDOW{.extdecl, importc: "dupwin",
|
||||
dynlib: pdcursesdll.}
|
||||
proc echochar*(a2: cunsignedlong): cint{.extdecl, importc: "echochar",
|
||||
dynlib: pdcursesdll.}
|
||||
@@ -736,12 +742,12 @@ proc erase*(): cint{.extdecl, importc: "erase", dynlib: pdcursesdll.}
|
||||
proc filter*(){.extdecl, importc: "filter", dynlib: pdcursesdll.}
|
||||
proc flash*(): cint{.extdecl, importc: "flash", dynlib: pdcursesdll.}
|
||||
proc flushinp*(): cint{.extdecl, importc: "flushinp", dynlib: pdcursesdll.}
|
||||
proc getbkgd*(a2: ptr TWINDOW): cunsignedlong{.extdecl, importc: "getbkgd",
|
||||
proc getbkgd*(a2: ptr WINDOW): cunsignedlong{.extdecl, importc: "getbkgd",
|
||||
dynlib: pdcursesdll.}
|
||||
proc getnstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "getnstr",
|
||||
dynlib: pdcursesdll.}
|
||||
proc getstr*(a2: cstring): cint{.extdecl, importc: "getstr", dynlib: pdcursesdll.}
|
||||
proc getwin*(a2: File): ptr TWINDOW{.extdecl, importc: "getwin",
|
||||
proc getwin*(a2: File): ptr WINDOW{.extdecl, importc: "getwin",
|
||||
dynlib: pdcursesdll.}
|
||||
proc halfdelay*(a2: cint): cint{.extdecl, importc: "halfdelay",
|
||||
dynlib: pdcursesdll.}
|
||||
@@ -751,11 +757,11 @@ proc has_ic*(): cunsignedchar{.extdecl, importc: "has_ic", dynlib: pdcursesdll.}
|
||||
proc has_il*(): cunsignedchar{.extdecl, importc: "has_il", dynlib: pdcursesdll.}
|
||||
proc hline*(a2: cunsignedlong; a3: cint): cint{.extdecl, importc: "hline",
|
||||
dynlib: pdcursesdll.}
|
||||
proc idcok*(a2: ptr TWINDOW; a3: cunsignedchar){.extdecl, importc: "idcok",
|
||||
proc idcok*(a2: ptr WINDOW; a3: cunsignedchar){.extdecl, importc: "idcok",
|
||||
dynlib: pdcursesdll.}
|
||||
proc idlok*(a2: ptr TWINDOW; a3: cunsignedchar): cint{.extdecl, importc: "idlok",
|
||||
proc idlok*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl, importc: "idlok",
|
||||
dynlib: pdcursesdll.}
|
||||
proc immedok*(a2: ptr TWINDOW; a3: cunsignedchar){.extdecl, importc: "immedok",
|
||||
proc immedok*(a2: ptr WINDOW; a3: cunsignedchar){.extdecl, importc: "immedok",
|
||||
dynlib: pdcursesdll.}
|
||||
proc inchnstr*(a2: ptr cunsignedlong; a3: cint): cint{.extdecl,
|
||||
importc: "inchnstr", dynlib: pdcursesdll.}
|
||||
@@ -766,7 +772,7 @@ proc init_color*(a2: cshort; a3: cshort; a4: cshort; a5: cshort): cint{.extdecl,
|
||||
importc: "init_color", dynlib: pdcursesdll.}
|
||||
proc init_pair*(a2: cshort; a3: cshort; a4: cshort): cint{.extdecl,
|
||||
importc: "init_pair", dynlib: pdcursesdll.}
|
||||
proc initscr*(): ptr TWINDOW{.extdecl, importc: "initscr", dynlib: pdcursesdll.}
|
||||
proc initscr*(): ptr WINDOW{.extdecl, importc: "initscr", dynlib: pdcursesdll.}
|
||||
proc innstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "innstr",
|
||||
dynlib: pdcursesdll.}
|
||||
proc insch*(a2: cunsignedlong): cint{.extdecl, importc: "insch",
|
||||
@@ -777,21 +783,21 @@ proc insnstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "insnstr",
|
||||
dynlib: pdcursesdll.}
|
||||
proc insstr*(a2: cstring): cint{.extdecl, importc: "insstr", dynlib: pdcursesdll.}
|
||||
proc instr*(a2: cstring): cint{.extdecl, importc: "instr", dynlib: pdcursesdll.}
|
||||
proc intrflush*(a2: ptr TWINDOW; a3: cunsignedchar): cint{.extdecl,
|
||||
proc intrflush*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl,
|
||||
importc: "intrflush", dynlib: pdcursesdll.}
|
||||
proc isendwin*(): cunsignedchar{.extdecl, importc: "isendwin", dynlib: pdcursesdll.}
|
||||
proc is_linetouched*(a2: ptr TWINDOW; a3: cint): cunsignedchar{.extdecl,
|
||||
proc is_linetouched*(a2: ptr WINDOW; a3: cint): cunsignedchar{.extdecl,
|
||||
importc: "is_linetouched", dynlib: pdcursesdll.}
|
||||
proc is_wintouched*(a2: ptr TWINDOW): cunsignedchar{.extdecl,
|
||||
proc is_wintouched*(a2: ptr WINDOW): cunsignedchar{.extdecl,
|
||||
importc: "is_wintouched", dynlib: pdcursesdll.}
|
||||
proc keyname*(a2: cint): cstring{.extdecl, importc: "keyname", dynlib: pdcursesdll.}
|
||||
proc keypad*(a2: ptr TWINDOW; a3: cunsignedchar): cint{.extdecl, importc: "keypad",
|
||||
proc keypad*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl, importc: "keypad",
|
||||
dynlib: pdcursesdll.}
|
||||
proc killchar*(): char{.extdecl, importc: "killchar", dynlib: pdcursesdll.}
|
||||
proc leaveok*(a2: ptr TWINDOW; a3: cunsignedchar): cint{.extdecl,
|
||||
proc leaveok*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl,
|
||||
importc: "leaveok", dynlib: pdcursesdll.}
|
||||
proc longname*(): cstring{.extdecl, importc: "longname", dynlib: pdcursesdll.}
|
||||
proc meta*(a2: ptr TWINDOW; a3: cunsignedchar): cint{.extdecl, importc: "meta",
|
||||
proc meta*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl, importc: "meta",
|
||||
dynlib: pdcursesdll.}
|
||||
proc move*(a2: cint; a3: cint): cint{.extdecl, importc: "move",
|
||||
dynlib: pdcursesdll.}
|
||||
@@ -811,7 +817,7 @@ proc mvcur*(a2: cint; a3: cint; a4: cint; a5: cint): cint{.extdecl,
|
||||
importc: "mvcur", dynlib: pdcursesdll.}
|
||||
proc mvdelch*(a2: cint; a3: cint): cint{.extdecl, importc: "mvdelch",
|
||||
dynlib: pdcursesdll.}
|
||||
proc mvderwin*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl,
|
||||
proc mvderwin*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
|
||||
importc: "mvderwin", dynlib: pdcursesdll.}
|
||||
proc mvgetch*(a2: cint; a3: cint): cint{.extdecl, importc: "mvgetch",
|
||||
dynlib: pdcursesdll.}
|
||||
@@ -843,92 +849,92 @@ proc mvscanw*(a2: cint; a3: cint; a4: cstring): cint{.varargs, extdecl,
|
||||
importc: "mvscanw", dynlib: pdcursesdll.}
|
||||
proc mvvline*(a2: cint; a3: cint; a4: cunsignedlong; a5: cint): cint{.extdecl,
|
||||
importc: "mvvline", dynlib: pdcursesdll.}
|
||||
proc mvwaddchnstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
|
||||
proc mvwaddchnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
|
||||
a6: cint): cint{.extdecl, importc: "mvwaddchnstr",
|
||||
dynlib: pdcursesdll.}
|
||||
proc mvwaddchstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
|
||||
proc mvwaddchstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
|
||||
extdecl, importc: "mvwaddchstr", dynlib: pdcursesdll.}
|
||||
proc mvwaddch*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cunsignedlong): cint{.
|
||||
proc mvwaddch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cunsignedlong): cint{.
|
||||
extdecl, importc: "mvwaddch", dynlib: pdcursesdll.}
|
||||
proc mvwaddnstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
|
||||
proc mvwaddnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
|
||||
extdecl, importc: "mvwaddnstr", dynlib: pdcursesdll.}
|
||||
proc mvwaddstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring): cint{.extdecl,
|
||||
proc mvwaddstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.extdecl,
|
||||
importc: "mvwaddstr", dynlib: pdcursesdll.}
|
||||
proc mvwchgat*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cint; a6: cunsignedlong;
|
||||
proc mvwchgat*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cint; a6: cunsignedlong;
|
||||
a7: cshort; a8: pointer): cint{.extdecl, importc: "mvwchgat",
|
||||
dynlib: pdcursesdll.}
|
||||
proc mvwdelch*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl,
|
||||
proc mvwdelch*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
|
||||
importc: "mvwdelch", dynlib: pdcursesdll.}
|
||||
proc mvwgetch*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl,
|
||||
proc mvwgetch*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
|
||||
importc: "mvwgetch", dynlib: pdcursesdll.}
|
||||
proc mvwgetnstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
|
||||
proc mvwgetnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
|
||||
extdecl, importc: "mvwgetnstr", dynlib: pdcursesdll.}
|
||||
proc mvwgetstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring): cint{.extdecl,
|
||||
proc mvwgetstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.extdecl,
|
||||
importc: "mvwgetstr", dynlib: pdcursesdll.}
|
||||
proc mvwhline*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cunsignedlong; a6: cint): cint{.
|
||||
proc mvwhline*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cunsignedlong; a6: cint): cint{.
|
||||
extdecl, importc: "mvwhline", dynlib: pdcursesdll.}
|
||||
proc mvwinchnstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
|
||||
proc mvwinchnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
|
||||
a6: cint): cint{.extdecl, importc: "mvwinchnstr",
|
||||
dynlib: pdcursesdll.}
|
||||
proc mvwinchstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
|
||||
proc mvwinchstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
|
||||
extdecl, importc: "mvwinchstr", dynlib: pdcursesdll.}
|
||||
proc mvwinch*(a2: ptr TWINDOW; a3: cint; a4: cint): cunsignedlong{.extdecl,
|
||||
proc mvwinch*(a2: ptr WINDOW; a3: cint; a4: cint): cunsignedlong{.extdecl,
|
||||
importc: "mvwinch", dynlib: pdcursesdll.}
|
||||
proc mvwinnstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
|
||||
proc mvwinnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
|
||||
extdecl, importc: "mvwinnstr", dynlib: pdcursesdll.}
|
||||
proc mvwinsch*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cunsignedlong): cint{.
|
||||
proc mvwinsch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cunsignedlong): cint{.
|
||||
extdecl, importc: "mvwinsch", dynlib: pdcursesdll.}
|
||||
proc mvwinsnstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
|
||||
proc mvwinsnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
|
||||
extdecl, importc: "mvwinsnstr", dynlib: pdcursesdll.}
|
||||
proc mvwinsstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring): cint{.extdecl,
|
||||
proc mvwinsstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.extdecl,
|
||||
importc: "mvwinsstr", dynlib: pdcursesdll.}
|
||||
proc mvwinstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring): cint{.extdecl,
|
||||
proc mvwinstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.extdecl,
|
||||
importc: "mvwinstr", dynlib: pdcursesdll.}
|
||||
proc mvwin*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl, importc: "mvwin",
|
||||
proc mvwin*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl, importc: "mvwin",
|
||||
dynlib: pdcursesdll.}
|
||||
proc mvwprintw*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring): cint{.varargs,
|
||||
proc mvwprintw*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.varargs,
|
||||
extdecl, importc: "mvwprintw", dynlib: pdcursesdll.}
|
||||
proc mvwscanw*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring): cint{.varargs,
|
||||
proc mvwscanw*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.varargs,
|
||||
extdecl, importc: "mvwscanw", dynlib: pdcursesdll.}
|
||||
proc mvwvline*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cunsignedlong; a6: cint): cint{.
|
||||
proc mvwvline*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cunsignedlong; a6: cint): cint{.
|
||||
extdecl, importc: "mvwvline", dynlib: pdcursesdll.}
|
||||
proc napms*(a2: cint): cint{.extdecl, importc: "napms", dynlib: pdcursesdll.}
|
||||
proc newpad*(a2: cint; a3: cint): ptr TWINDOW{.extdecl, importc: "newpad",
|
||||
proc newpad*(a2: cint; a3: cint): ptr WINDOW{.extdecl, importc: "newpad",
|
||||
dynlib: pdcursesdll.}
|
||||
proc newterm*(a2: cstring; a3: File; a4: File): ptr TSCREEN{.extdecl,
|
||||
proc newterm*(a2: cstring; a3: File; a4: File): ptr SCREEN{.extdecl,
|
||||
importc: "newterm", dynlib: pdcursesdll.}
|
||||
proc newwin*(a2: cint; a3: cint; a4: cint; a5: cint): ptr TWINDOW{.extdecl,
|
||||
proc newwin*(a2: cint; a3: cint; a4: cint; a5: cint): ptr WINDOW{.extdecl,
|
||||
importc: "newwin", dynlib: pdcursesdll.}
|
||||
proc nl*(): cint{.extdecl, importc: "nl", dynlib: pdcursesdll.}
|
||||
proc nocbreak*(): cint{.extdecl, importc: "nocbreak", dynlib: pdcursesdll.}
|
||||
proc nodelay*(a2: ptr TWINDOW; a3: cunsignedchar): cint{.extdecl,
|
||||
proc nodelay*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl,
|
||||
importc: "nodelay", dynlib: pdcursesdll.}
|
||||
proc noecho*(): cint{.extdecl, importc: "noecho", dynlib: pdcursesdll.}
|
||||
proc nonl*(): cint{.extdecl, importc: "nonl", dynlib: pdcursesdll.}
|
||||
proc noqiflush*(){.extdecl, importc: "noqiflush", dynlib: pdcursesdll.}
|
||||
proc noraw*(): cint{.extdecl, importc: "noraw", dynlib: pdcursesdll.}
|
||||
proc notimeout*(a2: ptr TWINDOW; a3: cunsignedchar): cint{.extdecl,
|
||||
proc notimeout*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl,
|
||||
importc: "notimeout", dynlib: pdcursesdll.}
|
||||
proc overlay*(a2: ptr TWINDOW; a3: ptr TWINDOW): cint{.extdecl, importc: "overlay",
|
||||
proc overlay*(a2: ptr WINDOW; a3: ptr WINDOW): cint{.extdecl, importc: "overlay",
|
||||
dynlib: pdcursesdll.}
|
||||
proc overwrite*(a2: ptr TWINDOW; a3: ptr TWINDOW): cint{.extdecl,
|
||||
proc overwrite*(a2: ptr WINDOW; a3: ptr WINDOW): cint{.extdecl,
|
||||
importc: "overwrite", dynlib: pdcursesdll.}
|
||||
proc pair_content*(a2: cshort; a3: ptr cshort; a4: ptr cshort): cint{.extdecl,
|
||||
importc: "pair_content", dynlib: pdcursesdll.}
|
||||
proc pechochar*(a2: ptr TWINDOW; a3: cunsignedlong): cint{.extdecl,
|
||||
proc pechochar*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl,
|
||||
importc: "pechochar", dynlib: pdcursesdll.}
|
||||
proc pnoutrefresh*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cint; a6: cint;
|
||||
proc pnoutrefresh*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cint; a6: cint;
|
||||
a7: cint; a8: cint): cint{.extdecl, importc: "pnoutrefresh",
|
||||
dynlib: pdcursesdll.}
|
||||
proc prefresh*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cint; a6: cint; a7: cint;
|
||||
proc prefresh*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cint; a6: cint; a7: cint;
|
||||
a8: cint): cint{.extdecl, importc: "prefresh", dynlib: pdcursesdll.}
|
||||
proc printw*(a2: cstring): cint{.varargs, extdecl, importc: "printw",
|
||||
dynlib: pdcursesdll.}
|
||||
proc putwin*(a2: ptr TWINDOW; a3: File): cint{.extdecl, importc: "putwin",
|
||||
proc putwin*(a2: ptr WINDOW; a3: File): cint{.extdecl, importc: "putwin",
|
||||
dynlib: pdcursesdll.}
|
||||
proc qiflush*(){.extdecl, importc: "qiflush", dynlib: pdcursesdll.}
|
||||
proc raw*(): cint{.extdecl, importc: "raw", dynlib: pdcursesdll.}
|
||||
proc redrawwin*(a2: ptr TWINDOW): cint{.extdecl, importc: "redrawwin",
|
||||
proc redrawwin*(a2: ptr WINDOW): cint{.extdecl, importc: "redrawwin",
|
||||
dynlib: pdcursesdll.}
|
||||
proc refresh*(): cint{.extdecl, importc: "refresh", dynlib: pdcursesdll.}
|
||||
proc reset_prog_mode*(): cint{.extdecl, importc: "reset_prog_mode",
|
||||
@@ -936,7 +942,7 @@ proc reset_prog_mode*(): cint{.extdecl, importc: "reset_prog_mode",
|
||||
proc reset_shell_mode*(): cint{.extdecl, importc: "reset_shell_mode",
|
||||
dynlib: pdcursesdll.}
|
||||
proc resetty*(): cint{.extdecl, importc: "resetty", dynlib: pdcursesdll.}
|
||||
#int ripoffline(int, int (*)(TWINDOW *, int));
|
||||
#int ripoffline(int, int (*)(WINDOW *, int));
|
||||
proc savetty*(): cint{.extdecl, importc: "savetty", dynlib: pdcursesdll.}
|
||||
proc scanw*(a2: cstring): cint{.varargs, extdecl, importc: "scanw",
|
||||
dynlib: pdcursesdll.}
|
||||
@@ -948,11 +954,11 @@ proc scr_restore*(a2: cstring): cint{.extdecl, importc: "scr_restore",
|
||||
dynlib: pdcursesdll.}
|
||||
proc scr_set*(a2: cstring): cint{.extdecl, importc: "scr_set", dynlib: pdcursesdll.}
|
||||
proc scrl*(a2: cint): cint{.extdecl, importc: "scrl", dynlib: pdcursesdll.}
|
||||
proc scroll*(a2: ptr TWINDOW): cint{.extdecl, importc: "scroll",
|
||||
proc scroll*(a2: ptr WINDOW): cint{.extdecl, importc: "scroll",
|
||||
dynlib: pdcursesdll.}
|
||||
proc scrollok*(a2: ptr TWINDOW; a3: cunsignedchar): cint{.extdecl,
|
||||
proc scrollok*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl,
|
||||
importc: "scrollok", dynlib: pdcursesdll.}
|
||||
proc set_term*(a2: ptr TSCREEN): ptr TSCREEN{.extdecl, importc: "set_term",
|
||||
proc set_term*(a2: ptr SCREEN): ptr SCREEN{.extdecl, importc: "set_term",
|
||||
dynlib: pdcursesdll.}
|
||||
proc setscrreg*(a2: cint; a3: cint): cint{.extdecl, importc: "setscrreg",
|
||||
dynlib: pdcursesdll.}
|
||||
@@ -984,11 +990,11 @@ proc slk_touch*(): cint{.extdecl, importc: "slk_touch", dynlib: pdcursesdll.}
|
||||
proc standend*(): cint{.extdecl, importc: "standend", dynlib: pdcursesdll.}
|
||||
proc standout*(): cint{.extdecl, importc: "standout", dynlib: pdcursesdll.}
|
||||
proc start_color*(): cint{.extdecl, importc: "start_color", dynlib: pdcursesdll.}
|
||||
proc subpad*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cint; a6: cint): ptr TWINDOW{.
|
||||
proc subpad*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cint; a6: cint): ptr WINDOW{.
|
||||
extdecl, importc: "subpad", dynlib: pdcursesdll.}
|
||||
proc subwin*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cint; a6: cint): ptr TWINDOW{.
|
||||
proc subwin*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cint; a6: cint): ptr WINDOW{.
|
||||
extdecl, importc: "subwin", dynlib: pdcursesdll.}
|
||||
proc syncok*(a2: ptr TWINDOW; a3: cunsignedchar): cint{.extdecl, importc: "syncok",
|
||||
proc syncok*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl, importc: "syncok",
|
||||
dynlib: pdcursesdll.}
|
||||
proc termattrs*(): cunsignedlong{.extdecl, importc: "termattrs",
|
||||
dynlib: pdcursesdll.}
|
||||
@@ -996,13 +1002,13 @@ proc termattrs2*(): cunsignedlong{.extdecl, importc: "term_attrs",
|
||||
dynlib: pdcursesdll.}
|
||||
proc termname*(): cstring{.extdecl, importc: "termname", dynlib: pdcursesdll.}
|
||||
proc timeout*(a2: cint){.extdecl, importc: "timeout", dynlib: pdcursesdll.}
|
||||
proc touchline*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl,
|
||||
proc touchline*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
|
||||
importc: "touchline", dynlib: pdcursesdll.}
|
||||
proc touchwin*(a2: ptr TWINDOW): cint{.extdecl, importc: "touchwin",
|
||||
proc touchwin*(a2: ptr WINDOW): cint{.extdecl, importc: "touchwin",
|
||||
dynlib: pdcursesdll.}
|
||||
proc typeahead*(a2: cint): cint{.extdecl, importc: "typeahead",
|
||||
dynlib: pdcursesdll.}
|
||||
proc untouchwin*(a2: ptr TWINDOW): cint{.extdecl, importc: "untouchwin",
|
||||
proc untouchwin*(a2: ptr WINDOW): cint{.extdecl, importc: "untouchwin",
|
||||
dynlib: pdcursesdll.}
|
||||
proc use_env*(a2: cunsignedchar){.extdecl, importc: "use_env", dynlib: pdcursesdll.}
|
||||
proc vidattr*(a2: cunsignedlong): cint{.extdecl, importc: "vidattr",
|
||||
@@ -1013,123 +1019,123 @@ proc vid_attr*(a2: cunsignedlong; a3: cshort; a4: pointer): cint{.extdecl,
|
||||
#int vid_puts(attr_t, short, void *, int (*)(int));
|
||||
proc vline*(a2: cunsignedlong; a3: cint): cint{.extdecl, importc: "vline",
|
||||
dynlib: pdcursesdll.}
|
||||
proc vwprintw*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl, varargs,
|
||||
proc vwprintw*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, varargs,
|
||||
importc: "vw_printw", dynlib: pdcursesdll.}
|
||||
proc vwprintw2*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl, varargs,
|
||||
proc vwprintw2*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, varargs,
|
||||
importc: "vwprintw", dynlib: pdcursesdll.}
|
||||
proc vwscanw*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl, varargs,
|
||||
proc vwscanw*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, varargs,
|
||||
importc: "vw_scanw", dynlib: pdcursesdll.}
|
||||
proc vwscanw2*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl, varargs,
|
||||
proc vwscanw2*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, varargs,
|
||||
importc: "vwscanw", dynlib: pdcursesdll.}
|
||||
proc waddchnstr*(a2: ptr TWINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl,
|
||||
proc waddchnstr*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl,
|
||||
importc: "waddchnstr", dynlib: pdcursesdll.}
|
||||
proc waddchstr*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
proc waddchstr*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
importc: "waddchstr", dynlib: pdcursesdll.}
|
||||
proc waddch*(a2: ptr TWINDOW; a3: cunsignedlong): cint{.extdecl, importc: "waddch",
|
||||
proc waddch*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl, importc: "waddch",
|
||||
dynlib: pdcursesdll.}
|
||||
proc waddnstr*(a2: ptr TWINDOW; a3: cstring; a4: cint): cint{.extdecl,
|
||||
proc waddnstr*(a2: ptr WINDOW; a3: cstring; a4: cint): cint{.extdecl,
|
||||
importc: "waddnstr", dynlib: pdcursesdll.}
|
||||
proc waddstr*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl, importc: "waddstr",
|
||||
proc waddstr*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, importc: "waddstr",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wattroff*(a2: ptr TWINDOW; a3: cunsignedlong): cint{.extdecl,
|
||||
proc wattroff*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl,
|
||||
importc: "wattroff", dynlib: pdcursesdll.}
|
||||
proc wattron*(a2: ptr TWINDOW; a3: cunsignedlong): cint{.extdecl,
|
||||
proc wattron*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl,
|
||||
importc: "wattron", dynlib: pdcursesdll.}
|
||||
proc wattrset*(a2: ptr TWINDOW; a3: cunsignedlong): cint{.extdecl,
|
||||
proc wattrset*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl,
|
||||
importc: "wattrset", dynlib: pdcursesdll.}
|
||||
proc wattr_get*(a2: ptr TWINDOW; a3: ptr cunsignedlong; a4: ptr cshort;
|
||||
proc wattr_get*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: ptr cshort;
|
||||
a5: pointer): cint{.extdecl, importc: "wattr_get",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wattr_off*(a2: ptr TWINDOW; a3: cunsignedlong; a4: pointer): cint{.extdecl,
|
||||
proc wattr_off*(a2: ptr WINDOW; a3: cunsignedlong; a4: pointer): cint{.extdecl,
|
||||
importc: "wattr_off", dynlib: pdcursesdll.}
|
||||
proc wattr_on*(a2: ptr TWINDOW; a3: cunsignedlong; a4: pointer): cint{.extdecl,
|
||||
proc wattr_on*(a2: ptr WINDOW; a3: cunsignedlong; a4: pointer): cint{.extdecl,
|
||||
importc: "wattr_on", dynlib: pdcursesdll.}
|
||||
proc wattr_set*(a2: ptr TWINDOW; a3: cunsignedlong; a4: cshort; a5: pointer): cint{.
|
||||
proc wattr_set*(a2: ptr WINDOW; a3: cunsignedlong; a4: cshort; a5: pointer): cint{.
|
||||
extdecl, importc: "wattr_set", dynlib: pdcursesdll.}
|
||||
proc wbkgdset*(a2: ptr TWINDOW; a3: cunsignedlong){.extdecl, importc: "wbkgdset",
|
||||
proc wbkgdset*(a2: ptr WINDOW; a3: cunsignedlong){.extdecl, importc: "wbkgdset",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wbkgd*(a2: ptr TWINDOW; a3: cunsignedlong): cint{.extdecl, importc: "wbkgd",
|
||||
proc wbkgd*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl, importc: "wbkgd",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wborder*(a2: ptr TWINDOW; a3: cunsignedlong; a4: cunsignedlong;
|
||||
proc wborder*(a2: ptr WINDOW; a3: cunsignedlong; a4: cunsignedlong;
|
||||
a5: cunsignedlong; a6: cunsignedlong; a7: cunsignedlong;
|
||||
a8: cunsignedlong; a9: cunsignedlong; a10: cunsignedlong): cint{.
|
||||
extdecl, importc: "wborder", dynlib: pdcursesdll.}
|
||||
proc wchgat*(a2: ptr TWINDOW; a3: cint; a4: cunsignedlong; a5: cshort;
|
||||
proc wchgat*(a2: ptr WINDOW; a3: cint; a4: cunsignedlong; a5: cshort;
|
||||
a6: pointer): cint{.extdecl, importc: "wchgat", dynlib: pdcursesdll.}
|
||||
proc wclear*(a2: ptr TWINDOW): cint{.extdecl, importc: "wclear",
|
||||
proc wclear*(a2: ptr WINDOW): cint{.extdecl, importc: "wclear",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wclrtobot*(a2: ptr TWINDOW): cint{.extdecl, importc: "wclrtobot",
|
||||
proc wclrtobot*(a2: ptr WINDOW): cint{.extdecl, importc: "wclrtobot",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wclrtoeol*(a2: ptr TWINDOW): cint{.extdecl, importc: "wclrtoeol",
|
||||
proc wclrtoeol*(a2: ptr WINDOW): cint{.extdecl, importc: "wclrtoeol",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wcolor_set*(a2: ptr TWINDOW; a3: cshort; a4: pointer): cint{.extdecl,
|
||||
proc wcolor_set*(a2: ptr WINDOW; a3: cshort; a4: pointer): cint{.extdecl,
|
||||
importc: "wcolor_set", dynlib: pdcursesdll.}
|
||||
proc wcursyncup*(a2: ptr TWINDOW){.extdecl, importc: "wcursyncup",
|
||||
proc wcursyncup*(a2: ptr WINDOW){.extdecl, importc: "wcursyncup",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wdelch*(a2: ptr TWINDOW): cint{.extdecl, importc: "wdelch",
|
||||
proc wdelch*(a2: ptr WINDOW): cint{.extdecl, importc: "wdelch",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wdeleteln*(a2: ptr TWINDOW): cint{.extdecl, importc: "wdeleteln",
|
||||
proc wdeleteln*(a2: ptr WINDOW): cint{.extdecl, importc: "wdeleteln",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wechochar*(a2: ptr TWINDOW; a3: cunsignedlong): cint{.extdecl,
|
||||
proc wechochar*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl,
|
||||
importc: "wechochar", dynlib: pdcursesdll.}
|
||||
proc werase*(a2: ptr TWINDOW): cint{.extdecl, importc: "werase",
|
||||
proc werase*(a2: ptr WINDOW): cint{.extdecl, importc: "werase",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wgetch*(a2: ptr TWINDOW): cint{.extdecl, importc: "wgetch",
|
||||
proc wgetch*(a2: ptr WINDOW): cint{.extdecl, importc: "wgetch",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wgetnstr*(a2: ptr TWINDOW; a3: cstring; a4: cint): cint{.extdecl,
|
||||
proc wgetnstr*(a2: ptr WINDOW; a3: cstring; a4: cint): cint{.extdecl,
|
||||
importc: "wgetnstr", dynlib: pdcursesdll.}
|
||||
proc wgetstr*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl, importc: "wgetstr",
|
||||
proc wgetstr*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, importc: "wgetstr",
|
||||
dynlib: pdcursesdll.}
|
||||
proc whline*(a2: ptr TWINDOW; a3: cunsignedlong; a4: cint): cint{.extdecl,
|
||||
proc whline*(a2: ptr WINDOW; a3: cunsignedlong; a4: cint): cint{.extdecl,
|
||||
importc: "whline", dynlib: pdcursesdll.}
|
||||
proc winchnstr*(a2: ptr TWINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl,
|
||||
proc winchnstr*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl,
|
||||
importc: "winchnstr", dynlib: pdcursesdll.}
|
||||
proc winchstr*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
proc winchstr*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
importc: "winchstr", dynlib: pdcursesdll.}
|
||||
proc winch*(a2: ptr TWINDOW): cunsignedlong{.extdecl, importc: "winch",
|
||||
proc winch*(a2: ptr WINDOW): cunsignedlong{.extdecl, importc: "winch",
|
||||
dynlib: pdcursesdll.}
|
||||
proc winnstr*(a2: ptr TWINDOW; a3: cstring; a4: cint): cint{.extdecl,
|
||||
proc winnstr*(a2: ptr WINDOW; a3: cstring; a4: cint): cint{.extdecl,
|
||||
importc: "winnstr", dynlib: pdcursesdll.}
|
||||
proc winsch*(a2: ptr TWINDOW; a3: cunsignedlong): cint{.extdecl, importc: "winsch",
|
||||
proc winsch*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl, importc: "winsch",
|
||||
dynlib: pdcursesdll.}
|
||||
proc winsdelln*(a2: ptr TWINDOW; a3: cint): cint{.extdecl, importc: "winsdelln",
|
||||
proc winsdelln*(a2: ptr WINDOW; a3: cint): cint{.extdecl, importc: "winsdelln",
|
||||
dynlib: pdcursesdll.}
|
||||
proc winsertln*(a2: ptr TWINDOW): cint{.extdecl, importc: "winsertln",
|
||||
proc winsertln*(a2: ptr WINDOW): cint{.extdecl, importc: "winsertln",
|
||||
dynlib: pdcursesdll.}
|
||||
proc winsnstr*(a2: ptr TWINDOW; a3: cstring; a4: cint): cint{.extdecl,
|
||||
proc winsnstr*(a2: ptr WINDOW; a3: cstring; a4: cint): cint{.extdecl,
|
||||
importc: "winsnstr", dynlib: pdcursesdll.}
|
||||
proc winsstr*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl, importc: "winsstr",
|
||||
proc winsstr*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, importc: "winsstr",
|
||||
dynlib: pdcursesdll.}
|
||||
proc winstr*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl, importc: "winstr",
|
||||
proc winstr*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, importc: "winstr",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wmove*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl, importc: "wmove",
|
||||
proc wmove*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl, importc: "wmove",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wnoutrefresh*(a2: ptr TWINDOW): cint{.extdecl, importc: "wnoutrefresh",
|
||||
proc wnoutrefresh*(a2: ptr WINDOW): cint{.extdecl, importc: "wnoutrefresh",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wprintw*(a2: ptr TWINDOW; a3: cstring): cint{.varargs, extdecl,
|
||||
proc wprintw*(a2: ptr WINDOW; a3: cstring): cint{.varargs, extdecl,
|
||||
importc: "wprintw", dynlib: pdcursesdll.}
|
||||
proc wredrawln*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl,
|
||||
proc wredrawln*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
|
||||
importc: "wredrawln", dynlib: pdcursesdll.}
|
||||
proc wrefresh*(a2: ptr TWINDOW): cint{.extdecl, importc: "wrefresh",
|
||||
proc wrefresh*(a2: ptr WINDOW): cint{.extdecl, importc: "wrefresh",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wscanw*(a2: ptr TWINDOW; a3: cstring): cint{.varargs, extdecl,
|
||||
proc wscanw*(a2: ptr WINDOW; a3: cstring): cint{.varargs, extdecl,
|
||||
importc: "wscanw", dynlib: pdcursesdll.}
|
||||
proc wscrl*(a2: ptr TWINDOW; a3: cint): cint{.extdecl, importc: "wscrl",
|
||||
proc wscrl*(a2: ptr WINDOW; a3: cint): cint{.extdecl, importc: "wscrl",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wsetscrreg*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl,
|
||||
proc wsetscrreg*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
|
||||
importc: "wsetscrreg", dynlib: pdcursesdll.}
|
||||
proc wstandend*(a2: ptr TWINDOW): cint{.extdecl, importc: "wstandend",
|
||||
proc wstandend*(a2: ptr WINDOW): cint{.extdecl, importc: "wstandend",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wstandout*(a2: ptr TWINDOW): cint{.extdecl, importc: "wstandout",
|
||||
proc wstandout*(a2: ptr WINDOW): cint{.extdecl, importc: "wstandout",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wsyncdown*(a2: ptr TWINDOW){.extdecl, importc: "wsyncdown",
|
||||
proc wsyncdown*(a2: ptr WINDOW){.extdecl, importc: "wsyncdown",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wsyncup*(a2: ptr TWINDOW){.extdecl, importc: "wsyncup", dynlib: pdcursesdll.}
|
||||
proc wtimeout*(a2: ptr TWINDOW; a3: cint){.extdecl, importc: "wtimeout",
|
||||
proc wsyncup*(a2: ptr WINDOW){.extdecl, importc: "wsyncup", dynlib: pdcursesdll.}
|
||||
proc wtimeout*(a2: ptr WINDOW; a3: cint){.extdecl, importc: "wtimeout",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wtouchln*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cint): cint{.extdecl,
|
||||
proc wtouchln*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cint): cint{.extdecl,
|
||||
importc: "wtouchln", dynlib: pdcursesdll.}
|
||||
proc wvline*(a2: ptr TWINDOW; a3: cunsignedlong; a4: cint): cint{.extdecl,
|
||||
proc wvline*(a2: ptr WINDOW; a3: cunsignedlong; a4: cint): cint{.extdecl,
|
||||
importc: "wvline", dynlib: pdcursesdll.}
|
||||
proc addnwstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "addnwstr",
|
||||
dynlib: pdcursesdll.}
|
||||
@@ -1146,7 +1152,7 @@ proc border_set*(a2: ptr cunsignedlong; a3: ptr cunsignedlong;
|
||||
a6: ptr cunsignedlong; a7: ptr cunsignedlong;
|
||||
a8: ptr cunsignedlong; a9: ptr cunsignedlong): cint{.extdecl,
|
||||
importc: "border_set", dynlib: pdcursesdll.}
|
||||
proc box_set*(a2: ptr TWINDOW; a3: ptr cunsignedlong; a4: ptr cunsignedlong): cint{.
|
||||
proc box_set*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: ptr cunsignedlong): cint{.
|
||||
extdecl, importc: "box_set", dynlib: pdcursesdll.}
|
||||
proc echo_wchar*(a2: ptr cunsignedlong): cint{.extdecl, importc: "echo_wchar",
|
||||
dynlib: pdcursesdll.}
|
||||
@@ -1221,47 +1227,47 @@ proc mvin_wchstr*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl,
|
||||
importc: "mvin_wchstr", dynlib: pdcursesdll.}
|
||||
proc mvvline_set*(a2: cint; a3: cint; a4: ptr cunsignedlong; a5: cint): cint{.
|
||||
extdecl, importc: "mvvline_set", dynlib: pdcursesdll.}
|
||||
proc mvwaddnwstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
|
||||
proc mvwaddnwstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
|
||||
extdecl, importc: "mvwaddnwstr", dynlib: pdcursesdll.}
|
||||
proc mvwaddwstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring): cint{.
|
||||
proc mvwaddwstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.
|
||||
extdecl, importc: "mvwaddwstr", dynlib: pdcursesdll.}
|
||||
proc mvwadd_wch*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
|
||||
proc mvwadd_wch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
|
||||
extdecl, importc: "mvwadd_wch", dynlib: pdcursesdll.}
|
||||
proc mvwadd_wchnstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
|
||||
proc mvwadd_wchnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
|
||||
a6: cint): cint{.extdecl, importc: "mvwadd_wchnstr",
|
||||
dynlib: pdcursesdll.}
|
||||
proc mvwadd_wchstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
|
||||
proc mvwadd_wchstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
|
||||
extdecl, importc: "mvwadd_wchstr", dynlib: pdcursesdll.}
|
||||
proc mvwgetn_wstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cint; a6: cint): cint{.
|
||||
proc mvwgetn_wstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cint; a6: cint): cint{.
|
||||
extdecl, importc: "mvwgetn_wstr", dynlib: pdcursesdll.}
|
||||
proc mvwget_wch*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cint): cint{.
|
||||
proc mvwget_wch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cint): cint{.
|
||||
extdecl, importc: "mvwget_wch", dynlib: pdcursesdll.}
|
||||
proc mvwget_wstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cint): cint{.
|
||||
proc mvwget_wstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cint): cint{.
|
||||
extdecl, importc: "mvwget_wstr", dynlib: pdcursesdll.}
|
||||
proc mvwhline_set*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
|
||||
proc mvwhline_set*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
|
||||
a6: cint): cint{.extdecl, importc: "mvwhline_set",
|
||||
dynlib: pdcursesdll.}
|
||||
proc mvwinnwstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
|
||||
proc mvwinnwstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
|
||||
extdecl, importc: "mvwinnwstr", dynlib: pdcursesdll.}
|
||||
proc mvwins_nwstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
|
||||
proc mvwins_nwstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
|
||||
extdecl, importc: "mvwins_nwstr", dynlib: pdcursesdll.}
|
||||
proc mvwins_wch*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
|
||||
proc mvwins_wch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
|
||||
extdecl, importc: "mvwins_wch", dynlib: pdcursesdll.}
|
||||
proc mvwins_wstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring): cint{.
|
||||
proc mvwins_wstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.
|
||||
extdecl, importc: "mvwins_wstr", dynlib: pdcursesdll.}
|
||||
proc mvwin_wch*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
|
||||
proc mvwin_wch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
|
||||
extdecl, importc: "mvwin_wch", dynlib: pdcursesdll.}
|
||||
proc mvwin_wchnstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
|
||||
proc mvwin_wchnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
|
||||
a6: cint): cint{.extdecl, importc: "mvwin_wchnstr",
|
||||
dynlib: pdcursesdll.}
|
||||
proc mvwin_wchstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
|
||||
proc mvwin_wchstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
|
||||
extdecl, importc: "mvwin_wchstr", dynlib: pdcursesdll.}
|
||||
proc mvwinwstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring): cint{.
|
||||
proc mvwinwstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.
|
||||
extdecl, importc: "mvwinwstr", dynlib: pdcursesdll.}
|
||||
proc mvwvline_set*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
|
||||
proc mvwvline_set*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
|
||||
a6: cint): cint{.extdecl, importc: "mvwvline_set",
|
||||
dynlib: pdcursesdll.}
|
||||
proc pecho_wchar*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
proc pecho_wchar*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
importc: "pecho_wchar", dynlib: pdcursesdll.}
|
||||
proc setcchar*(a2: ptr cunsignedlong; a3: cstring; a4: cunsignedlong;
|
||||
a5: cshort; a6: pointer): cint{.extdecl, importc: "setcchar",
|
||||
@@ -1272,74 +1278,74 @@ proc unget_wch*(a2: char): cint{.extdecl, importc: "unget_wch",
|
||||
dynlib: pdcursesdll.}
|
||||
proc vline_set*(a2: ptr cunsignedlong; a3: cint): cint{.extdecl,
|
||||
importc: "vline_set", dynlib: pdcursesdll.}
|
||||
proc waddnwstr*(a2: ptr TWINDOW; a3: cstring; a4: cint): cint{.extdecl,
|
||||
proc waddnwstr*(a2: ptr WINDOW; a3: cstring; a4: cint): cint{.extdecl,
|
||||
importc: "waddnwstr", dynlib: pdcursesdll.}
|
||||
proc waddwstr*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl,
|
||||
proc waddwstr*(a2: ptr WINDOW; a3: cstring): cint{.extdecl,
|
||||
importc: "waddwstr", dynlib: pdcursesdll.}
|
||||
proc wadd_wch*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
proc wadd_wch*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
importc: "wadd_wch", dynlib: pdcursesdll.}
|
||||
proc wadd_wchnstr*(a2: ptr TWINDOW; a3: ptr cunsignedlong; a4: cint): cint{.
|
||||
proc wadd_wchnstr*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: cint): cint{.
|
||||
extdecl, importc: "wadd_wchnstr", dynlib: pdcursesdll.}
|
||||
proc wadd_wchstr*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
proc wadd_wchstr*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
importc: "wadd_wchstr", dynlib: pdcursesdll.}
|
||||
proc wbkgrnd*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
proc wbkgrnd*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
importc: "wbkgrnd", dynlib: pdcursesdll.}
|
||||
proc wbkgrndset*(a2: ptr TWINDOW; a3: ptr cunsignedlong){.extdecl,
|
||||
proc wbkgrndset*(a2: ptr WINDOW; a3: ptr cunsignedlong){.extdecl,
|
||||
importc: "wbkgrndset", dynlib: pdcursesdll.}
|
||||
proc wborder_set*(a2: ptr TWINDOW; a3: ptr cunsignedlong; a4: ptr cunsignedlong;
|
||||
proc wborder_set*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: ptr cunsignedlong;
|
||||
a5: ptr cunsignedlong; a6: ptr cunsignedlong;
|
||||
a7: ptr cunsignedlong; a8: ptr cunsignedlong;
|
||||
a9: ptr cunsignedlong; a10: ptr cunsignedlong): cint{.extdecl,
|
||||
importc: "wborder_set", dynlib: pdcursesdll.}
|
||||
proc wecho_wchar*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
proc wecho_wchar*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
importc: "wecho_wchar", dynlib: pdcursesdll.}
|
||||
proc wgetbkgrnd*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
proc wgetbkgrnd*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
importc: "wgetbkgrnd", dynlib: pdcursesdll.}
|
||||
proc wgetn_wstr*(a2: ptr TWINDOW; a3: ptr cint; a4: cint): cint{.extdecl,
|
||||
proc wgetn_wstr*(a2: ptr WINDOW; a3: ptr cint; a4: cint): cint{.extdecl,
|
||||
importc: "wgetn_wstr", dynlib: pdcursesdll.}
|
||||
proc wget_wch*(a2: ptr TWINDOW; a3: ptr cint): cint{.extdecl,
|
||||
proc wget_wch*(a2: ptr WINDOW; a3: ptr cint): cint{.extdecl,
|
||||
importc: "wget_wch", dynlib: pdcursesdll.}
|
||||
proc wget_wstr*(a2: ptr TWINDOW; a3: ptr cint): cint{.extdecl,
|
||||
proc wget_wstr*(a2: ptr WINDOW; a3: ptr cint): cint{.extdecl,
|
||||
importc: "wget_wstr", dynlib: pdcursesdll.}
|
||||
proc whline_set*(a2: ptr TWINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl,
|
||||
proc whline_set*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl,
|
||||
importc: "whline_set", dynlib: pdcursesdll.}
|
||||
proc winnwstr*(a2: ptr TWINDOW; a3: cstring; a4: cint): cint{.extdecl,
|
||||
proc winnwstr*(a2: ptr WINDOW; a3: cstring; a4: cint): cint{.extdecl,
|
||||
importc: "winnwstr", dynlib: pdcursesdll.}
|
||||
proc wins_nwstr*(a2: ptr TWINDOW; a3: cstring; a4: cint): cint{.extdecl,
|
||||
proc wins_nwstr*(a2: ptr WINDOW; a3: cstring; a4: cint): cint{.extdecl,
|
||||
importc: "wins_nwstr", dynlib: pdcursesdll.}
|
||||
proc wins_wch*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
proc wins_wch*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
importc: "wins_wch", dynlib: pdcursesdll.}
|
||||
proc wins_wstr*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl,
|
||||
proc wins_wstr*(a2: ptr WINDOW; a3: cstring): cint{.extdecl,
|
||||
importc: "wins_wstr", dynlib: pdcursesdll.}
|
||||
proc winwstr*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl, importc: "winwstr",
|
||||
proc winwstr*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, importc: "winwstr",
|
||||
dynlib: pdcursesdll.}
|
||||
proc win_wch*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
proc win_wch*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
importc: "win_wch", dynlib: pdcursesdll.}
|
||||
proc win_wchnstr*(a2: ptr TWINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl,
|
||||
proc win_wchnstr*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl,
|
||||
importc: "win_wchnstr", dynlib: pdcursesdll.}
|
||||
proc win_wchstr*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
proc win_wchstr*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
|
||||
importc: "win_wchstr", dynlib: pdcursesdll.}
|
||||
proc wunctrl*(a2: ptr cunsignedlong): cstring{.extdecl, importc: "wunctrl",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wvline_set*(a2: ptr TWINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl,
|
||||
proc wvline_set*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl,
|
||||
importc: "wvline_set", dynlib: pdcursesdll.}
|
||||
proc getattrs*(a2: ptr TWINDOW): cunsignedlong{.extdecl, importc: "getattrs",
|
||||
proc getattrs*(a2: ptr WINDOW): cunsignedlong{.extdecl, importc: "getattrs",
|
||||
dynlib: pdcursesdll.}
|
||||
proc getbegx*(a2: ptr TWINDOW): cint{.extdecl, importc: "getbegx",
|
||||
proc getbegx*(a2: ptr WINDOW): cint{.extdecl, importc: "getbegx",
|
||||
dynlib: pdcursesdll.}
|
||||
proc getbegy*(a2: ptr TWINDOW): cint{.extdecl, importc: "getbegy",
|
||||
proc getbegy*(a2: ptr WINDOW): cint{.extdecl, importc: "getbegy",
|
||||
dynlib: pdcursesdll.}
|
||||
proc getmaxx*(a2: ptr TWINDOW): cint{.extdecl, importc: "getmaxx",
|
||||
proc getmaxx*(a2: ptr WINDOW): cint{.extdecl, importc: "getmaxx",
|
||||
dynlib: pdcursesdll.}
|
||||
proc getmaxy*(a2: ptr TWINDOW): cint{.extdecl, importc: "getmaxy",
|
||||
proc getmaxy*(a2: ptr WINDOW): cint{.extdecl, importc: "getmaxy",
|
||||
dynlib: pdcursesdll.}
|
||||
proc getparx*(a2: ptr TWINDOW): cint{.extdecl, importc: "getparx",
|
||||
proc getparx*(a2: ptr WINDOW): cint{.extdecl, importc: "getparx",
|
||||
dynlib: pdcursesdll.}
|
||||
proc getpary*(a2: ptr TWINDOW): cint{.extdecl, importc: "getpary",
|
||||
proc getpary*(a2: ptr WINDOW): cint{.extdecl, importc: "getpary",
|
||||
dynlib: pdcursesdll.}
|
||||
proc getcurx*(a2: ptr TWINDOW): cint{.extdecl, importc: "getcurx",
|
||||
proc getcurx*(a2: ptr WINDOW): cint{.extdecl, importc: "getcurx",
|
||||
dynlib: pdcursesdll.}
|
||||
proc getcury*(a2: ptr TWINDOW): cint{.extdecl, importc: "getcury",
|
||||
proc getcury*(a2: ptr WINDOW): cint{.extdecl, importc: "getcury",
|
||||
dynlib: pdcursesdll.}
|
||||
proc traceoff*(){.extdecl, importc: "traceoff", dynlib: pdcursesdll.}
|
||||
proc traceon*(){.extdecl, importc: "traceon", dynlib: pdcursesdll.}
|
||||
@@ -1363,7 +1369,7 @@ proc request_mouse_pos*(): cint{.extdecl, importc: "request_mouse_pos",
|
||||
dynlib: pdcursesdll.}
|
||||
proc map_button*(a2: cunsignedlong): cint{.extdecl, importc: "map_button",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wmouse_position*(a2: ptr TWINDOW; a3: ptr cint; a4: ptr cint){.extdecl,
|
||||
proc wmouse_position*(a2: ptr WINDOW; a3: ptr cint; a4: ptr cint){.extdecl,
|
||||
importc: "wmouse_position", dynlib: pdcursesdll.}
|
||||
proc getmouse*(): cunsignedlong{.extdecl, importc: "getmouse", dynlib: pdcursesdll.}
|
||||
proc getbmap*(): cunsignedlong{.extdecl, importc: "getbmap", dynlib: pdcursesdll.}
|
||||
@@ -1375,7 +1381,7 @@ proc has_key*(a2: cint): cunsignedchar{.extdecl, importc: "has_key",
|
||||
dynlib: pdcursesdll.}
|
||||
proc use_default_colors*(): cint{.extdecl, importc: "use_default_colors",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wresize*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl,
|
||||
proc wresize*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
|
||||
importc: "wresize", dynlib: pdcursesdll.}
|
||||
proc mouseinterval*(a2: cint): cint{.extdecl, importc: "mouseinterval",
|
||||
dynlib: pdcursesdll.}
|
||||
@@ -1383,13 +1389,13 @@ proc mousemask*(a2: cunsignedlong; a3: ptr cunsignedlong): cunsignedlong{.extdec
|
||||
importc: "mousemask", dynlib: pdcursesdll.}
|
||||
proc mouse_trafo*(a2: ptr cint; a3: ptr cint; a4: cunsignedchar): cunsignedchar{.
|
||||
extdecl, importc: "mouse_trafo", dynlib: pdcursesdll.}
|
||||
proc nc_getmouse*(a2: ptr TMEVENT): cint{.extdecl, importc: "nc_getmouse",
|
||||
proc nc_getmouse*(a2: ptr MEVENT): cint{.extdecl, importc: "nc_getmouse",
|
||||
dynlib: pdcursesdll.}
|
||||
proc ungetmouse*(a2: ptr TMEVENT): cint{.extdecl, importc: "ungetmouse",
|
||||
proc ungetmouse*(a2: ptr MEVENT): cint{.extdecl, importc: "ungetmouse",
|
||||
dynlib: pdcursesdll.}
|
||||
proc wenclose*(a2: ptr TWINDOW; a3: cint; a4: cint): cunsignedchar{.extdecl,
|
||||
proc wenclose*(a2: ptr WINDOW; a3: cint; a4: cint): cunsignedchar{.extdecl,
|
||||
importc: "wenclose", dynlib: pdcursesdll.}
|
||||
proc wmouse_trafo*(a2: ptr TWINDOW; a3: ptr cint; a4: ptr cint; a5: cunsignedchar): cunsignedchar{.
|
||||
proc wmouse_trafo*(a2: ptr WINDOW; a3: ptr cint; a4: ptr cint; a5: cunsignedchar): cunsignedchar{.
|
||||
extdecl, importc: "wmouse_trafo", dynlib: pdcursesdll.}
|
||||
proc addrawch*(a2: cunsignedlong): cint{.extdecl, importc: "addrawch",
|
||||
dynlib: pdcursesdll.}
|
||||
@@ -1405,23 +1411,23 @@ proc mvinsertln*(a2: cint; a3: cint): cint{.extdecl, importc: "mvinsertln",
|
||||
dynlib: pdcursesdll.}
|
||||
proc mvinsrawch*(a2: cint; a3: cint; a4: cunsignedlong): cint{.extdecl,
|
||||
importc: "mvinsrawch", dynlib: pdcursesdll.}
|
||||
proc mvwaddrawch*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cunsignedlong): cint{.
|
||||
proc mvwaddrawch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cunsignedlong): cint{.
|
||||
extdecl, importc: "mvwaddrawch", dynlib: pdcursesdll.}
|
||||
proc mvwdeleteln*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl,
|
||||
proc mvwdeleteln*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
|
||||
importc: "mvwdeleteln", dynlib: pdcursesdll.}
|
||||
proc mvwinsertln*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl,
|
||||
proc mvwinsertln*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
|
||||
importc: "mvwinsertln", dynlib: pdcursesdll.}
|
||||
proc mvwinsrawch*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cunsignedlong): cint{.
|
||||
proc mvwinsrawch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cunsignedlong): cint{.
|
||||
extdecl, importc: "mvwinsrawch", dynlib: pdcursesdll.}
|
||||
proc raw_output*(a2: cunsignedchar): cint{.extdecl, importc: "raw_output",
|
||||
dynlib: pdcursesdll.}
|
||||
proc resize_term*(a2: cint; a3: cint): cint{.extdecl, importc: "resize_term",
|
||||
dynlib: pdcursesdll.}
|
||||
proc resize_window*(a2: ptr TWINDOW; a3: cint; a4: cint): ptr TWINDOW{.extdecl,
|
||||
proc resize_window*(a2: ptr WINDOW; a3: cint; a4: cint): ptr WINDOW{.extdecl,
|
||||
importc: "resize_window", dynlib: pdcursesdll.}
|
||||
proc waddrawch*(a2: ptr TWINDOW; a3: cunsignedlong): cint{.extdecl,
|
||||
proc waddrawch*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl,
|
||||
importc: "waddrawch", dynlib: pdcursesdll.}
|
||||
proc winsrawch*(a2: ptr TWINDOW; a3: cunsignedlong): cint{.extdecl,
|
||||
proc winsrawch*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl,
|
||||
importc: "winsrawch", dynlib: pdcursesdll.}
|
||||
proc wordchar*(): char{.extdecl, importc: "wordchar", dynlib: pdcursesdll.}
|
||||
proc slk_wlabel*(a2: cint): cstring{.extdecl, importc: "slk_wlabel",
|
||||
@@ -1452,38 +1458,38 @@ proc return_key_modifiers*(a2: cunsignedchar): cint{.extdecl,
|
||||
importc: "PDC_return_key_modifiers", dynlib: pdcursesdll.}
|
||||
proc save_key_modifiers*(a2: cunsignedchar): cint{.extdecl,
|
||||
importc: "PDC_save_key_modifiers", dynlib: pdcursesdll.}
|
||||
proc bottom_panel*(pan: ptr TPANEL): cint{.extdecl, importc: "bottom_panel",
|
||||
proc bottom_panel*(pan: ptr PANEL): cint{.extdecl, importc: "bottom_panel",
|
||||
dynlib: pdcursesdll.}
|
||||
proc del_panel*(pan: ptr TPANEL): cint{.extdecl, importc: "del_panel",
|
||||
proc del_panel*(pan: ptr PANEL): cint{.extdecl, importc: "del_panel",
|
||||
dynlib: pdcursesdll.}
|
||||
proc hide_panel*(pan: ptr TPANEL): cint{.extdecl, importc: "hide_panel",
|
||||
proc hide_panel*(pan: ptr PANEL): cint{.extdecl, importc: "hide_panel",
|
||||
dynlib: pdcursesdll.}
|
||||
proc move_panel*(pan: ptr TPANEL; starty: cint; startx: cint): cint{.extdecl,
|
||||
proc move_panel*(pan: ptr PANEL; starty: cint; startx: cint): cint{.extdecl,
|
||||
importc: "move_panel", dynlib: pdcursesdll.}
|
||||
proc new_panel*(win: ptr TWINDOW): ptr TPANEL{.extdecl, importc: "new_panel",
|
||||
proc new_panel*(win: ptr WINDOW): ptr PANEL{.extdecl, importc: "new_panel",
|
||||
dynlib: pdcursesdll.}
|
||||
proc panel_above*(pan: ptr TPANEL): ptr TPANEL{.extdecl, importc: "panel_above",
|
||||
proc panel_above*(pan: ptr PANEL): ptr PANEL{.extdecl, importc: "panel_above",
|
||||
dynlib: pdcursesdll.}
|
||||
proc panel_below*(pan: ptr TPANEL): ptr TPANEL{.extdecl, importc: "panel_below",
|
||||
proc panel_below*(pan: ptr PANEL): ptr PANEL{.extdecl, importc: "panel_below",
|
||||
dynlib: pdcursesdll.}
|
||||
proc panel_hidden*(pan: ptr TPANEL): cint{.extdecl, importc: "panel_hidden",
|
||||
proc panel_hidden*(pan: ptr PANEL): cint{.extdecl, importc: "panel_hidden",
|
||||
dynlib: pdcursesdll.}
|
||||
proc panel_userptr*(pan: ptr TPANEL): pointer{.extdecl, importc: "panel_userptr",
|
||||
proc panel_userptr*(pan: ptr PANEL): pointer{.extdecl, importc: "panel_userptr",
|
||||
dynlib: pdcursesdll.}
|
||||
proc panel_window*(pan: ptr TPANEL): ptr TWINDOW{.extdecl, importc: "panel_window",
|
||||
proc panel_window*(pan: ptr PANEL): ptr WINDOW{.extdecl, importc: "panel_window",
|
||||
dynlib: pdcursesdll.}
|
||||
proc replace_panel*(pan: ptr TPANEL; win: ptr TWINDOW): cint{.extdecl,
|
||||
proc replace_panel*(pan: ptr PANEL; win: ptr WINDOW): cint{.extdecl,
|
||||
importc: "replace_panel", dynlib: pdcursesdll.}
|
||||
proc set_panel_userptr*(pan: ptr TPANEL; uptr: pointer): cint{.extdecl,
|
||||
proc set_panel_userptr*(pan: ptr PANEL; uptr: pointer): cint{.extdecl,
|
||||
importc: "set_panel_userptr", dynlib: pdcursesdll.}
|
||||
proc show_panel*(pan: ptr TPANEL): cint{.extdecl, importc: "show_panel",
|
||||
proc show_panel*(pan: ptr PANEL): cint{.extdecl, importc: "show_panel",
|
||||
dynlib: pdcursesdll.}
|
||||
proc top_panel*(pan: ptr TPANEL): cint{.extdecl, importc: "top_panel",
|
||||
proc top_panel*(pan: ptr PANEL): cint{.extdecl, importc: "top_panel",
|
||||
dynlib: pdcursesdll.}
|
||||
proc update_panels*(){.extdecl, importc: "update_panels", dynlib: pdcursesdll.}
|
||||
|
||||
when unixOS:
|
||||
proc Xinitscr*(a2: cint; a3: cstringArray): ptr TWINDOW{.extdecl,
|
||||
proc Xinitscr*(a2: cint; a3: cstringArray): ptr WINDOW{.extdecl,
|
||||
importc: "Xinitscr", dynlib: pdcursesdll.}
|
||||
proc XCursesExit*(){.extdecl, importc: "XCursesExit", dynlib: pdcursesdll.}
|
||||
proc sb_init*(): cint{.extdecl, importc: "sb_init", dynlib: pdcursesdll.}
|
||||
@@ -1536,4 +1542,4 @@ when defined(windows):
|
||||
quick_edit*{.importc: "pdc_quick_edit", dynlib: pdcursesdll.}: DWORD
|
||||
|
||||
proc get_buffer_rows*(): cint{.extdecl, importc: "PDC_get_buffer_rows",
|
||||
dynlib: pdcursesdll.}
|
||||
dynlib: pdcursesdll.}
|
||||
|
||||
@@ -26,25 +26,25 @@ const
|
||||
CMDSTATUS_LEN* = 40
|
||||
|
||||
type
|
||||
TSockAddr* = array[1..112, int8]
|
||||
TPGresAttDesc*{.pure, final.} = object
|
||||
SockAddr* = array[1..112, int8]
|
||||
PGresAttDesc*{.pure, final.} = object
|
||||
name*: cstring
|
||||
adtid*: Oid
|
||||
adtsize*: int
|
||||
|
||||
PPGresAttDesc* = ptr TPGresAttDesc
|
||||
PPGresAttDesc* = ptr PGresAttDesc
|
||||
PPPGresAttDesc* = ptr PPGresAttDesc
|
||||
TPGresAttValue*{.pure, final.} = object
|
||||
PGresAttValue*{.pure, final.} = object
|
||||
length*: int32
|
||||
value*: cstring
|
||||
|
||||
PPGresAttValue* = ptr TPGresAttValue
|
||||
PPGresAttValue* = ptr PGresAttValue
|
||||
PPPGresAttValue* = ptr PPGresAttValue
|
||||
PExecStatusType* = ptr TExecStatusType
|
||||
TExecStatusType* = enum
|
||||
PExecStatusType* = ptr ExecStatusType
|
||||
ExecStatusType* = enum
|
||||
PGRES_EMPTY_QUERY = 0, PGRES_COMMAND_OK, PGRES_TUPLES_OK, PGRES_COPY_OUT,
|
||||
PGRES_COPY_IN, PGRES_BAD_RESPONSE, PGRES_NONFATAL_ERROR, PGRES_FATAL_ERROR
|
||||
TPGlobjfuncs*{.pure, final.} = object
|
||||
PGlobjfuncs*{.pure, final.} = object
|
||||
fn_lo_open*: Oid
|
||||
fn_lo_close*: Oid
|
||||
fn_lo_creat*: Oid
|
||||
@@ -54,26 +54,26 @@ type
|
||||
fn_lo_read*: Oid
|
||||
fn_lo_write*: Oid
|
||||
|
||||
PPGlobjfuncs* = ptr TPGlobjfuncs
|
||||
PConnStatusType* = ptr TConnStatusType
|
||||
TConnStatusType* = enum
|
||||
PPGlobjfuncs* = ptr PGlobjfuncs
|
||||
PConnStatusType* = ptr ConnStatusType
|
||||
ConnStatusType* = enum
|
||||
CONNECTION_OK, CONNECTION_BAD, CONNECTION_STARTED, CONNECTION_MADE,
|
||||
CONNECTION_AWAITING_RESPONSE, CONNECTION_AUTH_OK, CONNECTION_SETENV,
|
||||
CONNECTION_SSL_STARTUP, CONNECTION_NEEDED
|
||||
TPGconn*{.pure, final.} = object
|
||||
PGconn*{.pure, final.} = object
|
||||
pghost*: cstring
|
||||
pgtty*: cstring
|
||||
pgport*: cstring
|
||||
pgoptions*: cstring
|
||||
dbName*: cstring
|
||||
status*: TConnStatusType
|
||||
status*: ConnStatusType
|
||||
errorMessage*: array[0..(ERROR_MSG_LENGTH) - 1, char]
|
||||
Pfin*: File
|
||||
Pfout*: File
|
||||
Pfdebug*: File
|
||||
sock*: int32
|
||||
laddr*: TSockAddr
|
||||
raddr*: TSockAddr
|
||||
laddr*: SockAddr
|
||||
raddr*: SockAddr
|
||||
salt*: array[0..(2) - 1, char]
|
||||
asyncNotifyWaiting*: int32
|
||||
notifyList*: pointer
|
||||
@@ -81,19 +81,19 @@ type
|
||||
pgpass*: cstring
|
||||
lobjfuncs*: PPGlobjfuncs
|
||||
|
||||
PPGconn* = ptr TPGconn
|
||||
TPGresult*{.pure, final.} = object
|
||||
PPGconn* = ptr PGconn
|
||||
PGresult*{.pure, final.} = object
|
||||
ntups*: int32
|
||||
numAttributes*: int32
|
||||
attDescs*: PPGresAttDesc
|
||||
tuples*: PPPGresAttValue
|
||||
tupArrSize*: int32
|
||||
resultStatus*: TExecStatusType
|
||||
resultStatus*: ExecStatusType
|
||||
cmdStatus*: array[0..(CMDSTATUS_LEN) - 1, char]
|
||||
binary*: int32
|
||||
conn*: PPGconn
|
||||
|
||||
PPGresult* = ptr TPGresult
|
||||
PPGresult* = ptr PGresult
|
||||
PPostgresPollingStatusType* = ptr PostgresPollingStatusType
|
||||
PostgresPollingStatusType* = enum
|
||||
PGRES_POLLING_FAILED = 0, PGRES_POLLING_READING, PGRES_POLLING_WRITING,
|
||||
@@ -143,7 +143,10 @@ type
|
||||
length*: int32
|
||||
isint*: int32
|
||||
p*: pointer
|
||||
|
||||
{.deprecated: [TSockAddr: SockAddr, TPGresAttDesc: PgresAttDesc,
|
||||
TPGresAttValue: PgresAttValue, TExecStatusType: ExecStatusType,
|
||||
TPGlobjfuncs: Pglobjfuncs, TConnStatusType: ConnStatusType, TPGconn: Pgconn,
|
||||
TPGresult: PGresult].}
|
||||
|
||||
proc pqconnectStart*(conninfo: cstring): PPGconn{.cdecl, dynlib: dllName,
|
||||
importc: "PQconnectStart".}
|
||||
@@ -175,7 +178,7 @@ proc pqport*(conn: PPGconn): cstring{.cdecl, dynlib: dllName, importc: "PQport".
|
||||
proc pqtty*(conn: PPGconn): cstring{.cdecl, dynlib: dllName, importc: "PQtty".}
|
||||
proc pqoptions*(conn: PPGconn): cstring{.cdecl, dynlib: dllName,
|
||||
importc: "PQoptions".}
|
||||
proc pqstatus*(conn: PPGconn): TConnStatusType{.cdecl, dynlib: dllName,
|
||||
proc pqstatus*(conn: PPGconn): ConnStatusType{.cdecl, dynlib: dllName,
|
||||
importc: "PQstatus".}
|
||||
proc pqtransactionStatus*(conn: PPGconn): PGTransactionStatusType{.cdecl,
|
||||
dynlib: dllName, importc: "PQtransactionStatus".}
|
||||
@@ -263,9 +266,9 @@ proc pqflush*(conn: PPGconn): int32{.cdecl, dynlib: dllName, importc: "PQflush".
|
||||
proc pqfn*(conn: PPGconn, fnid: int32, result_buf, result_len: ptr int32,
|
||||
result_is_int: int32, args: PPQArgBlock, nargs: int32): PPGresult{.
|
||||
cdecl, dynlib: dllName, importc: "PQfn".}
|
||||
proc pqresultStatus*(res: PPGresult): TExecStatusType{.cdecl, dynlib: dllName,
|
||||
proc pqresultStatus*(res: PPGresult): ExecStatusType{.cdecl, dynlib: dllName,
|
||||
importc: "PQresultStatus".}
|
||||
proc pqresStatus*(status: TExecStatusType): cstring{.cdecl, dynlib: dllName,
|
||||
proc pqresStatus*(status: ExecStatusType): cstring{.cdecl, dynlib: dllName,
|
||||
importc: "PQresStatus".}
|
||||
proc pqresultErrorMessage*(res: PPGresult): cstring{.cdecl, dynlib: dllName,
|
||||
importc: "PQresultErrorMessage".}
|
||||
@@ -309,7 +312,7 @@ proc pqgetisnull*(res: PPGresult, tup_num: int32, field_num: int32): int32{.
|
||||
cdecl, dynlib: dllName, importc: "PQgetisnull".}
|
||||
proc pqclear*(res: PPGresult){.cdecl, dynlib: dllName, importc: "PQclear".}
|
||||
proc pqfreemem*(p: pointer){.cdecl, dynlib: dllName, importc: "PQfreemem".}
|
||||
proc pqmakeEmptyPGresult*(conn: PPGconn, status: TExecStatusType): PPGresult{.
|
||||
proc pqmakeEmptyPGresult*(conn: PPGconn, status: ExecStatusType): PPGresult{.
|
||||
cdecl, dynlib: dllName, importc: "PQmakeEmptyPGresult".}
|
||||
proc pqescapeString*(till, `from`: cstring, len: int): int{.cdecl,
|
||||
dynlib: dllName, importc: "PQescapeString".}
|
||||
|
||||
@@ -28,16 +28,17 @@ const
|
||||
import times, rltypedefs
|
||||
|
||||
type
|
||||
Thistdata* = pointer
|
||||
Histdata* = pointer
|
||||
{.deprecated: [Thistdata: Histdata].}
|
||||
|
||||
# The structure used to store a history entry.
|
||||
|
||||
type
|
||||
THIST_ENTRY*{.pure, final.} = object
|
||||
HIST_ENTRY*{.pure, final.} = object
|
||||
line*: cstring
|
||||
timestamp*: cstring # char * rather than time_t for read/write
|
||||
data*: Thistdata
|
||||
|
||||
data*: Histdata
|
||||
{.deprecated: [THIST_ENTRY: HIST_ENTRY].}
|
||||
|
||||
# Size of the history-library-managed space in history entry HS.
|
||||
|
||||
@@ -47,12 +48,13 @@ template HISTENT_BYTES*(hs: expr): expr =
|
||||
# A structure used to pass the current state of the history stuff around.
|
||||
|
||||
type
|
||||
THISTORY_STATE*{.pure, final.} = object
|
||||
entries*: ptr ptr THIST_ENTRY # Pointer to the entries themselves.
|
||||
HISTORY_STATE*{.pure, final.} = object
|
||||
entries*: ptr ptr HIST_ENTRY # Pointer to the entries themselves.
|
||||
offset*: cint # The location pointer within this array.
|
||||
length*: cint # Number of elements within this array.
|
||||
size*: cint # Number of slots allocated to this array.
|
||||
flags*: cint
|
||||
{.deprecated: [THISTORY_STATE: HISTORY_STATE].}
|
||||
|
||||
|
||||
# Flag values for the `flags' member of HISTORY_STATE.
|
||||
@@ -67,11 +69,11 @@ const
|
||||
proc using_history*(){.cdecl, importc: "using_history", dynlib: historyDll.}
|
||||
# Return the current HISTORY_STATE of the history.
|
||||
|
||||
proc history_get_history_state*(): ptr THISTORY_STATE{.cdecl,
|
||||
proc history_get_history_state*(): ptr HISTORY_STATE{.cdecl,
|
||||
importc: "history_get_history_state", dynlib: historyDll.}
|
||||
# Set the state of the current history array to STATE.
|
||||
|
||||
proc history_set_history_state*(a2: ptr THISTORY_STATE){.cdecl,
|
||||
proc history_set_history_state*(a2: ptr HISTORY_STATE){.cdecl,
|
||||
importc: "history_set_history_state", dynlib: historyDll.}
|
||||
# Manage the history list.
|
||||
# Place STRING at the end of the history list.
|
||||
@@ -88,18 +90,18 @@ proc add_history_time*(a2: cstring){.cdecl, importc: "add_history_time",
|
||||
# is the magic number that tells us which element to delete. The
|
||||
# elements are numbered from 0.
|
||||
|
||||
proc remove_history*(a2: cint): ptr THIST_ENTRY{.cdecl,
|
||||
proc remove_history*(a2: cint): ptr HIST_ENTRY{.cdecl,
|
||||
importc: "remove_history", dynlib: historyDll.}
|
||||
# Free the history entry H and return any application-specific data
|
||||
# associated with it.
|
||||
|
||||
proc free_history_entry*(a2: ptr THIST_ENTRY): Thistdata{.cdecl,
|
||||
proc free_history_entry*(a2: ptr HIST_ENTRY): Histdata{.cdecl,
|
||||
importc: "free_history_entry", dynlib: historyDll.}
|
||||
# Make the history entry at WHICH have LINE and DATA. This returns
|
||||
# the old entry so you can dispose of the data. In the case of an
|
||||
# invalid WHICH, a NULL pointer is returned.
|
||||
|
||||
proc replace_history_entry*(a2: cint, a3: cstring, a4: Thistdata): ptr THIST_ENTRY{.
|
||||
proc replace_history_entry*(a2: cint, a3: cstring, a4: Histdata): ptr HIST_ENTRY{.
|
||||
cdecl, importc: "replace_history_entry", dynlib: historyDll.}
|
||||
# Clear the history list and start over.
|
||||
|
||||
@@ -123,7 +125,7 @@ proc history_is_stifled*(): cint{.cdecl, importc: "history_is_stifled",
|
||||
# history. Element 0 of this list is the beginning of time. If there
|
||||
# is no history, return NULL.
|
||||
|
||||
proc history_list*(): ptr ptr THIST_ENTRY{.cdecl, importc: "history_list",
|
||||
proc history_list*(): ptr ptr HIST_ENTRY{.cdecl, importc: "history_list",
|
||||
dynlib: historyDll.}
|
||||
# Returns the number which says what history element we are now
|
||||
# looking at.
|
||||
@@ -132,17 +134,17 @@ proc where_history*(): cint{.cdecl, importc: "where_history", dynlib: historyDll
|
||||
# Return the history entry at the current position, as determined by
|
||||
# history_offset. If there is no entry there, return a NULL pointer.
|
||||
|
||||
proc current_history*(): ptr THIST_ENTRY{.cdecl, importc: "current_history",
|
||||
proc current_history*(): ptr HIST_ENTRY{.cdecl, importc: "current_history",
|
||||
dynlib: historyDll.}
|
||||
# Return the history entry which is logically at OFFSET in the history
|
||||
# array. OFFSET is relative to history_base.
|
||||
|
||||
proc history_get*(a2: cint): ptr THIST_ENTRY{.cdecl, importc: "history_get",
|
||||
proc history_get*(a2: cint): ptr HIST_ENTRY{.cdecl, importc: "history_get",
|
||||
dynlib: historyDll.}
|
||||
# Return the timestamp associated with the HIST_ENTRY * passed as an
|
||||
# argument
|
||||
|
||||
proc history_get_time*(a2: ptr THIST_ENTRY): Time{.cdecl,
|
||||
proc history_get_time*(a2: ptr HIST_ENTRY): Time{.cdecl,
|
||||
importc: "history_get_time", dynlib: historyDll.}
|
||||
# Return the number of bytes that the primary history entries are using.
|
||||
# This just adds up the lengths of the_history->lines.
|
||||
@@ -158,13 +160,13 @@ proc history_set_pos*(a2: cint): cint{.cdecl, importc: "history_set_pos",
|
||||
# a pointer to that entry. If there is no previous entry, return
|
||||
# a NULL pointer.
|
||||
|
||||
proc previous_history*(): ptr THIST_ENTRY{.cdecl, importc: "previous_history",
|
||||
proc previous_history*(): ptr HIST_ENTRY{.cdecl, importc: "previous_history",
|
||||
dynlib: historyDll.}
|
||||
# Move history_offset forward to the next item in the input_history,
|
||||
# and return the a pointer to that entry. If there is no next entry,
|
||||
# return a NULL pointer.
|
||||
|
||||
proc next_history*(): ptr THIST_ENTRY{.cdecl, importc: "next_history",
|
||||
proc next_history*(): ptr HIST_ENTRY{.cdecl, importc: "next_history",
|
||||
dynlib: historyDll.}
|
||||
# Searching the history list.
|
||||
# Search the history for STRING, starting at history_offset.
|
||||
|
||||
@@ -78,9 +78,10 @@ const
|
||||
# TYPE says which kind of thing FUNCTION is.
|
||||
|
||||
type
|
||||
TKEYMAP_ENTRY*{.pure, final.} = object
|
||||
KEYMAP_ENTRY*{.pure, final.} = object
|
||||
typ*: char
|
||||
function*: TCommandFunc
|
||||
{.deprecated: [TKEYMAP_ENTRY: KEYMAP_ENTRY].}
|
||||
|
||||
|
||||
# This must be large enough to hold bindings for all of the characters
|
||||
@@ -97,8 +98,9 @@ const
|
||||
# Maybe I need C lessons.
|
||||
|
||||
type
|
||||
TKEYMAP_ENTRY_ARRAY* = array[0..KEYMAP_SIZE - 1, TKEYMAP_ENTRY]
|
||||
PKeymap* = ptr TKEYMAP_ENTRY
|
||||
KEYMAP_ENTRY_ARRAY* = array[0..KEYMAP_SIZE - 1, KEYMAP_ENTRY]
|
||||
PKeymap* = ptr KEYMAP_ENTRY
|
||||
{.deprecated: [TKEYMAP_ENTRY_ARRAY: KEYMAP_ENTRY_ARRAY].}
|
||||
|
||||
# The values that TYPE can have in a keymap entry.
|
||||
|
||||
@@ -110,12 +112,12 @@ const
|
||||
when false:
|
||||
var
|
||||
emacs_standard_keymap*{.importc: "emacs_standard_keymap",
|
||||
dynlib: readlineDll.}: TKEYMAP_ENTRY_ARRAY
|
||||
emacs_meta_keymap*{.importc: "emacs_meta_keymap", dynlib: readlineDll.}: TKEYMAP_ENTRY_ARRAY
|
||||
emacs_ctlx_keymap*{.importc: "emacs_ctlx_keymap", dynlib: readlineDll.}: TKEYMAP_ENTRY_ARRAY
|
||||
dynlib: readlineDll.}: KEYMAP_ENTRY_ARRAY
|
||||
emacs_meta_keymap*{.importc: "emacs_meta_keymap", dynlib: readlineDll.}: KEYMAP_ENTRY_ARRAY
|
||||
emacs_ctlx_keymap*{.importc: "emacs_ctlx_keymap", dynlib: readlineDll.}: KEYMAP_ENTRY_ARRAY
|
||||
var
|
||||
vi_insertion_keymap*{.importc: "vi_insertion_keymap", dynlib: readlineDll.}: TKEYMAP_ENTRY_ARRAY
|
||||
vi_movement_keymap*{.importc: "vi_movement_keymap", dynlib: readlineDll.}: TKEYMAP_ENTRY_ARRAY
|
||||
vi_insertion_keymap*{.importc: "vi_insertion_keymap", dynlib: readlineDll.}: KEYMAP_ENTRY_ARRAY
|
||||
vi_movement_keymap*{.importc: "vi_movement_keymap", dynlib: readlineDll.}: KEYMAP_ENTRY_ARRAY
|
||||
# Return a new, empty keymap.
|
||||
# Free it with free() when you are done.
|
||||
|
||||
@@ -154,7 +156,8 @@ const
|
||||
tildeDll = readlineDll
|
||||
|
||||
type
|
||||
Thook_func* = proc (a2: cstring): cstring{.cdecl.}
|
||||
Hook_func* = proc (a2: cstring): cstring{.cdecl.}
|
||||
{.deprecated: [Thook_func: Hook_func].}
|
||||
|
||||
when not defined(macosx):
|
||||
# If non-null, this contains the address of a function that the application
|
||||
@@ -163,7 +166,7 @@ when not defined(macosx):
|
||||
# which is the expansion, or a NULL pointer if the expansion fails.
|
||||
|
||||
var expansion_preexpansion_hook*{.importc: "tilde_expansion_preexpansion_hook",
|
||||
dynlib: tildeDll.}: Thook_func
|
||||
dynlib: tildeDll.}: Hook_func
|
||||
|
||||
# If non-null, this contains the address of a function to call if the
|
||||
# standard meaning for expanding a tilde fails. The function is called
|
||||
@@ -171,7 +174,7 @@ when not defined(macosx):
|
||||
# which is the expansion, or a NULL pointer if there is no expansion.
|
||||
|
||||
var expansion_failure_hook*{.importc: "tilde_expansion_failure_hook",
|
||||
dynlib: tildeDll.}: Thook_func
|
||||
dynlib: tildeDll.}: Hook_func
|
||||
|
||||
# When non-null, this is a NULL terminated array of strings which
|
||||
# are duplicates for a tilde prefix. Bash uses this to expand
|
||||
@@ -214,35 +217,38 @@ const
|
||||
# the code tells undo what to undo, not how to undo it.
|
||||
|
||||
type
|
||||
Tundo_code* = enum
|
||||
Undo_code* = enum
|
||||
UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END
|
||||
{.deprecated: [Tundo_code: Undo_code].}
|
||||
|
||||
# What an element of THE_UNDO_LIST looks like.
|
||||
|
||||
type
|
||||
TUNDO_LIST*{.pure, final.} = object
|
||||
next*: ptr Tundo_list
|
||||
UNDO_LIST*{.pure, final.} = object
|
||||
next*: ptr UNDO_LIST
|
||||
start*: cint
|
||||
theEnd*: cint # Where the change took place.
|
||||
text*: cstring # The text to insert, if undoing a delete.
|
||||
what*: Tundo_code # Delete, Insert, Begin, End.
|
||||
what*: Undo_code # Delete, Insert, Begin, End.
|
||||
{.deprecated: [TUNDO_LIST: UNDO_LIST].}
|
||||
|
||||
|
||||
# The current undo list for RL_LINE_BUFFER.
|
||||
|
||||
when not defined(macosx):
|
||||
var undo_list*{.importc: "rl_undo_list", dynlib: readlineDll.}: ptr TUNDO_LIST
|
||||
var undo_list*{.importc: "rl_undo_list", dynlib: readlineDll.}: ptr UNDO_LIST
|
||||
|
||||
# The data structure for mapping textual names to code addresses.
|
||||
|
||||
type
|
||||
TFUNMAP*{.pure, final.} = object
|
||||
FUNMAP*{.pure, final.} = object
|
||||
name*: cstring
|
||||
function*: TCommandFunc
|
||||
{.deprecated: [TFUNMAP: FUNMAP].}
|
||||
|
||||
|
||||
when not defined(macosx):
|
||||
var funmap*{.importc: "funmap", dynlib: readlineDll.}: ptr ptr TFUNMAP
|
||||
var funmap*{.importc: "funmap", dynlib: readlineDll.}: ptr ptr FUNMAP
|
||||
|
||||
# ****************************************************************
|
||||
#
|
||||
@@ -697,7 +703,7 @@ proc push_macro_input*(a2: cstring){.cdecl, importc: "rl_push_macro_input",
|
||||
dynlib: readlineDll.}
|
||||
# Functions for undoing, from undo.c
|
||||
|
||||
proc add_undo*(a2: Tundo_code, a3: cint, a4: cint, a5: cstring){.cdecl,
|
||||
proc add_undo*(a2: Undo_code, a3: cint, a4: cint, a5: cstring){.cdecl,
|
||||
importc: "rl_add_undo", dynlib: readlineDll.}
|
||||
proc free_undo_list*(){.cdecl, importc: "rl_free_undo_list", dynlib: readlineDll.}
|
||||
proc do_undo*(): cint{.cdecl, importc: "rl_do_undo", dynlib: readlineDll.}
|
||||
@@ -816,7 +822,7 @@ proc complete_internal*(a2: cint): cint{.cdecl, importc: "rl_complete_internal",
|
||||
dynlib: readlineDll.}
|
||||
proc display_match_list*(a2: cstringArray, a3: cint, a4: cint){.cdecl,
|
||||
importc: "rl_display_match_list", dynlib: readlineDll.}
|
||||
proc completion_matches*(a2: cstring, a3: Tcompentry_func): cstringArray{.
|
||||
proc completion_matches*(a2: cstring, a3: Compentry_func): cstringArray{.
|
||||
cdecl, importc: "rl_completion_matches", dynlib: readlineDll.}
|
||||
proc username_completion_function*(a2: cstring, a3: cint): cstring{.cdecl,
|
||||
importc: "rl_username_completion_function", dynlib: readlineDll.}
|
||||
@@ -1169,13 +1175,13 @@ template ISSTATE*(x: expr): expr =
|
||||
(readline_state and x) != 0
|
||||
|
||||
type
|
||||
Treadline_state*{.pure, final.} = object
|
||||
Readline_state*{.pure, final.} = object
|
||||
point*: cint # line state
|
||||
theEnd*: cint
|
||||
mark*: cint
|
||||
buffer*: cstring
|
||||
buflen*: cint
|
||||
ul*: ptr TUNDO_LIST
|
||||
ul*: ptr UNDO_LIST
|
||||
prompt*: cstring # global state
|
||||
rlstate*: cint
|
||||
done*: cint
|
||||
@@ -1194,9 +1200,10 @@ type
|
||||
# options state
|
||||
# reserved for future expansion, so the struct size doesn't change
|
||||
reserved*: array[0..64 - 1, char]
|
||||
{.deprecated: [Treadline_state: Readline_state].}
|
||||
|
||||
|
||||
proc save_state*(a2: ptr Treadline_state): cint{.cdecl,
|
||||
proc save_state*(a2: ptr Readline_state): cint{.cdecl,
|
||||
importc: "rl_save_state", dynlib: readlineDll.}
|
||||
proc restore_state*(a2: ptr Treadline_state): cint{.cdecl,
|
||||
proc restore_state*(a2: ptr Readline_state): cint{.cdecl,
|
||||
importc: "rl_restore_state", dynlib: readlineDll.}
|
||||
|
||||
@@ -19,27 +19,32 @@
|
||||
#
|
||||
|
||||
type
|
||||
TFunction* = proc (): cint{.cdecl.}
|
||||
TVFunction* = proc (){.cdecl.}
|
||||
TCPFunction* = proc (): cstring{.cdecl.}
|
||||
TCPPFunction* = proc (): cstringArray{.cdecl.}
|
||||
Function* = proc (): cint{.cdecl.}
|
||||
VFunction* = proc (){.cdecl.}
|
||||
CPFunction* = proc (): cstring{.cdecl.}
|
||||
CPPFunction* = proc (): cstringArray{.cdecl.}
|
||||
{.deprecated: [TFunction: Function, TVFunction: VFunction,
|
||||
TCPFunction: CPFunction, TCPPFunction: CPPFunction].}
|
||||
|
||||
# Bindable functions
|
||||
|
||||
type
|
||||
Tcommand_func* = proc (a2: cint, a3: cint): cint{.cdecl.}
|
||||
Command_func* = proc (a2: cint, a3: cint): cint{.cdecl.}
|
||||
{.deprecated: [Tcommand_func: Command_func].}
|
||||
|
||||
# Typedefs for the completion system
|
||||
|
||||
type
|
||||
Tcompentry_func* = proc (a2: cstring, a3: cint): cstring{.cdecl.}
|
||||
Tcompletion_func* = proc (a2: cstring, a3: cint, a4: cint): cstringArray{.
|
||||
Compentry_func* = proc (a2: cstring, a3: cint): cstring{.cdecl.}
|
||||
Completion_func* = proc (a2: cstring, a3: cint, a4: cint): cstringArray{.
|
||||
cdecl.}
|
||||
Tquote_func* = proc (a2: cstring, a3: cint, a4: cstring): cstring{.cdecl.}
|
||||
Tdequote_func* = proc (a2: cstring, a3: cint): cstring{.cdecl.}
|
||||
Tcompignore_func* = proc (a2: cstringArray): cint{.cdecl.}
|
||||
Tcompdisp_func* = proc (a2: cstringArray, a3: cint, a4: cint){.cdecl.}
|
||||
|
||||
Quote_func* = proc (a2: cstring, a3: cint, a4: cstring): cstring{.cdecl.}
|
||||
Dequote_func* = proc (a2: cstring, a3: cint): cstring{.cdecl.}
|
||||
Compignore_func* = proc (a2: cstringArray): cint{.cdecl.}
|
||||
Compdisp_func* = proc (a2: cstringArray, a3: cint, a4: cint){.cdecl.}
|
||||
{.deprecated: [Tcompentry_func: Compentry_func,Tcompletion_func: Completion_func,
|
||||
Tquote_func: Quote_func, Tdequote_func: Dequote_func,
|
||||
Tcompignore_func: Compignore_func, Tcompdisp_func: Compdisp_func].}
|
||||
# Type for input and pre-read hook functions like rl_event_hook
|
||||
|
||||
type
|
||||
|
||||
Reference in New Issue
Block a user