diff --git a/.github/workflows/auto-wheel-upload.yml b/.github/workflows/auto-wheel-upload.yml
new file mode 100644
index 0000000..40ab7be
--- /dev/null
+++ b/.github/workflows/auto-wheel-upload.yml
@@ -0,0 +1,66 @@
+name: Auto Wheel Upload
+
+on:
+ pull_request:
+ types: [opened, edited, synchronize]
+ paths:
+ - '**/*.go' # 监听Go文件变化
+ - '**/llpkg.cfg' # 监听配置文件变化
+ - '**/go.mod' # 监听模块文件变化
+ - '**/go.sum' # 监听依赖文件变化
+
+jobs:
+ process-wheel-request:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ pull-requests: write
+ issues: write
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ with:
+ token: ${{ secrets.WHEEL_UPLOAD_TOKEN }}
+
+ - name: Set up Go
+ uses: actions/setup-go@v4
+ with:
+ go-version: '1.22'
+
+ - name: Install llpkgstore
+ run: |
+ go install -v github.com/Bigdata-shiyang/llpkgstore-test/cmd/llpkgstore@latest
+
+ - name: Process wheel request
+ env:
+ GITHUB_TOKEN: ${{ secrets.WHEEL_UPLOAD_TOKEN }}
+ TARGET_REPO_OWNER: Bigdata-shiyang
+ TARGET_REPO_NAME: test # 指向当前仓库
+ run: |
+ echo "Starting wheel upload process for PR #${{ github.event.number }}"
+ llpkgstore wheel-upload ${{ github.event.number }}
+
+ - name: Add success label
+ if: success()
+ env:
+ GITHUB_TOKEN: ${{ secrets.WHEEL_UPLOAD_TOKEN }}
+ run: |
+ echo "Adding success label to PR #${{ github.event.number }}"
+ curl -X POST \
+ -H "Authorization: token ${{ secrets.WHEEL_UPLOAD_TOKEN }}" \
+ -H "Accept: application/vnd.github.v3+json" \
+ https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.number }}/labels \
+ -d '{"labels":["wheel-added"]}'
+
+ - name: Add failure label
+ if: failure()
+ env:
+ GITHUB_TOKEN: ${{ secrets.WHEEL_UPLOAD_TOKEN }}
+ run: |
+ echo "Adding failure label to PR #${{ github.event.number }}"
+ curl -X POST \
+ -H "Authorization: token ${{ secrets.WHEEL_UPLOAD_TOKEN }}" \
+ -H "Accept: application/vnd.github.v3+json" \
+ https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.number }}/labels \
+ -d '{"labels":["wheel-failed"]}'
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/bzip2/_demo/compress/compress.go b/bzip2/_demo/compress/compress.go
new file mode 100644
index 0000000..6c17f3c
--- /dev/null
+++ b/bzip2/_demo/compress/compress.go
@@ -0,0 +1,60 @@
+package main
+
+import (
+ "fmt"
+ "unsafe"
+
+ "github.com/goplus/lib/c"
+ "github.com/goplus/llpkg/bzip2"
+)
+
+func CompressFile(inPath, outPath string) error {
+ inPathC := c.AllocaCStr(inPath)
+
+ inFile := c.Fopen(inPathC, c.Str("rb"))
+ if inFile == nil {
+ return fmt.Errorf("failed to open input file: %s", inPath)
+ }
+ defer c.Fclose(inFile)
+
+ outPathC := c.AllocaCStr(outPath)
+ outFile := c.Fopen(outPathC, c.Str("wb"))
+ if outFile == nil {
+ return fmt.Errorf("failed to open output file: %s", outPath)
+ }
+ defer c.Fclose(outFile)
+
+ var bzerr c.Int
+ bzfile := bzip2.WriteOpen(&bzerr, outFile, 9, 0, 30)
+ if bzfile == nil || bzerr != bzip2.OK {
+ return fmt.Errorf("BzWriteOpen error, code=%d", bzerr)
+ }
+
+ buf := make([]byte, 4096)
+ for {
+ n := c.Fread(unsafe.Pointer(&buf[0]), 1, uintptr(len(buf)), inFile)
+ if n == 0 {
+ break
+ }
+
+ bzip2.Write(&bzerr, bzfile, unsafe.Pointer(&buf[0]), c.Int(n))
+ if bzerr != bzip2.OK {
+ return fmt.Errorf("BzWrite error, code=%d", bzerr)
+ }
+
+ if n < uintptr(len(buf)) {
+ break
+ }
+ }
+
+ bzip2.WriteClose(&bzerr, bzfile, 0, nil, nil)
+ if bzerr != bzip2.OK {
+ return fmt.Errorf("BzWriteClose error, code=%d", bzerr)
+ }
+
+ return nil
+}
+
+func main() {
+ CompressFile("test.txt", "../decompress/test.bz2")
+}
diff --git a/bzip2/_demo/compress/test.txt b/bzip2/_demo/compress/test.txt
new file mode 100644
index 0000000..97b5955
--- /dev/null
+++ b/bzip2/_demo/compress/test.txt
@@ -0,0 +1 @@
+12345678
diff --git a/bzip2/_demo/decompress/decompress.go b/bzip2/_demo/decompress/decompress.go
new file mode 100644
index 0000000..829e9c9
--- /dev/null
+++ b/bzip2/_demo/decompress/decompress.go
@@ -0,0 +1,76 @@
+package main
+
+import (
+ "fmt"
+ "log"
+ "os"
+ "unsafe"
+
+ "github.com/goplus/lib/c"
+ "github.com/goplus/llpkg/bzip2"
+)
+
+func DecompressFile(inPath, outPath string) error {
+ inPathC := c.AllocaCStr(inPath)
+
+ inFile := c.Fopen(inPathC, c.Str("rb"))
+ if inFile == nil {
+ return fmt.Errorf("failed to open input file: %s", inPath)
+ }
+ defer c.Fclose(inFile)
+
+ outPathC := c.AllocaCStr(outPath)
+
+ outFile := c.Fopen(outPathC, c.Str("wb"))
+ if outFile == nil {
+ return fmt.Errorf("failed to open output file: %s", outPath)
+ }
+ defer c.Fclose(outFile)
+
+ var bzerr c.Int
+ bzfile := bzip2.ReadOpen(&bzerr, inFile, 0, 0, nil, 0)
+ if bzfile == nil || bzerr != bzip2.OK {
+ return fmt.Errorf("BzReadOpen error, code=%d", bzerr)
+ }
+
+ buf := make([]byte, 4096)
+ for {
+ n := bzip2.Read(&bzerr, bzfile, unsafe.Pointer(&buf[0]), c.Int(len(buf)))
+ if bzerr == bzip2.STREAM_END {
+ if n > 0 {
+ c.Fwrite(unsafe.Pointer(&buf[0]), 1, uintptr(n), outFile)
+ }
+ break
+ }
+
+ if bzerr != bzip2.OK && bzerr != bzip2.STREAM_END {
+ return fmt.Errorf("BzRead error, code=%d", bzerr)
+ }
+ if n > 0 {
+ c.Fwrite(unsafe.Pointer(&buf[0]), 1, uintptr(n), outFile)
+ } else {
+ break
+ }
+ }
+
+ bzip2.ReadClose(&bzerr, bzfile)
+ if bzerr != bzip2.OK {
+ return fmt.Errorf("BzReadClose error, code=%d", bzerr)
+ }
+
+ return nil
+}
+
+func main() {
+ err := DecompressFile("test.bz2", "ttt.test")
+ if err != nil {
+ panic(err)
+ }
+
+ b, err := os.ReadFile("ttt.test")
+ if err != nil {
+ panic(err)
+ }
+
+ log.Println(string(b))
+}
diff --git a/bzip2/bzip2_autogen_link.go b/bzip2/bzip2_autogen_link.go
new file mode 100644
index 0000000..f1d39d6
--- /dev/null
+++ b/bzip2/bzip2_autogen_link.go
@@ -0,0 +1,5 @@
+package bzip2
+
+import _ "github.com/goplus/lib/c"
+
+const LLGoPackage string = "link: $(pkg-config --libs bzip2);"
diff --git a/bzip2/bzlib.go b/bzip2/bzlib.go
new file mode 100644
index 0000000..edda402
--- /dev/null
+++ b/bzip2/bzlib.go
@@ -0,0 +1,136 @@
+package bzip2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+const RUN = 0
+const FLUSH = 1
+const FINISH = 2
+const OK = 0
+const RUN_OK = 1
+const FLUSH_OK = 2
+const FINISH_OK = 3
+const STREAM_END = 4
+const MAX_UNUSED = 5000
+
+type BzStream struct {
+ NextIn *c.Char
+ AvailIn c.Uint
+ TotalInLo32 c.Uint
+ TotalInHi32 c.Uint
+ NextOut *c.Char
+ AvailOut c.Uint
+ TotalOutLo32 c.Uint
+ TotalOutHi32 c.Uint
+ State c.Pointer
+ Bzalloc c.Pointer
+ Bzfree c.Pointer
+ Opaque c.Pointer
+}
+
+/*-- Core (low-level) library functions --*/
+// llgo:link (*BzStream).CompressInit C.BZ2_bzCompressInit
+func (recv_ *BzStream) CompressInit(blockSize100k c.Int, verbosity c.Int, workFactor c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*BzStream).Compress C.BZ2_bzCompress
+func (recv_ *BzStream) Compress(action c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*BzStream).CompressEnd C.BZ2_bzCompressEnd
+func (recv_ *BzStream) CompressEnd() c.Int {
+ return 0
+}
+
+// llgo:link (*BzStream).DecompressInit C.BZ2_bzDecompressInit
+func (recv_ *BzStream) DecompressInit(verbosity c.Int, small c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*BzStream).Decompress C.BZ2_bzDecompress
+func (recv_ *BzStream) Decompress() c.Int {
+ return 0
+}
+
+// llgo:link (*BzStream).DecompressEnd C.BZ2_bzDecompressEnd
+func (recv_ *BzStream) DecompressEnd() c.Int {
+ return 0
+}
+
+type BZFILE c.Void
+
+//go:linkname ReadOpen C.BZ2_bzReadOpen
+func ReadOpen(bzerror *c.Int, f *c.FILE, verbosity c.Int, small c.Int, unused c.Pointer, nUnused c.Int) *BZFILE
+
+//go:linkname ReadClose C.BZ2_bzReadClose
+func ReadClose(bzerror *c.Int, b *BZFILE)
+
+//go:linkname ReadGetUnused C.BZ2_bzReadGetUnused
+func ReadGetUnused(bzerror *c.Int, b *BZFILE, unused *c.Pointer, nUnused *c.Int)
+
+//go:linkname Read C.BZ2_bzRead
+func Read(bzerror *c.Int, b *BZFILE, buf c.Pointer, len c.Int) c.Int
+
+//go:linkname WriteOpen C.BZ2_bzWriteOpen
+func WriteOpen(bzerror *c.Int, f *c.FILE, blockSize100k c.Int, verbosity c.Int, workFactor c.Int) *BZFILE
+
+//go:linkname Write C.BZ2_bzWrite
+func Write(bzerror *c.Int, b *BZFILE, buf c.Pointer, len c.Int)
+
+//go:linkname WriteClose C.BZ2_bzWriteClose
+func WriteClose(bzerror *c.Int, b *BZFILE, abandon c.Int, nbytes_in *c.Uint, nbytes_out *c.Uint)
+
+//go:linkname WriteClose64 C.BZ2_bzWriteClose64
+func WriteClose64(bzerror *c.Int, b *BZFILE, abandon c.Int, nbytes_in_lo32 *c.Uint, nbytes_in_hi32 *c.Uint, nbytes_out_lo32 *c.Uint, nbytes_out_hi32 *c.Uint)
+
+/*-- Utility functions --*/
+//go:linkname BuffToBuffCompress C.BZ2_bzBuffToBuffCompress
+func BuffToBuffCompress(dest *c.Char, destLen *c.Uint, source *c.Char, sourceLen c.Uint, blockSize100k c.Int, verbosity c.Int, workFactor c.Int) c.Int
+
+//go:linkname BuffToBuffDecompress C.BZ2_bzBuffToBuffDecompress
+func BuffToBuffDecompress(dest *c.Char, destLen *c.Uint, source *c.Char, sourceLen c.Uint, small c.Int, verbosity c.Int) c.Int
+
+/*--
+ Code contributed by Yoshioka Tsuneo (tsuneo@rr.iij4u.or.jp)
+ to support better zlib compatibility.
+ This code is not _officially_ part of libbzip2 (yet);
+ I haven't tested it, documented it, or considered the
+ threading-safeness of it.
+ If this code breaks, please contact both Yoshioka and me.
+--*/
+//go:linkname LibVersion C.BZ2_bzlibVersion
+func LibVersion() *c.Char
+
+//go:linkname Open C.BZ2_bzopen
+func Open(path *c.Char, mode *c.Char) *BZFILE
+
+//go:linkname Dopen C.BZ2_bzdopen
+func Dopen(fd c.Int, mode *c.Char) *BZFILE
+
+// llgo:link (*BZFILE).Read C.BZ2_bzread
+func (recv_ *BZFILE) Read(buf c.Pointer, len c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*BZFILE).Write C.BZ2_bzwrite
+func (recv_ *BZFILE) Write(buf c.Pointer, len c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*BZFILE).Flush C.BZ2_bzflush
+func (recv_ *BZFILE) Flush() c.Int {
+ return 0
+}
+
+// llgo:link (*BZFILE).Close C.BZ2_bzclose
+func (recv_ *BZFILE) Close() {
+}
+
+// llgo:link (*BZFILE).Error C.BZ2_bzerror
+func (recv_ *BZFILE) Error(errnum *c.Int) *c.Char {
+ return nil
+}
diff --git a/bzip2/go.mod b/bzip2/go.mod
new file mode 100644
index 0000000..faff6f9
--- /dev/null
+++ b/bzip2/go.mod
@@ -0,0 +1,5 @@
+module github.com/goplus/llpkg/bzip2
+
+go 1.20
+
+require github.com/goplus/lib v0.2.0
diff --git a/bzip2/go.sum b/bzip2/go.sum
new file mode 100644
index 0000000..512980a
--- /dev/null
+++ b/bzip2/go.sum
@@ -0,0 +1,2 @@
+github.com/goplus/lib v0.2.0 h1:AjqkN1XK5H23wZMMlpaUYAMCDAdSBQ2NMFrLtSh7W4g=
+github.com/goplus/lib v0.2.0/go.mod h1:SgJv3oPqLLHCu0gcL46ejOP3x7/2ry2Jtxu7ta32kp0=
diff --git a/bzip2/llcppg.cfg b/bzip2/llcppg.cfg
new file mode 100644
index 0000000..69bdae9
--- /dev/null
+++ b/bzip2/llcppg.cfg
@@ -0,0 +1,22 @@
+{
+ "name": "bzip2",
+ "cflags": "$(pkg-config --cflags bzip2)",
+ "libs": "$(pkg-config --libs bzip2)",
+ "include": [
+ "bzlib.h"
+ ],
+ "trimPrefixes": ["BZ2_bz", "BZ_"],
+ "cplusplus": false,
+ "deps": [],
+ "keepUnderScore": false,
+ "impl": [
+ {
+ "files": [],
+ "cond": {
+ "os": [],
+ "arch": []
+ }
+ }
+ ],
+ "mix": false
+}
diff --git a/bzip2/llcppg.pub b/bzip2/llcppg.pub
new file mode 100644
index 0000000..7fb1577
--- /dev/null
+++ b/bzip2/llcppg.pub
@@ -0,0 +1,2 @@
+BZFILE
+bz_stream BzStream
\ No newline at end of file
diff --git a/bzip2/llpkg.cfg b/bzip2/llpkg.cfg
new file mode 100644
index 0000000..f50083d
--- /dev/null
+++ b/bzip2/llpkg.cfg
@@ -0,0 +1,8 @@
+{
+ "upstream": {
+ "package": {
+ "name": "bzip2",
+ "version": "1.0.8"
+ }
+ }
+}
diff --git a/bzip3/_demo/test/test.go b/bzip3/_demo/test/test.go
new file mode 100644
index 0000000..2068b84
--- /dev/null
+++ b/bzip3/_demo/test/test.go
@@ -0,0 +1,31 @@
+package main
+
+import (
+ "fmt"
+
+ "github.com/goplus/lib/c"
+ zip "github.com/goplus/llpkg/bzip3"
+)
+
+func main() {
+ fmt.Println(c.GoString(zip.Version()))
+ input := []byte("Hello, bzip3 compression!")
+ output := make([]byte, zip.Bound(uintptr(len(input))))
+ outputSize := uintptr(len(output))
+
+ errCode := zip.Compress(1024*1024, &input[0], &output[0], uintptr(len(input)), &outputSize)
+ if errCode != zip.OK {
+ fmt.Println("Compression failed with error code:", errCode)
+ return
+ }
+ fmt.Println("Compression successful. Compressed size:", outputSize)
+
+ decompressed := make([]byte, len(input))
+ decompressedSize := uintptr(len(decompressed))
+ errCode = zip.Decompress(&output[0], &decompressed[0], outputSize, &decompressedSize)
+ if errCode != zip.OK {
+ fmt.Println("Decompression failed with error code:", errCode)
+ return
+ }
+ fmt.Println("Decompression successful. Decompressed data:", string(decompressed))
+}
diff --git a/bzip3/bzip3_autogen_link.go b/bzip3/bzip3_autogen_link.go
new file mode 100644
index 0000000..033ac64
--- /dev/null
+++ b/bzip3/bzip3_autogen_link.go
@@ -0,0 +1,5 @@
+package bzip3
+
+import _ "github.com/goplus/lib/c"
+
+const LLGoPackage string = "link: $(pkg-config --libs bzip3);"
diff --git a/bzip3/go.mod b/bzip3/go.mod
new file mode 100644
index 0000000..93fd945
--- /dev/null
+++ b/bzip3/go.mod
@@ -0,0 +1,5 @@
+module github.com/goplus/llpkg/bzip3
+
+go 1.20
+
+require github.com/goplus/lib v0.2.0
diff --git a/bzip3/go.sum b/bzip3/go.sum
new file mode 100644
index 0000000..512980a
--- /dev/null
+++ b/bzip3/go.sum
@@ -0,0 +1,2 @@
+github.com/goplus/lib v0.2.0 h1:AjqkN1XK5H23wZMMlpaUYAMCDAdSBQ2NMFrLtSh7W4g=
+github.com/goplus/lib v0.2.0/go.mod h1:SgJv3oPqLLHCu0gcL46ejOP3x7/2ry2Jtxu7ta32kp0=
diff --git a/bzip3/libbz3.go b/bzip3/libbz3.go
new file mode 100644
index 0000000..2c93f6e
--- /dev/null
+++ b/bzip3/libbz3.go
@@ -0,0 +1,188 @@
+package bzip3
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+const OK = 0
+
+type State struct {
+ Unused [8]uint8
+}
+
+/**
+ * @brief Get bzip3 version.
+ */
+//go:linkname Version C.bz3_version
+func Version() *c.Char
+
+/**
+ * @brief Get the last error number associated with a given state.
+ */
+// llgo:link (*State).LastError C.bz3_last_error
+func (recv_ *State) LastError() c.Int8T {
+ return 0
+}
+
+/**
+ * @brief Return a user-readable message explaining the cause of the last error.
+ */
+// llgo:link (*State).Strerror C.bz3_strerror
+func (recv_ *State) Strerror() *c.Char {
+ return nil
+}
+
+/**
+ * @brief Construct a new block encoder state, which will encode blocks as big as the given block size.
+ * The decoder will be able to decode blocks at most as big as the given block size.
+ * Returns NULL in case allocation fails or the block size is not between 65K and 511M
+ */
+//go:linkname New C.bz3_new
+func New(block_size c.Int32T) *State
+
+/**
+ * @brief Free the memory occupied by a block encoder state.
+ */
+// llgo:link (*State).Free C.bz3_free
+func (recv_ *State) Free() {
+}
+
+/**
+ * @brief Return the recommended size of the output buffer for the compression functions.
+ */
+//go:linkname Bound C.bz3_bound
+func Bound(input_size c.SizeT) c.SizeT
+
+/**
+ * @brief Compress a frame. This function does not support parallelism
+ * by itself, consider using the low level `bz3_encode_blocks()` function instead.
+ * Using the low level API might provide better performance.
+ * Returns a bzip3 error code; BZ3_OK when the operation is successful.
+ * Make sure to set out_size to the size of the output buffer before the operation;
+ * out_size must be at least equal to `bz3_bound(in_size)'.
+ */
+//go:linkname Compress C.bz3_compress
+func Compress(block_size c.Uint32T, in *c.Uint8T, out *c.Uint8T, in_size c.SizeT, out_size *c.SizeT) c.Int
+
+/**
+ * @brief Decompress a frame. This function does not support parallelism
+ * by itself, consider using the low level `bz3_decode_blocks()` function instead.
+ * Using the low level API might provide better performance.
+ * Returns a bzip3 error code; BZ3_OK when the operation is successful.
+ * Make sure to set out_size to the size of the output buffer before the operation.
+ */
+//go:linkname Decompress C.bz3_decompress
+func Decompress(in *c.Uint8T, out *c.Uint8T, in_size c.SizeT, out_size *c.SizeT) c.Int
+
+/**
+ * @brief Calculate the minimal memory required for compression with the given block size.
+ * This includes all internal buffers and state structures. This calculates the amount of bytes
+ * that will be allocated by a call to `bz3_new()`.
+ *
+ * @details Memory allocation and usage patterns:
+ *
+ * bz3_new():
+ * - Allocates all memory upfront:
+ * - Core state structure (sizeof(struct bz3_state))
+ * - Swap buffer (bz3_bound(block_size) bytes)
+ * - SAIS array (BWT_BOUND(block_size) * sizeof(int32_t) bytes)
+ * - LZP lookup table ((1 << LZP_DICTIONARY) * sizeof(int32_t) bytes)
+ * - Compression state (sizeof(state))
+ * - All memory remains allocated until bz3_free()
+ *
+ * Additional memory may be used depending on API used from here.
+ *
+ * # Low Level APIs
+ *
+ * 1. bz3_encode_block() / bz3_decode_block():
+ * - Uses pre-allocated memory from bz3_new()
+ * - No additional memory allocation except for libsais (usually ~16KiB)
+ * - Peak memory usage of physical RAM varies with compression stages:
+ * - LZP: Uses LZP lookup table + swap buffer
+ * - BWT: Uses SAIS array + swap buffer
+ * - Entropy coding: Uses compression state (cm_state) + swap buffer
+ *
+ * Using the higher level API, `bz3_compress`, expect an additional allocation
+ * of `bz3_bound(block_size)`.
+ *
+ * In the parallel version `bz3_encode_blocks`, each thread gets its own state,
+ * so memory usage is `n_threads * bz3_compress_memory_needed()`.
+ *
+ * # High Level APIs
+ *
+ * 1. bz3_compress():
+ * - Allocates additional temporary compression buffer (bz3_bound(block_size) bytes)
+ * in addition to the memory amount returned by this method call and libsais.
+ * - Everything is freed after compression completes
+ *
+ * 2. bz3_decompress():
+ * - Allocates additional temporary compression buffer (bz3_bound(block_size) bytes)
+ * in addition to the memory amount returned by this method call and libsais.
+ * - Everything is freed after compression completes
+ *
+ * Memory remains constant during operation, with except of some small allocations from libsais during
+ * BWT stage. That is not accounted by this function, though it usually amounts to ~16KiB, negligible.
+ * The worst case of BWT is 2*block_size technically speaking.
+ *
+ * No dynamic (re)allocation occurs outside of that.
+ *
+ * @param block_size The block size to be used for compression
+ * @return The total number of bytes required for compression, or 0 if block_size is invalid
+ */
+//go:linkname MinMemoryNeeded C.bz3_min_memory_needed
+func MinMemoryNeeded(block_size c.Int32T) c.SizeT
+
+/**
+ * @brief Encode a single block. Returns the amount of bytes written to `buffer'.
+ * `buffer' must be able to hold at least `bz3_bound(size)' bytes. The size must not
+ * exceed the block size associated with the state.
+ */
+// llgo:link (*State).EncodeBlock C.bz3_encode_block
+func (recv_ *State) EncodeBlock(buffer *c.Uint8T, size c.Int32T) c.Int32T {
+ return 0
+}
+
+/**
+ * @brief Decode a single block.
+ *
+ * `buffer' must be able to hold at least `bz3_bound(orig_size)' bytes
+ * in order to ensure decompression will succeed for all possible bzip3 blocks.
+ *
+ * In most (but not all) cases, `orig_size` should usually be sufficient.
+ * If it is not sufficient, you must allocate a buffer of size `bz3_bound(orig_size)` temporarily.
+ *
+ * If `buffer_size` is too small, `BZ3_ERR_DATA_SIZE_TOO_SMALL` will be returned.
+ * The size must not exceed the block size associated with the state.
+ *
+ * @param buffer_size The size of the buffer at 'buffer'
+ * @param compressed_size The size of the compressed data in 'buffer'
+ * @param orig_size The original size of the data before compression.
+ */
+// llgo:link (*State).DecodeBlock C.bz3_decode_block
+func (recv_ *State) DecodeBlock(buffer *c.Uint8T, buffer_size c.SizeT, compressed_size c.Int32T, orig_size c.Int32T) c.Int32T {
+ return 0
+}
+
+/**
+ * @brief Check if using original file size as buffer size is sufficient for decompressing
+ * a block at `block` pointer.
+ *
+ * @param block Pointer to the compressed block data
+ * @param block_size Size of the block buffer in bytes (must be at least 13 bytes for header)
+ * @param orig_size Size of the original uncompressed data
+ * @return 1 if original size is sufficient, 0 if insufficient, -1 on header error (insufficient buffer size)
+ *
+ * @remarks
+ *
+ * This function is useful for external APIs using the low level block encoding API,
+ * `bz3_encode_block`. You would normally call this directly after `bz3_encode_block`
+ * on the block that has been output.
+ *
+ * The purpose of this function is to prevent encoding blocks that would require an additional
+ * malloc at decompress time.
+ * The goal is to prevent erroring with `BZ3_ERR_DATA_SIZE_TOO_SMALL`, thus
+ * in turn
+ */
+//go:linkname OrigSizeSufficientForDecode C.bz3_orig_size_sufficient_for_decode
+func OrigSizeSufficientForDecode(block *c.Uint8T, block_size c.SizeT, orig_size c.Int32T) c.Int
diff --git a/bzip3/llcppg.cfg b/bzip3/llcppg.cfg
new file mode 100644
index 0000000..2d1240e
--- /dev/null
+++ b/bzip3/llcppg.cfg
@@ -0,0 +1,22 @@
+{
+ "name": "bzip3",
+ "cflags": "$(pkg-config --cflags bzip3)",
+ "libs": "$(pkg-config --libs bzip3)",
+ "include": [
+ "libbz3.h"
+ ],
+ "trimPrefixes": ["bz3_","BZ3_"],
+ "cplusplus": false,
+ "deps": [],
+ "keepUnderScore": false,
+ "impl": [
+ {
+ "files": [],
+ "cond": {
+ "os": [],
+ "arch": []
+ }
+ }
+ ],
+ "mix": false
+}
diff --git a/bzip3/llcppg.pub b/bzip3/llcppg.pub
new file mode 100644
index 0000000..42f9c94
--- /dev/null
+++ b/bzip3/llcppg.pub
@@ -0,0 +1 @@
+bz3_state State
\ No newline at end of file
diff --git a/bzip3/llpkg.cfg b/bzip3/llpkg.cfg
new file mode 100644
index 0000000..db76528
--- /dev/null
+++ b/bzip3/llpkg.cfg
@@ -0,0 +1,8 @@
+{
+ "upstream": {
+ "package": {
+ "name": "bzip3",
+ "version": "1.5.1"
+ }
+ }
+}
\ No newline at end of file
diff --git a/cargs/_demo/test/test.go b/cargs/_demo/test/test.go
new file mode 100644
index 0000000..138f1a0
--- /dev/null
+++ b/cargs/_demo/test/test.go
@@ -0,0 +1,59 @@
+package main
+
+import (
+ "fmt"
+ "os"
+
+ C "github.com/goplus/lib/c"
+ "github.com/goplus/llpkg/cargs"
+)
+
+func main() {
+ // Define command-line options
+ options := []cargs.Option{
+ {
+ Identifier: 'h',
+ AccessLetters: C.Str("h"),
+ AccessName: C.Str("help"),
+ ValueName: nil,
+ Description: C.Str("Show help information"),
+ },
+ {
+ Identifier: 'v',
+ AccessLetters: C.Str("v"),
+ AccessName: C.Str("version"),
+ ValueName: nil,
+ Description: C.Str("Show version information"),
+ },
+ }
+
+ args := os.Args
+
+ // Convert Go string array to C-style argv
+ argv := make([]*int8, len(args))
+ for i, arg := range args {
+ argv[i] = C.AllocaCStr(arg)
+ }
+
+ // Initialize option context
+ var context cargs.OptionContext
+ context.OptionInit(&options[0], uintptr(len(options)), C.Int(len(args)), &argv[0])
+
+ // Process all options
+ identifierFound := false
+ for context.OptionFetch() {
+ identifierFound = true
+ identifier := context.OptionGetIdentifier()
+ switch identifier {
+ case 'h':
+ fmt.Println("Help: This is a simple command-line parser demo")
+ case 'v':
+ fmt.Println("Version: 1.0.0")
+ }
+ }
+
+ // Default output if no identifier is found
+ if !identifierFound {
+ fmt.Println("Demo Command-line Tool\nIdentifier:\n\t-h: Help\n\t-v: Version")
+ }
+}
diff --git a/cargs/cargs.go b/cargs/cargs.go
new file mode 100644
index 0000000..948fd08
--- /dev/null
+++ b/cargs/cargs.go
@@ -0,0 +1,228 @@
+package cargs
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+/**
+ * An option is used to describe a flag/argument option submitted when the
+ * program is run.
+ */
+
+type Option struct {
+ Identifier c.Char
+ AccessLetters *c.Char
+ AccessName *c.Char
+ ValueName *c.Char
+ Description *c.Char
+}
+
+/**
+ * A context is used to iterate over all options provided. It stores the parsing
+ * state.
+ */
+
+type OptionContext struct {
+ Options *Option
+ OptionCount c.SizeT
+ Argc c.Int
+ Argv **c.Char
+ Index c.Int
+ InnerIndex c.Int
+ ErrorIndex c.Int
+ ErrorLetter c.Char
+ ForcedEnd bool
+ Identifier c.Char
+ Value *c.Char
+}
+
+// llgo:type C
+type Printer func(__llgo_arg_0 c.Pointer, __llgo_arg_1 *c.Char, __llgo_va_list ...interface{}) c.Int
+
+/**
+ * @brief Prepare argument options context for parsing.
+ *
+ * This function prepares the context for iteration and initializes the context
+ * with the supplied options and arguments. After the context has been prepared,
+ * it can be used to fetch arguments from it.
+ *
+ * @param context The context which will be initialized.
+ * @param options The registered options which are available for the program.
+ * @param option_count The amount of options which are available for the
+ * program.
+ * @param argc The amount of arguments the user supplied in the main function.
+ * @param argv A pointer to the arguments of the main function.
+ */
+// llgo:link (*OptionContext).OptionInit C.cag_option_init
+func (recv_ *OptionContext) OptionInit(options *Option, option_count c.SizeT, argc c.Int, argv **c.Char) {
+}
+
+/**
+ * @brief Fetches an option from the argument list.
+ *
+ * This function fetches a single option from the argument list. The context
+ * will be moved to that item. Information can be extracted from the context
+ * after the item has been fetched.
+ * The arguments will be re-ordered, which means that non-option arguments will
+ * be moved to the end of the argument list. After all options have been
+ * fetched, all non-option arguments will be positioned after the index of
+ * the context.
+ *
+ * @param context The context from which we will fetch the option.
+ * @return Returns true if there was another option or false if the end is
+ * reached.
+ */
+// llgo:link (*OptionContext).OptionFetch C.cag_option_fetch
+func (recv_ *OptionContext) OptionFetch() bool {
+ return false
+}
+
+/**
+ * @brief Gets the identifier of the option.
+ *
+ * This function gets the identifier of the option, which should be unique to
+ * this option and can be used to determine what kind of option this is.
+ *
+ * @param context The context from which the option was fetched.
+ * @return Returns the identifier of the option.
+ */
+// llgo:link (*OptionContext).OptionGetIdentifier C.cag_option_get_identifier
+func (recv_ *OptionContext) OptionGetIdentifier() c.Char {
+ return 0
+}
+
+/**
+ * @brief Gets the value from the option.
+ *
+ * This function gets the value from the option, if any. If the option does not
+ * contain a value, this function will return NULL.
+ *
+ * @param context The context from which the option was fetched.
+ * @return Returns a pointer to the value or NULL if there is no value.
+ */
+// llgo:link (*OptionContext).OptionGetValue C.cag_option_get_value
+func (recv_ *OptionContext) OptionGetValue() *c.Char {
+ return nil
+}
+
+/**
+ * @brief Gets the current index of the context.
+ *
+ * This function gets the index within the argv arguments of the context. The
+ * context always points to the next item which it will inspect. This is
+ * particularly useful to inspect the original argument array, or to get
+ * non-option arguments after option fetching has finished.
+ *
+ * @param context The context from which the option was fetched.
+ * @return Returns the current index of the context.
+ */
+// llgo:link (*OptionContext).OptionGetIndex C.cag_option_get_index
+func (recv_ *OptionContext) OptionGetIndex() c.Int {
+ return 0
+}
+
+/**
+ * @brief Retrieves the index of an invalid option.
+ *
+ * This function retrieves the index of an invalid option if the provided option
+ * does not match any of the options specified in the `cag_option` list. This is
+ * particularly useful when detailed information about an invalid option is
+ * required.
+ *
+ * @param context Pointer to the context from which the option was fetched.
+ * @return Returns the index of the invalid option, or -1 if it is not invalid.
+ */
+// llgo:link (*OptionContext).OptionGetErrorIndex C.cag_option_get_error_index
+func (recv_ *OptionContext) OptionGetErrorIndex() c.Int {
+ return 0
+}
+
+/**
+ * @brief Retrieves the letter character of the invalid option.
+ *
+ * This function retrieves the character of the invalid option character
+ * if the provided option does not match any of the options specified in the
+ * `cag_option` list.
+ *
+ * @param context Pointer to the context from which the option was fetched.
+ * @return Returns the letter that was unknown, or 0 otherwise.
+ */
+// llgo:link (*OptionContext).OptionGetErrorLetter C.cag_option_get_error_letter
+func (recv_ *OptionContext) OptionGetErrorLetter() c.Char {
+ return 0
+}
+
+/**
+ * @brief Prints the error associated with the invalid option to the specified
+ * destination.
+ *
+ * This function prints information about the error associated with the invalid
+ * option to the specified destination (such as a file stream). It helps in
+ * displaying the error of the current context.
+ *
+ * @param context Pointer to the context from which the option was fetched.
+ * @param destination Pointer to the file stream where the error information
+ * will be printed.
+ */
+// llgo:link (*OptionContext).OptionPrintError C.cag_option_print_error
+func (recv_ *OptionContext) OptionPrintError(destination *c.FILE) {
+}
+
+/**
+ * @brief Prints the error associated with the invalid option using user
+ * callback.
+ *
+ * This function prints information about the error associated with the invalid
+ * option using user callback. Callback prototype is same with fprintf. It helps
+ * in displaying the error of the current context.
+ *
+ * @param context Pointer to the context from which the option was fetched.
+ * @param printer The printer callback function. For example fprintf.
+ * @param printer_ctx The parameter for printer callback. For example fprintf
+ * could use parameter stderr.
+ */
+// llgo:link (*OptionContext).OptionPrinterError C.cag_option_printer_error
+func (recv_ *OptionContext) OptionPrinterError(printer Printer, printer_ctx c.Pointer) {
+}
+
+/**
+ * @brief Prints all options to the terminal.
+ *
+ * This function prints all options to the terminal. This can be used to
+ * generate the output for a "--help" option.
+ *
+ * @param options The options which will be printed.
+ * @param option_count The option count which will be printed.
+ * @param destination The destination where the output will be printed.
+ */
+// llgo:link (*Option).OptionPrint C.cag_option_print
+func (recv_ *Option) OptionPrint(option_count c.SizeT, destination *c.FILE) {
+}
+
+/**
+ * @brief Prints all options using user callback.
+ *
+ * This function prints all options using user callback. This can be used to
+ * generate the output for a "--help" option.
+ * Using user callback is useful in tiny system without FILE support
+ *
+ * @param options The options which will be printed.
+ * @param option_count The option count which will be printed.
+ * @param destination The destination where the output will be printed.
+ * @param printer The printer callback function. For example fprintf.
+ * @param printer_ctx The parameter for printer callback. For example fprintf
+ * could use parameter stderr.
+ */
+// llgo:link (*Option).OptionPrinter C.cag_option_printer
+func (recv_ *Option) OptionPrinter(option_count c.SizeT, printer Printer, printer_ctx c.Pointer) {
+}
+
+// llgo:link (*OptionContext).OptionPrepare C.cag_option_prepare
+func (recv_ *OptionContext) OptionPrepare(options *Option, option_count c.SizeT, argc c.Int, argv **c.Char) {
+}
+
+// llgo:link (*OptionContext).OptionGet C.cag_option_get
+func (recv_ *OptionContext) OptionGet() c.Char {
+ return 0
+}
diff --git a/cargs/cargs_autogen_link.go b/cargs/cargs_autogen_link.go
new file mode 100644
index 0000000..405e22a
--- /dev/null
+++ b/cargs/cargs_autogen_link.go
@@ -0,0 +1,5 @@
+package cargs
+
+import _ "github.com/goplus/lib/c"
+
+const LLGoPackage string = "link: $(pkg-config --libs cargs);"
diff --git a/cargs/go.mod b/cargs/go.mod
new file mode 100644
index 0000000..3dcf942
--- /dev/null
+++ b/cargs/go.mod
@@ -0,0 +1,5 @@
+module github.com/goplus/llpkg/cargs
+
+go 1.20
+
+require github.com/goplus/lib v0.2.0
diff --git a/cargs/go.sum b/cargs/go.sum
new file mode 100644
index 0000000..512980a
--- /dev/null
+++ b/cargs/go.sum
@@ -0,0 +1,2 @@
+github.com/goplus/lib v0.2.0 h1:AjqkN1XK5H23wZMMlpaUYAMCDAdSBQ2NMFrLtSh7W4g=
+github.com/goplus/lib v0.2.0/go.mod h1:SgJv3oPqLLHCu0gcL46ejOP3x7/2ry2Jtxu7ta32kp0=
diff --git a/cargs/llcppg.cfg b/cargs/llcppg.cfg
new file mode 100644
index 0000000..60172b9
--- /dev/null
+++ b/cargs/llcppg.cfg
@@ -0,0 +1,22 @@
+{
+ "name": "cargs",
+ "cflags": "$(pkg-config --cflags cargs)",
+ "libs": "$(pkg-config --libs cargs)",
+ "include": [
+ "cargs.h"
+ ],
+ "trimPrefixes": ["cag_"],
+ "cplusplus": false,
+ "deps": [],
+ "keepUnderScore": false,
+ "impl": [
+ {
+ "files": [],
+ "cond": {
+ "os": [],
+ "arch": []
+ }
+ }
+ ],
+ "mix": false
+}
diff --git a/cargs/llcppg.pub b/cargs/llcppg.pub
new file mode 100644
index 0000000..d01e605
--- /dev/null
+++ b/cargs/llcppg.pub
@@ -0,0 +1,3 @@
+cag_option Option
+cag_option_context OptionContext
+cag_printer Printer
\ No newline at end of file
diff --git a/cargs/llpkg.cfg b/cargs/llpkg.cfg
new file mode 100644
index 0000000..211267f
--- /dev/null
+++ b/cargs/llpkg.cfg
@@ -0,0 +1,8 @@
+{
+ "upstream": {
+ "package": {
+ "name": "cargs",
+ "version": "1.2.0"
+ }
+ }
+}
\ No newline at end of file
diff --git a/cjson/_demo/hello/hello.go b/cjson/_demo/hello/hello.go
new file mode 100644
index 0000000..c8bdc11
--- /dev/null
+++ b/cjson/_demo/hello/hello.go
@@ -0,0 +1,50 @@
+package main
+
+import (
+ "unsafe"
+
+ "github.com/goplus/llpkg/cjson"
+
+ "github.com/goplus/lib/c"
+)
+
+func main() {
+ mod := cjson.Object()
+ mod.SetItem(c.Str("name"), cjson.String(c.Str("math")))
+
+ syms := cjson.Array()
+
+ fn := cjson.Object()
+ fn.SetItem(c.Str("name"), cjson.String(c.Str("sqrt")))
+ fn.SetItem(c.Str("sig"), cjson.String(c.Str("(x, /)")))
+ syms.AddItem(fn)
+
+ v := cjson.Object()
+ v.SetItem(c.Str("name"), cjson.String(c.Str("pi")))
+ syms.AddItem(v)
+
+ mod.SetItem(c.Str("items"), syms)
+
+ cstr := mod.CStr()
+ str := c.GoString(cstr)
+ c.Printf(c.Str("%s\n"), cstr)
+ cjson.FreeCStr(unsafe.Pointer(cstr))
+
+ mod.Delete()
+
+ cjsonLoad(str)
+}
+
+func cjsonLoad(str string) {
+ mod := ParseString(str)
+
+ cstr := mod.Print()
+ c.Printf(c.Str("%s\n"), cstr)
+ cjson.FreeCStr(unsafe.Pointer(cstr))
+
+ mod.Delete()
+}
+
+func ParseString(value string) *cjson.JSON {
+ return cjson.ParseWithLength((*c.Char)(unsafe.Pointer(unsafe.StringData(value))), uintptr(len(value)))
+}
diff --git a/cjson/cJSON.go b/cjson/cJSON.go
new file mode 100644
index 0000000..5d725b7
--- /dev/null
+++ b/cjson/cJSON.go
@@ -0,0 +1,416 @@
+package cjson
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+const VERSION_MAJOR = 1
+const VERSION_MINOR = 7
+const VERSION_PATCH = 18
+const IsReference = 256
+const StringIsConst = 512
+const NESTING_LIMIT = 1000
+
+/* The cJSON structure: */
+
+type JSON struct {
+ Next *JSON
+ Prev *JSON
+ Child *JSON
+ Type c.Int
+ Valuestring *c.Char
+ Valueint c.Int
+ Valuedouble c.Double
+ String *c.Char
+}
+
+type Hooks struct {
+ MallocFn c.Pointer
+ FreeFn c.Pointer
+}
+type Bool c.Int
+
+/* returns the version of cJSON as a string */
+//go:linkname Version C.cJSON_Version
+func Version() *c.Char
+
+/* Supply malloc, realloc and free functions to cJSON */
+// llgo:link (*Hooks).InitHooks C.cJSON_InitHooks
+func (recv_ *Hooks) InitHooks() {
+}
+
+/* Memory Management: the caller is always responsible to free the results from all variants of cJSON_Parse (with cJSON_Delete) and cJSON_Print (with stdlib free, cJSON_Hooks.free_fn, or cJSON_free as appropriate). The exception is cJSON_PrintPreallocated, where the caller has full responsibility of the buffer. */
+/* Supply a block of JSON, and this returns a cJSON object you can interrogate. */
+//go:linkname Parse C.cJSON_Parse
+func Parse(value *c.Char) *JSON
+
+//go:linkname ParseWithLength C.cJSON_ParseWithLength
+func ParseWithLength(value *c.Char, buffer_length c.SizeT) *JSON
+
+/* ParseWithOpts allows you to require (and check) that the JSON is null terminated, and to retrieve the pointer to the final byte parsed. */
+/* If you supply a ptr in return_parse_end and parsing fails, then return_parse_end will contain a pointer to the error so will match cJSON_GetErrorPtr(). */
+//go:linkname ParseWithOpts C.cJSON_ParseWithOpts
+func ParseWithOpts(value *c.Char, return_parse_end **c.Char, require_null_terminated Bool) *JSON
+
+//go:linkname ParseWithLengthOpts C.cJSON_ParseWithLengthOpts
+func ParseWithLengthOpts(value *c.Char, buffer_length c.SizeT, return_parse_end **c.Char, require_null_terminated Bool) *JSON
+
+/* Render a cJSON entity to text for transfer/storage. */
+// llgo:link (*JSON).Print C.cJSON_Print
+func (recv_ *JSON) Print() *c.Char {
+ return nil
+}
+
+/* Render a cJSON entity to text for transfer/storage without any formatting. */
+// llgo:link (*JSON).CStr C.cJSON_PrintUnformatted
+func (recv_ *JSON) CStr() *c.Char {
+ return nil
+}
+
+/* Render a cJSON entity to text using a buffered strategy. prebuffer is a guess at the final size. guessing well reduces reallocation. fmt=0 gives unformatted, =1 gives formatted */
+// llgo:link (*JSON).PrintBuffered C.cJSON_PrintBuffered
+func (recv_ *JSON) PrintBuffered(prebuffer c.Int, fmt Bool) *c.Char {
+ return nil
+}
+
+/* Render a cJSON entity to text using a buffer already allocated in memory with given length. Returns 1 on success and 0 on failure. */
+/* NOTE: cJSON is not always 100% accurate in estimating how much memory it will use, so to be safe allocate 5 bytes more than you actually need */
+// llgo:link (*JSON).PrintPreallocated C.cJSON_PrintPreallocated
+func (recv_ *JSON) PrintPreallocated(buffer *c.Char, length c.Int, format Bool) Bool {
+ return 0
+}
+
+/* Delete a cJSON entity and all subentities. */
+// llgo:link (*JSON).Delete C.cJSON_Delete
+func (recv_ *JSON) Delete() {
+}
+
+/* Returns the number of items in an array (or object). */
+// llgo:link (*JSON).GetArraySize C.cJSON_GetArraySize
+func (recv_ *JSON) GetArraySize() c.Int {
+ return 0
+}
+
+/* Retrieve item number "index" from array "array". Returns NULL if unsuccessful. */
+// llgo:link (*JSON).GetArrayItem C.cJSON_GetArrayItem
+func (recv_ *JSON) GetArrayItem(index c.Int) *JSON {
+ return nil
+}
+
+/* Get item "string" from object. Case insensitive. */
+// llgo:link (*JSON).GetObjectItem C.cJSON_GetObjectItem
+func (recv_ *JSON) GetObjectItem(string *c.Char) *JSON {
+ return nil
+}
+
+// llgo:link (*JSON).GetObjectItemCaseSensitive C.cJSON_GetObjectItemCaseSensitive
+func (recv_ *JSON) GetObjectItemCaseSensitive(string *c.Char) *JSON {
+ return nil
+}
+
+// llgo:link (*JSON).HasObjectItem C.cJSON_HasObjectItem
+func (recv_ *JSON) HasObjectItem(string *c.Char) Bool {
+ return 0
+}
+
+/* For analysing failed parses. This returns a pointer to the parse error. You'll probably need to look a few chars back to make sense of it. Defined when cJSON_Parse() returns 0. 0 when cJSON_Parse() succeeds. */
+//go:linkname GetErrorPtr C.cJSON_GetErrorPtr
+func GetErrorPtr() *c.Char
+
+/* Check item type and return its value */
+// llgo:link (*JSON).GetStringValue C.cJSON_GetStringValue
+func (recv_ *JSON) GetStringValue() *c.Char {
+ return nil
+}
+
+// llgo:link (*JSON).GetNumberValue C.cJSON_GetNumberValue
+func (recv_ *JSON) GetNumberValue() c.Double {
+ return 0
+}
+
+/* These functions check the type of an item */
+// llgo:link (*JSON).IsInvalid C.cJSON_IsInvalid
+func (recv_ *JSON) IsInvalid() Bool {
+ return 0
+}
+
+// llgo:link (*JSON).IsFalse C.cJSON_IsFalse
+func (recv_ *JSON) IsFalse() Bool {
+ return 0
+}
+
+// llgo:link (*JSON).IsTrue C.cJSON_IsTrue
+func (recv_ *JSON) IsTrue() Bool {
+ return 0
+}
+
+// llgo:link (*JSON).IsBool C.cJSON_IsBool
+func (recv_ *JSON) IsBool() Bool {
+ return 0
+}
+
+// llgo:link (*JSON).IsNull C.cJSON_IsNull
+func (recv_ *JSON) IsNull() Bool {
+ return 0
+}
+
+// llgo:link (*JSON).IsNumber C.cJSON_IsNumber
+func (recv_ *JSON) IsNumber() Bool {
+ return 0
+}
+
+// llgo:link (*JSON).IsString C.cJSON_IsString
+func (recv_ *JSON) IsString() Bool {
+ return 0
+}
+
+// llgo:link (*JSON).IsArray C.cJSON_IsArray
+func (recv_ *JSON) IsArray() Bool {
+ return 0
+}
+
+// llgo:link (*JSON).IsObject C.cJSON_IsObject
+func (recv_ *JSON) IsObject() Bool {
+ return 0
+}
+
+// llgo:link (*JSON).IsRaw C.cJSON_IsRaw
+func (recv_ *JSON) IsRaw() Bool {
+ return 0
+}
+
+/* These calls create a cJSON item of the appropriate type. */
+//go:linkname Null C.cJSON_CreateNull
+func Null() *JSON
+
+//go:linkname True C.cJSON_CreateTrue
+func True() *JSON
+
+//go:linkname False C.cJSON_CreateFalse
+func False() *JSON
+
+//go:linkname CreateBool C.cJSON_CreateBool
+func CreateBool(boolean Bool) *JSON
+
+//go:linkname Number C.cJSON_CreateNumber
+func Number(num c.Double) *JSON
+
+//go:linkname String C.cJSON_CreateString
+func String(string *c.Char) *JSON
+
+/* raw json */
+//go:linkname Raw C.cJSON_CreateRaw
+func Raw(raw *c.Char) *JSON
+
+//go:linkname Array C.cJSON_CreateArray
+func Array() *JSON
+
+//go:linkname Object C.cJSON_CreateObject
+func Object() *JSON
+
+/* Create a string where valuestring references a string so
+ * it will not be freed by cJSON_Delete */
+//go:linkname StringRef C.cJSON_CreateStringReference
+func StringRef(string *c.Char) *JSON
+
+/* Create an object/array that only references it's elements so
+ * they will not be freed by cJSON_Delete */
+//go:linkname ObjectRef C.cJSON_CreateObjectReference
+func ObjectRef(child *JSON) *JSON
+
+// llgo:link (*JSON).CreateArrayRef C.cJSON_CreateArrayReference
+func (recv_ *JSON) CreateArrayRef() *JSON {
+ return nil
+}
+
+/* These utilities create an Array of count items.
+ * The parameter count cannot be greater than the number of elements in the number array, otherwise array access will be out of bounds.*/
+//go:linkname IntArray C.cJSON_CreateIntArray
+func IntArray(numbers *c.Int, count c.Int) *JSON
+
+//go:linkname FloatArray C.cJSON_CreateFloatArray
+func FloatArray(numbers *c.Float, count c.Int) *JSON
+
+//go:linkname DoubleArray C.cJSON_CreateDoubleArray
+func DoubleArray(numbers *c.Double, count c.Int) *JSON
+
+//go:linkname StringArray C.cJSON_CreateStringArray
+func StringArray(strings **c.Char, count c.Int) *JSON
+
+/* Append item to the specified array/object. */
+// llgo:link (*JSON).AddItem C.cJSON_AddItemToArray
+func (recv_ *JSON) AddItem(item *JSON) Bool {
+ return 0
+}
+
+// llgo:link (*JSON).SetItem C.cJSON_AddItemToObject
+func (recv_ *JSON) SetItem(string *c.Char, item *JSON) Bool {
+ return 0
+}
+
+/* Use this when string is definitely const (i.e. a literal, or as good as), and will definitely survive the cJSON object.
+ * WARNING: When this function was used, make sure to always check that (item->type & cJSON_StringIsConst) is zero before
+ * writing to `item->string` */
+// llgo:link (*JSON).AddItemToObjectCS C.cJSON_AddItemToObjectCS
+func (recv_ *JSON) AddItemToObjectCS(string *c.Char, item *JSON) Bool {
+ return 0
+}
+
+/* Append reference to item to the specified array/object. Use this when you want to add an existing cJSON to a new cJSON, but don't want to corrupt your existing cJSON. */
+// llgo:link (*JSON).AddItemReferenceToArray C.cJSON_AddItemReferenceToArray
+func (recv_ *JSON) AddItemReferenceToArray(item *JSON) Bool {
+ return 0
+}
+
+// llgo:link (*JSON).AddItemReferenceToObject C.cJSON_AddItemReferenceToObject
+func (recv_ *JSON) AddItemReferenceToObject(string *c.Char, item *JSON) Bool {
+ return 0
+}
+
+/* Remove/Detach items from Arrays/Objects. */
+// llgo:link (*JSON).DetachItemViaPointer C.cJSON_DetachItemViaPointer
+func (recv_ *JSON) DetachItemViaPointer(item *JSON) *JSON {
+ return nil
+}
+
+// llgo:link (*JSON).DetachItemFromArray C.cJSON_DetachItemFromArray
+func (recv_ *JSON) DetachItemFromArray(which c.Int) *JSON {
+ return nil
+}
+
+// llgo:link (*JSON).DeleteItemFromArray C.cJSON_DeleteItemFromArray
+func (recv_ *JSON) DeleteItemFromArray(which c.Int) {
+}
+
+// llgo:link (*JSON).DetachItemFromObject C.cJSON_DetachItemFromObject
+func (recv_ *JSON) DetachItemFromObject(string *c.Char) *JSON {
+ return nil
+}
+
+// llgo:link (*JSON).DetachItemFromObjectCaseSensitive C.cJSON_DetachItemFromObjectCaseSensitive
+func (recv_ *JSON) DetachItemFromObjectCaseSensitive(string *c.Char) *JSON {
+ return nil
+}
+
+// llgo:link (*JSON).DeleteItemFromObject C.cJSON_DeleteItemFromObject
+func (recv_ *JSON) DeleteItemFromObject(string *c.Char) {
+}
+
+// llgo:link (*JSON).DeleteItemFromObjectCaseSensitive C.cJSON_DeleteItemFromObjectCaseSensitive
+func (recv_ *JSON) DeleteItemFromObjectCaseSensitive(string *c.Char) {
+}
+
+/* Update array items. */
+// llgo:link (*JSON).InsertItemInArray C.cJSON_InsertItemInArray
+func (recv_ *JSON) InsertItemInArray(which c.Int, newitem *JSON) Bool {
+ return 0
+}
+
+// llgo:link (*JSON).ReplaceItemViaPointer C.cJSON_ReplaceItemViaPointer
+func (recv_ *JSON) ReplaceItemViaPointer(item *JSON, replacement *JSON) Bool {
+ return 0
+}
+
+// llgo:link (*JSON).ReplaceItemInArray C.cJSON_ReplaceItemInArray
+func (recv_ *JSON) ReplaceItemInArray(which c.Int, newitem *JSON) Bool {
+ return 0
+}
+
+// llgo:link (*JSON).ReplaceItemInObject C.cJSON_ReplaceItemInObject
+func (recv_ *JSON) ReplaceItemInObject(string *c.Char, newitem *JSON) Bool {
+ return 0
+}
+
+// llgo:link (*JSON).ReplaceItemInObjectCaseSensitive C.cJSON_ReplaceItemInObjectCaseSensitive
+func (recv_ *JSON) ReplaceItemInObjectCaseSensitive(string *c.Char, newitem *JSON) Bool {
+ return 0
+}
+
+/* Duplicate a cJSON item */
+// llgo:link (*JSON).Duplicate C.cJSON_Duplicate
+func (recv_ *JSON) Duplicate(recurse Bool) *JSON {
+ return nil
+}
+
+/* Duplicate will create a new, identical cJSON item to the one you pass, in new memory that will
+ * need to be released. With recurse!=0, it will duplicate any children connected to the item.
+ * The item->next and ->prev pointers are always zero on return from Duplicate. */
+/* Recursively compare two cJSON items for equality. If either a or b is NULL or invalid, they will be considered unequal.
+ * case_sensitive determines if object keys are treated case sensitive (1) or case insensitive (0) */
+// llgo:link (*JSON).Compare C.cJSON_Compare
+func (recv_ *JSON) Compare(b *JSON, case_sensitive Bool) Bool {
+ return 0
+}
+
+/* Minify a strings, remove blank characters(such as ' ', '\t', '\r', '\n') from strings.
+ * The input pointer json cannot point to a read-only address area, such as a string constant,
+ * but should point to a readable and writable address area. */
+//go:linkname Minify C.cJSON_Minify
+func Minify(json *c.Char)
+
+/* Helper functions for creating and adding items to an object at the same time.
+ * They return the added item or NULL on failure. */
+// llgo:link (*JSON).AddNullToObject C.cJSON_AddNullToObject
+func (recv_ *JSON) AddNullToObject(name *c.Char) *JSON {
+ return nil
+}
+
+// llgo:link (*JSON).AddTrueToObject C.cJSON_AddTrueToObject
+func (recv_ *JSON) AddTrueToObject(name *c.Char) *JSON {
+ return nil
+}
+
+// llgo:link (*JSON).AddFalseToObject C.cJSON_AddFalseToObject
+func (recv_ *JSON) AddFalseToObject(name *c.Char) *JSON {
+ return nil
+}
+
+// llgo:link (*JSON).AddBoolToObject C.cJSON_AddBoolToObject
+func (recv_ *JSON) AddBoolToObject(name *c.Char, boolean Bool) *JSON {
+ return nil
+}
+
+// llgo:link (*JSON).AddNumberToObject C.cJSON_AddNumberToObject
+func (recv_ *JSON) AddNumberToObject(name *c.Char, number c.Double) *JSON {
+ return nil
+}
+
+// llgo:link (*JSON).AddStringToObject C.cJSON_AddStringToObject
+func (recv_ *JSON) AddStringToObject(name *c.Char, string *c.Char) *JSON {
+ return nil
+}
+
+// llgo:link (*JSON).AddRawToObject C.cJSON_AddRawToObject
+func (recv_ *JSON) AddRawToObject(name *c.Char, raw *c.Char) *JSON {
+ return nil
+}
+
+// llgo:link (*JSON).AddObjectToObject C.cJSON_AddObjectToObject
+func (recv_ *JSON) AddObjectToObject(name *c.Char) *JSON {
+ return nil
+}
+
+// llgo:link (*JSON).AddArrayToObject C.cJSON_AddArrayToObject
+func (recv_ *JSON) AddArrayToObject(name *c.Char) *JSON {
+ return nil
+}
+
+/* helper for the cJSON_SetNumberValue macro */
+// llgo:link (*JSON).SetNumberHelper C.cJSON_SetNumberHelper
+func (recv_ *JSON) SetNumberHelper(number c.Double) c.Double {
+ return 0
+}
+
+/* Change the valuestring of a cJSON_String object, only takes effect when type of object is cJSON_String */
+// llgo:link (*JSON).SetValuestring C.cJSON_SetValuestring
+func (recv_ *JSON) SetValuestring(valuestring *c.Char) *c.Char {
+ return nil
+}
+
+/* malloc/free objects using the malloc/free functions that have been set with cJSON_InitHooks */
+//go:linkname Malloc C.cJSON_malloc
+func Malloc(size c.SizeT) c.Pointer
+
+//go:linkname FreeCStr C.cJSON_free
+func FreeCStr(object c.Pointer)
diff --git a/cjson/cJSON_Utils.go b/cjson/cJSON_Utils.go
new file mode 100644
index 0000000..9b5f2a1
--- /dev/null
+++ b/cjson/cJSON_Utils.go
@@ -0,0 +1,84 @@
+package cjson
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+/* Implement RFC6901 (https://tools.ietf.org/html/rfc6901) JSON Pointer spec. */
+// llgo:link (*JSON).GetPointer C.cJSONUtils_GetPointer
+func (recv_ *JSON) GetPointer(pointer *c.Char) *JSON {
+ return nil
+}
+
+// llgo:link (*JSON).GetPointerCaseSensitive C.cJSONUtils_GetPointerCaseSensitive
+func (recv_ *JSON) GetPointerCaseSensitive(pointer *c.Char) *JSON {
+ return nil
+}
+
+/* Implement RFC6902 (https://tools.ietf.org/html/rfc6902) JSON Patch spec. */
+/* NOTE: This modifies objects in 'from' and 'to' by sorting the elements by their key */
+// llgo:link (*JSON).GeneratePatches C.cJSONUtils_GeneratePatches
+func (recv_ *JSON) GeneratePatches(to *JSON) *JSON {
+ return nil
+}
+
+// llgo:link (*JSON).GeneratePatchesCaseSensitive C.cJSONUtils_GeneratePatchesCaseSensitive
+func (recv_ *JSON) GeneratePatchesCaseSensitive(to *JSON) *JSON {
+ return nil
+}
+
+/* Utility for generating patch array entries. */
+// llgo:link (*JSON).AddPatchToArray C.cJSONUtils_AddPatchToArray
+func (recv_ *JSON) AddPatchToArray(operation *c.Char, path *c.Char, value *JSON) {
+}
+
+/* Returns 0 for success. */
+// llgo:link (*JSON).ApplyPatches C.cJSONUtils_ApplyPatches
+func (recv_ *JSON) ApplyPatches(patches *JSON) c.Int {
+ return 0
+}
+
+// llgo:link (*JSON).ApplyPatchesCaseSensitive C.cJSONUtils_ApplyPatchesCaseSensitive
+func (recv_ *JSON) ApplyPatchesCaseSensitive(patches *JSON) c.Int {
+ return 0
+}
+
+/* Implement RFC7386 (https://tools.ietf.org/html/rfc7396) JSON Merge Patch spec. */
+/* target will be modified by patch. return value is new ptr for target. */
+// llgo:link (*JSON).MergePatch C.cJSONUtils_MergePatch
+func (recv_ *JSON) MergePatch(patch *JSON) *JSON {
+ return nil
+}
+
+// llgo:link (*JSON).MergePatchCaseSensitive C.cJSONUtils_MergePatchCaseSensitive
+func (recv_ *JSON) MergePatchCaseSensitive(patch *JSON) *JSON {
+ return nil
+}
+
+/* generates a patch to move from -> to */
+/* NOTE: This modifies objects in 'from' and 'to' by sorting the elements by their key */
+// llgo:link (*JSON).GenerateMergePatch C.cJSONUtils_GenerateMergePatch
+func (recv_ *JSON) GenerateMergePatch(to *JSON) *JSON {
+ return nil
+}
+
+// llgo:link (*JSON).GenerateMergePatchCaseSensitive C.cJSONUtils_GenerateMergePatchCaseSensitive
+func (recv_ *JSON) GenerateMergePatchCaseSensitive(to *JSON) *JSON {
+ return nil
+}
+
+/* Given a root object and a target object, construct a pointer from one to the other. */
+// llgo:link (*JSON).FindPointerFromObjectTo C.cJSONUtils_FindPointerFromObjectTo
+func (recv_ *JSON) FindPointerFromObjectTo(target *JSON) *c.Char {
+ return nil
+}
+
+/* Sorts the members of the object into alphabetical order. */
+// llgo:link (*JSON).SortObject C.cJSONUtils_SortObject
+func (recv_ *JSON) SortObject() {
+}
+
+// llgo:link (*JSON).SortObjectCaseSensitive C.cJSONUtils_SortObjectCaseSensitive
+func (recv_ *JSON) SortObjectCaseSensitive() {
+}
diff --git a/cjson/cjson_autogen_link.go b/cjson/cjson_autogen_link.go
new file mode 100644
index 0000000..87375c6
--- /dev/null
+++ b/cjson/cjson_autogen_link.go
@@ -0,0 +1,5 @@
+package cjson
+
+import _ "github.com/goplus/lib/c"
+
+const LLGoPackage string = "link: $(pkg-config --libs libcjson libcjson_utils);"
diff --git a/cjson/go.mod b/cjson/go.mod
new file mode 100644
index 0000000..4cf198a
--- /dev/null
+++ b/cjson/go.mod
@@ -0,0 +1,5 @@
+module github.com/goplus/llpkg/cjson
+
+go 1.20
+
+require github.com/goplus/lib v0.2.0
diff --git a/cjson/go.sum b/cjson/go.sum
new file mode 100644
index 0000000..512980a
--- /dev/null
+++ b/cjson/go.sum
@@ -0,0 +1,2 @@
+github.com/goplus/lib v0.2.0 h1:AjqkN1XK5H23wZMMlpaUYAMCDAdSBQ2NMFrLtSh7W4g=
+github.com/goplus/lib v0.2.0/go.mod h1:SgJv3oPqLLHCu0gcL46ejOP3x7/2ry2Jtxu7ta32kp0=
diff --git a/cjson/llcppg.cfg b/cjson/llcppg.cfg
new file mode 100644
index 0000000..7f51d63
--- /dev/null
+++ b/cjson/llcppg.cfg
@@ -0,0 +1,36 @@
+{
+ "name": "cjson",
+ "cflags": "$(pkg-config --cflags libcjson)",
+ "libs": "$(pkg-config --libs libcjson libcjson_utils)",
+ "include": [
+ "cjson/cJSON.h",
+ "cjson/cJSON_Utils.h"
+ ],
+ "trimPrefixes": ["cJSON_", "cJSONUtils_","CJSON_"],
+ "cplusplus": false,
+ "symMap": {
+ "cJSON_PrintUnformatted":".CStr",
+ "cJSON_CreateObject":"Object",
+ "cJSON_CreateArray":"Array",
+ "cJSON_CreateString":"String",
+ "cJSON_CreateNull":"Null",
+ "cJSON_CreateTrue":"True",
+ "cJSON_CreateFalse":"False",
+ "cJSON_CreateBool":"CreateBool",
+ "cJSON_CreateNumber":"Number",
+ "cJSON_CreateRaw":"Raw",
+ "cJSON_CreateStringReference":"StringRef",
+ "cJSON_CreateArrayReference":".CreateArrayRef",
+ "cJSON_CreateObjectReference":"ObjectRef",
+ "cJSON_CreateIntArray":"IntArray",
+ "cJSON_CreateFloatArray":"FloatArray",
+ "cJSON_CreateDoubleArray":"DoubleArray",
+ "cJSON_CreateStringArray":"StringArray",
+ "cJSON_free":"FreeCStr",
+ "cJSON_AddItemToArray":".AddItem",
+ "cJSON_AddItemToObject":".SetItem"
+ },
+ "typeMap": {
+ "cJSON": "JSON"
+ }
+}
diff --git a/cjson/llcppg.pub b/cjson/llcppg.pub
new file mode 100644
index 0000000..51e9a8a
--- /dev/null
+++ b/cjson/llcppg.pub
@@ -0,0 +1,3 @@
+cJSON JSON
+cJSON_Hooks Hooks
+cJSON_bool Bool
\ No newline at end of file
diff --git a/cjson/llpkg.cfg b/cjson/llpkg.cfg
new file mode 100644
index 0000000..b704672
--- /dev/null
+++ b/cjson/llpkg.cfg
@@ -0,0 +1,14 @@
+{
+ "upstream": {
+ "package": {
+ "name": "cjson",
+ "version": "1.7.18"
+ },
+ "installer":{
+ "name": "conan",
+ "config" : {
+ "options": "utils=True"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/libsodium/libsodium.pc b/libsodium/libsodium.pc
new file mode 100644
index 0000000..f3c2225
--- /dev/null
+++ b/libsodium/libsodium.pc
@@ -0,0 +1,10 @@
+prefix=/Users/admin/.conan2/p/b/libso13ee2903afd8b/p
+libdir=${prefix}/lib
+includedir=${prefix}/include
+bindir=${prefix}/bin
+
+Name: libsodium
+Description: Conan package: libsodium
+Version: 1.0.20
+Libs: -L"${libdir}" -lsodium
+Cflags: -I"${includedir}"
diff --git a/libsodium/llcppg.cfg b/libsodium/llcppg.cfg
new file mode 100644
index 0000000..b70a234
--- /dev/null
+++ b/libsodium/llcppg.cfg
@@ -0,0 +1,74 @@
+{
+ "name": "libsodium",
+ "cflags": "$(pkg-config --cflags libsodium)",
+ "libs": "$(pkg-config --libs libsodium)",
+ "include": [
+ "sodium.h",
+ "sodium/crypto_kdf_hkdf_sha512.h",
+ "sodium/crypto_kdf_hkdf_sha256.h",
+ "sodium/crypto_auth.h",
+ "sodium/crypto_secretbox.h",
+ "sodium/crypto_secretstream_xchacha20poly1305.h",
+ "sodium/crypto_pwhash.h",
+ "sodium/crypto_sign.h",
+ "sodium/crypto_box.h",
+ "sodium/crypto_auth_hmacsha512256.h",
+ "sodium/randombytes_internal_random.h",
+ "sodium/crypto_scalarmult.h",
+ "sodium/crypto_box_curve25519xsalsa20poly1305.h",
+ "sodium/crypto_auth_hmacsha256.h",
+ "sodium/crypto_shorthash.h",
+ "sodium/crypto_sign_ed25519.h",
+ "sodium/crypto_box_curve25519xchacha20poly1305.h",
+ "sodium/crypto_secretbox_xsalsa20poly1305.h",
+ "sodium/crypto_auth_hmacsha512.h",
+ "sodium/crypto_secretbox_xchacha20poly1305.h",
+ "sodium/crypto_generichash.h",
+ "sodium/crypto_stream.h",
+ "sodium/crypto_hash.h",
+ "sodium/crypto_onetimeauth.h",
+ "sodium/randombytes_sysrandom.h",
+ "sodium/crypto_kdf.h",
+ "sodium/crypto_core_ristretto255.h",
+ "sodium/crypto_aead_xchacha20poly1305.h",
+ "sodium/crypto_hash_sha512.h",
+ "sodium/crypto_kx.h",
+ "sodium/crypto_hash_sha256.h",
+ "sodium/crypto_onetimeauth_poly1305.h",
+ "sodium/crypto_generichash_blake2b.h",
+ "sodium/crypto_pwhash_argon2i.h",
+ "sodium/crypto_pwhash_argon2id.h",
+ "sodium/crypto_pwhash_scryptsalsa208sha256.h",
+ "sodium/crypto_core_salsa208.h",
+ "sodium/crypto_scalarmult_curve25519.h",
+ "sodium/crypto_scalarmult_ed25519.h",
+ "sodium/crypto_scalarmult_ristretto255.h",
+ "sodium/crypto_core_salsa2012.h",
+ "sodium/crypto_core_salsa20.h",
+ "sodium/core.h",
+ "sodium/crypto_core_hsalsa20.h",
+ "sodium/crypto_core_hchacha20.h",
+ "sodium/crypto_shorthash_siphash24.h",
+ "sodium/crypto_core_ed25519.h",
+ "sodium/crypto_kdf_blake2b.h",
+ "sodium/crypto_sign_edwards25519sha512batch.h",
+ "sodium/crypto_aead_chacha20poly1305.h",
+ "sodium/crypto_stream_chacha20.h",
+ "sodium/crypto_stream_salsa20.h",
+ "sodium/crypto_stream_salsa2012.h",
+ "sodium/crypto_stream_salsa208.h",
+ "sodium/crypto_stream_xchacha20.h",
+ "sodium/crypto_stream_xsalsa20.h",
+ "sodium/crypto_verify_16.h",
+ "sodium/crypto_verify_32.h",
+ "sodium/crypto_verify_64.h",
+ "sodium/crypto_aead_aegis128l.h",
+ "sodium/randombytes.h",
+ "sodium/crypto_aead_aes256gcm.h",
+ "sodium/crypto_aead_aegis256.h",
+ "sodium/runtime.h",
+ "sodium/utils.h",
+ "sodium/version.h",
+ "sodium/export.h"
+ ]
+}
diff --git a/libsodium/llcppg.symb.json b/libsodium/llcppg.symb.json
new file mode 100755
index 0000000..247d418
--- /dev/null
+++ b/libsodium/llcppg.symb.json
@@ -0,0 +1,3242 @@
+[
+ {
+ "mangle": "crypto_aead_aegis128l_abytes",
+ "c++": "crypto_aead_aegis128l_abytes()",
+ "go": "CryptoAeadAegis128lAbytes"
+ },
+ {
+ "mangle": "crypto_aead_aegis128l_decrypt",
+ "c++": "crypto_aead_aegis128l_decrypt(unsigned char *, unsigned long long *, unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadAegis128lDecrypt"
+ },
+ {
+ "mangle": "crypto_aead_aegis128l_decrypt_detached",
+ "c++": "crypto_aead_aegis128l_decrypt_detached(unsigned char *, unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadAegis128lDecryptDetached"
+ },
+ {
+ "mangle": "crypto_aead_aegis128l_encrypt",
+ "c++": "crypto_aead_aegis128l_encrypt(unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadAegis128lEncrypt"
+ },
+ {
+ "mangle": "crypto_aead_aegis128l_encrypt_detached",
+ "c++": "crypto_aead_aegis128l_encrypt_detached(unsigned char *, unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadAegis128lEncryptDetached"
+ },
+ {
+ "mangle": "crypto_aead_aegis128l_keybytes",
+ "c++": "crypto_aead_aegis128l_keybytes()",
+ "go": "CryptoAeadAegis128lKeybytes"
+ },
+ {
+ "mangle": "crypto_aead_aegis128l_keygen",
+ "c++": "crypto_aead_aegis128l_keygen(unsigned char *)",
+ "go": "CryptoAeadAegis128lKeygen"
+ },
+ {
+ "mangle": "crypto_aead_aegis128l_messagebytes_max",
+ "c++": "crypto_aead_aegis128l_messagebytes_max()",
+ "go": "CryptoAeadAegis128lMessagebytesMax"
+ },
+ {
+ "mangle": "crypto_aead_aegis128l_npubbytes",
+ "c++": "crypto_aead_aegis128l_npubbytes()",
+ "go": "CryptoAeadAegis128lNpubbytes"
+ },
+ {
+ "mangle": "crypto_aead_aegis128l_nsecbytes",
+ "c++": "crypto_aead_aegis128l_nsecbytes()",
+ "go": "CryptoAeadAegis128lNsecbytes"
+ },
+ {
+ "mangle": "crypto_aead_aegis256_abytes",
+ "c++": "crypto_aead_aegis256_abytes()",
+ "go": "CryptoAeadAegis256Abytes"
+ },
+ {
+ "mangle": "crypto_aead_aegis256_decrypt",
+ "c++": "crypto_aead_aegis256_decrypt(unsigned char *, unsigned long long *, unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadAegis256Decrypt"
+ },
+ {
+ "mangle": "crypto_aead_aegis256_decrypt_detached",
+ "c++": "crypto_aead_aegis256_decrypt_detached(unsigned char *, unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadAegis256DecryptDetached"
+ },
+ {
+ "mangle": "crypto_aead_aegis256_encrypt",
+ "c++": "crypto_aead_aegis256_encrypt(unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadAegis256Encrypt"
+ },
+ {
+ "mangle": "crypto_aead_aegis256_encrypt_detached",
+ "c++": "crypto_aead_aegis256_encrypt_detached(unsigned char *, unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadAegis256EncryptDetached"
+ },
+ {
+ "mangle": "crypto_aead_aegis256_keybytes",
+ "c++": "crypto_aead_aegis256_keybytes()",
+ "go": "CryptoAeadAegis256Keybytes"
+ },
+ {
+ "mangle": "crypto_aead_aegis256_keygen",
+ "c++": "crypto_aead_aegis256_keygen(unsigned char *)",
+ "go": "CryptoAeadAegis256Keygen"
+ },
+ {
+ "mangle": "crypto_aead_aegis256_messagebytes_max",
+ "c++": "crypto_aead_aegis256_messagebytes_max()",
+ "go": "CryptoAeadAegis256MessagebytesMax"
+ },
+ {
+ "mangle": "crypto_aead_aegis256_npubbytes",
+ "c++": "crypto_aead_aegis256_npubbytes()",
+ "go": "CryptoAeadAegis256Npubbytes"
+ },
+ {
+ "mangle": "crypto_aead_aegis256_nsecbytes",
+ "c++": "crypto_aead_aegis256_nsecbytes()",
+ "go": "CryptoAeadAegis256Nsecbytes"
+ },
+ {
+ "mangle": "crypto_aead_aes256gcm_abytes",
+ "c++": "crypto_aead_aes256gcm_abytes()",
+ "go": "CryptoAeadAes256gcmAbytes"
+ },
+ {
+ "mangle": "crypto_aead_aes256gcm_beforenm",
+ "c++": "crypto_aead_aes256gcm_beforenm(crypto_aead_aes256gcm_state *, const unsigned char *)",
+ "go": "(*CryptoAeadAes256gcmState).CryptoAeadAes256gcmBeforenm"
+ },
+ {
+ "mangle": "crypto_aead_aes256gcm_decrypt",
+ "c++": "crypto_aead_aes256gcm_decrypt(unsigned char *, unsigned long long *, unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadAes256gcmDecrypt"
+ },
+ {
+ "mangle": "crypto_aead_aes256gcm_decrypt_afternm",
+ "c++": "crypto_aead_aes256gcm_decrypt_afternm(unsigned char *, unsigned long long *, unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, const unsigned char *, const crypto_aead_aes256gcm_state *)",
+ "go": "CryptoAeadAes256gcmDecryptAfternm"
+ },
+ {
+ "mangle": "crypto_aead_aes256gcm_decrypt_detached",
+ "c++": "crypto_aead_aes256gcm_decrypt_detached(unsigned char *, unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadAes256gcmDecryptDetached"
+ },
+ {
+ "mangle": "crypto_aead_aes256gcm_decrypt_detached_afternm",
+ "c++": "crypto_aead_aes256gcm_decrypt_detached_afternm(unsigned char *, unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const crypto_aead_aes256gcm_state *)",
+ "go": "CryptoAeadAes256gcmDecryptDetachedAfternm"
+ },
+ {
+ "mangle": "crypto_aead_aes256gcm_encrypt",
+ "c++": "crypto_aead_aes256gcm_encrypt(unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadAes256gcmEncrypt"
+ },
+ {
+ "mangle": "crypto_aead_aes256gcm_encrypt_afternm",
+ "c++": "crypto_aead_aes256gcm_encrypt_afternm(unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const crypto_aead_aes256gcm_state *)",
+ "go": "CryptoAeadAes256gcmEncryptAfternm"
+ },
+ {
+ "mangle": "crypto_aead_aes256gcm_encrypt_detached",
+ "c++": "crypto_aead_aes256gcm_encrypt_detached(unsigned char *, unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadAes256gcmEncryptDetached"
+ },
+ {
+ "mangle": "crypto_aead_aes256gcm_encrypt_detached_afternm",
+ "c++": "crypto_aead_aes256gcm_encrypt_detached_afternm(unsigned char *, unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const crypto_aead_aes256gcm_state *)",
+ "go": "CryptoAeadAes256gcmEncryptDetachedAfternm"
+ },
+ {
+ "mangle": "crypto_aead_aes256gcm_is_available",
+ "c++": "crypto_aead_aes256gcm_is_available()",
+ "go": "CryptoAeadAes256gcmIsAvailable"
+ },
+ {
+ "mangle": "crypto_aead_aes256gcm_keybytes",
+ "c++": "crypto_aead_aes256gcm_keybytes()",
+ "go": "CryptoAeadAes256gcmKeybytes"
+ },
+ {
+ "mangle": "crypto_aead_aes256gcm_keygen",
+ "c++": "crypto_aead_aes256gcm_keygen(unsigned char *)",
+ "go": "CryptoAeadAes256gcmKeygen"
+ },
+ {
+ "mangle": "crypto_aead_aes256gcm_messagebytes_max",
+ "c++": "crypto_aead_aes256gcm_messagebytes_max()",
+ "go": "CryptoAeadAes256gcmMessagebytesMax"
+ },
+ {
+ "mangle": "crypto_aead_aes256gcm_npubbytes",
+ "c++": "crypto_aead_aes256gcm_npubbytes()",
+ "go": "CryptoAeadAes256gcmNpubbytes"
+ },
+ {
+ "mangle": "crypto_aead_aes256gcm_nsecbytes",
+ "c++": "crypto_aead_aes256gcm_nsecbytes()",
+ "go": "CryptoAeadAes256gcmNsecbytes"
+ },
+ {
+ "mangle": "crypto_aead_aes256gcm_statebytes",
+ "c++": "crypto_aead_aes256gcm_statebytes()",
+ "go": "CryptoAeadAes256gcmStatebytes"
+ },
+ {
+ "mangle": "crypto_aead_chacha20poly1305_abytes",
+ "c++": "crypto_aead_chacha20poly1305_abytes()",
+ "go": "CryptoAeadChacha20poly1305Abytes"
+ },
+ {
+ "mangle": "crypto_aead_chacha20poly1305_decrypt",
+ "c++": "crypto_aead_chacha20poly1305_decrypt(unsigned char *, unsigned long long *, unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadChacha20poly1305Decrypt"
+ },
+ {
+ "mangle": "crypto_aead_chacha20poly1305_decrypt_detached",
+ "c++": "crypto_aead_chacha20poly1305_decrypt_detached(unsigned char *, unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadChacha20poly1305DecryptDetached"
+ },
+ {
+ "mangle": "crypto_aead_chacha20poly1305_encrypt",
+ "c++": "crypto_aead_chacha20poly1305_encrypt(unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadChacha20poly1305Encrypt"
+ },
+ {
+ "mangle": "crypto_aead_chacha20poly1305_encrypt_detached",
+ "c++": "crypto_aead_chacha20poly1305_encrypt_detached(unsigned char *, unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadChacha20poly1305EncryptDetached"
+ },
+ {
+ "mangle": "crypto_aead_chacha20poly1305_ietf_abytes",
+ "c++": "crypto_aead_chacha20poly1305_ietf_abytes()",
+ "go": "CryptoAeadChacha20poly1305IetfAbytes"
+ },
+ {
+ "mangle": "crypto_aead_chacha20poly1305_ietf_decrypt",
+ "c++": "crypto_aead_chacha20poly1305_ietf_decrypt(unsigned char *, unsigned long long *, unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadChacha20poly1305IetfDecrypt"
+ },
+ {
+ "mangle": "crypto_aead_chacha20poly1305_ietf_decrypt_detached",
+ "c++": "crypto_aead_chacha20poly1305_ietf_decrypt_detached(unsigned char *, unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadChacha20poly1305IetfDecryptDetached"
+ },
+ {
+ "mangle": "crypto_aead_chacha20poly1305_ietf_encrypt",
+ "c++": "crypto_aead_chacha20poly1305_ietf_encrypt(unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadChacha20poly1305IetfEncrypt"
+ },
+ {
+ "mangle": "crypto_aead_chacha20poly1305_ietf_encrypt_detached",
+ "c++": "crypto_aead_chacha20poly1305_ietf_encrypt_detached(unsigned char *, unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadChacha20poly1305IetfEncryptDetached"
+ },
+ {
+ "mangle": "crypto_aead_chacha20poly1305_ietf_keybytes",
+ "c++": "crypto_aead_chacha20poly1305_ietf_keybytes()",
+ "go": "CryptoAeadChacha20poly1305IetfKeybytes"
+ },
+ {
+ "mangle": "crypto_aead_chacha20poly1305_ietf_keygen",
+ "c++": "crypto_aead_chacha20poly1305_ietf_keygen(unsigned char *)",
+ "go": "CryptoAeadChacha20poly1305IetfKeygen"
+ },
+ {
+ "mangle": "crypto_aead_chacha20poly1305_ietf_messagebytes_max",
+ "c++": "crypto_aead_chacha20poly1305_ietf_messagebytes_max()",
+ "go": "CryptoAeadChacha20poly1305IetfMessagebytesMax"
+ },
+ {
+ "mangle": "crypto_aead_chacha20poly1305_ietf_npubbytes",
+ "c++": "crypto_aead_chacha20poly1305_ietf_npubbytes()",
+ "go": "CryptoAeadChacha20poly1305IetfNpubbytes"
+ },
+ {
+ "mangle": "crypto_aead_chacha20poly1305_ietf_nsecbytes",
+ "c++": "crypto_aead_chacha20poly1305_ietf_nsecbytes()",
+ "go": "CryptoAeadChacha20poly1305IetfNsecbytes"
+ },
+ {
+ "mangle": "crypto_aead_chacha20poly1305_keybytes",
+ "c++": "crypto_aead_chacha20poly1305_keybytes()",
+ "go": "CryptoAeadChacha20poly1305Keybytes"
+ },
+ {
+ "mangle": "crypto_aead_chacha20poly1305_keygen",
+ "c++": "crypto_aead_chacha20poly1305_keygen(unsigned char *)",
+ "go": "CryptoAeadChacha20poly1305Keygen"
+ },
+ {
+ "mangle": "crypto_aead_chacha20poly1305_messagebytes_max",
+ "c++": "crypto_aead_chacha20poly1305_messagebytes_max()",
+ "go": "CryptoAeadChacha20poly1305MessagebytesMax"
+ },
+ {
+ "mangle": "crypto_aead_chacha20poly1305_npubbytes",
+ "c++": "crypto_aead_chacha20poly1305_npubbytes()",
+ "go": "CryptoAeadChacha20poly1305Npubbytes"
+ },
+ {
+ "mangle": "crypto_aead_chacha20poly1305_nsecbytes",
+ "c++": "crypto_aead_chacha20poly1305_nsecbytes()",
+ "go": "CryptoAeadChacha20poly1305Nsecbytes"
+ },
+ {
+ "mangle": "crypto_aead_xchacha20poly1305_ietf_abytes",
+ "c++": "crypto_aead_xchacha20poly1305_ietf_abytes()",
+ "go": "CryptoAeadXchacha20poly1305IetfAbytes"
+ },
+ {
+ "mangle": "crypto_aead_xchacha20poly1305_ietf_decrypt",
+ "c++": "crypto_aead_xchacha20poly1305_ietf_decrypt(unsigned char *, unsigned long long *, unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadXchacha20poly1305IetfDecrypt"
+ },
+ {
+ "mangle": "crypto_aead_xchacha20poly1305_ietf_decrypt_detached",
+ "c++": "crypto_aead_xchacha20poly1305_ietf_decrypt_detached(unsigned char *, unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadXchacha20poly1305IetfDecryptDetached"
+ },
+ {
+ "mangle": "crypto_aead_xchacha20poly1305_ietf_encrypt",
+ "c++": "crypto_aead_xchacha20poly1305_ietf_encrypt(unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadXchacha20poly1305IetfEncrypt"
+ },
+ {
+ "mangle": "crypto_aead_xchacha20poly1305_ietf_encrypt_detached",
+ "c++": "crypto_aead_xchacha20poly1305_ietf_encrypt_detached(unsigned char *, unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoAeadXchacha20poly1305IetfEncryptDetached"
+ },
+ {
+ "mangle": "crypto_aead_xchacha20poly1305_ietf_keybytes",
+ "c++": "crypto_aead_xchacha20poly1305_ietf_keybytes()",
+ "go": "CryptoAeadXchacha20poly1305IetfKeybytes"
+ },
+ {
+ "mangle": "crypto_aead_xchacha20poly1305_ietf_keygen",
+ "c++": "crypto_aead_xchacha20poly1305_ietf_keygen(unsigned char *)",
+ "go": "CryptoAeadXchacha20poly1305IetfKeygen"
+ },
+ {
+ "mangle": "crypto_aead_xchacha20poly1305_ietf_messagebytes_max",
+ "c++": "crypto_aead_xchacha20poly1305_ietf_messagebytes_max()",
+ "go": "CryptoAeadXchacha20poly1305IetfMessagebytesMax"
+ },
+ {
+ "mangle": "crypto_aead_xchacha20poly1305_ietf_npubbytes",
+ "c++": "crypto_aead_xchacha20poly1305_ietf_npubbytes()",
+ "go": "CryptoAeadXchacha20poly1305IetfNpubbytes"
+ },
+ {
+ "mangle": "crypto_aead_xchacha20poly1305_ietf_nsecbytes",
+ "c++": "crypto_aead_xchacha20poly1305_ietf_nsecbytes()",
+ "go": "CryptoAeadXchacha20poly1305IetfNsecbytes"
+ },
+ {
+ "mangle": "crypto_auth",
+ "c++": "crypto_auth(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoAuth"
+ },
+ {
+ "mangle": "crypto_auth_bytes",
+ "c++": "crypto_auth_bytes()",
+ "go": "CryptoAuthBytes"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha256",
+ "c++": "crypto_auth_hmacsha256(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoAuthHmacsha256"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha256_bytes",
+ "c++": "crypto_auth_hmacsha256_bytes()",
+ "go": "CryptoAuthHmacsha256Bytes"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha256_final",
+ "c++": "crypto_auth_hmacsha256_final(crypto_auth_hmacsha256_state *, unsigned char *)",
+ "go": "(*CryptoAuthHmacsha256State).CryptoAuthHmacsha256Final"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha256_init",
+ "c++": "crypto_auth_hmacsha256_init(crypto_auth_hmacsha256_state *, const unsigned char *, size_t)",
+ "go": "(*CryptoAuthHmacsha256State).CryptoAuthHmacsha256Init"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha256_keybytes",
+ "c++": "crypto_auth_hmacsha256_keybytes()",
+ "go": "CryptoAuthHmacsha256Keybytes"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha256_keygen",
+ "c++": "crypto_auth_hmacsha256_keygen(unsigned char *)",
+ "go": "CryptoAuthHmacsha256Keygen"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha256_statebytes",
+ "c++": "crypto_auth_hmacsha256_statebytes()",
+ "go": "CryptoAuthHmacsha256Statebytes"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha256_update",
+ "c++": "crypto_auth_hmacsha256_update(crypto_auth_hmacsha256_state *, const unsigned char *, unsigned long long)",
+ "go": "(*CryptoAuthHmacsha256State).CryptoAuthHmacsha256Update"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha256_verify",
+ "c++": "crypto_auth_hmacsha256_verify(const unsigned char *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoAuthHmacsha256Verify"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha512",
+ "c++": "crypto_auth_hmacsha512(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoAuthHmacsha512"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha512256",
+ "c++": "crypto_auth_hmacsha512256(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoAuthHmacsha512256"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha512256_bytes",
+ "c++": "crypto_auth_hmacsha512256_bytes()",
+ "go": "CryptoAuthHmacsha512256Bytes"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha512256_final",
+ "c++": "crypto_auth_hmacsha512256_final(crypto_auth_hmacsha512256_state *, unsigned char *)",
+ "go": "(*CryptoAuthHmacsha512256State).CryptoAuthHmacsha512256Final"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha512256_init",
+ "c++": "crypto_auth_hmacsha512256_init(crypto_auth_hmacsha512256_state *, const unsigned char *, size_t)",
+ "go": "(*CryptoAuthHmacsha512256State).CryptoAuthHmacsha512256Init"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha512256_keybytes",
+ "c++": "crypto_auth_hmacsha512256_keybytes()",
+ "go": "CryptoAuthHmacsha512256Keybytes"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha512256_keygen",
+ "c++": "crypto_auth_hmacsha512256_keygen(unsigned char *)",
+ "go": "CryptoAuthHmacsha512256Keygen"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha512256_statebytes",
+ "c++": "crypto_auth_hmacsha512256_statebytes()",
+ "go": "CryptoAuthHmacsha512256Statebytes"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha512256_update",
+ "c++": "crypto_auth_hmacsha512256_update(crypto_auth_hmacsha512256_state *, const unsigned char *, unsigned long long)",
+ "go": "(*CryptoAuthHmacsha512256State).CryptoAuthHmacsha512256Update"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha512256_verify",
+ "c++": "crypto_auth_hmacsha512256_verify(const unsigned char *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoAuthHmacsha512256Verify"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha512_bytes",
+ "c++": "crypto_auth_hmacsha512_bytes()",
+ "go": "CryptoAuthHmacsha512Bytes"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha512_final",
+ "c++": "crypto_auth_hmacsha512_final(crypto_auth_hmacsha512_state *, unsigned char *)",
+ "go": "(*CryptoAuthHmacsha512State).CryptoAuthHmacsha512Final"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha512_init",
+ "c++": "crypto_auth_hmacsha512_init(crypto_auth_hmacsha512_state *, const unsigned char *, size_t)",
+ "go": "(*CryptoAuthHmacsha512State).CryptoAuthHmacsha512Init"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha512_keybytes",
+ "c++": "crypto_auth_hmacsha512_keybytes()",
+ "go": "CryptoAuthHmacsha512Keybytes"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha512_keygen",
+ "c++": "crypto_auth_hmacsha512_keygen(unsigned char *)",
+ "go": "CryptoAuthHmacsha512Keygen"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha512_statebytes",
+ "c++": "crypto_auth_hmacsha512_statebytes()",
+ "go": "CryptoAuthHmacsha512Statebytes"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha512_update",
+ "c++": "crypto_auth_hmacsha512_update(crypto_auth_hmacsha512_state *, const unsigned char *, unsigned long long)",
+ "go": "(*CryptoAuthHmacsha512State).CryptoAuthHmacsha512Update"
+ },
+ {
+ "mangle": "crypto_auth_hmacsha512_verify",
+ "c++": "crypto_auth_hmacsha512_verify(const unsigned char *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoAuthHmacsha512Verify"
+ },
+ {
+ "mangle": "crypto_auth_keybytes",
+ "c++": "crypto_auth_keybytes()",
+ "go": "CryptoAuthKeybytes"
+ },
+ {
+ "mangle": "crypto_auth_keygen",
+ "c++": "crypto_auth_keygen(unsigned char *)",
+ "go": "CryptoAuthKeygen"
+ },
+ {
+ "mangle": "crypto_auth_primitive",
+ "c++": "crypto_auth_primitive()",
+ "go": "CryptoAuthPrimitive"
+ },
+ {
+ "mangle": "crypto_auth_verify",
+ "c++": "crypto_auth_verify(const unsigned char *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoAuthVerify"
+ },
+ {
+ "mangle": "crypto_box",
+ "c++": "crypto_box(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBox"
+ },
+ {
+ "mangle": "crypto_box_afternm",
+ "c++": "crypto_box_afternm(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxAfternm"
+ },
+ {
+ "mangle": "crypto_box_beforenm",
+ "c++": "crypto_box_beforenm(unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxBeforenm"
+ },
+ {
+ "mangle": "crypto_box_beforenmbytes",
+ "c++": "crypto_box_beforenmbytes()",
+ "go": "CryptoBoxBeforenmbytes"
+ },
+ {
+ "mangle": "crypto_box_boxzerobytes",
+ "c++": "crypto_box_boxzerobytes()",
+ "go": "CryptoBoxBoxzerobytes"
+ },
+ {
+ "mangle": "crypto_box_curve25519xchacha20poly1305_beforenm",
+ "c++": "crypto_box_curve25519xchacha20poly1305_beforenm(unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxCurve25519xchacha20poly1305Beforenm"
+ },
+ {
+ "mangle": "crypto_box_curve25519xchacha20poly1305_beforenmbytes",
+ "c++": "crypto_box_curve25519xchacha20poly1305_beforenmbytes()",
+ "go": "CryptoBoxCurve25519xchacha20poly1305Beforenmbytes"
+ },
+ {
+ "mangle": "crypto_box_curve25519xchacha20poly1305_detached",
+ "c++": "crypto_box_curve25519xchacha20poly1305_detached(unsigned char *, unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxCurve25519xchacha20poly1305Detached"
+ },
+ {
+ "mangle": "crypto_box_curve25519xchacha20poly1305_detached_afternm",
+ "c++": "crypto_box_curve25519xchacha20poly1305_detached_afternm(unsigned char *, unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxCurve25519xchacha20poly1305DetachedAfternm"
+ },
+ {
+ "mangle": "crypto_box_curve25519xchacha20poly1305_easy",
+ "c++": "crypto_box_curve25519xchacha20poly1305_easy(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxCurve25519xchacha20poly1305Easy"
+ },
+ {
+ "mangle": "crypto_box_curve25519xchacha20poly1305_easy_afternm",
+ "c++": "crypto_box_curve25519xchacha20poly1305_easy_afternm(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxCurve25519xchacha20poly1305EasyAfternm"
+ },
+ {
+ "mangle": "crypto_box_curve25519xchacha20poly1305_keypair",
+ "c++": "crypto_box_curve25519xchacha20poly1305_keypair(unsigned char *, unsigned char *)",
+ "go": "CryptoBoxCurve25519xchacha20poly1305Keypair"
+ },
+ {
+ "mangle": "crypto_box_curve25519xchacha20poly1305_macbytes",
+ "c++": "crypto_box_curve25519xchacha20poly1305_macbytes()",
+ "go": "CryptoBoxCurve25519xchacha20poly1305Macbytes"
+ },
+ {
+ "mangle": "crypto_box_curve25519xchacha20poly1305_messagebytes_max",
+ "c++": "crypto_box_curve25519xchacha20poly1305_messagebytes_max()",
+ "go": "CryptoBoxCurve25519xchacha20poly1305MessagebytesMax"
+ },
+ {
+ "mangle": "crypto_box_curve25519xchacha20poly1305_noncebytes",
+ "c++": "crypto_box_curve25519xchacha20poly1305_noncebytes()",
+ "go": "CryptoBoxCurve25519xchacha20poly1305Noncebytes"
+ },
+ {
+ "mangle": "crypto_box_curve25519xchacha20poly1305_open_detached",
+ "c++": "crypto_box_curve25519xchacha20poly1305_open_detached(unsigned char *, const unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxCurve25519xchacha20poly1305OpenDetached"
+ },
+ {
+ "mangle": "crypto_box_curve25519xchacha20poly1305_open_detached_afternm",
+ "c++": "crypto_box_curve25519xchacha20poly1305_open_detached_afternm(unsigned char *, const unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxCurve25519xchacha20poly1305OpenDetachedAfternm"
+ },
+ {
+ "mangle": "crypto_box_curve25519xchacha20poly1305_open_easy",
+ "c++": "crypto_box_curve25519xchacha20poly1305_open_easy(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxCurve25519xchacha20poly1305OpenEasy"
+ },
+ {
+ "mangle": "crypto_box_curve25519xchacha20poly1305_open_easy_afternm",
+ "c++": "crypto_box_curve25519xchacha20poly1305_open_easy_afternm(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxCurve25519xchacha20poly1305OpenEasyAfternm"
+ },
+ {
+ "mangle": "crypto_box_curve25519xchacha20poly1305_publickeybytes",
+ "c++": "crypto_box_curve25519xchacha20poly1305_publickeybytes()",
+ "go": "CryptoBoxCurve25519xchacha20poly1305Publickeybytes"
+ },
+ {
+ "mangle": "crypto_box_curve25519xchacha20poly1305_seal",
+ "c++": "crypto_box_curve25519xchacha20poly1305_seal(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoBoxCurve25519xchacha20poly1305Seal"
+ },
+ {
+ "mangle": "crypto_box_curve25519xchacha20poly1305_seal_open",
+ "c++": "crypto_box_curve25519xchacha20poly1305_seal_open(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxCurve25519xchacha20poly1305SealOpen"
+ },
+ {
+ "mangle": "crypto_box_curve25519xchacha20poly1305_sealbytes",
+ "c++": "crypto_box_curve25519xchacha20poly1305_sealbytes()",
+ "go": "CryptoBoxCurve25519xchacha20poly1305Sealbytes"
+ },
+ {
+ "mangle": "crypto_box_curve25519xchacha20poly1305_secretkeybytes",
+ "c++": "crypto_box_curve25519xchacha20poly1305_secretkeybytes()",
+ "go": "CryptoBoxCurve25519xchacha20poly1305Secretkeybytes"
+ },
+ {
+ "mangle": "crypto_box_curve25519xchacha20poly1305_seed_keypair",
+ "c++": "crypto_box_curve25519xchacha20poly1305_seed_keypair(unsigned char *, unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxCurve25519xchacha20poly1305SeedKeypair"
+ },
+ {
+ "mangle": "crypto_box_curve25519xchacha20poly1305_seedbytes",
+ "c++": "crypto_box_curve25519xchacha20poly1305_seedbytes()",
+ "go": "CryptoBoxCurve25519xchacha20poly1305Seedbytes"
+ },
+ {
+ "mangle": "crypto_box_curve25519xsalsa20poly1305",
+ "c++": "crypto_box_curve25519xsalsa20poly1305(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxCurve25519xsalsa20poly1305"
+ },
+ {
+ "mangle": "crypto_box_curve25519xsalsa20poly1305_afternm",
+ "c++": "crypto_box_curve25519xsalsa20poly1305_afternm(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxCurve25519xsalsa20poly1305Afternm"
+ },
+ {
+ "mangle": "crypto_box_curve25519xsalsa20poly1305_beforenm",
+ "c++": "crypto_box_curve25519xsalsa20poly1305_beforenm(unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxCurve25519xsalsa20poly1305Beforenm"
+ },
+ {
+ "mangle": "crypto_box_curve25519xsalsa20poly1305_beforenmbytes",
+ "c++": "crypto_box_curve25519xsalsa20poly1305_beforenmbytes()",
+ "go": "CryptoBoxCurve25519xsalsa20poly1305Beforenmbytes"
+ },
+ {
+ "mangle": "crypto_box_curve25519xsalsa20poly1305_boxzerobytes",
+ "c++": "crypto_box_curve25519xsalsa20poly1305_boxzerobytes()",
+ "go": "CryptoBoxCurve25519xsalsa20poly1305Boxzerobytes"
+ },
+ {
+ "mangle": "crypto_box_curve25519xsalsa20poly1305_keypair",
+ "c++": "crypto_box_curve25519xsalsa20poly1305_keypair(unsigned char *, unsigned char *)",
+ "go": "CryptoBoxCurve25519xsalsa20poly1305Keypair"
+ },
+ {
+ "mangle": "crypto_box_curve25519xsalsa20poly1305_macbytes",
+ "c++": "crypto_box_curve25519xsalsa20poly1305_macbytes()",
+ "go": "CryptoBoxCurve25519xsalsa20poly1305Macbytes"
+ },
+ {
+ "mangle": "crypto_box_curve25519xsalsa20poly1305_messagebytes_max",
+ "c++": "crypto_box_curve25519xsalsa20poly1305_messagebytes_max()",
+ "go": "CryptoBoxCurve25519xsalsa20poly1305MessagebytesMax"
+ },
+ {
+ "mangle": "crypto_box_curve25519xsalsa20poly1305_noncebytes",
+ "c++": "crypto_box_curve25519xsalsa20poly1305_noncebytes()",
+ "go": "CryptoBoxCurve25519xsalsa20poly1305Noncebytes"
+ },
+ {
+ "mangle": "crypto_box_curve25519xsalsa20poly1305_open",
+ "c++": "crypto_box_curve25519xsalsa20poly1305_open(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxCurve25519xsalsa20poly1305Open"
+ },
+ {
+ "mangle": "crypto_box_curve25519xsalsa20poly1305_open_afternm",
+ "c++": "crypto_box_curve25519xsalsa20poly1305_open_afternm(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxCurve25519xsalsa20poly1305OpenAfternm"
+ },
+ {
+ "mangle": "crypto_box_curve25519xsalsa20poly1305_publickeybytes",
+ "c++": "crypto_box_curve25519xsalsa20poly1305_publickeybytes()",
+ "go": "CryptoBoxCurve25519xsalsa20poly1305Publickeybytes"
+ },
+ {
+ "mangle": "crypto_box_curve25519xsalsa20poly1305_secretkeybytes",
+ "c++": "crypto_box_curve25519xsalsa20poly1305_secretkeybytes()",
+ "go": "CryptoBoxCurve25519xsalsa20poly1305Secretkeybytes"
+ },
+ {
+ "mangle": "crypto_box_curve25519xsalsa20poly1305_seed_keypair",
+ "c++": "crypto_box_curve25519xsalsa20poly1305_seed_keypair(unsigned char *, unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxCurve25519xsalsa20poly1305SeedKeypair"
+ },
+ {
+ "mangle": "crypto_box_curve25519xsalsa20poly1305_seedbytes",
+ "c++": "crypto_box_curve25519xsalsa20poly1305_seedbytes()",
+ "go": "CryptoBoxCurve25519xsalsa20poly1305Seedbytes"
+ },
+ {
+ "mangle": "crypto_box_curve25519xsalsa20poly1305_zerobytes",
+ "c++": "crypto_box_curve25519xsalsa20poly1305_zerobytes()",
+ "go": "CryptoBoxCurve25519xsalsa20poly1305Zerobytes"
+ },
+ {
+ "mangle": "crypto_box_detached",
+ "c++": "crypto_box_detached(unsigned char *, unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxDetached"
+ },
+ {
+ "mangle": "crypto_box_detached_afternm",
+ "c++": "crypto_box_detached_afternm(unsigned char *, unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxDetachedAfternm"
+ },
+ {
+ "mangle": "crypto_box_easy",
+ "c++": "crypto_box_easy(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxEasy"
+ },
+ {
+ "mangle": "crypto_box_easy_afternm",
+ "c++": "crypto_box_easy_afternm(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxEasyAfternm"
+ },
+ {
+ "mangle": "crypto_box_keypair",
+ "c++": "crypto_box_keypair(unsigned char *, unsigned char *)",
+ "go": "CryptoBoxKeypair"
+ },
+ {
+ "mangle": "crypto_box_macbytes",
+ "c++": "crypto_box_macbytes()",
+ "go": "CryptoBoxMacbytes"
+ },
+ {
+ "mangle": "crypto_box_messagebytes_max",
+ "c++": "crypto_box_messagebytes_max()",
+ "go": "CryptoBoxMessagebytesMax"
+ },
+ {
+ "mangle": "crypto_box_noncebytes",
+ "c++": "crypto_box_noncebytes()",
+ "go": "CryptoBoxNoncebytes"
+ },
+ {
+ "mangle": "crypto_box_open",
+ "c++": "crypto_box_open(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxOpen"
+ },
+ {
+ "mangle": "crypto_box_open_afternm",
+ "c++": "crypto_box_open_afternm(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxOpenAfternm"
+ },
+ {
+ "mangle": "crypto_box_open_detached",
+ "c++": "crypto_box_open_detached(unsigned char *, const unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxOpenDetached"
+ },
+ {
+ "mangle": "crypto_box_open_detached_afternm",
+ "c++": "crypto_box_open_detached_afternm(unsigned char *, const unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxOpenDetachedAfternm"
+ },
+ {
+ "mangle": "crypto_box_open_easy",
+ "c++": "crypto_box_open_easy(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxOpenEasy"
+ },
+ {
+ "mangle": "crypto_box_open_easy_afternm",
+ "c++": "crypto_box_open_easy_afternm(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxOpenEasyAfternm"
+ },
+ {
+ "mangle": "crypto_box_primitive",
+ "c++": "crypto_box_primitive()",
+ "go": "CryptoBoxPrimitive"
+ },
+ {
+ "mangle": "crypto_box_publickeybytes",
+ "c++": "crypto_box_publickeybytes()",
+ "go": "CryptoBoxPublickeybytes"
+ },
+ {
+ "mangle": "crypto_box_seal",
+ "c++": "crypto_box_seal(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoBoxSeal"
+ },
+ {
+ "mangle": "crypto_box_seal_open",
+ "c++": "crypto_box_seal_open(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxSealOpen"
+ },
+ {
+ "mangle": "crypto_box_sealbytes",
+ "c++": "crypto_box_sealbytes()",
+ "go": "CryptoBoxSealbytes"
+ },
+ {
+ "mangle": "crypto_box_secretkeybytes",
+ "c++": "crypto_box_secretkeybytes()",
+ "go": "CryptoBoxSecretkeybytes"
+ },
+ {
+ "mangle": "crypto_box_seed_keypair",
+ "c++": "crypto_box_seed_keypair(unsigned char *, unsigned char *, const unsigned char *)",
+ "go": "CryptoBoxSeedKeypair"
+ },
+ {
+ "mangle": "crypto_box_seedbytes",
+ "c++": "crypto_box_seedbytes()",
+ "go": "CryptoBoxSeedbytes"
+ },
+ {
+ "mangle": "crypto_box_zerobytes",
+ "c++": "crypto_box_zerobytes()",
+ "go": "CryptoBoxZerobytes"
+ },
+ {
+ "mangle": "crypto_core_ed25519_add",
+ "c++": "crypto_core_ed25519_add(unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreEd25519Add"
+ },
+ {
+ "mangle": "crypto_core_ed25519_bytes",
+ "c++": "crypto_core_ed25519_bytes()",
+ "go": "CryptoCoreEd25519Bytes"
+ },
+ {
+ "mangle": "crypto_core_ed25519_from_hash",
+ "c++": "crypto_core_ed25519_from_hash(unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreEd25519FromHash"
+ },
+ {
+ "mangle": "crypto_core_ed25519_from_uniform",
+ "c++": "crypto_core_ed25519_from_uniform(unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreEd25519FromUniform"
+ },
+ {
+ "mangle": "crypto_core_ed25519_hashbytes",
+ "c++": "crypto_core_ed25519_hashbytes()",
+ "go": "CryptoCoreEd25519Hashbytes"
+ },
+ {
+ "mangle": "crypto_core_ed25519_is_valid_point",
+ "c++": "crypto_core_ed25519_is_valid_point(const unsigned char *)",
+ "go": "CryptoCoreEd25519IsValidPoint"
+ },
+ {
+ "mangle": "crypto_core_ed25519_nonreducedscalarbytes",
+ "c++": "crypto_core_ed25519_nonreducedscalarbytes()",
+ "go": "CryptoCoreEd25519Nonreducedscalarbytes"
+ },
+ {
+ "mangle": "crypto_core_ed25519_random",
+ "c++": "crypto_core_ed25519_random(unsigned char *)",
+ "go": "CryptoCoreEd25519Random"
+ },
+ {
+ "mangle": "crypto_core_ed25519_scalar_add",
+ "c++": "crypto_core_ed25519_scalar_add(unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreEd25519ScalarAdd"
+ },
+ {
+ "mangle": "crypto_core_ed25519_scalar_complement",
+ "c++": "crypto_core_ed25519_scalar_complement(unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreEd25519ScalarComplement"
+ },
+ {
+ "mangle": "crypto_core_ed25519_scalar_invert",
+ "c++": "crypto_core_ed25519_scalar_invert(unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreEd25519ScalarInvert"
+ },
+ {
+ "mangle": "crypto_core_ed25519_scalar_mul",
+ "c++": "crypto_core_ed25519_scalar_mul(unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreEd25519ScalarMul"
+ },
+ {
+ "mangle": "crypto_core_ed25519_scalar_negate",
+ "c++": "crypto_core_ed25519_scalar_negate(unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreEd25519ScalarNegate"
+ },
+ {
+ "mangle": "crypto_core_ed25519_scalar_random",
+ "c++": "crypto_core_ed25519_scalar_random(unsigned char *)",
+ "go": "CryptoCoreEd25519ScalarRandom"
+ },
+ {
+ "mangle": "crypto_core_ed25519_scalar_reduce",
+ "c++": "crypto_core_ed25519_scalar_reduce(unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreEd25519ScalarReduce"
+ },
+ {
+ "mangle": "crypto_core_ed25519_scalar_sub",
+ "c++": "crypto_core_ed25519_scalar_sub(unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreEd25519ScalarSub"
+ },
+ {
+ "mangle": "crypto_core_ed25519_scalarbytes",
+ "c++": "crypto_core_ed25519_scalarbytes()",
+ "go": "CryptoCoreEd25519Scalarbytes"
+ },
+ {
+ "mangle": "crypto_core_ed25519_sub",
+ "c++": "crypto_core_ed25519_sub(unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreEd25519Sub"
+ },
+ {
+ "mangle": "crypto_core_ed25519_uniformbytes",
+ "c++": "crypto_core_ed25519_uniformbytes()",
+ "go": "CryptoCoreEd25519Uniformbytes"
+ },
+ {
+ "mangle": "crypto_core_hchacha20",
+ "c++": "crypto_core_hchacha20(unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreHchacha20"
+ },
+ {
+ "mangle": "crypto_core_hchacha20_constbytes",
+ "c++": "crypto_core_hchacha20_constbytes()",
+ "go": "CryptoCoreHchacha20Constbytes"
+ },
+ {
+ "mangle": "crypto_core_hchacha20_inputbytes",
+ "c++": "crypto_core_hchacha20_inputbytes()",
+ "go": "CryptoCoreHchacha20Inputbytes"
+ },
+ {
+ "mangle": "crypto_core_hchacha20_keybytes",
+ "c++": "crypto_core_hchacha20_keybytes()",
+ "go": "CryptoCoreHchacha20Keybytes"
+ },
+ {
+ "mangle": "crypto_core_hchacha20_outputbytes",
+ "c++": "crypto_core_hchacha20_outputbytes()",
+ "go": "CryptoCoreHchacha20Outputbytes"
+ },
+ {
+ "mangle": "crypto_core_hsalsa20",
+ "c++": "crypto_core_hsalsa20(unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreHsalsa20"
+ },
+ {
+ "mangle": "crypto_core_hsalsa20_constbytes",
+ "c++": "crypto_core_hsalsa20_constbytes()",
+ "go": "CryptoCoreHsalsa20Constbytes"
+ },
+ {
+ "mangle": "crypto_core_hsalsa20_inputbytes",
+ "c++": "crypto_core_hsalsa20_inputbytes()",
+ "go": "CryptoCoreHsalsa20Inputbytes"
+ },
+ {
+ "mangle": "crypto_core_hsalsa20_keybytes",
+ "c++": "crypto_core_hsalsa20_keybytes()",
+ "go": "CryptoCoreHsalsa20Keybytes"
+ },
+ {
+ "mangle": "crypto_core_hsalsa20_outputbytes",
+ "c++": "crypto_core_hsalsa20_outputbytes()",
+ "go": "CryptoCoreHsalsa20Outputbytes"
+ },
+ {
+ "mangle": "crypto_core_ristretto255_add",
+ "c++": "crypto_core_ristretto255_add(unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreRistretto255Add"
+ },
+ {
+ "mangle": "crypto_core_ristretto255_bytes",
+ "c++": "crypto_core_ristretto255_bytes()",
+ "go": "CryptoCoreRistretto255Bytes"
+ },
+ {
+ "mangle": "crypto_core_ristretto255_from_hash",
+ "c++": "crypto_core_ristretto255_from_hash(unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreRistretto255FromHash"
+ },
+ {
+ "mangle": "crypto_core_ristretto255_hashbytes",
+ "c++": "crypto_core_ristretto255_hashbytes()",
+ "go": "CryptoCoreRistretto255Hashbytes"
+ },
+ {
+ "mangle": "crypto_core_ristretto255_is_valid_point",
+ "c++": "crypto_core_ristretto255_is_valid_point(const unsigned char *)",
+ "go": "CryptoCoreRistretto255IsValidPoint"
+ },
+ {
+ "mangle": "crypto_core_ristretto255_nonreducedscalarbytes",
+ "c++": "crypto_core_ristretto255_nonreducedscalarbytes()",
+ "go": "CryptoCoreRistretto255Nonreducedscalarbytes"
+ },
+ {
+ "mangle": "crypto_core_ristretto255_random",
+ "c++": "crypto_core_ristretto255_random(unsigned char *)",
+ "go": "CryptoCoreRistretto255Random"
+ },
+ {
+ "mangle": "crypto_core_ristretto255_scalar_add",
+ "c++": "crypto_core_ristretto255_scalar_add(unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreRistretto255ScalarAdd"
+ },
+ {
+ "mangle": "crypto_core_ristretto255_scalar_complement",
+ "c++": "crypto_core_ristretto255_scalar_complement(unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreRistretto255ScalarComplement"
+ },
+ {
+ "mangle": "crypto_core_ristretto255_scalar_invert",
+ "c++": "crypto_core_ristretto255_scalar_invert(unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreRistretto255ScalarInvert"
+ },
+ {
+ "mangle": "crypto_core_ristretto255_scalar_mul",
+ "c++": "crypto_core_ristretto255_scalar_mul(unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreRistretto255ScalarMul"
+ },
+ {
+ "mangle": "crypto_core_ristretto255_scalar_negate",
+ "c++": "crypto_core_ristretto255_scalar_negate(unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreRistretto255ScalarNegate"
+ },
+ {
+ "mangle": "crypto_core_ristretto255_scalar_random",
+ "c++": "crypto_core_ristretto255_scalar_random(unsigned char *)",
+ "go": "CryptoCoreRistretto255ScalarRandom"
+ },
+ {
+ "mangle": "crypto_core_ristretto255_scalar_reduce",
+ "c++": "crypto_core_ristretto255_scalar_reduce(unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreRistretto255ScalarReduce"
+ },
+ {
+ "mangle": "crypto_core_ristretto255_scalar_sub",
+ "c++": "crypto_core_ristretto255_scalar_sub(unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreRistretto255ScalarSub"
+ },
+ {
+ "mangle": "crypto_core_ristretto255_scalarbytes",
+ "c++": "crypto_core_ristretto255_scalarbytes()",
+ "go": "CryptoCoreRistretto255Scalarbytes"
+ },
+ {
+ "mangle": "crypto_core_ristretto255_sub",
+ "c++": "crypto_core_ristretto255_sub(unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreRistretto255Sub"
+ },
+ {
+ "mangle": "crypto_core_salsa20",
+ "c++": "crypto_core_salsa20(unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreSalsa20"
+ },
+ {
+ "mangle": "crypto_core_salsa2012",
+ "c++": "crypto_core_salsa2012(unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreSalsa2012"
+ },
+ {
+ "mangle": "crypto_core_salsa2012_constbytes",
+ "c++": "crypto_core_salsa2012_constbytes()",
+ "go": "CryptoCoreSalsa2012Constbytes"
+ },
+ {
+ "mangle": "crypto_core_salsa2012_inputbytes",
+ "c++": "crypto_core_salsa2012_inputbytes()",
+ "go": "CryptoCoreSalsa2012Inputbytes"
+ },
+ {
+ "mangle": "crypto_core_salsa2012_keybytes",
+ "c++": "crypto_core_salsa2012_keybytes()",
+ "go": "CryptoCoreSalsa2012Keybytes"
+ },
+ {
+ "mangle": "crypto_core_salsa2012_outputbytes",
+ "c++": "crypto_core_salsa2012_outputbytes()",
+ "go": "CryptoCoreSalsa2012Outputbytes"
+ },
+ {
+ "mangle": "crypto_core_salsa208",
+ "c++": "crypto_core_salsa208(unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoCoreSalsa208"
+ },
+ {
+ "mangle": "crypto_core_salsa208_constbytes",
+ "c++": "crypto_core_salsa208_constbytes()",
+ "go": "CryptoCoreSalsa208Constbytes"
+ },
+ {
+ "mangle": "crypto_core_salsa208_inputbytes",
+ "c++": "crypto_core_salsa208_inputbytes()",
+ "go": "CryptoCoreSalsa208Inputbytes"
+ },
+ {
+ "mangle": "crypto_core_salsa208_keybytes",
+ "c++": "crypto_core_salsa208_keybytes()",
+ "go": "CryptoCoreSalsa208Keybytes"
+ },
+ {
+ "mangle": "crypto_core_salsa208_outputbytes",
+ "c++": "crypto_core_salsa208_outputbytes()",
+ "go": "CryptoCoreSalsa208Outputbytes"
+ },
+ {
+ "mangle": "crypto_core_salsa20_constbytes",
+ "c++": "crypto_core_salsa20_constbytes()",
+ "go": "CryptoCoreSalsa20Constbytes"
+ },
+ {
+ "mangle": "crypto_core_salsa20_inputbytes",
+ "c++": "crypto_core_salsa20_inputbytes()",
+ "go": "CryptoCoreSalsa20Inputbytes"
+ },
+ {
+ "mangle": "crypto_core_salsa20_keybytes",
+ "c++": "crypto_core_salsa20_keybytes()",
+ "go": "CryptoCoreSalsa20Keybytes"
+ },
+ {
+ "mangle": "crypto_core_salsa20_outputbytes",
+ "c++": "crypto_core_salsa20_outputbytes()",
+ "go": "CryptoCoreSalsa20Outputbytes"
+ },
+ {
+ "mangle": "crypto_generichash",
+ "c++": "crypto_generichash(unsigned char *, size_t, const unsigned char *, unsigned long long, const unsigned char *, size_t)",
+ "go": "CryptoGenerichash"
+ },
+ {
+ "mangle": "crypto_generichash_blake2b",
+ "c++": "crypto_generichash_blake2b(unsigned char *, size_t, const unsigned char *, unsigned long long, const unsigned char *, size_t)",
+ "go": "CryptoGenerichashBlake2b"
+ },
+ {
+ "mangle": "crypto_generichash_blake2b_bytes",
+ "c++": "crypto_generichash_blake2b_bytes()",
+ "go": "CryptoGenerichashBlake2bBytes"
+ },
+ {
+ "mangle": "crypto_generichash_blake2b_bytes_max",
+ "c++": "crypto_generichash_blake2b_bytes_max()",
+ "go": "CryptoGenerichashBlake2bBytesMax"
+ },
+ {
+ "mangle": "crypto_generichash_blake2b_bytes_min",
+ "c++": "crypto_generichash_blake2b_bytes_min()",
+ "go": "CryptoGenerichashBlake2bBytesMin"
+ },
+ {
+ "mangle": "crypto_generichash_blake2b_final",
+ "c++": "crypto_generichash_blake2b_final(crypto_generichash_blake2b_state *, unsigned char *, const size_t)",
+ "go": "(*CryptoGenerichashBlake2bState).CryptoGenerichashBlake2bFinal"
+ },
+ {
+ "mangle": "crypto_generichash_blake2b_init",
+ "c++": "crypto_generichash_blake2b_init(crypto_generichash_blake2b_state *, const unsigned char *, const size_t, const size_t)",
+ "go": "(*CryptoGenerichashBlake2bState).CryptoGenerichashBlake2bInit"
+ },
+ {
+ "mangle": "crypto_generichash_blake2b_init_salt_personal",
+ "c++": "crypto_generichash_blake2b_init_salt_personal(crypto_generichash_blake2b_state *, const unsigned char *, const size_t, const size_t, const unsigned char *, const unsigned char *)",
+ "go": "(*CryptoGenerichashBlake2bState).CryptoGenerichashBlake2bInitSaltPersonal"
+ },
+ {
+ "mangle": "crypto_generichash_blake2b_keybytes",
+ "c++": "crypto_generichash_blake2b_keybytes()",
+ "go": "CryptoGenerichashBlake2bKeybytes"
+ },
+ {
+ "mangle": "crypto_generichash_blake2b_keybytes_max",
+ "c++": "crypto_generichash_blake2b_keybytes_max()",
+ "go": "CryptoGenerichashBlake2bKeybytesMax"
+ },
+ {
+ "mangle": "crypto_generichash_blake2b_keybytes_min",
+ "c++": "crypto_generichash_blake2b_keybytes_min()",
+ "go": "CryptoGenerichashBlake2bKeybytesMin"
+ },
+ {
+ "mangle": "crypto_generichash_blake2b_keygen",
+ "c++": "crypto_generichash_blake2b_keygen(unsigned char *)",
+ "go": "CryptoGenerichashBlake2bKeygen"
+ },
+ {
+ "mangle": "crypto_generichash_blake2b_personalbytes",
+ "c++": "crypto_generichash_blake2b_personalbytes()",
+ "go": "CryptoGenerichashBlake2bPersonalbytes"
+ },
+ {
+ "mangle": "crypto_generichash_blake2b_salt_personal",
+ "c++": "crypto_generichash_blake2b_salt_personal(unsigned char *, size_t, const unsigned char *, unsigned long long, const unsigned char *, size_t, const unsigned char *, const unsigned char *)",
+ "go": "CryptoGenerichashBlake2bSaltPersonal"
+ },
+ {
+ "mangle": "crypto_generichash_blake2b_saltbytes",
+ "c++": "crypto_generichash_blake2b_saltbytes()",
+ "go": "CryptoGenerichashBlake2bSaltbytes"
+ },
+ {
+ "mangle": "crypto_generichash_blake2b_statebytes",
+ "c++": "crypto_generichash_blake2b_statebytes()",
+ "go": "CryptoGenerichashBlake2bStatebytes"
+ },
+ {
+ "mangle": "crypto_generichash_blake2b_update",
+ "c++": "crypto_generichash_blake2b_update(crypto_generichash_blake2b_state *, const unsigned char *, unsigned long long)",
+ "go": "(*CryptoGenerichashBlake2bState).CryptoGenerichashBlake2bUpdate"
+ },
+ {
+ "mangle": "crypto_generichash_bytes",
+ "c++": "crypto_generichash_bytes()",
+ "go": "CryptoGenerichashBytes"
+ },
+ {
+ "mangle": "crypto_generichash_bytes_max",
+ "c++": "crypto_generichash_bytes_max()",
+ "go": "CryptoGenerichashBytesMax"
+ },
+ {
+ "mangle": "crypto_generichash_bytes_min",
+ "c++": "crypto_generichash_bytes_min()",
+ "go": "CryptoGenerichashBytesMin"
+ },
+ {
+ "mangle": "crypto_generichash_final",
+ "c++": "crypto_generichash_final(crypto_generichash_state *, unsigned char *, const size_t)",
+ "go": "(*CryptoGenerichashState).CryptoGenerichashFinal"
+ },
+ {
+ "mangle": "crypto_generichash_init",
+ "c++": "crypto_generichash_init(crypto_generichash_state *, const unsigned char *, const size_t, const size_t)",
+ "go": "(*CryptoGenerichashState).CryptoGenerichashInit"
+ },
+ {
+ "mangle": "crypto_generichash_keybytes",
+ "c++": "crypto_generichash_keybytes()",
+ "go": "CryptoGenerichashKeybytes"
+ },
+ {
+ "mangle": "crypto_generichash_keybytes_max",
+ "c++": "crypto_generichash_keybytes_max()",
+ "go": "CryptoGenerichashKeybytesMax"
+ },
+ {
+ "mangle": "crypto_generichash_keybytes_min",
+ "c++": "crypto_generichash_keybytes_min()",
+ "go": "CryptoGenerichashKeybytesMin"
+ },
+ {
+ "mangle": "crypto_generichash_keygen",
+ "c++": "crypto_generichash_keygen(unsigned char *)",
+ "go": "CryptoGenerichashKeygen"
+ },
+ {
+ "mangle": "crypto_generichash_primitive",
+ "c++": "crypto_generichash_primitive()",
+ "go": "CryptoGenerichashPrimitive"
+ },
+ {
+ "mangle": "crypto_generichash_statebytes",
+ "c++": "crypto_generichash_statebytes()",
+ "go": "CryptoGenerichashStatebytes"
+ },
+ {
+ "mangle": "crypto_generichash_update",
+ "c++": "crypto_generichash_update(crypto_generichash_state *, const unsigned char *, unsigned long long)",
+ "go": "(*CryptoGenerichashState).CryptoGenerichashUpdate"
+ },
+ {
+ "mangle": "crypto_hash",
+ "c++": "crypto_hash(unsigned char *, const unsigned char *, unsigned long long)",
+ "go": "CryptoHash"
+ },
+ {
+ "mangle": "crypto_hash_bytes",
+ "c++": "crypto_hash_bytes()",
+ "go": "CryptoHashBytes"
+ },
+ {
+ "mangle": "crypto_hash_primitive",
+ "c++": "crypto_hash_primitive()",
+ "go": "CryptoHashPrimitive"
+ },
+ {
+ "mangle": "crypto_hash_sha256",
+ "c++": "crypto_hash_sha256(unsigned char *, const unsigned char *, unsigned long long)",
+ "go": "CryptoHashSha256"
+ },
+ {
+ "mangle": "crypto_hash_sha256_bytes",
+ "c++": "crypto_hash_sha256_bytes()",
+ "go": "CryptoHashSha256Bytes"
+ },
+ {
+ "mangle": "crypto_hash_sha256_final",
+ "c++": "crypto_hash_sha256_final(crypto_hash_sha256_state *, unsigned char *)",
+ "go": "(*CryptoHashSha256State).CryptoHashSha256Final"
+ },
+ {
+ "mangle": "crypto_hash_sha256_init",
+ "c++": "crypto_hash_sha256_init(crypto_hash_sha256_state *)",
+ "go": "(*CryptoHashSha256State).CryptoHashSha256Init"
+ },
+ {
+ "mangle": "crypto_hash_sha256_statebytes",
+ "c++": "crypto_hash_sha256_statebytes()",
+ "go": "CryptoHashSha256Statebytes"
+ },
+ {
+ "mangle": "crypto_hash_sha256_update",
+ "c++": "crypto_hash_sha256_update(crypto_hash_sha256_state *, const unsigned char *, unsigned long long)",
+ "go": "(*CryptoHashSha256State).CryptoHashSha256Update"
+ },
+ {
+ "mangle": "crypto_hash_sha512",
+ "c++": "crypto_hash_sha512(unsigned char *, const unsigned char *, unsigned long long)",
+ "go": "CryptoHashSha512"
+ },
+ {
+ "mangle": "crypto_hash_sha512_bytes",
+ "c++": "crypto_hash_sha512_bytes()",
+ "go": "CryptoHashSha512Bytes"
+ },
+ {
+ "mangle": "crypto_hash_sha512_final",
+ "c++": "crypto_hash_sha512_final(crypto_hash_sha512_state *, unsigned char *)",
+ "go": "(*CryptoHashSha512State).CryptoHashSha512Final"
+ },
+ {
+ "mangle": "crypto_hash_sha512_init",
+ "c++": "crypto_hash_sha512_init(crypto_hash_sha512_state *)",
+ "go": "(*CryptoHashSha512State).CryptoHashSha512Init"
+ },
+ {
+ "mangle": "crypto_hash_sha512_statebytes",
+ "c++": "crypto_hash_sha512_statebytes()",
+ "go": "CryptoHashSha512Statebytes"
+ },
+ {
+ "mangle": "crypto_hash_sha512_update",
+ "c++": "crypto_hash_sha512_update(crypto_hash_sha512_state *, const unsigned char *, unsigned long long)",
+ "go": "(*CryptoHashSha512State).CryptoHashSha512Update"
+ },
+ {
+ "mangle": "crypto_kdf_blake2b_bytes_max",
+ "c++": "crypto_kdf_blake2b_bytes_max()",
+ "go": "CryptoKdfBlake2bBytesMax"
+ },
+ {
+ "mangle": "crypto_kdf_blake2b_bytes_min",
+ "c++": "crypto_kdf_blake2b_bytes_min()",
+ "go": "CryptoKdfBlake2bBytesMin"
+ },
+ {
+ "mangle": "crypto_kdf_blake2b_contextbytes",
+ "c++": "crypto_kdf_blake2b_contextbytes()",
+ "go": "CryptoKdfBlake2bContextbytes"
+ },
+ {
+ "mangle": "crypto_kdf_blake2b_derive_from_key",
+ "c++": "crypto_kdf_blake2b_derive_from_key(unsigned char *, size_t, uint64_t, const char *, const unsigned char *)",
+ "go": "CryptoKdfBlake2bDeriveFromKey"
+ },
+ {
+ "mangle": "crypto_kdf_blake2b_keybytes",
+ "c++": "crypto_kdf_blake2b_keybytes()",
+ "go": "CryptoKdfBlake2bKeybytes"
+ },
+ {
+ "mangle": "crypto_kdf_bytes_max",
+ "c++": "crypto_kdf_bytes_max()",
+ "go": "CryptoKdfBytesMax"
+ },
+ {
+ "mangle": "crypto_kdf_bytes_min",
+ "c++": "crypto_kdf_bytes_min()",
+ "go": "CryptoKdfBytesMin"
+ },
+ {
+ "mangle": "crypto_kdf_contextbytes",
+ "c++": "crypto_kdf_contextbytes()",
+ "go": "CryptoKdfContextbytes"
+ },
+ {
+ "mangle": "crypto_kdf_derive_from_key",
+ "c++": "crypto_kdf_derive_from_key(unsigned char *, size_t, uint64_t, const char *, const unsigned char *)",
+ "go": "CryptoKdfDeriveFromKey"
+ },
+ {
+ "mangle": "crypto_kdf_hkdf_sha256_bytes_max",
+ "c++": "crypto_kdf_hkdf_sha256_bytes_max()",
+ "go": "CryptoKdfHkdfSha256BytesMax"
+ },
+ {
+ "mangle": "crypto_kdf_hkdf_sha256_bytes_min",
+ "c++": "crypto_kdf_hkdf_sha256_bytes_min()",
+ "go": "CryptoKdfHkdfSha256BytesMin"
+ },
+ {
+ "mangle": "crypto_kdf_hkdf_sha256_expand",
+ "c++": "crypto_kdf_hkdf_sha256_expand(unsigned char *, size_t, const char *, size_t, const unsigned char *)",
+ "go": "CryptoKdfHkdfSha256Expand"
+ },
+ {
+ "mangle": "crypto_kdf_hkdf_sha256_extract",
+ "c++": "crypto_kdf_hkdf_sha256_extract(unsigned char *, const unsigned char *, size_t, const unsigned char *, size_t)",
+ "go": "CryptoKdfHkdfSha256Extract"
+ },
+ {
+ "mangle": "crypto_kdf_hkdf_sha256_extract_final",
+ "c++": "crypto_kdf_hkdf_sha256_extract_final(crypto_kdf_hkdf_sha256_state *, unsigned char *)",
+ "go": "(*CryptoKdfHkdfSha256State).CryptoKdfHkdfSha256ExtractFinal"
+ },
+ {
+ "mangle": "crypto_kdf_hkdf_sha256_extract_init",
+ "c++": "crypto_kdf_hkdf_sha256_extract_init(crypto_kdf_hkdf_sha256_state *, const unsigned char *, size_t)",
+ "go": "(*CryptoKdfHkdfSha256State).CryptoKdfHkdfSha256ExtractInit"
+ },
+ {
+ "mangle": "crypto_kdf_hkdf_sha256_extract_update",
+ "c++": "crypto_kdf_hkdf_sha256_extract_update(crypto_kdf_hkdf_sha256_state *, const unsigned char *, size_t)",
+ "go": "(*CryptoKdfHkdfSha256State).CryptoKdfHkdfSha256ExtractUpdate"
+ },
+ {
+ "mangle": "crypto_kdf_hkdf_sha256_keybytes",
+ "c++": "crypto_kdf_hkdf_sha256_keybytes()",
+ "go": "CryptoKdfHkdfSha256Keybytes"
+ },
+ {
+ "mangle": "crypto_kdf_hkdf_sha256_keygen",
+ "c++": "crypto_kdf_hkdf_sha256_keygen(unsigned char *)",
+ "go": "CryptoKdfHkdfSha256Keygen"
+ },
+ {
+ "mangle": "crypto_kdf_hkdf_sha256_statebytes",
+ "c++": "crypto_kdf_hkdf_sha256_statebytes()",
+ "go": "CryptoKdfHkdfSha256Statebytes"
+ },
+ {
+ "mangle": "crypto_kdf_hkdf_sha512_bytes_max",
+ "c++": "crypto_kdf_hkdf_sha512_bytes_max()",
+ "go": "CryptoKdfHkdfSha512BytesMax"
+ },
+ {
+ "mangle": "crypto_kdf_hkdf_sha512_bytes_min",
+ "c++": "crypto_kdf_hkdf_sha512_bytes_min()",
+ "go": "CryptoKdfHkdfSha512BytesMin"
+ },
+ {
+ "mangle": "crypto_kdf_hkdf_sha512_expand",
+ "c++": "crypto_kdf_hkdf_sha512_expand(unsigned char *, size_t, const char *, size_t, const unsigned char *)",
+ "go": "CryptoKdfHkdfSha512Expand"
+ },
+ {
+ "mangle": "crypto_kdf_hkdf_sha512_extract",
+ "c++": "crypto_kdf_hkdf_sha512_extract(unsigned char *, const unsigned char *, size_t, const unsigned char *, size_t)",
+ "go": "CryptoKdfHkdfSha512Extract"
+ },
+ {
+ "mangle": "crypto_kdf_hkdf_sha512_extract_final",
+ "c++": "crypto_kdf_hkdf_sha512_extract_final(crypto_kdf_hkdf_sha512_state *, unsigned char *)",
+ "go": "(*CryptoKdfHkdfSha512State).CryptoKdfHkdfSha512ExtractFinal"
+ },
+ {
+ "mangle": "crypto_kdf_hkdf_sha512_extract_init",
+ "c++": "crypto_kdf_hkdf_sha512_extract_init(crypto_kdf_hkdf_sha512_state *, const unsigned char *, size_t)",
+ "go": "(*CryptoKdfHkdfSha512State).CryptoKdfHkdfSha512ExtractInit"
+ },
+ {
+ "mangle": "crypto_kdf_hkdf_sha512_extract_update",
+ "c++": "crypto_kdf_hkdf_sha512_extract_update(crypto_kdf_hkdf_sha512_state *, const unsigned char *, size_t)",
+ "go": "(*CryptoKdfHkdfSha512State).CryptoKdfHkdfSha512ExtractUpdate"
+ },
+ {
+ "mangle": "crypto_kdf_hkdf_sha512_keybytes",
+ "c++": "crypto_kdf_hkdf_sha512_keybytes()",
+ "go": "CryptoKdfHkdfSha512Keybytes"
+ },
+ {
+ "mangle": "crypto_kdf_hkdf_sha512_keygen",
+ "c++": "crypto_kdf_hkdf_sha512_keygen(unsigned char *)",
+ "go": "CryptoKdfHkdfSha512Keygen"
+ },
+ {
+ "mangle": "crypto_kdf_hkdf_sha512_statebytes",
+ "c++": "crypto_kdf_hkdf_sha512_statebytes()",
+ "go": "CryptoKdfHkdfSha512Statebytes"
+ },
+ {
+ "mangle": "crypto_kdf_keybytes",
+ "c++": "crypto_kdf_keybytes()",
+ "go": "CryptoKdfKeybytes"
+ },
+ {
+ "mangle": "crypto_kdf_keygen",
+ "c++": "crypto_kdf_keygen(unsigned char *)",
+ "go": "CryptoKdfKeygen"
+ },
+ {
+ "mangle": "crypto_kdf_primitive",
+ "c++": "crypto_kdf_primitive()",
+ "go": "CryptoKdfPrimitive"
+ },
+ {
+ "mangle": "crypto_kx_client_session_keys",
+ "c++": "crypto_kx_client_session_keys(unsigned char *, unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoKxClientSessionKeys"
+ },
+ {
+ "mangle": "crypto_kx_keypair",
+ "c++": "crypto_kx_keypair(unsigned char *, unsigned char *)",
+ "go": "CryptoKxKeypair"
+ },
+ {
+ "mangle": "crypto_kx_primitive",
+ "c++": "crypto_kx_primitive()",
+ "go": "CryptoKxPrimitive"
+ },
+ {
+ "mangle": "crypto_kx_publickeybytes",
+ "c++": "crypto_kx_publickeybytes()",
+ "go": "CryptoKxPublickeybytes"
+ },
+ {
+ "mangle": "crypto_kx_secretkeybytes",
+ "c++": "crypto_kx_secretkeybytes()",
+ "go": "CryptoKxSecretkeybytes"
+ },
+ {
+ "mangle": "crypto_kx_seed_keypair",
+ "c++": "crypto_kx_seed_keypair(unsigned char *, unsigned char *, const unsigned char *)",
+ "go": "CryptoKxSeedKeypair"
+ },
+ {
+ "mangle": "crypto_kx_seedbytes",
+ "c++": "crypto_kx_seedbytes()",
+ "go": "CryptoKxSeedbytes"
+ },
+ {
+ "mangle": "crypto_kx_server_session_keys",
+ "c++": "crypto_kx_server_session_keys(unsigned char *, unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoKxServerSessionKeys"
+ },
+ {
+ "mangle": "crypto_kx_sessionkeybytes",
+ "c++": "crypto_kx_sessionkeybytes()",
+ "go": "CryptoKxSessionkeybytes"
+ },
+ {
+ "mangle": "crypto_onetimeauth",
+ "c++": "crypto_onetimeauth(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoOnetimeauth"
+ },
+ {
+ "mangle": "crypto_onetimeauth_bytes",
+ "c++": "crypto_onetimeauth_bytes()",
+ "go": "CryptoOnetimeauthBytes"
+ },
+ {
+ "mangle": "crypto_onetimeauth_final",
+ "c++": "crypto_onetimeauth_final(crypto_onetimeauth_state *, unsigned char *)",
+ "go": "(*CryptoOnetimeauthState).CryptoOnetimeauthFinal"
+ },
+ {
+ "mangle": "crypto_onetimeauth_init",
+ "c++": "crypto_onetimeauth_init(crypto_onetimeauth_state *, const unsigned char *)",
+ "go": "(*CryptoOnetimeauthState).CryptoOnetimeauthInit"
+ },
+ {
+ "mangle": "crypto_onetimeauth_keybytes",
+ "c++": "crypto_onetimeauth_keybytes()",
+ "go": "CryptoOnetimeauthKeybytes"
+ },
+ {
+ "mangle": "crypto_onetimeauth_keygen",
+ "c++": "crypto_onetimeauth_keygen(unsigned char *)",
+ "go": "CryptoOnetimeauthKeygen"
+ },
+ {
+ "mangle": "crypto_onetimeauth_poly1305",
+ "c++": "crypto_onetimeauth_poly1305(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoOnetimeauthPoly1305"
+ },
+ {
+ "mangle": "crypto_onetimeauth_poly1305_bytes",
+ "c++": "crypto_onetimeauth_poly1305_bytes()",
+ "go": "CryptoOnetimeauthPoly1305Bytes"
+ },
+ {
+ "mangle": "crypto_onetimeauth_poly1305_final",
+ "c++": "crypto_onetimeauth_poly1305_final(crypto_onetimeauth_poly1305_state *, unsigned char *)",
+ "go": "(*CryptoOnetimeauthPoly1305State).CryptoOnetimeauthPoly1305Final"
+ },
+ {
+ "mangle": "crypto_onetimeauth_poly1305_init",
+ "c++": "crypto_onetimeauth_poly1305_init(crypto_onetimeauth_poly1305_state *, const unsigned char *)",
+ "go": "(*CryptoOnetimeauthPoly1305State).CryptoOnetimeauthPoly1305Init"
+ },
+ {
+ "mangle": "crypto_onetimeauth_poly1305_keybytes",
+ "c++": "crypto_onetimeauth_poly1305_keybytes()",
+ "go": "CryptoOnetimeauthPoly1305Keybytes"
+ },
+ {
+ "mangle": "crypto_onetimeauth_poly1305_keygen",
+ "c++": "crypto_onetimeauth_poly1305_keygen(unsigned char *)",
+ "go": "CryptoOnetimeauthPoly1305Keygen"
+ },
+ {
+ "mangle": "crypto_onetimeauth_poly1305_statebytes",
+ "c++": "crypto_onetimeauth_poly1305_statebytes()",
+ "go": "CryptoOnetimeauthPoly1305Statebytes"
+ },
+ {
+ "mangle": "crypto_onetimeauth_poly1305_update",
+ "c++": "crypto_onetimeauth_poly1305_update(crypto_onetimeauth_poly1305_state *, const unsigned char *, unsigned long long)",
+ "go": "(*CryptoOnetimeauthPoly1305State).CryptoOnetimeauthPoly1305Update"
+ },
+ {
+ "mangle": "crypto_onetimeauth_poly1305_verify",
+ "c++": "crypto_onetimeauth_poly1305_verify(const unsigned char *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoOnetimeauthPoly1305Verify"
+ },
+ {
+ "mangle": "crypto_onetimeauth_primitive",
+ "c++": "crypto_onetimeauth_primitive()",
+ "go": "CryptoOnetimeauthPrimitive"
+ },
+ {
+ "mangle": "crypto_onetimeauth_statebytes",
+ "c++": "crypto_onetimeauth_statebytes()",
+ "go": "CryptoOnetimeauthStatebytes"
+ },
+ {
+ "mangle": "crypto_onetimeauth_update",
+ "c++": "crypto_onetimeauth_update(crypto_onetimeauth_state *, const unsigned char *, unsigned long long)",
+ "go": "(*CryptoOnetimeauthState).CryptoOnetimeauthUpdate"
+ },
+ {
+ "mangle": "crypto_onetimeauth_verify",
+ "c++": "crypto_onetimeauth_verify(const unsigned char *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoOnetimeauthVerify"
+ },
+ {
+ "mangle": "crypto_pwhash",
+ "c++": "crypto_pwhash(unsigned char *const, unsigned long long, const char *const, unsigned long long, const unsigned char *const, unsigned long long, size_t, int)",
+ "go": "CryptoPwhash"
+ },
+ {
+ "mangle": "crypto_pwhash_alg_argon2i13",
+ "c++": "crypto_pwhash_alg_argon2i13()",
+ "go": "CryptoPwhashAlgArgon2i13"
+ },
+ {
+ "mangle": "crypto_pwhash_alg_argon2id13",
+ "c++": "crypto_pwhash_alg_argon2id13()",
+ "go": "CryptoPwhashAlgArgon2id13"
+ },
+ {
+ "mangle": "crypto_pwhash_alg_default",
+ "c++": "crypto_pwhash_alg_default()",
+ "go": "CryptoPwhashAlgDefault"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i",
+ "c++": "crypto_pwhash_argon2i(unsigned char *const, unsigned long long, const char *const, unsigned long long, const unsigned char *const, unsigned long long, size_t, int)",
+ "go": "CryptoPwhashArgon2i"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i_alg_argon2i13",
+ "c++": "crypto_pwhash_argon2i_alg_argon2i13()",
+ "go": "CryptoPwhashArgon2iAlgArgon2i13"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i_bytes_max",
+ "c++": "crypto_pwhash_argon2i_bytes_max()",
+ "go": "CryptoPwhashArgon2iBytesMax"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i_bytes_min",
+ "c++": "crypto_pwhash_argon2i_bytes_min()",
+ "go": "CryptoPwhashArgon2iBytesMin"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i_memlimit_interactive",
+ "c++": "crypto_pwhash_argon2i_memlimit_interactive()",
+ "go": "CryptoPwhashArgon2iMemlimitInteractive"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i_memlimit_max",
+ "c++": "crypto_pwhash_argon2i_memlimit_max()",
+ "go": "CryptoPwhashArgon2iMemlimitMax"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i_memlimit_min",
+ "c++": "crypto_pwhash_argon2i_memlimit_min()",
+ "go": "CryptoPwhashArgon2iMemlimitMin"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i_memlimit_moderate",
+ "c++": "crypto_pwhash_argon2i_memlimit_moderate()",
+ "go": "CryptoPwhashArgon2iMemlimitModerate"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i_memlimit_sensitive",
+ "c++": "crypto_pwhash_argon2i_memlimit_sensitive()",
+ "go": "CryptoPwhashArgon2iMemlimitSensitive"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i_opslimit_interactive",
+ "c++": "crypto_pwhash_argon2i_opslimit_interactive()",
+ "go": "CryptoPwhashArgon2iOpslimitInteractive"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i_opslimit_max",
+ "c++": "crypto_pwhash_argon2i_opslimit_max()",
+ "go": "CryptoPwhashArgon2iOpslimitMax"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i_opslimit_min",
+ "c++": "crypto_pwhash_argon2i_opslimit_min()",
+ "go": "CryptoPwhashArgon2iOpslimitMin"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i_opslimit_moderate",
+ "c++": "crypto_pwhash_argon2i_opslimit_moderate()",
+ "go": "CryptoPwhashArgon2iOpslimitModerate"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i_opslimit_sensitive",
+ "c++": "crypto_pwhash_argon2i_opslimit_sensitive()",
+ "go": "CryptoPwhashArgon2iOpslimitSensitive"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i_passwd_max",
+ "c++": "crypto_pwhash_argon2i_passwd_max()",
+ "go": "CryptoPwhashArgon2iPasswdMax"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i_passwd_min",
+ "c++": "crypto_pwhash_argon2i_passwd_min()",
+ "go": "CryptoPwhashArgon2iPasswdMin"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i_saltbytes",
+ "c++": "crypto_pwhash_argon2i_saltbytes()",
+ "go": "CryptoPwhashArgon2iSaltbytes"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i_str",
+ "c++": "crypto_pwhash_argon2i_str(char *, const char *const, unsigned long long, unsigned long long, size_t)",
+ "go": "CryptoPwhashArgon2iStr"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i_str_needs_rehash",
+ "c++": "crypto_pwhash_argon2i_str_needs_rehash(const char *, unsigned long long, size_t)",
+ "go": "CryptoPwhashArgon2iStrNeedsRehash"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i_str_verify",
+ "c++": "crypto_pwhash_argon2i_str_verify(const char *, const char *const, unsigned long long)",
+ "go": "CryptoPwhashArgon2iStrVerify"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i_strbytes",
+ "c++": "crypto_pwhash_argon2i_strbytes()",
+ "go": "CryptoPwhashArgon2iStrbytes"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2i_strprefix",
+ "c++": "crypto_pwhash_argon2i_strprefix()",
+ "go": "CryptoPwhashArgon2iStrprefix"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id",
+ "c++": "crypto_pwhash_argon2id(unsigned char *const, unsigned long long, const char *const, unsigned long long, const unsigned char *const, unsigned long long, size_t, int)",
+ "go": "CryptoPwhashArgon2id"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id_alg_argon2id13",
+ "c++": "crypto_pwhash_argon2id_alg_argon2id13()",
+ "go": "CryptoPwhashArgon2idAlgArgon2id13"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id_bytes_max",
+ "c++": "crypto_pwhash_argon2id_bytes_max()",
+ "go": "CryptoPwhashArgon2idBytesMax"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id_bytes_min",
+ "c++": "crypto_pwhash_argon2id_bytes_min()",
+ "go": "CryptoPwhashArgon2idBytesMin"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id_memlimit_interactive",
+ "c++": "crypto_pwhash_argon2id_memlimit_interactive()",
+ "go": "CryptoPwhashArgon2idMemlimitInteractive"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id_memlimit_max",
+ "c++": "crypto_pwhash_argon2id_memlimit_max()",
+ "go": "CryptoPwhashArgon2idMemlimitMax"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id_memlimit_min",
+ "c++": "crypto_pwhash_argon2id_memlimit_min()",
+ "go": "CryptoPwhashArgon2idMemlimitMin"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id_memlimit_moderate",
+ "c++": "crypto_pwhash_argon2id_memlimit_moderate()",
+ "go": "CryptoPwhashArgon2idMemlimitModerate"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id_memlimit_sensitive",
+ "c++": "crypto_pwhash_argon2id_memlimit_sensitive()",
+ "go": "CryptoPwhashArgon2idMemlimitSensitive"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id_opslimit_interactive",
+ "c++": "crypto_pwhash_argon2id_opslimit_interactive()",
+ "go": "CryptoPwhashArgon2idOpslimitInteractive"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id_opslimit_max",
+ "c++": "crypto_pwhash_argon2id_opslimit_max()",
+ "go": "CryptoPwhashArgon2idOpslimitMax"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id_opslimit_min",
+ "c++": "crypto_pwhash_argon2id_opslimit_min()",
+ "go": "CryptoPwhashArgon2idOpslimitMin"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id_opslimit_moderate",
+ "c++": "crypto_pwhash_argon2id_opslimit_moderate()",
+ "go": "CryptoPwhashArgon2idOpslimitModerate"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id_opslimit_sensitive",
+ "c++": "crypto_pwhash_argon2id_opslimit_sensitive()",
+ "go": "CryptoPwhashArgon2idOpslimitSensitive"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id_passwd_max",
+ "c++": "crypto_pwhash_argon2id_passwd_max()",
+ "go": "CryptoPwhashArgon2idPasswdMax"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id_passwd_min",
+ "c++": "crypto_pwhash_argon2id_passwd_min()",
+ "go": "CryptoPwhashArgon2idPasswdMin"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id_saltbytes",
+ "c++": "crypto_pwhash_argon2id_saltbytes()",
+ "go": "CryptoPwhashArgon2idSaltbytes"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id_str",
+ "c++": "crypto_pwhash_argon2id_str(char *, const char *const, unsigned long long, unsigned long long, size_t)",
+ "go": "CryptoPwhashArgon2idStr"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id_str_needs_rehash",
+ "c++": "crypto_pwhash_argon2id_str_needs_rehash(const char *, unsigned long long, size_t)",
+ "go": "CryptoPwhashArgon2idStrNeedsRehash"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id_str_verify",
+ "c++": "crypto_pwhash_argon2id_str_verify(const char *, const char *const, unsigned long long)",
+ "go": "CryptoPwhashArgon2idStrVerify"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id_strbytes",
+ "c++": "crypto_pwhash_argon2id_strbytes()",
+ "go": "CryptoPwhashArgon2idStrbytes"
+ },
+ {
+ "mangle": "crypto_pwhash_argon2id_strprefix",
+ "c++": "crypto_pwhash_argon2id_strprefix()",
+ "go": "CryptoPwhashArgon2idStrprefix"
+ },
+ {
+ "mangle": "crypto_pwhash_bytes_max",
+ "c++": "crypto_pwhash_bytes_max()",
+ "go": "CryptoPwhashBytesMax"
+ },
+ {
+ "mangle": "crypto_pwhash_bytes_min",
+ "c++": "crypto_pwhash_bytes_min()",
+ "go": "CryptoPwhashBytesMin"
+ },
+ {
+ "mangle": "crypto_pwhash_memlimit_interactive",
+ "c++": "crypto_pwhash_memlimit_interactive()",
+ "go": "CryptoPwhashMemlimitInteractive"
+ },
+ {
+ "mangle": "crypto_pwhash_memlimit_max",
+ "c++": "crypto_pwhash_memlimit_max()",
+ "go": "CryptoPwhashMemlimitMax"
+ },
+ {
+ "mangle": "crypto_pwhash_memlimit_min",
+ "c++": "crypto_pwhash_memlimit_min()",
+ "go": "CryptoPwhashMemlimitMin"
+ },
+ {
+ "mangle": "crypto_pwhash_memlimit_moderate",
+ "c++": "crypto_pwhash_memlimit_moderate()",
+ "go": "CryptoPwhashMemlimitModerate"
+ },
+ {
+ "mangle": "crypto_pwhash_memlimit_sensitive",
+ "c++": "crypto_pwhash_memlimit_sensitive()",
+ "go": "CryptoPwhashMemlimitSensitive"
+ },
+ {
+ "mangle": "crypto_pwhash_opslimit_interactive",
+ "c++": "crypto_pwhash_opslimit_interactive()",
+ "go": "CryptoPwhashOpslimitInteractive"
+ },
+ {
+ "mangle": "crypto_pwhash_opslimit_max",
+ "c++": "crypto_pwhash_opslimit_max()",
+ "go": "CryptoPwhashOpslimitMax"
+ },
+ {
+ "mangle": "crypto_pwhash_opslimit_min",
+ "c++": "crypto_pwhash_opslimit_min()",
+ "go": "CryptoPwhashOpslimitMin"
+ },
+ {
+ "mangle": "crypto_pwhash_opslimit_moderate",
+ "c++": "crypto_pwhash_opslimit_moderate()",
+ "go": "CryptoPwhashOpslimitModerate"
+ },
+ {
+ "mangle": "crypto_pwhash_opslimit_sensitive",
+ "c++": "crypto_pwhash_opslimit_sensitive()",
+ "go": "CryptoPwhashOpslimitSensitive"
+ },
+ {
+ "mangle": "crypto_pwhash_passwd_max",
+ "c++": "crypto_pwhash_passwd_max()",
+ "go": "CryptoPwhashPasswdMax"
+ },
+ {
+ "mangle": "crypto_pwhash_passwd_min",
+ "c++": "crypto_pwhash_passwd_min()",
+ "go": "CryptoPwhashPasswdMin"
+ },
+ {
+ "mangle": "crypto_pwhash_primitive",
+ "c++": "crypto_pwhash_primitive()",
+ "go": "CryptoPwhashPrimitive"
+ },
+ {
+ "mangle": "crypto_pwhash_saltbytes",
+ "c++": "crypto_pwhash_saltbytes()",
+ "go": "CryptoPwhashSaltbytes"
+ },
+ {
+ "mangle": "crypto_pwhash_scryptsalsa208sha256",
+ "c++": "crypto_pwhash_scryptsalsa208sha256(unsigned char *const, unsigned long long, const char *const, unsigned long long, const unsigned char *const, unsigned long long, size_t)",
+ "go": "CryptoPwhashScryptsalsa208sha256"
+ },
+ {
+ "mangle": "crypto_pwhash_scryptsalsa208sha256_bytes_max",
+ "c++": "crypto_pwhash_scryptsalsa208sha256_bytes_max()",
+ "go": "CryptoPwhashScryptsalsa208sha256BytesMax"
+ },
+ {
+ "mangle": "crypto_pwhash_scryptsalsa208sha256_bytes_min",
+ "c++": "crypto_pwhash_scryptsalsa208sha256_bytes_min()",
+ "go": "CryptoPwhashScryptsalsa208sha256BytesMin"
+ },
+ {
+ "mangle": "crypto_pwhash_scryptsalsa208sha256_ll",
+ "c++": "crypto_pwhash_scryptsalsa208sha256_ll(const uint8_t *, size_t, const uint8_t *, size_t, uint64_t, uint32_t, uint32_t, uint8_t *, size_t)",
+ "go": "CryptoPwhashScryptsalsa208sha256Ll"
+ },
+ {
+ "mangle": "crypto_pwhash_scryptsalsa208sha256_memlimit_interactive",
+ "c++": "crypto_pwhash_scryptsalsa208sha256_memlimit_interactive()",
+ "go": "CryptoPwhashScryptsalsa208sha256MemlimitInteractive"
+ },
+ {
+ "mangle": "crypto_pwhash_scryptsalsa208sha256_memlimit_max",
+ "c++": "crypto_pwhash_scryptsalsa208sha256_memlimit_max()",
+ "go": "CryptoPwhashScryptsalsa208sha256MemlimitMax"
+ },
+ {
+ "mangle": "crypto_pwhash_scryptsalsa208sha256_memlimit_min",
+ "c++": "crypto_pwhash_scryptsalsa208sha256_memlimit_min()",
+ "go": "CryptoPwhashScryptsalsa208sha256MemlimitMin"
+ },
+ {
+ "mangle": "crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive",
+ "c++": "crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive()",
+ "go": "CryptoPwhashScryptsalsa208sha256MemlimitSensitive"
+ },
+ {
+ "mangle": "crypto_pwhash_scryptsalsa208sha256_opslimit_interactive",
+ "c++": "crypto_pwhash_scryptsalsa208sha256_opslimit_interactive()",
+ "go": "CryptoPwhashScryptsalsa208sha256OpslimitInteractive"
+ },
+ {
+ "mangle": "crypto_pwhash_scryptsalsa208sha256_opslimit_max",
+ "c++": "crypto_pwhash_scryptsalsa208sha256_opslimit_max()",
+ "go": "CryptoPwhashScryptsalsa208sha256OpslimitMax"
+ },
+ {
+ "mangle": "crypto_pwhash_scryptsalsa208sha256_opslimit_min",
+ "c++": "crypto_pwhash_scryptsalsa208sha256_opslimit_min()",
+ "go": "CryptoPwhashScryptsalsa208sha256OpslimitMin"
+ },
+ {
+ "mangle": "crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive",
+ "c++": "crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive()",
+ "go": "CryptoPwhashScryptsalsa208sha256OpslimitSensitive"
+ },
+ {
+ "mangle": "crypto_pwhash_scryptsalsa208sha256_passwd_max",
+ "c++": "crypto_pwhash_scryptsalsa208sha256_passwd_max()",
+ "go": "CryptoPwhashScryptsalsa208sha256PasswdMax"
+ },
+ {
+ "mangle": "crypto_pwhash_scryptsalsa208sha256_passwd_min",
+ "c++": "crypto_pwhash_scryptsalsa208sha256_passwd_min()",
+ "go": "CryptoPwhashScryptsalsa208sha256PasswdMin"
+ },
+ {
+ "mangle": "crypto_pwhash_scryptsalsa208sha256_saltbytes",
+ "c++": "crypto_pwhash_scryptsalsa208sha256_saltbytes()",
+ "go": "CryptoPwhashScryptsalsa208sha256Saltbytes"
+ },
+ {
+ "mangle": "crypto_pwhash_scryptsalsa208sha256_str",
+ "c++": "crypto_pwhash_scryptsalsa208sha256_str(char *, const char *const, unsigned long long, unsigned long long, size_t)",
+ "go": "CryptoPwhashScryptsalsa208sha256Str"
+ },
+ {
+ "mangle": "crypto_pwhash_scryptsalsa208sha256_str_needs_rehash",
+ "c++": "crypto_pwhash_scryptsalsa208sha256_str_needs_rehash(const char *, unsigned long long, size_t)",
+ "go": "CryptoPwhashScryptsalsa208sha256StrNeedsRehash"
+ },
+ {
+ "mangle": "crypto_pwhash_scryptsalsa208sha256_str_verify",
+ "c++": "crypto_pwhash_scryptsalsa208sha256_str_verify(const char *, const char *const, unsigned long long)",
+ "go": "CryptoPwhashScryptsalsa208sha256StrVerify"
+ },
+ {
+ "mangle": "crypto_pwhash_scryptsalsa208sha256_strbytes",
+ "c++": "crypto_pwhash_scryptsalsa208sha256_strbytes()",
+ "go": "CryptoPwhashScryptsalsa208sha256Strbytes"
+ },
+ {
+ "mangle": "crypto_pwhash_scryptsalsa208sha256_strprefix",
+ "c++": "crypto_pwhash_scryptsalsa208sha256_strprefix()",
+ "go": "CryptoPwhashScryptsalsa208sha256Strprefix"
+ },
+ {
+ "mangle": "crypto_pwhash_str",
+ "c++": "crypto_pwhash_str(char *, const char *const, unsigned long long, unsigned long long, size_t)",
+ "go": "CryptoPwhashStr"
+ },
+ {
+ "mangle": "crypto_pwhash_str_alg",
+ "c++": "crypto_pwhash_str_alg(char *, const char *const, unsigned long long, unsigned long long, size_t, int)",
+ "go": "CryptoPwhashStrAlg"
+ },
+ {
+ "mangle": "crypto_pwhash_str_needs_rehash",
+ "c++": "crypto_pwhash_str_needs_rehash(const char *, unsigned long long, size_t)",
+ "go": "CryptoPwhashStrNeedsRehash"
+ },
+ {
+ "mangle": "crypto_pwhash_str_verify",
+ "c++": "crypto_pwhash_str_verify(const char *, const char *const, unsigned long long)",
+ "go": "CryptoPwhashStrVerify"
+ },
+ {
+ "mangle": "crypto_pwhash_strbytes",
+ "c++": "crypto_pwhash_strbytes()",
+ "go": "CryptoPwhashStrbytes"
+ },
+ {
+ "mangle": "crypto_pwhash_strprefix",
+ "c++": "crypto_pwhash_strprefix()",
+ "go": "CryptoPwhashStrprefix"
+ },
+ {
+ "mangle": "crypto_scalarmult",
+ "c++": "crypto_scalarmult(unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoScalarmult"
+ },
+ {
+ "mangle": "crypto_scalarmult_base",
+ "c++": "crypto_scalarmult_base(unsigned char *, const unsigned char *)",
+ "go": "CryptoScalarmultBase"
+ },
+ {
+ "mangle": "crypto_scalarmult_bytes",
+ "c++": "crypto_scalarmult_bytes()",
+ "go": "CryptoScalarmultBytes"
+ },
+ {
+ "mangle": "crypto_scalarmult_curve25519",
+ "c++": "crypto_scalarmult_curve25519(unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoScalarmultCurve25519"
+ },
+ {
+ "mangle": "crypto_scalarmult_curve25519_base",
+ "c++": "crypto_scalarmult_curve25519_base(unsigned char *, const unsigned char *)",
+ "go": "CryptoScalarmultCurve25519Base"
+ },
+ {
+ "mangle": "crypto_scalarmult_curve25519_bytes",
+ "c++": "crypto_scalarmult_curve25519_bytes()",
+ "go": "CryptoScalarmultCurve25519Bytes"
+ },
+ {
+ "mangle": "crypto_scalarmult_curve25519_scalarbytes",
+ "c++": "crypto_scalarmult_curve25519_scalarbytes()",
+ "go": "CryptoScalarmultCurve25519Scalarbytes"
+ },
+ {
+ "mangle": "crypto_scalarmult_ed25519",
+ "c++": "crypto_scalarmult_ed25519(unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoScalarmultEd25519"
+ },
+ {
+ "mangle": "crypto_scalarmult_ed25519_base",
+ "c++": "crypto_scalarmult_ed25519_base(unsigned char *, const unsigned char *)",
+ "go": "CryptoScalarmultEd25519Base"
+ },
+ {
+ "mangle": "crypto_scalarmult_ed25519_base_noclamp",
+ "c++": "crypto_scalarmult_ed25519_base_noclamp(unsigned char *, const unsigned char *)",
+ "go": "CryptoScalarmultEd25519BaseNoclamp"
+ },
+ {
+ "mangle": "crypto_scalarmult_ed25519_bytes",
+ "c++": "crypto_scalarmult_ed25519_bytes()",
+ "go": "CryptoScalarmultEd25519Bytes"
+ },
+ {
+ "mangle": "crypto_scalarmult_ed25519_noclamp",
+ "c++": "crypto_scalarmult_ed25519_noclamp(unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoScalarmultEd25519Noclamp"
+ },
+ {
+ "mangle": "crypto_scalarmult_ed25519_scalarbytes",
+ "c++": "crypto_scalarmult_ed25519_scalarbytes()",
+ "go": "CryptoScalarmultEd25519Scalarbytes"
+ },
+ {
+ "mangle": "crypto_scalarmult_primitive",
+ "c++": "crypto_scalarmult_primitive()",
+ "go": "CryptoScalarmultPrimitive"
+ },
+ {
+ "mangle": "crypto_scalarmult_ristretto255",
+ "c++": "crypto_scalarmult_ristretto255(unsigned char *, const unsigned char *, const unsigned char *)",
+ "go": "CryptoScalarmultRistretto255"
+ },
+ {
+ "mangle": "crypto_scalarmult_ristretto255_base",
+ "c++": "crypto_scalarmult_ristretto255_base(unsigned char *, const unsigned char *)",
+ "go": "CryptoScalarmultRistretto255Base"
+ },
+ {
+ "mangle": "crypto_scalarmult_ristretto255_bytes",
+ "c++": "crypto_scalarmult_ristretto255_bytes()",
+ "go": "CryptoScalarmultRistretto255Bytes"
+ },
+ {
+ "mangle": "crypto_scalarmult_ristretto255_scalarbytes",
+ "c++": "crypto_scalarmult_ristretto255_scalarbytes()",
+ "go": "CryptoScalarmultRistretto255Scalarbytes"
+ },
+ {
+ "mangle": "crypto_scalarmult_scalarbytes",
+ "c++": "crypto_scalarmult_scalarbytes()",
+ "go": "CryptoScalarmultScalarbytes"
+ },
+ {
+ "mangle": "crypto_secretbox",
+ "c++": "crypto_secretbox(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoSecretbox"
+ },
+ {
+ "mangle": "crypto_secretbox_boxzerobytes",
+ "c++": "crypto_secretbox_boxzerobytes()",
+ "go": "CryptoSecretboxBoxzerobytes"
+ },
+ {
+ "mangle": "crypto_secretbox_detached",
+ "c++": "crypto_secretbox_detached(unsigned char *, unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoSecretboxDetached"
+ },
+ {
+ "mangle": "crypto_secretbox_easy",
+ "c++": "crypto_secretbox_easy(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoSecretboxEasy"
+ },
+ {
+ "mangle": "crypto_secretbox_keybytes",
+ "c++": "crypto_secretbox_keybytes()",
+ "go": "CryptoSecretboxKeybytes"
+ },
+ {
+ "mangle": "crypto_secretbox_keygen",
+ "c++": "crypto_secretbox_keygen(unsigned char *)",
+ "go": "CryptoSecretboxKeygen"
+ },
+ {
+ "mangle": "crypto_secretbox_macbytes",
+ "c++": "crypto_secretbox_macbytes()",
+ "go": "CryptoSecretboxMacbytes"
+ },
+ {
+ "mangle": "crypto_secretbox_messagebytes_max",
+ "c++": "crypto_secretbox_messagebytes_max()",
+ "go": "CryptoSecretboxMessagebytesMax"
+ },
+ {
+ "mangle": "crypto_secretbox_noncebytes",
+ "c++": "crypto_secretbox_noncebytes()",
+ "go": "CryptoSecretboxNoncebytes"
+ },
+ {
+ "mangle": "crypto_secretbox_open",
+ "c++": "crypto_secretbox_open(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoSecretboxOpen"
+ },
+ {
+ "mangle": "crypto_secretbox_open_detached",
+ "c++": "crypto_secretbox_open_detached(unsigned char *, const unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoSecretboxOpenDetached"
+ },
+ {
+ "mangle": "crypto_secretbox_open_easy",
+ "c++": "crypto_secretbox_open_easy(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoSecretboxOpenEasy"
+ },
+ {
+ "mangle": "crypto_secretbox_primitive",
+ "c++": "crypto_secretbox_primitive()",
+ "go": "CryptoSecretboxPrimitive"
+ },
+ {
+ "mangle": "crypto_secretbox_xchacha20poly1305_detached",
+ "c++": "crypto_secretbox_xchacha20poly1305_detached(unsigned char *, unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoSecretboxXchacha20poly1305Detached"
+ },
+ {
+ "mangle": "crypto_secretbox_xchacha20poly1305_easy",
+ "c++": "crypto_secretbox_xchacha20poly1305_easy(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoSecretboxXchacha20poly1305Easy"
+ },
+ {
+ "mangle": "crypto_secretbox_xchacha20poly1305_keybytes",
+ "c++": "crypto_secretbox_xchacha20poly1305_keybytes()",
+ "go": "CryptoSecretboxXchacha20poly1305Keybytes"
+ },
+ {
+ "mangle": "crypto_secretbox_xchacha20poly1305_macbytes",
+ "c++": "crypto_secretbox_xchacha20poly1305_macbytes()",
+ "go": "CryptoSecretboxXchacha20poly1305Macbytes"
+ },
+ {
+ "mangle": "crypto_secretbox_xchacha20poly1305_messagebytes_max",
+ "c++": "crypto_secretbox_xchacha20poly1305_messagebytes_max()",
+ "go": "CryptoSecretboxXchacha20poly1305MessagebytesMax"
+ },
+ {
+ "mangle": "crypto_secretbox_xchacha20poly1305_noncebytes",
+ "c++": "crypto_secretbox_xchacha20poly1305_noncebytes()",
+ "go": "CryptoSecretboxXchacha20poly1305Noncebytes"
+ },
+ {
+ "mangle": "crypto_secretbox_xchacha20poly1305_open_detached",
+ "c++": "crypto_secretbox_xchacha20poly1305_open_detached(unsigned char *, const unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoSecretboxXchacha20poly1305OpenDetached"
+ },
+ {
+ "mangle": "crypto_secretbox_xchacha20poly1305_open_easy",
+ "c++": "crypto_secretbox_xchacha20poly1305_open_easy(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoSecretboxXchacha20poly1305OpenEasy"
+ },
+ {
+ "mangle": "crypto_secretbox_xsalsa20poly1305",
+ "c++": "crypto_secretbox_xsalsa20poly1305(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoSecretboxXsalsa20poly1305"
+ },
+ {
+ "mangle": "crypto_secretbox_xsalsa20poly1305_boxzerobytes",
+ "c++": "crypto_secretbox_xsalsa20poly1305_boxzerobytes()",
+ "go": "CryptoSecretboxXsalsa20poly1305Boxzerobytes"
+ },
+ {
+ "mangle": "crypto_secretbox_xsalsa20poly1305_keybytes",
+ "c++": "crypto_secretbox_xsalsa20poly1305_keybytes()",
+ "go": "CryptoSecretboxXsalsa20poly1305Keybytes"
+ },
+ {
+ "mangle": "crypto_secretbox_xsalsa20poly1305_keygen",
+ "c++": "crypto_secretbox_xsalsa20poly1305_keygen(unsigned char *)",
+ "go": "CryptoSecretboxXsalsa20poly1305Keygen"
+ },
+ {
+ "mangle": "crypto_secretbox_xsalsa20poly1305_macbytes",
+ "c++": "crypto_secretbox_xsalsa20poly1305_macbytes()",
+ "go": "CryptoSecretboxXsalsa20poly1305Macbytes"
+ },
+ {
+ "mangle": "crypto_secretbox_xsalsa20poly1305_messagebytes_max",
+ "c++": "crypto_secretbox_xsalsa20poly1305_messagebytes_max()",
+ "go": "CryptoSecretboxXsalsa20poly1305MessagebytesMax"
+ },
+ {
+ "mangle": "crypto_secretbox_xsalsa20poly1305_noncebytes",
+ "c++": "crypto_secretbox_xsalsa20poly1305_noncebytes()",
+ "go": "CryptoSecretboxXsalsa20poly1305Noncebytes"
+ },
+ {
+ "mangle": "crypto_secretbox_xsalsa20poly1305_open",
+ "c++": "crypto_secretbox_xsalsa20poly1305_open(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoSecretboxXsalsa20poly1305Open"
+ },
+ {
+ "mangle": "crypto_secretbox_xsalsa20poly1305_zerobytes",
+ "c++": "crypto_secretbox_xsalsa20poly1305_zerobytes()",
+ "go": "CryptoSecretboxXsalsa20poly1305Zerobytes"
+ },
+ {
+ "mangle": "crypto_secretbox_zerobytes",
+ "c++": "crypto_secretbox_zerobytes()",
+ "go": "CryptoSecretboxZerobytes"
+ },
+ {
+ "mangle": "crypto_secretstream_xchacha20poly1305_abytes",
+ "c++": "crypto_secretstream_xchacha20poly1305_abytes()",
+ "go": "CryptoSecretstreamXchacha20poly1305Abytes"
+ },
+ {
+ "mangle": "crypto_secretstream_xchacha20poly1305_headerbytes",
+ "c++": "crypto_secretstream_xchacha20poly1305_headerbytes()",
+ "go": "CryptoSecretstreamXchacha20poly1305Headerbytes"
+ },
+ {
+ "mangle": "crypto_secretstream_xchacha20poly1305_init_pull",
+ "c++": "crypto_secretstream_xchacha20poly1305_init_pull(crypto_secretstream_xchacha20poly1305_state *, const unsigned char *, const unsigned char *)",
+ "go": "(*CryptoSecretstreamXchacha20poly1305State).CryptoSecretstreamXchacha20poly1305InitPull"
+ },
+ {
+ "mangle": "crypto_secretstream_xchacha20poly1305_init_push",
+ "c++": "crypto_secretstream_xchacha20poly1305_init_push(crypto_secretstream_xchacha20poly1305_state *, unsigned char *, const unsigned char *)",
+ "go": "(*CryptoSecretstreamXchacha20poly1305State).CryptoSecretstreamXchacha20poly1305InitPush"
+ },
+ {
+ "mangle": "crypto_secretstream_xchacha20poly1305_keybytes",
+ "c++": "crypto_secretstream_xchacha20poly1305_keybytes()",
+ "go": "CryptoSecretstreamXchacha20poly1305Keybytes"
+ },
+ {
+ "mangle": "crypto_secretstream_xchacha20poly1305_keygen",
+ "c++": "crypto_secretstream_xchacha20poly1305_keygen(unsigned char *)",
+ "go": "CryptoSecretstreamXchacha20poly1305Keygen"
+ },
+ {
+ "mangle": "crypto_secretstream_xchacha20poly1305_messagebytes_max",
+ "c++": "crypto_secretstream_xchacha20poly1305_messagebytes_max()",
+ "go": "CryptoSecretstreamXchacha20poly1305MessagebytesMax"
+ },
+ {
+ "mangle": "crypto_secretstream_xchacha20poly1305_pull",
+ "c++": "crypto_secretstream_xchacha20poly1305_pull(crypto_secretstream_xchacha20poly1305_state *, unsigned char *, unsigned long long *, unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long)",
+ "go": "(*CryptoSecretstreamXchacha20poly1305State).CryptoSecretstreamXchacha20poly1305Pull"
+ },
+ {
+ "mangle": "crypto_secretstream_xchacha20poly1305_push",
+ "c++": "crypto_secretstream_xchacha20poly1305_push(crypto_secretstream_xchacha20poly1305_state *, unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *, unsigned long long, unsigned char)",
+ "go": "(*CryptoSecretstreamXchacha20poly1305State).CryptoSecretstreamXchacha20poly1305Push"
+ },
+ {
+ "mangle": "crypto_secretstream_xchacha20poly1305_rekey",
+ "c++": "crypto_secretstream_xchacha20poly1305_rekey(crypto_secretstream_xchacha20poly1305_state *)",
+ "go": "(*CryptoSecretstreamXchacha20poly1305State).CryptoSecretstreamXchacha20poly1305Rekey"
+ },
+ {
+ "mangle": "crypto_secretstream_xchacha20poly1305_statebytes",
+ "c++": "crypto_secretstream_xchacha20poly1305_statebytes()",
+ "go": "CryptoSecretstreamXchacha20poly1305Statebytes"
+ },
+ {
+ "mangle": "crypto_secretstream_xchacha20poly1305_tag_final",
+ "c++": "crypto_secretstream_xchacha20poly1305_tag_final()",
+ "go": "CryptoSecretstreamXchacha20poly1305TagFinal"
+ },
+ {
+ "mangle": "crypto_secretstream_xchacha20poly1305_tag_message",
+ "c++": "crypto_secretstream_xchacha20poly1305_tag_message()",
+ "go": "CryptoSecretstreamXchacha20poly1305TagMessage"
+ },
+ {
+ "mangle": "crypto_secretstream_xchacha20poly1305_tag_push",
+ "c++": "crypto_secretstream_xchacha20poly1305_tag_push()",
+ "go": "CryptoSecretstreamXchacha20poly1305TagPush"
+ },
+ {
+ "mangle": "crypto_secretstream_xchacha20poly1305_tag_rekey",
+ "c++": "crypto_secretstream_xchacha20poly1305_tag_rekey()",
+ "go": "CryptoSecretstreamXchacha20poly1305TagRekey"
+ },
+ {
+ "mangle": "crypto_shorthash",
+ "c++": "crypto_shorthash(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoShorthash"
+ },
+ {
+ "mangle": "crypto_shorthash_bytes",
+ "c++": "crypto_shorthash_bytes()",
+ "go": "CryptoShorthashBytes"
+ },
+ {
+ "mangle": "crypto_shorthash_keybytes",
+ "c++": "crypto_shorthash_keybytes()",
+ "go": "CryptoShorthashKeybytes"
+ },
+ {
+ "mangle": "crypto_shorthash_keygen",
+ "c++": "crypto_shorthash_keygen(unsigned char *)",
+ "go": "CryptoShorthashKeygen"
+ },
+ {
+ "mangle": "crypto_shorthash_primitive",
+ "c++": "crypto_shorthash_primitive()",
+ "go": "CryptoShorthashPrimitive"
+ },
+ {
+ "mangle": "crypto_shorthash_siphash24",
+ "c++": "crypto_shorthash_siphash24(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoShorthashSiphash24"
+ },
+ {
+ "mangle": "crypto_shorthash_siphash24_bytes",
+ "c++": "crypto_shorthash_siphash24_bytes()",
+ "go": "CryptoShorthashSiphash24Bytes"
+ },
+ {
+ "mangle": "crypto_shorthash_siphash24_keybytes",
+ "c++": "crypto_shorthash_siphash24_keybytes()",
+ "go": "CryptoShorthashSiphash24Keybytes"
+ },
+ {
+ "mangle": "crypto_shorthash_siphashx24",
+ "c++": "crypto_shorthash_siphashx24(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoShorthashSiphashx24"
+ },
+ {
+ "mangle": "crypto_shorthash_siphashx24_bytes",
+ "c++": "crypto_shorthash_siphashx24_bytes()",
+ "go": "CryptoShorthashSiphashx24Bytes"
+ },
+ {
+ "mangle": "crypto_shorthash_siphashx24_keybytes",
+ "c++": "crypto_shorthash_siphashx24_keybytes()",
+ "go": "CryptoShorthashSiphashx24Keybytes"
+ },
+ {
+ "mangle": "crypto_sign",
+ "c++": "crypto_sign(unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoSign"
+ },
+ {
+ "mangle": "crypto_sign_bytes",
+ "c++": "crypto_sign_bytes()",
+ "go": "CryptoSignBytes"
+ },
+ {
+ "mangle": "crypto_sign_detached",
+ "c++": "crypto_sign_detached(unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoSignDetached"
+ },
+ {
+ "mangle": "crypto_sign_ed25519",
+ "c++": "crypto_sign_ed25519(unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoSignEd25519"
+ },
+ {
+ "mangle": "crypto_sign_ed25519_bytes",
+ "c++": "crypto_sign_ed25519_bytes()",
+ "go": "CryptoSignEd25519Bytes"
+ },
+ {
+ "mangle": "crypto_sign_ed25519_detached",
+ "c++": "crypto_sign_ed25519_detached(unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoSignEd25519Detached"
+ },
+ {
+ "mangle": "crypto_sign_ed25519_keypair",
+ "c++": "crypto_sign_ed25519_keypair(unsigned char *, unsigned char *)",
+ "go": "CryptoSignEd25519Keypair"
+ },
+ {
+ "mangle": "crypto_sign_ed25519_messagebytes_max",
+ "c++": "crypto_sign_ed25519_messagebytes_max()",
+ "go": "CryptoSignEd25519MessagebytesMax"
+ },
+ {
+ "mangle": "crypto_sign_ed25519_open",
+ "c++": "crypto_sign_ed25519_open(unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoSignEd25519Open"
+ },
+ {
+ "mangle": "crypto_sign_ed25519_pk_to_curve25519",
+ "c++": "crypto_sign_ed25519_pk_to_curve25519(unsigned char *, const unsigned char *)",
+ "go": "CryptoSignEd25519PkToCurve25519"
+ },
+ {
+ "mangle": "crypto_sign_ed25519_publickeybytes",
+ "c++": "crypto_sign_ed25519_publickeybytes()",
+ "go": "CryptoSignEd25519Publickeybytes"
+ },
+ {
+ "mangle": "crypto_sign_ed25519_secretkeybytes",
+ "c++": "crypto_sign_ed25519_secretkeybytes()",
+ "go": "CryptoSignEd25519Secretkeybytes"
+ },
+ {
+ "mangle": "crypto_sign_ed25519_seed_keypair",
+ "c++": "crypto_sign_ed25519_seed_keypair(unsigned char *, unsigned char *, const unsigned char *)",
+ "go": "CryptoSignEd25519SeedKeypair"
+ },
+ {
+ "mangle": "crypto_sign_ed25519_seedbytes",
+ "c++": "crypto_sign_ed25519_seedbytes()",
+ "go": "CryptoSignEd25519Seedbytes"
+ },
+ {
+ "mangle": "crypto_sign_ed25519_sk_to_curve25519",
+ "c++": "crypto_sign_ed25519_sk_to_curve25519(unsigned char *, const unsigned char *)",
+ "go": "CryptoSignEd25519SkToCurve25519"
+ },
+ {
+ "mangle": "crypto_sign_ed25519_sk_to_pk",
+ "c++": "crypto_sign_ed25519_sk_to_pk(unsigned char *, const unsigned char *)",
+ "go": "CryptoSignEd25519SkToPk"
+ },
+ {
+ "mangle": "crypto_sign_ed25519_sk_to_seed",
+ "c++": "crypto_sign_ed25519_sk_to_seed(unsigned char *, const unsigned char *)",
+ "go": "CryptoSignEd25519SkToSeed"
+ },
+ {
+ "mangle": "crypto_sign_ed25519_verify_detached",
+ "c++": "crypto_sign_ed25519_verify_detached(const unsigned char *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoSignEd25519VerifyDetached"
+ },
+ {
+ "mangle": "crypto_sign_ed25519ph_final_create",
+ "c++": "crypto_sign_ed25519ph_final_create(crypto_sign_ed25519ph_state *, unsigned char *, unsigned long long *, const unsigned char *)",
+ "go": "(*CryptoSignEd25519phState).CryptoSignEd25519phFinalCreate"
+ },
+ {
+ "mangle": "crypto_sign_ed25519ph_final_verify",
+ "c++": "crypto_sign_ed25519ph_final_verify(crypto_sign_ed25519ph_state *, const unsigned char *, const unsigned char *)",
+ "go": "(*CryptoSignEd25519phState).CryptoSignEd25519phFinalVerify"
+ },
+ {
+ "mangle": "crypto_sign_ed25519ph_init",
+ "c++": "crypto_sign_ed25519ph_init(crypto_sign_ed25519ph_state *)",
+ "go": "(*CryptoSignEd25519phState).CryptoSignEd25519phInit"
+ },
+ {
+ "mangle": "crypto_sign_ed25519ph_statebytes",
+ "c++": "crypto_sign_ed25519ph_statebytes()",
+ "go": "CryptoSignEd25519phStatebytes"
+ },
+ {
+ "mangle": "crypto_sign_ed25519ph_update",
+ "c++": "crypto_sign_ed25519ph_update(crypto_sign_ed25519ph_state *, const unsigned char *, unsigned long long)",
+ "go": "(*CryptoSignEd25519phState).CryptoSignEd25519phUpdate"
+ },
+ {
+ "mangle": "crypto_sign_edwards25519sha512batch",
+ "c++": "crypto_sign_edwards25519sha512batch(unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoSignEdwards25519sha512batch"
+ },
+ {
+ "mangle": "crypto_sign_edwards25519sha512batch_keypair",
+ "c++": "crypto_sign_edwards25519sha512batch_keypair(unsigned char *, unsigned char *)",
+ "go": "CryptoSignEdwards25519sha512batchKeypair"
+ },
+ {
+ "mangle": "crypto_sign_edwards25519sha512batch_open",
+ "c++": "crypto_sign_edwards25519sha512batch_open(unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoSignEdwards25519sha512batchOpen"
+ },
+ {
+ "mangle": "crypto_sign_final_create",
+ "c++": "crypto_sign_final_create(crypto_sign_state *, unsigned char *, unsigned long long *, const unsigned char *)",
+ "go": "(*CryptoSignState).CryptoSignFinalCreate"
+ },
+ {
+ "mangle": "crypto_sign_final_verify",
+ "c++": "crypto_sign_final_verify(crypto_sign_state *, const unsigned char *, const unsigned char *)",
+ "go": "(*CryptoSignState).CryptoSignFinalVerify"
+ },
+ {
+ "mangle": "crypto_sign_init",
+ "c++": "crypto_sign_init(crypto_sign_state *)",
+ "go": "(*CryptoSignState).CryptoSignInit"
+ },
+ {
+ "mangle": "crypto_sign_keypair",
+ "c++": "crypto_sign_keypair(unsigned char *, unsigned char *)",
+ "go": "CryptoSignKeypair"
+ },
+ {
+ "mangle": "crypto_sign_messagebytes_max",
+ "c++": "crypto_sign_messagebytes_max()",
+ "go": "CryptoSignMessagebytesMax"
+ },
+ {
+ "mangle": "crypto_sign_open",
+ "c++": "crypto_sign_open(unsigned char *, unsigned long long *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoSignOpen"
+ },
+ {
+ "mangle": "crypto_sign_primitive",
+ "c++": "crypto_sign_primitive()",
+ "go": "CryptoSignPrimitive"
+ },
+ {
+ "mangle": "crypto_sign_publickeybytes",
+ "c++": "crypto_sign_publickeybytes()",
+ "go": "CryptoSignPublickeybytes"
+ },
+ {
+ "mangle": "crypto_sign_secretkeybytes",
+ "c++": "crypto_sign_secretkeybytes()",
+ "go": "CryptoSignSecretkeybytes"
+ },
+ {
+ "mangle": "crypto_sign_seed_keypair",
+ "c++": "crypto_sign_seed_keypair(unsigned char *, unsigned char *, const unsigned char *)",
+ "go": "CryptoSignSeedKeypair"
+ },
+ {
+ "mangle": "crypto_sign_seedbytes",
+ "c++": "crypto_sign_seedbytes()",
+ "go": "CryptoSignSeedbytes"
+ },
+ {
+ "mangle": "crypto_sign_statebytes",
+ "c++": "crypto_sign_statebytes()",
+ "go": "CryptoSignStatebytes"
+ },
+ {
+ "mangle": "crypto_sign_update",
+ "c++": "crypto_sign_update(crypto_sign_state *, const unsigned char *, unsigned long long)",
+ "go": "(*CryptoSignState).CryptoSignUpdate"
+ },
+ {
+ "mangle": "crypto_sign_verify_detached",
+ "c++": "crypto_sign_verify_detached(const unsigned char *, const unsigned char *, unsigned long long, const unsigned char *)",
+ "go": "CryptoSignVerifyDetached"
+ },
+ {
+ "mangle": "crypto_stream",
+ "c++": "crypto_stream(unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoStream"
+ },
+ {
+ "mangle": "crypto_stream_chacha20",
+ "c++": "crypto_stream_chacha20(unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoStreamChacha20"
+ },
+ {
+ "mangle": "crypto_stream_chacha20_ietf",
+ "c++": "crypto_stream_chacha20_ietf(unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoStreamChacha20Ietf"
+ },
+ {
+ "mangle": "crypto_stream_chacha20_ietf_keybytes",
+ "c++": "crypto_stream_chacha20_ietf_keybytes()",
+ "go": "CryptoStreamChacha20IetfKeybytes"
+ },
+ {
+ "mangle": "crypto_stream_chacha20_ietf_keygen",
+ "c++": "crypto_stream_chacha20_ietf_keygen(unsigned char *)",
+ "go": "CryptoStreamChacha20IetfKeygen"
+ },
+ {
+ "mangle": "crypto_stream_chacha20_ietf_messagebytes_max",
+ "c++": "crypto_stream_chacha20_ietf_messagebytes_max()",
+ "go": "CryptoStreamChacha20IetfMessagebytesMax"
+ },
+ {
+ "mangle": "crypto_stream_chacha20_ietf_noncebytes",
+ "c++": "crypto_stream_chacha20_ietf_noncebytes()",
+ "go": "CryptoStreamChacha20IetfNoncebytes"
+ },
+ {
+ "mangle": "crypto_stream_chacha20_ietf_xor",
+ "c++": "crypto_stream_chacha20_ietf_xor(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoStreamChacha20IetfXor"
+ },
+ {
+ "mangle": "crypto_stream_chacha20_ietf_xor_ic",
+ "c++": "crypto_stream_chacha20_ietf_xor_ic(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, uint32_t, const unsigned char *)",
+ "go": "CryptoStreamChacha20IetfXorIc"
+ },
+ {
+ "mangle": "crypto_stream_chacha20_keybytes",
+ "c++": "crypto_stream_chacha20_keybytes()",
+ "go": "CryptoStreamChacha20Keybytes"
+ },
+ {
+ "mangle": "crypto_stream_chacha20_keygen",
+ "c++": "crypto_stream_chacha20_keygen(unsigned char *)",
+ "go": "CryptoStreamChacha20Keygen"
+ },
+ {
+ "mangle": "crypto_stream_chacha20_messagebytes_max",
+ "c++": "crypto_stream_chacha20_messagebytes_max()",
+ "go": "CryptoStreamChacha20MessagebytesMax"
+ },
+ {
+ "mangle": "crypto_stream_chacha20_noncebytes",
+ "c++": "crypto_stream_chacha20_noncebytes()",
+ "go": "CryptoStreamChacha20Noncebytes"
+ },
+ {
+ "mangle": "crypto_stream_chacha20_xor",
+ "c++": "crypto_stream_chacha20_xor(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoStreamChacha20Xor"
+ },
+ {
+ "mangle": "crypto_stream_chacha20_xor_ic",
+ "c++": "crypto_stream_chacha20_xor_ic(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, uint64_t, const unsigned char *)",
+ "go": "CryptoStreamChacha20XorIc"
+ },
+ {
+ "mangle": "crypto_stream_keybytes",
+ "c++": "crypto_stream_keybytes()",
+ "go": "CryptoStreamKeybytes"
+ },
+ {
+ "mangle": "crypto_stream_keygen",
+ "c++": "crypto_stream_keygen(unsigned char *)",
+ "go": "CryptoStreamKeygen"
+ },
+ {
+ "mangle": "crypto_stream_messagebytes_max",
+ "c++": "crypto_stream_messagebytes_max()",
+ "go": "CryptoStreamMessagebytesMax"
+ },
+ {
+ "mangle": "crypto_stream_noncebytes",
+ "c++": "crypto_stream_noncebytes()",
+ "go": "CryptoStreamNoncebytes"
+ },
+ {
+ "mangle": "crypto_stream_primitive",
+ "c++": "crypto_stream_primitive()",
+ "go": "CryptoStreamPrimitive"
+ },
+ {
+ "mangle": "crypto_stream_salsa20",
+ "c++": "crypto_stream_salsa20(unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoStreamSalsa20"
+ },
+ {
+ "mangle": "crypto_stream_salsa2012",
+ "c++": "crypto_stream_salsa2012(unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoStreamSalsa2012"
+ },
+ {
+ "mangle": "crypto_stream_salsa2012_keybytes",
+ "c++": "crypto_stream_salsa2012_keybytes()",
+ "go": "CryptoStreamSalsa2012Keybytes"
+ },
+ {
+ "mangle": "crypto_stream_salsa2012_keygen",
+ "c++": "crypto_stream_salsa2012_keygen(unsigned char *)",
+ "go": "CryptoStreamSalsa2012Keygen"
+ },
+ {
+ "mangle": "crypto_stream_salsa2012_messagebytes_max",
+ "c++": "crypto_stream_salsa2012_messagebytes_max()",
+ "go": "CryptoStreamSalsa2012MessagebytesMax"
+ },
+ {
+ "mangle": "crypto_stream_salsa2012_noncebytes",
+ "c++": "crypto_stream_salsa2012_noncebytes()",
+ "go": "CryptoStreamSalsa2012Noncebytes"
+ },
+ {
+ "mangle": "crypto_stream_salsa2012_xor",
+ "c++": "crypto_stream_salsa2012_xor(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoStreamSalsa2012Xor"
+ },
+ {
+ "mangle": "crypto_stream_salsa208",
+ "c++": "crypto_stream_salsa208(unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoStreamSalsa208"
+ },
+ {
+ "mangle": "crypto_stream_salsa208_keybytes",
+ "c++": "crypto_stream_salsa208_keybytes()",
+ "go": "CryptoStreamSalsa208Keybytes"
+ },
+ {
+ "mangle": "crypto_stream_salsa208_keygen",
+ "c++": "crypto_stream_salsa208_keygen(unsigned char *)",
+ "go": "CryptoStreamSalsa208Keygen"
+ },
+ {
+ "mangle": "crypto_stream_salsa208_messagebytes_max",
+ "c++": "crypto_stream_salsa208_messagebytes_max()",
+ "go": "CryptoStreamSalsa208MessagebytesMax"
+ },
+ {
+ "mangle": "crypto_stream_salsa208_noncebytes",
+ "c++": "crypto_stream_salsa208_noncebytes()",
+ "go": "CryptoStreamSalsa208Noncebytes"
+ },
+ {
+ "mangle": "crypto_stream_salsa208_xor",
+ "c++": "crypto_stream_salsa208_xor(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoStreamSalsa208Xor"
+ },
+ {
+ "mangle": "crypto_stream_salsa20_keybytes",
+ "c++": "crypto_stream_salsa20_keybytes()",
+ "go": "CryptoStreamSalsa20Keybytes"
+ },
+ {
+ "mangle": "crypto_stream_salsa20_keygen",
+ "c++": "crypto_stream_salsa20_keygen(unsigned char *)",
+ "go": "CryptoStreamSalsa20Keygen"
+ },
+ {
+ "mangle": "crypto_stream_salsa20_messagebytes_max",
+ "c++": "crypto_stream_salsa20_messagebytes_max()",
+ "go": "CryptoStreamSalsa20MessagebytesMax"
+ },
+ {
+ "mangle": "crypto_stream_salsa20_noncebytes",
+ "c++": "crypto_stream_salsa20_noncebytes()",
+ "go": "CryptoStreamSalsa20Noncebytes"
+ },
+ {
+ "mangle": "crypto_stream_salsa20_xor",
+ "c++": "crypto_stream_salsa20_xor(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoStreamSalsa20Xor"
+ },
+ {
+ "mangle": "crypto_stream_salsa20_xor_ic",
+ "c++": "crypto_stream_salsa20_xor_ic(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, uint64_t, const unsigned char *)",
+ "go": "CryptoStreamSalsa20XorIc"
+ },
+ {
+ "mangle": "crypto_stream_xchacha20",
+ "c++": "crypto_stream_xchacha20(unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoStreamXchacha20"
+ },
+ {
+ "mangle": "crypto_stream_xchacha20_keybytes",
+ "c++": "crypto_stream_xchacha20_keybytes()",
+ "go": "CryptoStreamXchacha20Keybytes"
+ },
+ {
+ "mangle": "crypto_stream_xchacha20_keygen",
+ "c++": "crypto_stream_xchacha20_keygen(unsigned char *)",
+ "go": "CryptoStreamXchacha20Keygen"
+ },
+ {
+ "mangle": "crypto_stream_xchacha20_messagebytes_max",
+ "c++": "crypto_stream_xchacha20_messagebytes_max()",
+ "go": "CryptoStreamXchacha20MessagebytesMax"
+ },
+ {
+ "mangle": "crypto_stream_xchacha20_noncebytes",
+ "c++": "crypto_stream_xchacha20_noncebytes()",
+ "go": "CryptoStreamXchacha20Noncebytes"
+ },
+ {
+ "mangle": "crypto_stream_xchacha20_xor",
+ "c++": "crypto_stream_xchacha20_xor(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoStreamXchacha20Xor"
+ },
+ {
+ "mangle": "crypto_stream_xchacha20_xor_ic",
+ "c++": "crypto_stream_xchacha20_xor_ic(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, uint64_t, const unsigned char *)",
+ "go": "CryptoStreamXchacha20XorIc"
+ },
+ {
+ "mangle": "crypto_stream_xor",
+ "c++": "crypto_stream_xor(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoStreamXor"
+ },
+ {
+ "mangle": "crypto_stream_xsalsa20",
+ "c++": "crypto_stream_xsalsa20(unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoStreamXsalsa20"
+ },
+ {
+ "mangle": "crypto_stream_xsalsa20_keybytes",
+ "c++": "crypto_stream_xsalsa20_keybytes()",
+ "go": "CryptoStreamXsalsa20Keybytes"
+ },
+ {
+ "mangle": "crypto_stream_xsalsa20_keygen",
+ "c++": "crypto_stream_xsalsa20_keygen(unsigned char *)",
+ "go": "CryptoStreamXsalsa20Keygen"
+ },
+ {
+ "mangle": "crypto_stream_xsalsa20_messagebytes_max",
+ "c++": "crypto_stream_xsalsa20_messagebytes_max()",
+ "go": "CryptoStreamXsalsa20MessagebytesMax"
+ },
+ {
+ "mangle": "crypto_stream_xsalsa20_noncebytes",
+ "c++": "crypto_stream_xsalsa20_noncebytes()",
+ "go": "CryptoStreamXsalsa20Noncebytes"
+ },
+ {
+ "mangle": "crypto_stream_xsalsa20_xor",
+ "c++": "crypto_stream_xsalsa20_xor(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, const unsigned char *)",
+ "go": "CryptoStreamXsalsa20Xor"
+ },
+ {
+ "mangle": "crypto_stream_xsalsa20_xor_ic",
+ "c++": "crypto_stream_xsalsa20_xor_ic(unsigned char *, const unsigned char *, unsigned long long, const unsigned char *, uint64_t, const unsigned char *)",
+ "go": "CryptoStreamXsalsa20XorIc"
+ },
+ {
+ "mangle": "crypto_verify_16",
+ "c++": "crypto_verify_16(const unsigned char *, const unsigned char *)",
+ "go": "CryptoVerify16"
+ },
+ {
+ "mangle": "crypto_verify_16_bytes",
+ "c++": "crypto_verify_16_bytes()",
+ "go": "CryptoVerify16Bytes"
+ },
+ {
+ "mangle": "crypto_verify_32",
+ "c++": "crypto_verify_32(const unsigned char *, const unsigned char *)",
+ "go": "CryptoVerify32"
+ },
+ {
+ "mangle": "crypto_verify_32_bytes",
+ "c++": "crypto_verify_32_bytes()",
+ "go": "CryptoVerify32Bytes"
+ },
+ {
+ "mangle": "crypto_verify_64",
+ "c++": "crypto_verify_64(const unsigned char *, const unsigned char *)",
+ "go": "CryptoVerify64"
+ },
+ {
+ "mangle": "crypto_verify_64_bytes",
+ "c++": "crypto_verify_64_bytes()",
+ "go": "CryptoVerify64Bytes"
+ },
+ {
+ "mangle": "randombytes",
+ "c++": "randombytes(unsigned char *const, const unsigned long long)",
+ "go": "Randombytes"
+ },
+ {
+ "mangle": "randombytes_buf",
+ "c++": "randombytes_buf(void *const, const size_t)",
+ "go": "RandombytesBuf"
+ },
+ {
+ "mangle": "randombytes_buf_deterministic",
+ "c++": "randombytes_buf_deterministic(void *const, const size_t, const unsigned char *)",
+ "go": "RandombytesBufDeterministic"
+ },
+ {
+ "mangle": "randombytes_close",
+ "c++": "randombytes_close()",
+ "go": "RandombytesClose"
+ },
+ {
+ "mangle": "randombytes_implementation_name",
+ "c++": "randombytes_implementation_name()",
+ "go": "RandombytesImplementationName"
+ },
+ {
+ "mangle": "randombytes_random",
+ "c++": "randombytes_random()",
+ "go": "RandombytesRandom"
+ },
+ {
+ "mangle": "randombytes_seedbytes",
+ "c++": "randombytes_seedbytes()",
+ "go": "RandombytesSeedbytes"
+ },
+ {
+ "mangle": "randombytes_set_implementation",
+ "c++": "randombytes_set_implementation(const randombytes_implementation *)",
+ "go": "(*RandombytesImplementation).RandombytesSetImplementation"
+ },
+ {
+ "mangle": "randombytes_stir",
+ "c++": "randombytes_stir()",
+ "go": "RandombytesStir"
+ },
+ {
+ "mangle": "randombytes_uniform",
+ "c++": "randombytes_uniform(const uint32_t)",
+ "go": "RandombytesUniform"
+ },
+ {
+ "mangle": "sodium_add",
+ "c++": "sodium_add(unsigned char *, const unsigned char *, const size_t)",
+ "go": "SodiumAdd"
+ },
+ {
+ "mangle": "sodium_allocarray",
+ "c++": "sodium_allocarray(size_t, size_t)",
+ "go": "SodiumAllocarray"
+ },
+ {
+ "mangle": "sodium_base642bin",
+ "c++": "sodium_base642bin(unsigned char *const, const size_t, const char *const, const size_t, const char *const, size_t *const, const char **const, const int)",
+ "go": "SodiumBase642bin"
+ },
+ {
+ "mangle": "sodium_base64_encoded_len",
+ "c++": "sodium_base64_encoded_len(const size_t, const int)",
+ "go": "SodiumBase64EncodedLen"
+ },
+ {
+ "mangle": "sodium_bin2base64",
+ "c++": "sodium_bin2base64(char *const, const size_t, const unsigned char *const, const size_t, const int)",
+ "go": "SodiumBin2base64"
+ },
+ {
+ "mangle": "sodium_bin2hex",
+ "c++": "sodium_bin2hex(char *const, const size_t, const unsigned char *const, const size_t)",
+ "go": "SodiumBin2hex"
+ },
+ {
+ "mangle": "sodium_compare",
+ "c++": "sodium_compare(const unsigned char *, const unsigned char *, size_t)",
+ "go": "SodiumCompare"
+ },
+ {
+ "mangle": "sodium_free",
+ "c++": "sodium_free(void *)",
+ "go": "SodiumFree"
+ },
+ {
+ "mangle": "sodium_hex2bin",
+ "c++": "sodium_hex2bin(unsigned char *const, const size_t, const char *const, const size_t, const char *const, size_t *const, const char **const)",
+ "go": "SodiumHex2bin"
+ },
+ {
+ "mangle": "sodium_increment",
+ "c++": "sodium_increment(unsigned char *, const size_t)",
+ "go": "SodiumIncrement"
+ },
+ {
+ "mangle": "sodium_init",
+ "c++": "sodium_init()",
+ "go": "SodiumInit"
+ },
+ {
+ "mangle": "sodium_is_zero",
+ "c++": "sodium_is_zero(const unsigned char *, const size_t)",
+ "go": "SodiumIsZero"
+ },
+ {
+ "mangle": "sodium_library_minimal",
+ "c++": "sodium_library_minimal()",
+ "go": "SodiumLibraryMinimal"
+ },
+ {
+ "mangle": "sodium_library_version_major",
+ "c++": "sodium_library_version_major()",
+ "go": "SodiumLibraryVersionMajor"
+ },
+ {
+ "mangle": "sodium_library_version_minor",
+ "c++": "sodium_library_version_minor()",
+ "go": "SodiumLibraryVersionMinor"
+ },
+ {
+ "mangle": "sodium_malloc",
+ "c++": "sodium_malloc(const size_t)",
+ "go": "SodiumMalloc"
+ },
+ {
+ "mangle": "sodium_memcmp",
+ "c++": "sodium_memcmp(const void *const, const void *const, size_t)",
+ "go": "SodiumMemcmp"
+ },
+ {
+ "mangle": "sodium_memzero",
+ "c++": "sodium_memzero(void *const, const size_t)",
+ "go": "SodiumMemzero"
+ },
+ {
+ "mangle": "sodium_misuse",
+ "c++": "sodium_misuse()",
+ "go": "SodiumMisuse"
+ },
+ {
+ "mangle": "sodium_mlock",
+ "c++": "sodium_mlock(void *const, const size_t)",
+ "go": "SodiumMlock"
+ },
+ {
+ "mangle": "sodium_mprotect_noaccess",
+ "c++": "sodium_mprotect_noaccess(void *)",
+ "go": "SodiumMprotectNoaccess"
+ },
+ {
+ "mangle": "sodium_mprotect_readonly",
+ "c++": "sodium_mprotect_readonly(void *)",
+ "go": "SodiumMprotectReadonly"
+ },
+ {
+ "mangle": "sodium_mprotect_readwrite",
+ "c++": "sodium_mprotect_readwrite(void *)",
+ "go": "SodiumMprotectReadwrite"
+ },
+ {
+ "mangle": "sodium_munlock",
+ "c++": "sodium_munlock(void *const, const size_t)",
+ "go": "SodiumMunlock"
+ },
+ {
+ "mangle": "sodium_pad",
+ "c++": "sodium_pad(size_t *, unsigned char *, size_t, size_t, size_t)",
+ "go": "SodiumPad"
+ },
+ {
+ "mangle": "sodium_runtime_has_aesni",
+ "c++": "sodium_runtime_has_aesni()",
+ "go": "SodiumRuntimeHasAesni"
+ },
+ {
+ "mangle": "sodium_runtime_has_armcrypto",
+ "c++": "sodium_runtime_has_armcrypto()",
+ "go": "SodiumRuntimeHasArmcrypto"
+ },
+ {
+ "mangle": "sodium_runtime_has_avx",
+ "c++": "sodium_runtime_has_avx()",
+ "go": "SodiumRuntimeHasAvx"
+ },
+ {
+ "mangle": "sodium_runtime_has_avx2",
+ "c++": "sodium_runtime_has_avx2()",
+ "go": "SodiumRuntimeHasAvx2"
+ },
+ {
+ "mangle": "sodium_runtime_has_avx512f",
+ "c++": "sodium_runtime_has_avx512f()",
+ "go": "SodiumRuntimeHasAvx512f"
+ },
+ {
+ "mangle": "sodium_runtime_has_neon",
+ "c++": "sodium_runtime_has_neon()",
+ "go": "SodiumRuntimeHasNeon"
+ },
+ {
+ "mangle": "sodium_runtime_has_pclmul",
+ "c++": "sodium_runtime_has_pclmul()",
+ "go": "SodiumRuntimeHasPclmul"
+ },
+ {
+ "mangle": "sodium_runtime_has_rdrand",
+ "c++": "sodium_runtime_has_rdrand()",
+ "go": "SodiumRuntimeHasRdrand"
+ },
+ {
+ "mangle": "sodium_runtime_has_sse2",
+ "c++": "sodium_runtime_has_sse2()",
+ "go": "SodiumRuntimeHasSse2"
+ },
+ {
+ "mangle": "sodium_runtime_has_sse3",
+ "c++": "sodium_runtime_has_sse3()",
+ "go": "SodiumRuntimeHasSse3"
+ },
+ {
+ "mangle": "sodium_runtime_has_sse41",
+ "c++": "sodium_runtime_has_sse41()",
+ "go": "SodiumRuntimeHasSse41"
+ },
+ {
+ "mangle": "sodium_runtime_has_ssse3",
+ "c++": "sodium_runtime_has_ssse3()",
+ "go": "SodiumRuntimeHasSsse3"
+ },
+ {
+ "mangle": "sodium_set_misuse_handler",
+ "c++": "sodium_set_misuse_handler(void (*)(void))",
+ "go": "SodiumSetMisuseHandler"
+ },
+ {
+ "mangle": "sodium_stackzero",
+ "c++": "sodium_stackzero(const size_t)",
+ "go": "SodiumStackzero"
+ },
+ {
+ "mangle": "sodium_sub",
+ "c++": "sodium_sub(unsigned char *, const unsigned char *, const size_t)",
+ "go": "SodiumSub"
+ },
+ {
+ "mangle": "sodium_unpad",
+ "c++": "sodium_unpad(size_t *, const unsigned char *, size_t, size_t)",
+ "go": "SodiumUnpad"
+ },
+ {
+ "mangle": "sodium_version_string",
+ "c++": "sodium_version_string()",
+ "go": "SodiumVersionString"
+ }
+]
\ No newline at end of file
diff --git a/libsodium/llpkg.cfg b/libsodium/llpkg.cfg
new file mode 100644
index 0000000..538a2ea
--- /dev/null
+++ b/libsodium/llpkg.cfg
@@ -0,0 +1,8 @@
+{
+ "upstream": {
+ "package": {
+ "name": "libsodium",
+ "version": "1.0.20"
+ }
+ }
+}
\ No newline at end of file
diff --git a/libtool/_demo/test/test.go b/libtool/_demo/test/test.go
new file mode 100644
index 0000000..40b9f30
--- /dev/null
+++ b/libtool/_demo/test/test.go
@@ -0,0 +1,54 @@
+package main
+
+import (
+ "fmt"
+
+ "github.com/goplus/lib/c"
+ "github.com/goplus/llpkg/libtool"
+)
+
+func main() {
+ fmt.Println("Simple libtool demonstration")
+
+ // Initialize libtool
+ ret := libtool.Dlinit()
+ if ret != 0 {
+ fmt.Println("Failed to initialize libtool:", c.GoString(libtool.Dlerror()))
+ return
+ }
+ fmt.Println("Successfully initialized libtool")
+
+ // Try to load a common library (libc)
+ libName := "libc.so.6" // Linux style
+ handle := libtool.Dlopen(c.Str(libName))
+ if handle == nil {
+ libName = "libc.dylib" // macOS style
+ handle = libtool.Dlopen(c.Str(libName))
+ }
+ if handle == nil {
+ libName = "c" // Generic style
+ handle = libtool.Dlopen(c.Str(libName))
+ }
+
+ if handle != nil {
+ fmt.Printf("Successfully opened %s\n", libName)
+
+ // Try to find a common function (printf)
+ symPtr := libtool.Dlsym(handle, c.Str("printf"))
+ if symPtr != nil {
+ fmt.Println("Found 'printf' function")
+ } else {
+ fmt.Println("Symbol 'printf' not found:", c.GoString(libtool.Dlerror()))
+ }
+
+ // Close the library
+ libtool.Dlclose(handle)
+ fmt.Println("Closed library")
+ } else {
+ fmt.Println("Could not open any standard library:", c.GoString(libtool.Dlerror()))
+ }
+
+ // Clean up libtool
+ libtool.Dlexit()
+ fmt.Println("Successfully cleaned up libtool")
+}
diff --git a/libtool/go.mod b/libtool/go.mod
new file mode 100644
index 0000000..c8b6d58
--- /dev/null
+++ b/libtool/go.mod
@@ -0,0 +1,5 @@
+module github.com/goplus/llpkg/libtool
+
+go 1.20
+
+require github.com/goplus/lib v0.2.0
diff --git a/libtool/go.sum b/libtool/go.sum
new file mode 100644
index 0000000..512980a
--- /dev/null
+++ b/libtool/go.sum
@@ -0,0 +1,2 @@
+github.com/goplus/lib v0.2.0 h1:AjqkN1XK5H23wZMMlpaUYAMCDAdSBQ2NMFrLtSh7W4g=
+github.com/goplus/lib v0.2.0/go.mod h1:SgJv3oPqLLHCu0gcL46ejOP3x7/2ry2Jtxu7ta32kp0=
diff --git a/libtool/libtool_autogen_link.go b/libtool/libtool_autogen_link.go
new file mode 100644
index 0000000..60f6280
--- /dev/null
+++ b/libtool/libtool_autogen_link.go
@@ -0,0 +1,5 @@
+package libtool
+
+import _ "github.com/goplus/lib/c"
+
+const LLGoPackage string = "link: $(pkg-config --libs libtool);"
diff --git a/libtool/llcppg.cfg b/libtool/llcppg.cfg
new file mode 100644
index 0000000..f99f38b
--- /dev/null
+++ b/libtool/llcppg.cfg
@@ -0,0 +1,25 @@
+{
+ "name": "libtool",
+ "cflags": "$(pkg-config --cflags libtool)",
+ "libs": "$(pkg-config --libs libtool)",
+ "include": [
+ "ltdl.h",
+ "libltdl/lt_dlloader.h",
+ "libltdl/lt_error.h",
+ "libltdl/lt_system.h"
+ ],
+ "trimPrefixes": ["lt__","lt_", "LT_"],
+ "cplusplus": false,
+ "deps": [],
+ "keepUnderScore": false,
+ "impl": [
+ {
+ "files": [],
+ "cond": {
+ "os": [],
+ "arch": []
+ }
+ }
+ ],
+ "mix": false
+}
diff --git a/libtool/llcppg.pub b/libtool/llcppg.pub
new file mode 100644
index 0000000..4bd09b5
--- /dev/null
+++ b/libtool/llcppg.pub
@@ -0,0 +1,20 @@
+lt__advise Advise
+lt__handle Handle
+lt_dladvise Dladvise
+lt_dlhandle Dlhandle
+lt_dlhandle_interface DlhandleInterface
+lt_dlinfo Dlinfo
+lt_dlinterface_id DlinterfaceId
+lt_dlloader Dlloader
+lt_dlloader_exit DlloaderExit
+lt_dlloader_init DlloaderInit
+lt_dlloader_priority DlloaderPriority
+lt_dlpreload_callback_func DlpreloadCallbackFunc
+lt_dlsymlist Dlsymlist
+lt_dlvtable Dlvtable
+lt_find_sym FindSym
+lt_get_vtable GetVtable
+lt_module Module
+lt_module_close ModuleClose
+lt_module_open ModuleOpen
+lt_user_data UserData
\ No newline at end of file
diff --git a/libtool/llpkg.cfg b/libtool/llpkg.cfg
new file mode 100644
index 0000000..0dd4006
--- /dev/null
+++ b/libtool/llpkg.cfg
@@ -0,0 +1,8 @@
+{
+ "upstream": {
+ "package": {
+ "name": "libtool",
+ "version": "2.4.7"
+ }
+ }
+}
\ No newline at end of file
diff --git a/libtool/lt_dlloader.go b/libtool/lt_dlloader.go
new file mode 100644
index 0000000..c0a6aae
--- /dev/null
+++ b/libtool/lt_dlloader.go
@@ -0,0 +1,75 @@
+package libtool
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+const DLLOADER_H = 1
+
+type Dlloader c.Pointer
+type Module c.Pointer
+type UserData c.Pointer
+
+type Advise struct {
+ Unused [8]uint8
+}
+type Dladvise *Advise
+
+// llgo:type C
+type ModuleOpen func(UserData, *c.Char, Dladvise) Module
+
+// llgo:type C
+type ModuleClose func(UserData, Module) c.Int
+
+// llgo:type C
+type FindSym func(UserData, Module, *c.Char) c.Pointer
+
+// llgo:type C
+type DlloaderInit func(UserData) c.Int
+
+// llgo:type C
+type DlloaderExit func(UserData) c.Int
+type DlloaderPriority c.Int
+
+const (
+ DLLOADER_PREPEND DlloaderPriority = 0
+ DLLOADER_APPEND DlloaderPriority = 1
+)
+
+/*
+This structure defines a module loader, as populated by the get_vtable
+
+ entry point of each loader.
+*/
+type Dlvtable struct {
+ Name *c.Char
+ SymPrefix *c.Char
+ ModuleOpen *ModuleOpen
+ ModuleClose *ModuleClose
+ FindSym *FindSym
+ DlloaderInit *DlloaderInit
+ DlloaderExit *DlloaderExit
+ DlloaderData UserData
+ Priority DlloaderPriority
+}
+
+// llgo:link (*Dlvtable).DlloaderAdd C.lt_dlloader_add
+func (recv_ *Dlvtable) DlloaderAdd() c.Int {
+ return 0
+}
+
+//go:linkname DlloaderNext C.lt_dlloader_next
+func DlloaderNext(loader Dlloader) Dlloader
+
+//go:linkname DlloaderRemove C.lt_dlloader_remove
+func DlloaderRemove(name *c.Char) *Dlvtable
+
+//go:linkname DlloaderFind C.lt_dlloader_find
+func DlloaderFind(name *c.Char) *Dlvtable
+
+//go:linkname DlloaderGet C.lt_dlloader_get
+func DlloaderGet(loader Dlloader) *Dlvtable
+
+// llgo:type C
+type GetVtable func(UserData) *Dlvtable
diff --git a/libtool/lt_error.go b/libtool/lt_error.go
new file mode 100644
index 0000000..4e4bc68
--- /dev/null
+++ b/libtool/lt_error.go
@@ -0,0 +1,38 @@
+package libtool
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+const ERROR_H = 1
+const (
+ ERROR_UNKNOWN c.Int = 0
+ ERROR_DLOPEN_NOT_SUPPORTED c.Int = 1
+ ERROR_INVALID_LOADER c.Int = 2
+ ERROR_INIT_LOADER c.Int = 3
+ ERROR_REMOVE_LOADER c.Int = 4
+ ERROR_FILE_NOT_FOUND c.Int = 5
+ ERROR_DEPLIB_NOT_FOUND c.Int = 6
+ ERROR_NO_SYMBOLS c.Int = 7
+ ERROR_CANNOT_OPEN c.Int = 8
+ ERROR_CANNOT_CLOSE c.Int = 9
+ ERROR_SYMBOL_NOT_FOUND c.Int = 10
+ ERROR_NO_MEMORY c.Int = 11
+ ERROR_INVALID_HANDLE c.Int = 12
+ ERROR_BUFFER_OVERFLOW c.Int = 13
+ ERROR_INVALID_ERRORCODE c.Int = 14
+ ERROR_SHUTDOWN c.Int = 15
+ ERROR_CLOSE_RESIDENT_MODULE c.Int = 16
+ ERROR_INVALID_MUTEX_ARGS c.Int = 17
+ ERROR_INVALID_POSITION c.Int = 18
+ ERROR_CONFLICTING_FLAGS c.Int = 19
+ ERROR_MAX c.Int = 20
+)
+
+/* These functions are only useful from inside custom module loaders. */
+//go:linkname Dladderror C.lt_dladderror
+func Dladderror(diagnostic *c.Char) c.Int
+
+//go:linkname Dlseterror C.lt_dlseterror
+func Dlseterror(errorcode c.Int) c.Int
diff --git a/libtool/lt_system.go b/libtool/lt_system.go
new file mode 100644
index 0000000..88694fd
--- /dev/null
+++ b/libtool/lt_system.go
@@ -0,0 +1,8 @@
+package libtool
+
+import _ "unsafe"
+
+const SYSTEM_H = 1
+const FILENAME_MAX = 2048
+const PATHSEP_CHAR = ":"
+const READTEXT_MODE = "r"
diff --git a/libtool/ltdl.go b/libtool/ltdl.go
new file mode 100644
index 0000000..55ddea2
--- /dev/null
+++ b/libtool/ltdl.go
@@ -0,0 +1,150 @@
+package libtool
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+const LTDL_H = 1
+
+type Handle struct {
+ Unused [8]uint8
+}
+type Dlhandle *Handle
+
+/* Initialisation and finalisation functions for libltdl. */
+//go:linkname Dlinit C.lt_dlinit
+func Dlinit() c.Int
+
+//go:linkname Dlexit C.lt_dlexit
+func Dlexit() c.Int
+
+/* Module search path manipulation. */
+//go:linkname Dladdsearchdir C.lt_dladdsearchdir
+func Dladdsearchdir(search_dir *c.Char) c.Int
+
+//go:linkname Dlinsertsearchdir C.lt_dlinsertsearchdir
+func Dlinsertsearchdir(before *c.Char, search_dir *c.Char) c.Int
+
+//go:linkname Dlsetsearchpath C.lt_dlsetsearchpath
+func Dlsetsearchpath(search_path *c.Char) c.Int
+
+//go:linkname Dlgetsearchpath C.lt_dlgetsearchpath
+func Dlgetsearchpath() *c.Char
+
+//go:linkname Dlforeachfile C.lt_dlforeachfile
+func Dlforeachfile(search_path *c.Char, func_ func(*c.Char, c.Pointer) c.Int, data c.Pointer) c.Int
+
+/* User module loading advisors. */
+//go:linkname DladviseInit C.lt_dladvise_init
+func DladviseInit(advise *Dladvise) c.Int
+
+//go:linkname DladviseDestroy C.lt_dladvise_destroy
+func DladviseDestroy(advise *Dladvise) c.Int
+
+//go:linkname DladviseExt C.lt_dladvise_ext
+func DladviseExt(advise *Dladvise) c.Int
+
+//go:linkname DladviseResident C.lt_dladvise_resident
+func DladviseResident(advise *Dladvise) c.Int
+
+//go:linkname DladviseLocal C.lt_dladvise_local
+func DladviseLocal(advise *Dladvise) c.Int
+
+//go:linkname DladviseGlobal C.lt_dladvise_global
+func DladviseGlobal(advise *Dladvise) c.Int
+
+//go:linkname DladvisePreload C.lt_dladvise_preload
+func DladvisePreload(advise *Dladvise) c.Int
+
+/* Portable libltdl versions of the system dlopen() API. */
+//go:linkname Dlopen C.lt_dlopen
+func Dlopen(filename *c.Char) Dlhandle
+
+//go:linkname Dlopenext C.lt_dlopenext
+func Dlopenext(filename *c.Char) Dlhandle
+
+//go:linkname Dlopenadvise C.lt_dlopenadvise
+func Dlopenadvise(filename *c.Char, advise Dladvise) Dlhandle
+
+//go:linkname Dlsym C.lt_dlsym
+func Dlsym(handle Dlhandle, name *c.Char) c.Pointer
+
+//go:linkname Dlerror C.lt_dlerror
+func Dlerror() *c.Char
+
+//go:linkname Dlclose C.lt_dlclose
+func Dlclose(handle Dlhandle) c.Int
+
+/*
+A preopened symbol. Arrays of this type comprise the exported
+
+ symbols for a dlpreopened module.
+*/
+type Dlsymlist struct {
+ Name *c.Char
+ Address c.Pointer
+}
+
+// llgo:type C
+type DlpreloadCallbackFunc func(Dlhandle) c.Int
+
+// llgo:link (*Dlsymlist).Dlpreload C.lt_dlpreload
+func (recv_ *Dlsymlist) Dlpreload() c.Int {
+ return 0
+}
+
+// llgo:link (*Dlsymlist).DlpreloadDefault C.lt_dlpreload_default
+func (recv_ *Dlsymlist) DlpreloadDefault() c.Int {
+ return 0
+}
+
+//go:linkname DlpreloadOpen C.lt_dlpreload_open
+func DlpreloadOpen(originator *c.Char, func_ DlpreloadCallbackFunc) c.Int
+
+type DlinterfaceId c.Pointer
+
+// llgo:type C
+type DlhandleInterface func(Dlhandle, *c.Char) c.Int
+
+//go:linkname DlinterfaceRegister C.lt_dlinterface_register
+func DlinterfaceRegister(id_string *c.Char, iface DlhandleInterface) DlinterfaceId
+
+//go:linkname DlinterfaceFree C.lt_dlinterface_free
+func DlinterfaceFree(key DlinterfaceId)
+
+//go:linkname DlcallerSetData C.lt_dlcaller_set_data
+func DlcallerSetData(key DlinterfaceId, handle Dlhandle, data c.Pointer) c.Pointer
+
+//go:linkname DlcallerGetData C.lt_dlcaller_get_data
+func DlcallerGetData(key DlinterfaceId, handle Dlhandle) c.Pointer
+
+/* Read only information pertaining to a loaded module. */
+
+type Dlinfo struct {
+ Filename *c.Char
+ Name *c.Char
+ RefCount c.Int
+ IsResident c.Uint
+ IsSymglobal c.Uint
+ IsSymlocal c.Uint
+}
+
+//go:linkname Dlgetinfo C.lt_dlgetinfo
+func Dlgetinfo(handle Dlhandle) *Dlinfo
+
+//go:linkname DlhandleIterate C.lt_dlhandle_iterate
+func DlhandleIterate(iface DlinterfaceId, place Dlhandle) Dlhandle
+
+//go:linkname DlhandleFetch C.lt_dlhandle_fetch
+func DlhandleFetch(iface DlinterfaceId, module_name *c.Char) Dlhandle
+
+//go:linkname DlhandleMap C.lt_dlhandle_map
+func DlhandleMap(iface DlinterfaceId, func_ func(Dlhandle, c.Pointer) c.Int, data c.Pointer) c.Int
+
+/* Deprecated module residency management API. */
+//go:linkname Dlmakeresident C.lt_dlmakeresident
+func Dlmakeresident(handle Dlhandle) c.Int
+
+//go:linkname Dlisresident C.lt_dlisresident
+func Dlisresident(handle Dlhandle) c.Int
diff --git a/libxml2/HTMLparser.go b/libxml2/HTMLparser.go
new file mode 100644
index 0000000..3f27ce4
--- /dev/null
+++ b/libxml2/HTMLparser.go
@@ -0,0 +1,226 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type HtmlParserCtxt ParserCtxt
+type HtmlParserCtxtPtr ParserCtxtPtr
+type HtmlParserNodeInfo ParserNodeInfo
+type HtmlSAXHandler SAXHandler
+type HtmlSAXHandlerPtr SAXHandlerPtr
+type HtmlParserInput ParserInput
+type HtmlParserInputPtr ParserInputPtr
+type HtmlDocPtr DocPtr
+type HtmlNodePtr NodePtr
+
+type X_htmlElemDesc struct {
+ Name *c.Char
+ StartTag c.Char
+ EndTag c.Char
+ SaveEndTag c.Char
+ Empty c.Char
+ Depr c.Char
+ Dtd c.Char
+ Isinline c.Char
+ Desc *c.Char
+ Subelts **c.Char
+ Defaultsubelt *c.Char
+ AttrsOpt **c.Char
+ AttrsDepr **c.Char
+ AttrsReq **c.Char
+}
+type HtmlElemDesc X_htmlElemDesc
+type HtmlElemDescPtr *HtmlElemDesc
+
+type X_htmlEntityDesc struct {
+ Value c.Uint
+ Name *c.Char
+ Desc *c.Char
+}
+type HtmlEntityDesc X_htmlEntityDesc
+type HtmlEntityDescPtr *HtmlEntityDesc
+
+//go:linkname X__htmlDefaultSAXHandler C.__htmlDefaultSAXHandler
+func X__htmlDefaultSAXHandler() *SAXHandlerV1
+
+/*
+ * There is only few public functions.
+ */
+//go:linkname HtmlInitAutoClose C.htmlInitAutoClose
+func HtmlInitAutoClose()
+
+// llgo:link (*Char).HtmlTagLookup C.htmlTagLookup
+func (recv_ *Char) HtmlTagLookup() *HtmlElemDesc {
+ return nil
+}
+
+// llgo:link (*Char).HtmlEntityLookup C.htmlEntityLookup
+func (recv_ *Char) HtmlEntityLookup() *HtmlEntityDesc {
+ return nil
+}
+
+//go:linkname HtmlEntityValueLookup C.htmlEntityValueLookup
+func HtmlEntityValueLookup(value c.Uint) *HtmlEntityDesc
+
+//go:linkname HtmlIsAutoClosed C.htmlIsAutoClosed
+func HtmlIsAutoClosed(doc HtmlDocPtr, elem HtmlNodePtr) c.Int
+
+//go:linkname HtmlAutoCloseTag C.htmlAutoCloseTag
+func HtmlAutoCloseTag(doc HtmlDocPtr, name *Char, elem HtmlNodePtr) c.Int
+
+//go:linkname HtmlParseEntityRef C.htmlParseEntityRef
+func HtmlParseEntityRef(ctxt HtmlParserCtxtPtr, str **Char) *HtmlEntityDesc
+
+//go:linkname HtmlParseCharRef C.htmlParseCharRef
+func HtmlParseCharRef(ctxt HtmlParserCtxtPtr) c.Int
+
+//go:linkname HtmlParseElement C.htmlParseElement
+func HtmlParseElement(ctxt HtmlParserCtxtPtr)
+
+//go:linkname HtmlNewParserCtxt C.htmlNewParserCtxt
+func HtmlNewParserCtxt() HtmlParserCtxtPtr
+
+// llgo:link (*HtmlSAXHandler).HtmlNewSAXParserCtxt C.htmlNewSAXParserCtxt
+func (recv_ *HtmlSAXHandler) HtmlNewSAXParserCtxt(userData c.Pointer) HtmlParserCtxtPtr {
+ return nil
+}
+
+//go:linkname HtmlCreateMemoryParserCtxt C.htmlCreateMemoryParserCtxt
+func HtmlCreateMemoryParserCtxt(buffer *c.Char, size c.Int) HtmlParserCtxtPtr
+
+//go:linkname HtmlParseDocument C.htmlParseDocument
+func HtmlParseDocument(ctxt HtmlParserCtxtPtr) c.Int
+
+// llgo:link (*Char).HtmlSAXParseDoc C.htmlSAXParseDoc
+func (recv_ *Char) HtmlSAXParseDoc(encoding *c.Char, sax HtmlSAXHandlerPtr, userData c.Pointer) HtmlDocPtr {
+ return nil
+}
+
+// llgo:link (*Char).HtmlParseDoc C.htmlParseDoc
+func (recv_ *Char) HtmlParseDoc(encoding *c.Char) HtmlDocPtr {
+ return nil
+}
+
+//go:linkname HtmlCreateFileParserCtxt C.htmlCreateFileParserCtxt
+func HtmlCreateFileParserCtxt(filename *c.Char, encoding *c.Char) HtmlParserCtxtPtr
+
+//go:linkname HtmlSAXParseFile C.htmlSAXParseFile
+func HtmlSAXParseFile(filename *c.Char, encoding *c.Char, sax HtmlSAXHandlerPtr, userData c.Pointer) HtmlDocPtr
+
+//go:linkname HtmlParseFile C.htmlParseFile
+func HtmlParseFile(filename *c.Char, encoding *c.Char) HtmlDocPtr
+
+//go:linkname UTF8ToHtml C.UTF8ToHtml
+func UTF8ToHtml(out *c.Char, outlen *c.Int, in *c.Char, inlen *c.Int) c.Int
+
+//go:linkname HtmlEncodeEntities C.htmlEncodeEntities
+func HtmlEncodeEntities(out *c.Char, outlen *c.Int, in *c.Char, inlen *c.Int, quoteChar c.Int) c.Int
+
+// llgo:link (*Char).HtmlIsScriptAttribute C.htmlIsScriptAttribute
+func (recv_ *Char) HtmlIsScriptAttribute() c.Int {
+ return 0
+}
+
+//go:linkname HtmlHandleOmittedElem C.htmlHandleOmittedElem
+func HtmlHandleOmittedElem(val c.Int) c.Int
+
+/**
+ * Interfaces for the Push mode.
+ */
+//go:linkname HtmlCreatePushParserCtxt C.htmlCreatePushParserCtxt
+func HtmlCreatePushParserCtxt(sax HtmlSAXHandlerPtr, user_data c.Pointer, chunk *c.Char, size c.Int, filename *c.Char, enc CharEncoding) HtmlParserCtxtPtr
+
+//go:linkname HtmlParseChunk C.htmlParseChunk
+func HtmlParseChunk(ctxt HtmlParserCtxtPtr, chunk *c.Char, size c.Int, terminate c.Int) c.Int
+
+//go:linkname HtmlFreeParserCtxt C.htmlFreeParserCtxt
+func HtmlFreeParserCtxt(ctxt HtmlParserCtxtPtr)
+
+type HtmlParserOption c.Int
+
+const (
+ HTML_PARSE_RECOVER HtmlParserOption = 1
+ HTML_PARSE_NODEFDTD HtmlParserOption = 4
+ HTML_PARSE_NOERROR HtmlParserOption = 32
+ HTML_PARSE_NOWARNING HtmlParserOption = 64
+ HTML_PARSE_PEDANTIC HtmlParserOption = 128
+ HTML_PARSE_NOBLANKS HtmlParserOption = 256
+ HTML_PARSE_NONET HtmlParserOption = 2048
+ HTML_PARSE_NOIMPLIED HtmlParserOption = 8192
+ HTML_PARSE_COMPACT HtmlParserOption = 65536
+ HTML_PARSE_IGNORE_ENC HtmlParserOption = 2097152
+)
+
+//go:linkname HtmlCtxtReset C.htmlCtxtReset
+func HtmlCtxtReset(ctxt HtmlParserCtxtPtr)
+
+//go:linkname HtmlCtxtUseOptions C.htmlCtxtUseOptions
+func HtmlCtxtUseOptions(ctxt HtmlParserCtxtPtr, options c.Int) c.Int
+
+// llgo:link (*Char).HtmlReadDoc C.htmlReadDoc
+func (recv_ *Char) HtmlReadDoc(URL *c.Char, encoding *c.Char, options c.Int) HtmlDocPtr {
+ return nil
+}
+
+//go:linkname HtmlReadFile C.htmlReadFile
+func HtmlReadFile(URL *c.Char, encoding *c.Char, options c.Int) HtmlDocPtr
+
+//go:linkname HtmlReadMemory C.htmlReadMemory
+func HtmlReadMemory(buffer *c.Char, size c.Int, URL *c.Char, encoding *c.Char, options c.Int) HtmlDocPtr
+
+//go:linkname HtmlReadFd C.htmlReadFd
+func HtmlReadFd(fd c.Int, URL *c.Char, encoding *c.Char, options c.Int) HtmlDocPtr
+
+//go:linkname HtmlReadIO C.htmlReadIO
+func HtmlReadIO(ioread InputReadCallback, ioclose InputCloseCallback, ioctx c.Pointer, URL *c.Char, encoding *c.Char, options c.Int) HtmlDocPtr
+
+//go:linkname HtmlCtxtParseDocument C.htmlCtxtParseDocument
+func HtmlCtxtParseDocument(ctxt HtmlParserCtxtPtr, input ParserInputPtr) HtmlDocPtr
+
+//go:linkname HtmlCtxtReadDoc C.htmlCtxtReadDoc
+func HtmlCtxtReadDoc(ctxt ParserCtxtPtr, cur *Char, URL *c.Char, encoding *c.Char, options c.Int) HtmlDocPtr
+
+//go:linkname HtmlCtxtReadFile C.htmlCtxtReadFile
+func HtmlCtxtReadFile(ctxt ParserCtxtPtr, filename *c.Char, encoding *c.Char, options c.Int) HtmlDocPtr
+
+//go:linkname HtmlCtxtReadMemory C.htmlCtxtReadMemory
+func HtmlCtxtReadMemory(ctxt ParserCtxtPtr, buffer *c.Char, size c.Int, URL *c.Char, encoding *c.Char, options c.Int) HtmlDocPtr
+
+//go:linkname HtmlCtxtReadFd C.htmlCtxtReadFd
+func HtmlCtxtReadFd(ctxt ParserCtxtPtr, fd c.Int, URL *c.Char, encoding *c.Char, options c.Int) HtmlDocPtr
+
+//go:linkname HtmlCtxtReadIO C.htmlCtxtReadIO
+func HtmlCtxtReadIO(ctxt ParserCtxtPtr, ioread InputReadCallback, ioclose InputCloseCallback, ioctx c.Pointer, URL *c.Char, encoding *c.Char, options c.Int) HtmlDocPtr
+
+type HtmlStatus c.Int
+
+const (
+ HTML_NA HtmlStatus = 0
+ HTML_INVALID HtmlStatus = 1
+ HTML_DEPRECATED HtmlStatus = 2
+ HTML_VALID HtmlStatus = 4
+ HTML_REQUIRED HtmlStatus = 12
+)
+
+/* Using htmlElemDesc rather than name here, to emphasise the fact
+ that otherwise there's a lookup overhead
+*/
+// llgo:link (*HtmlElemDesc).HtmlAttrAllowed C.htmlAttrAllowed
+func (recv_ *HtmlElemDesc) HtmlAttrAllowed(*Char, c.Int) HtmlStatus {
+ return 0
+}
+
+// llgo:link (*HtmlElemDesc).HtmlElementAllowedHere C.htmlElementAllowedHere
+func (recv_ *HtmlElemDesc) HtmlElementAllowedHere(*Char) c.Int {
+ return 0
+}
+
+// llgo:link (*HtmlElemDesc).HtmlElementStatusHere C.htmlElementStatusHere
+func (recv_ *HtmlElemDesc) HtmlElementStatusHere(*HtmlElemDesc) HtmlStatus {
+ return 0
+}
+
+//go:linkname HtmlNodeStatus C.htmlNodeStatus
+func HtmlNodeStatus(HtmlNodePtr, c.Int) HtmlStatus
diff --git a/libxml2/HTMLtree.go b/libxml2/HTMLtree.go
new file mode 100644
index 0000000..0e032ce
--- /dev/null
+++ b/libxml2/HTMLtree.go
@@ -0,0 +1,66 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+// llgo:link (*Char).HtmlNewDoc C.htmlNewDoc
+func (recv_ *Char) HtmlNewDoc(ExternalID *Char) HtmlDocPtr {
+ return nil
+}
+
+// llgo:link (*Char).HtmlNewDocNoDtD C.htmlNewDocNoDtD
+func (recv_ *Char) HtmlNewDocNoDtD(ExternalID *Char) HtmlDocPtr {
+ return nil
+}
+
+//go:linkname HtmlGetMetaEncoding C.htmlGetMetaEncoding
+func HtmlGetMetaEncoding(doc HtmlDocPtr) *Char
+
+//go:linkname HtmlSetMetaEncoding C.htmlSetMetaEncoding
+func HtmlSetMetaEncoding(doc HtmlDocPtr, encoding *Char) c.Int
+
+//go:linkname HtmlDocDumpMemory C.htmlDocDumpMemory
+func HtmlDocDumpMemory(cur DocPtr, mem **Char, size *c.Int)
+
+//go:linkname HtmlDocDumpMemoryFormat C.htmlDocDumpMemoryFormat
+func HtmlDocDumpMemoryFormat(cur DocPtr, mem **Char, size *c.Int, format c.Int)
+
+//go:linkname HtmlDocDump C.htmlDocDump
+func HtmlDocDump(f *c.FILE, cur DocPtr) c.Int
+
+//go:linkname HtmlSaveFile C.htmlSaveFile
+func HtmlSaveFile(filename *c.Char, cur DocPtr) c.Int
+
+//go:linkname HtmlNodeDump C.htmlNodeDump
+func HtmlNodeDump(buf BufferPtr, doc DocPtr, cur NodePtr) c.Int
+
+//go:linkname HtmlNodeDumpFile C.htmlNodeDumpFile
+func HtmlNodeDumpFile(out *c.FILE, doc DocPtr, cur NodePtr)
+
+//go:linkname HtmlNodeDumpFileFormat C.htmlNodeDumpFileFormat
+func HtmlNodeDumpFileFormat(out *c.FILE, doc DocPtr, cur NodePtr, encoding *c.Char, format c.Int) c.Int
+
+//go:linkname HtmlSaveFileEnc C.htmlSaveFileEnc
+func HtmlSaveFileEnc(filename *c.Char, cur DocPtr, encoding *c.Char) c.Int
+
+//go:linkname HtmlSaveFileFormat C.htmlSaveFileFormat
+func HtmlSaveFileFormat(filename *c.Char, cur DocPtr, encoding *c.Char, format c.Int) c.Int
+
+//go:linkname HtmlNodeDumpFormatOutput C.htmlNodeDumpFormatOutput
+func HtmlNodeDumpFormatOutput(buf OutputBufferPtr, doc DocPtr, cur NodePtr, encoding *c.Char, format c.Int)
+
+//go:linkname HtmlDocContentDumpOutput C.htmlDocContentDumpOutput
+func HtmlDocContentDumpOutput(buf OutputBufferPtr, cur DocPtr, encoding *c.Char)
+
+//go:linkname HtmlDocContentDumpFormatOutput C.htmlDocContentDumpFormatOutput
+func HtmlDocContentDumpFormatOutput(buf OutputBufferPtr, cur DocPtr, encoding *c.Char, format c.Int)
+
+//go:linkname HtmlNodeDumpOutput C.htmlNodeDumpOutput
+func HtmlNodeDumpOutput(buf OutputBufferPtr, doc DocPtr, cur NodePtr, encoding *c.Char)
+
+// llgo:link (*Char).HtmlIsBooleanAttr C.htmlIsBooleanAttr
+func (recv_ *Char) HtmlIsBooleanAttr() c.Int {
+ return 0
+}
diff --git a/libxml2/SAX.go b/libxml2/SAX.go
new file mode 100644
index 0000000..d61a63c
--- /dev/null
+++ b/libxml2/SAX.go
@@ -0,0 +1,116 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+//go:linkname GetPublicId C.getPublicId
+func GetPublicId(ctx c.Pointer) *Char
+
+//go:linkname GetSystemId C.getSystemId
+func GetSystemId(ctx c.Pointer) *Char
+
+//go:linkname SetDocumentLocator C.setDocumentLocator
+func SetDocumentLocator(ctx c.Pointer, loc SAXLocatorPtr)
+
+//go:linkname GetLineNumber C.getLineNumber
+func GetLineNumber(ctx c.Pointer) c.Int
+
+//go:linkname GetColumnNumber C.getColumnNumber
+func GetColumnNumber(ctx c.Pointer) c.Int
+
+//go:linkname IsStandalone C.isStandalone
+func IsStandalone(ctx c.Pointer) c.Int
+
+//go:linkname HasInternalSubset C.hasInternalSubset
+func HasInternalSubset(ctx c.Pointer) c.Int
+
+//go:linkname HasExternalSubset C.hasExternalSubset
+func HasExternalSubset(ctx c.Pointer) c.Int
+
+//go:linkname InternalSubset C.internalSubset
+func InternalSubset(ctx c.Pointer, name *Char, ExternalID *Char, SystemID *Char)
+
+//go:linkname ExternalSubset C.externalSubset
+func ExternalSubset(ctx c.Pointer, name *Char, ExternalID *Char, SystemID *Char)
+
+//go:linkname GetEntity C.getEntity
+func GetEntity(ctx c.Pointer, name *Char) EntityPtr
+
+//go:linkname GetParameterEntity__1 C.getParameterEntity
+func GetParameterEntity__1(ctx c.Pointer, name *Char) EntityPtr
+
+//go:linkname ResolveEntity C.resolveEntity
+func ResolveEntity(ctx c.Pointer, publicId *Char, systemId *Char) ParserInputPtr
+
+//go:linkname EntityDecl C.entityDecl
+func EntityDecl(ctx c.Pointer, name *Char, type_ c.Int, publicId *Char, systemId *Char, content *Char)
+
+//go:linkname AttributeDecl C.attributeDecl
+func AttributeDecl(ctx c.Pointer, elem *Char, fullname *Char, type_ c.Int, def c.Int, defaultValue *Char, tree EnumerationPtr)
+
+//go:linkname ElementDecl C.elementDecl
+func ElementDecl(ctx c.Pointer, name *Char, type_ c.Int, content ElementContentPtr)
+
+//go:linkname NotationDecl C.notationDecl
+func NotationDecl(ctx c.Pointer, name *Char, publicId *Char, systemId *Char)
+
+//go:linkname UnparsedEntityDecl C.unparsedEntityDecl
+func UnparsedEntityDecl(ctx c.Pointer, name *Char, publicId *Char, systemId *Char, notationName *Char)
+
+//go:linkname StartDocument C.startDocument
+func StartDocument(ctx c.Pointer)
+
+//go:linkname EndDocument C.endDocument
+func EndDocument(ctx c.Pointer)
+
+//go:linkname GetAttribute C.attribute
+func GetAttribute(ctx c.Pointer, fullname *Char, value *Char)
+
+//go:linkname StartElement C.startElement
+func StartElement(ctx c.Pointer, fullname *Char, atts **Char)
+
+//go:linkname EndElement C.endElement
+func EndElement(ctx c.Pointer, name *Char)
+
+//go:linkname Reference C.reference
+func Reference(ctx c.Pointer, name *Char)
+
+//go:linkname Characters C.characters
+func Characters(ctx c.Pointer, ch *Char, len c.Int)
+
+//go:linkname IgnorableWhitespace C.ignorableWhitespace
+func IgnorableWhitespace(ctx c.Pointer, ch *Char, len c.Int)
+
+//go:linkname ProcessingInstruction C.processingInstruction
+func ProcessingInstruction(ctx c.Pointer, target *Char, data *Char)
+
+//go:linkname GlobalNamespace C.globalNamespace
+func GlobalNamespace(ctx c.Pointer, href *Char, prefix *Char)
+
+//go:linkname SetNamespace C.setNamespace
+func SetNamespace(ctx c.Pointer, name *Char)
+
+//go:linkname GetNamespace C.getNamespace
+func GetNamespace(ctx c.Pointer) NsPtr
+
+//go:linkname CheckNamespace C.checkNamespace
+func CheckNamespace(ctx c.Pointer, nameSpace *Char) c.Int
+
+//go:linkname NamespaceDecl C.namespaceDecl
+func NamespaceDecl(ctx c.Pointer, href *Char, prefix *Char)
+
+//go:linkname Comment C.comment
+func Comment(ctx c.Pointer, value *Char)
+
+//go:linkname CdataBlock C.cdataBlock
+func CdataBlock(ctx c.Pointer, value *Char, len c.Int)
+
+// llgo:link (*SAXHandlerV1).InitxmlDefaultSAXHandler C.initxmlDefaultSAXHandler
+func (recv_ *SAXHandlerV1) InitxmlDefaultSAXHandler(warning c.Int) {
+}
+
+// llgo:link (*SAXHandlerV1).InithtmlDefaultSAXHandler C.inithtmlDefaultSAXHandler
+func (recv_ *SAXHandlerV1) InithtmlDefaultSAXHandler() {
+}
diff --git a/libxml2/SAX2.go b/libxml2/SAX2.go
new file mode 100644
index 0000000..471cf2b
--- /dev/null
+++ b/libxml2/SAX2.go
@@ -0,0 +1,118 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+//go:linkname SAX2GetPublicId C.xmlSAX2GetPublicId
+func SAX2GetPublicId(ctx c.Pointer) *Char
+
+//go:linkname SAX2GetSystemId C.xmlSAX2GetSystemId
+func SAX2GetSystemId(ctx c.Pointer) *Char
+
+//go:linkname SAX2SetDocumentLocator C.xmlSAX2SetDocumentLocator
+func SAX2SetDocumentLocator(ctx c.Pointer, loc SAXLocatorPtr)
+
+//go:linkname SAX2GetLineNumber C.xmlSAX2GetLineNumber
+func SAX2GetLineNumber(ctx c.Pointer) c.Int
+
+//go:linkname SAX2GetColumnNumber C.xmlSAX2GetColumnNumber
+func SAX2GetColumnNumber(ctx c.Pointer) c.Int
+
+//go:linkname SAX2IsStandalone C.xmlSAX2IsStandalone
+func SAX2IsStandalone(ctx c.Pointer) c.Int
+
+//go:linkname SAX2HasInternalSubset C.xmlSAX2HasInternalSubset
+func SAX2HasInternalSubset(ctx c.Pointer) c.Int
+
+//go:linkname SAX2HasExternalSubset C.xmlSAX2HasExternalSubset
+func SAX2HasExternalSubset(ctx c.Pointer) c.Int
+
+//go:linkname SAX2InternalSubset C.xmlSAX2InternalSubset
+func SAX2InternalSubset(ctx c.Pointer, name *Char, ExternalID *Char, SystemID *Char)
+
+//go:linkname SAX2ExternalSubset C.xmlSAX2ExternalSubset
+func SAX2ExternalSubset(ctx c.Pointer, name *Char, ExternalID *Char, SystemID *Char)
+
+//go:linkname SAX2GetEntity C.xmlSAX2GetEntity
+func SAX2GetEntity(ctx c.Pointer, name *Char) EntityPtr
+
+//go:linkname SAX2GetParameterEntity C.xmlSAX2GetParameterEntity
+func SAX2GetParameterEntity(ctx c.Pointer, name *Char) EntityPtr
+
+//go:linkname SAX2ResolveEntity C.xmlSAX2ResolveEntity
+func SAX2ResolveEntity(ctx c.Pointer, publicId *Char, systemId *Char) ParserInputPtr
+
+//go:linkname SAX2EntityDecl C.xmlSAX2EntityDecl
+func SAX2EntityDecl(ctx c.Pointer, name *Char, type_ c.Int, publicId *Char, systemId *Char, content *Char)
+
+//go:linkname SAX2AttributeDecl C.xmlSAX2AttributeDecl
+func SAX2AttributeDecl(ctx c.Pointer, elem *Char, fullname *Char, type_ c.Int, def c.Int, defaultValue *Char, tree EnumerationPtr)
+
+//go:linkname SAX2ElementDecl C.xmlSAX2ElementDecl
+func SAX2ElementDecl(ctx c.Pointer, name *Char, type_ c.Int, content ElementContentPtr)
+
+//go:linkname SAX2NotationDecl C.xmlSAX2NotationDecl
+func SAX2NotationDecl(ctx c.Pointer, name *Char, publicId *Char, systemId *Char)
+
+//go:linkname SAX2UnparsedEntityDecl C.xmlSAX2UnparsedEntityDecl
+func SAX2UnparsedEntityDecl(ctx c.Pointer, name *Char, publicId *Char, systemId *Char, notationName *Char)
+
+//go:linkname SAX2StartDocument C.xmlSAX2StartDocument
+func SAX2StartDocument(ctx c.Pointer)
+
+//go:linkname SAX2EndDocument C.xmlSAX2EndDocument
+func SAX2EndDocument(ctx c.Pointer)
+
+//go:linkname SAX2StartElement C.xmlSAX2StartElement
+func SAX2StartElement(ctx c.Pointer, fullname *Char, atts **Char)
+
+//go:linkname SAX2EndElement C.xmlSAX2EndElement
+func SAX2EndElement(ctx c.Pointer, name *Char)
+
+//go:linkname SAX2StartElementNs C.xmlSAX2StartElementNs
+func SAX2StartElementNs(ctx c.Pointer, localname *Char, prefix *Char, URI *Char, nb_namespaces c.Int, namespaces **Char, nb_attributes c.Int, nb_defaulted c.Int, attributes **Char)
+
+//go:linkname SAX2EndElementNs C.xmlSAX2EndElementNs
+func SAX2EndElementNs(ctx c.Pointer, localname *Char, prefix *Char, URI *Char)
+
+//go:linkname SAX2Reference C.xmlSAX2Reference
+func SAX2Reference(ctx c.Pointer, name *Char)
+
+//go:linkname SAX2Characters C.xmlSAX2Characters
+func SAX2Characters(ctx c.Pointer, ch *Char, len c.Int)
+
+//go:linkname SAX2IgnorableWhitespace C.xmlSAX2IgnorableWhitespace
+func SAX2IgnorableWhitespace(ctx c.Pointer, ch *Char, len c.Int)
+
+//go:linkname SAX2ProcessingInstruction C.xmlSAX2ProcessingInstruction
+func SAX2ProcessingInstruction(ctx c.Pointer, target *Char, data *Char)
+
+//go:linkname SAX2Comment C.xmlSAX2Comment
+func SAX2Comment(ctx c.Pointer, value *Char)
+
+//go:linkname SAX2CDataBlock C.xmlSAX2CDataBlock
+func SAX2CDataBlock(ctx c.Pointer, value *Char, len c.Int)
+
+//go:linkname SAXDefaultVersion C.xmlSAXDefaultVersion
+func SAXDefaultVersion(version c.Int) c.Int
+
+// llgo:link (*SAXHandler).SAXVersion C.xmlSAXVersion
+func (recv_ *SAXHandler) SAXVersion(version c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*SAXHandler).SAX2InitDefaultSAXHandler C.xmlSAX2InitDefaultSAXHandler
+func (recv_ *SAXHandler) SAX2InitDefaultSAXHandler(warning c.Int) {
+}
+
+// llgo:link (*SAXHandler).SAX2InitHtmlDefaultSAXHandler C.xmlSAX2InitHtmlDefaultSAXHandler
+func (recv_ *SAXHandler) SAX2InitHtmlDefaultSAXHandler() {
+}
+
+//go:linkname HtmlDefaultSAXHandlerInit C.htmlDefaultSAXHandlerInit
+func HtmlDefaultSAXHandlerInit()
+
+//go:linkname DefaultSAXHandlerInit C.xmlDefaultSAXHandlerInit
+func DefaultSAXHandlerInit()
diff --git a/libxml2/_demo/hello/hello.go b/libxml2/_demo/hello/hello.go
new file mode 100644
index 0000000..0737bb3
--- /dev/null
+++ b/libxml2/_demo/hello/hello.go
@@ -0,0 +1,23 @@
+package main
+
+import (
+ "unsafe"
+
+ "github.com/goplus/llpkg/libxml2"
+
+ "github.com/goplus/lib/c"
+)
+
+func main() {
+ libxml2.InitParser()
+ xml := "Alice25"
+ doc := libxml2.ReadMemory((*int8)(unsafe.Pointer(unsafe.StringData(xml))), c.Int(len(xml)), nil, nil, 0)
+ if doc == nil {
+ panic("Failed to parse XML")
+ }
+ docPtr := (*libxml2.Doc)(unsafe.Pointer(doc))
+ root := docPtr.DocGetRootElement()
+ c.Printf(c.Str("Root element: %s\n"), root.Name)
+ libxml2.FreeDoc(doc)
+ libxml2.CleanupParser()
+}
diff --git a/libxml2/c14n.go b/libxml2/c14n.go
new file mode 100644
index 0000000..37da7f3
--- /dev/null
+++ b/libxml2/c14n.go
@@ -0,0 +1,29 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type C14NMode c.Int
+
+const (
+ C14N_1_0 C14NMode = 0
+ C14N_EXCLUSIVE_1_0 C14NMode = 1
+ C14N_1_1 C14NMode = 2
+)
+
+//go:linkname C14NDocSaveTo C.xmlC14NDocSaveTo
+func C14NDocSaveTo(doc DocPtr, nodes NodeSetPtr, mode c.Int, inclusive_ns_prefixes **Char, with_comments c.Int, buf OutputBufferPtr) c.Int
+
+//go:linkname C14NDocDumpMemory C.xmlC14NDocDumpMemory
+func C14NDocDumpMemory(doc DocPtr, nodes NodeSetPtr, mode c.Int, inclusive_ns_prefixes **Char, with_comments c.Int, doc_txt_ptr **Char) c.Int
+
+//go:linkname C14NDocSave C.xmlC14NDocSave
+func C14NDocSave(doc DocPtr, nodes NodeSetPtr, mode c.Int, inclusive_ns_prefixes **Char, with_comments c.Int, filename *c.Char, compression c.Int) c.Int
+
+// llgo:type C
+type C14NIsVisibleCallback func(c.Pointer, NodePtr, NodePtr) c.Int
+
+//go:linkname C14NExecute C.xmlC14NExecute
+func C14NExecute(doc DocPtr, is_visible_callback C14NIsVisibleCallback, user_data c.Pointer, mode c.Int, inclusive_ns_prefixes **Char, with_comments c.Int, buf OutputBufferPtr) c.Int
diff --git a/libxml2/catalog.go b/libxml2/catalog.go
new file mode 100644
index 0000000..36d1c01
--- /dev/null
+++ b/libxml2/catalog.go
@@ -0,0 +1,170 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type CatalogPrefer c.Int
+
+const (
+ CATA_PREFER_NONE CatalogPrefer = 0
+ CATA_PREFER_PUBLIC CatalogPrefer = 1
+ CATA_PREFER_SYSTEM CatalogPrefer = 2
+)
+
+type CatalogAllow c.Int
+
+const (
+ CATA_ALLOW_NONE CatalogAllow = 0
+ CATA_ALLOW_GLOBAL CatalogAllow = 1
+ CATA_ALLOW_DOCUMENT CatalogAllow = 2
+ CATA_ALLOW_ALL CatalogAllow = 3
+)
+
+type X_xmlCatalog struct {
+ Unused [8]uint8
+}
+type Catalog X_xmlCatalog
+type CatalogPtr *Catalog
+
+/*
+ * Operations on a given catalog.
+ */
+//go:linkname NewCatalog C.xmlNewCatalog
+func NewCatalog(sgml c.Int) CatalogPtr
+
+//go:linkname LoadACatalog C.xmlLoadACatalog
+func LoadACatalog(filename *c.Char) CatalogPtr
+
+//go:linkname LoadSGMLSuperCatalog C.xmlLoadSGMLSuperCatalog
+func LoadSGMLSuperCatalog(filename *c.Char) CatalogPtr
+
+//go:linkname ConvertSGMLCatalog C.xmlConvertSGMLCatalog
+func ConvertSGMLCatalog(catal CatalogPtr) c.Int
+
+//go:linkname ACatalogAdd C.xmlACatalogAdd
+func ACatalogAdd(catal CatalogPtr, type_ *Char, orig *Char, replace *Char) c.Int
+
+//go:linkname ACatalogRemove C.xmlACatalogRemove
+func ACatalogRemove(catal CatalogPtr, value *Char) c.Int
+
+//go:linkname ACatalogResolve C.xmlACatalogResolve
+func ACatalogResolve(catal CatalogPtr, pubID *Char, sysID *Char) *Char
+
+//go:linkname ACatalogResolveSystem C.xmlACatalogResolveSystem
+func ACatalogResolveSystem(catal CatalogPtr, sysID *Char) *Char
+
+//go:linkname ACatalogResolvePublic C.xmlACatalogResolvePublic
+func ACatalogResolvePublic(catal CatalogPtr, pubID *Char) *Char
+
+//go:linkname ACatalogResolveURI C.xmlACatalogResolveURI
+func ACatalogResolveURI(catal CatalogPtr, URI *Char) *Char
+
+//go:linkname ACatalogDump C.xmlACatalogDump
+func ACatalogDump(catal CatalogPtr, out *c.FILE)
+
+//go:linkname FreeCatalog C.xmlFreeCatalog
+func FreeCatalog(catal CatalogPtr)
+
+//go:linkname CatalogIsEmpty C.xmlCatalogIsEmpty
+func CatalogIsEmpty(catal CatalogPtr) c.Int
+
+/*
+ * Global operations.
+ */
+//go:linkname InitializeCatalog C.xmlInitializeCatalog
+func InitializeCatalog()
+
+//go:linkname LoadCatalog C.xmlLoadCatalog
+func LoadCatalog(filename *c.Char) c.Int
+
+//go:linkname LoadCatalogs C.xmlLoadCatalogs
+func LoadCatalogs(paths *c.Char)
+
+//go:linkname CatalogCleanup C.xmlCatalogCleanup
+func CatalogCleanup()
+
+//go:linkname CatalogDump C.xmlCatalogDump
+func CatalogDump(out *c.FILE)
+
+// llgo:link (*Char).CatalogResolve C.xmlCatalogResolve
+func (recv_ *Char) CatalogResolve(sysID *Char) *Char {
+ return nil
+}
+
+// llgo:link (*Char).CatalogResolveSystem C.xmlCatalogResolveSystem
+func (recv_ *Char) CatalogResolveSystem() *Char {
+ return nil
+}
+
+// llgo:link (*Char).CatalogResolvePublic C.xmlCatalogResolvePublic
+func (recv_ *Char) CatalogResolvePublic() *Char {
+ return nil
+}
+
+// llgo:link (*Char).CatalogResolveURI C.xmlCatalogResolveURI
+func (recv_ *Char) CatalogResolveURI() *Char {
+ return nil
+}
+
+// llgo:link (*Char).CatalogAdd C.xmlCatalogAdd
+func (recv_ *Char) CatalogAdd(orig *Char, replace *Char) c.Int {
+ return 0
+}
+
+// llgo:link (*Char).CatalogRemove C.xmlCatalogRemove
+func (recv_ *Char) CatalogRemove() c.Int {
+ return 0
+}
+
+//go:linkname ParseCatalogFile C.xmlParseCatalogFile
+func ParseCatalogFile(filename *c.Char) DocPtr
+
+//go:linkname CatalogConvert C.xmlCatalogConvert
+func CatalogConvert() c.Int
+
+/*
+ * Strictly minimal interfaces for per-document catalogs used
+ * by the parser.
+ */
+//go:linkname CatalogFreeLocal C.xmlCatalogFreeLocal
+func CatalogFreeLocal(catalogs c.Pointer)
+
+//go:linkname CatalogAddLocal C.xmlCatalogAddLocal
+func CatalogAddLocal(catalogs c.Pointer, URL *Char) c.Pointer
+
+//go:linkname CatalogLocalResolve C.xmlCatalogLocalResolve
+func CatalogLocalResolve(catalogs c.Pointer, pubID *Char, sysID *Char) *Char
+
+//go:linkname CatalogLocalResolveURI C.xmlCatalogLocalResolveURI
+func CatalogLocalResolveURI(catalogs c.Pointer, URI *Char) *Char
+
+/*
+ * Preference settings.
+ */
+//go:linkname CatalogSetDebug C.xmlCatalogSetDebug
+func CatalogSetDebug(level c.Int) c.Int
+
+// llgo:link CatalogPrefer.CatalogSetDefaultPrefer C.xmlCatalogSetDefaultPrefer
+func (recv_ CatalogPrefer) CatalogSetDefaultPrefer() CatalogPrefer {
+ return 0
+}
+
+// llgo:link CatalogAllow.CatalogSetDefaults C.xmlCatalogSetDefaults
+func (recv_ CatalogAllow) CatalogSetDefaults() {
+}
+
+//go:linkname CatalogGetDefaults C.xmlCatalogGetDefaults
+func CatalogGetDefaults() CatalogAllow
+
+/* DEPRECATED interfaces */
+// llgo:link (*Char).CatalogGetSystem C.xmlCatalogGetSystem
+func (recv_ *Char) CatalogGetSystem() *Char {
+ return nil
+}
+
+// llgo:link (*Char).CatalogGetPublic C.xmlCatalogGetPublic
+func (recv_ *Char) CatalogGetPublic() *Char {
+ return nil
+}
diff --git a/libxml2/chvalid.go b/libxml2/chvalid.go
new file mode 100644
index 0000000..5c2024c
--- /dev/null
+++ b/libxml2/chvalid.go
@@ -0,0 +1,59 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type X_xmlChSRange struct {
+ Low uint16
+ High uint16
+}
+type ChSRange X_xmlChSRange
+type ChSRangePtr *ChSRange
+
+type X_xmlChLRange struct {
+ Low c.Uint
+ High c.Uint
+}
+type ChLRange X_xmlChLRange
+type ChLRangePtr *ChLRange
+
+type X_xmlChRangeGroup struct {
+ NbShortRange c.Int
+ NbLongRange c.Int
+ ShortRange *ChSRange
+ LongRange *ChLRange
+}
+type ChRangeGroup X_xmlChRangeGroup
+type ChRangeGroupPtr *ChRangeGroup
+
+/**
+ * Range checking routine
+ */
+//go:linkname CharInRange C.xmlCharInRange
+func CharInRange(val c.Uint, group *ChRangeGroup) c.Int
+
+//go:linkname IsBaseChar C.xmlIsBaseChar
+func IsBaseChar(ch c.Uint) c.Int
+
+//go:linkname IsBlank C.xmlIsBlank
+func IsBlank(ch c.Uint) c.Int
+
+//go:linkname IsChar C.xmlIsChar
+func IsChar(ch c.Uint) c.Int
+
+//go:linkname IsCombining C.xmlIsCombining
+func IsCombining(ch c.Uint) c.Int
+
+//go:linkname IsDigit C.xmlIsDigit
+func IsDigit(ch c.Uint) c.Int
+
+//go:linkname IsExtender C.xmlIsExtender
+func IsExtender(ch c.Uint) c.Int
+
+//go:linkname IsIdeographic C.xmlIsIdeographic
+func IsIdeographic(ch c.Uint) c.Int
+
+//go:linkname IsPubidChar C.xmlIsPubidChar
+func IsPubidChar(ch c.Uint) c.Int
diff --git a/libxml2/debugXML.go b/libxml2/debugXML.go
new file mode 100644
index 0000000..332c6ca
--- /dev/null
+++ b/libxml2/debugXML.go
@@ -0,0 +1,124 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+/*
+ * The standard Dump routines.
+ */
+//go:linkname DebugDumpString C.xmlDebugDumpString
+func DebugDumpString(output *c.FILE, str *Char)
+
+//go:linkname DebugDumpAttr C.xmlDebugDumpAttr
+func DebugDumpAttr(output *c.FILE, attr AttrPtr, depth c.Int)
+
+//go:linkname DebugDumpAttrList C.xmlDebugDumpAttrList
+func DebugDumpAttrList(output *c.FILE, attr AttrPtr, depth c.Int)
+
+//go:linkname DebugDumpOneNode C.xmlDebugDumpOneNode
+func DebugDumpOneNode(output *c.FILE, node NodePtr, depth c.Int)
+
+//go:linkname DebugDumpNode C.xmlDebugDumpNode
+func DebugDumpNode(output *c.FILE, node NodePtr, depth c.Int)
+
+//go:linkname DebugDumpNodeList C.xmlDebugDumpNodeList
+func DebugDumpNodeList(output *c.FILE, node NodePtr, depth c.Int)
+
+//go:linkname DebugDumpDocumentHead C.xmlDebugDumpDocumentHead
+func DebugDumpDocumentHead(output *c.FILE, doc DocPtr)
+
+//go:linkname DebugDumpDocument C.xmlDebugDumpDocument
+func DebugDumpDocument(output *c.FILE, doc DocPtr)
+
+//go:linkname DebugDumpDTD C.xmlDebugDumpDTD
+func DebugDumpDTD(output *c.FILE, dtd DtdPtr)
+
+//go:linkname DebugDumpEntities C.xmlDebugDumpEntities
+func DebugDumpEntities(output *c.FILE, doc DocPtr)
+
+/****************************************************************
+ * *
+ * Checking routines *
+ * *
+ ****************************************************************/
+//go:linkname DebugCheckDocument C.xmlDebugCheckDocument
+func DebugCheckDocument(output *c.FILE, doc DocPtr) c.Int
+
+/****************************************************************
+ * *
+ * XML shell helpers *
+ * *
+ ****************************************************************/
+//go:linkname LsOneNode C.xmlLsOneNode
+func LsOneNode(output *c.FILE, node NodePtr)
+
+//go:linkname LsCountNode C.xmlLsCountNode
+func LsCountNode(node NodePtr) c.Int
+
+//go:linkname BoolToText C.xmlBoolToText
+func BoolToText(boolval c.Int) *c.Char
+
+// llgo:type C
+type ShellReadlineFunc func(*c.Char) *c.Char
+
+type X_xmlShellCtxt struct {
+ Filename *c.Char
+ Doc DocPtr
+ Node NodePtr
+ Pctxt XPathContextPtr
+ Loaded c.Int
+ Output *c.FILE
+ Input ShellReadlineFunc
+}
+type ShellCtxt X_xmlShellCtxt
+type ShellCtxtPtr *ShellCtxt
+
+// llgo:type C
+type ShellCmd func(ShellCtxtPtr, *c.Char, NodePtr, NodePtr) c.Int
+
+//go:linkname ShellPrintXPathError C.xmlShellPrintXPathError
+func ShellPrintXPathError(errorType c.Int, arg *c.Char)
+
+//go:linkname ShellPrintXPathResult C.xmlShellPrintXPathResult
+func ShellPrintXPathResult(list XPathObjectPtr)
+
+//go:linkname ShellList C.xmlShellList
+func ShellList(ctxt ShellCtxtPtr, arg *c.Char, node NodePtr, node2 NodePtr) c.Int
+
+//go:linkname ShellBase C.xmlShellBase
+func ShellBase(ctxt ShellCtxtPtr, arg *c.Char, node NodePtr, node2 NodePtr) c.Int
+
+//go:linkname ShellDir C.xmlShellDir
+func ShellDir(ctxt ShellCtxtPtr, arg *c.Char, node NodePtr, node2 NodePtr) c.Int
+
+//go:linkname ShellLoad C.xmlShellLoad
+func ShellLoad(ctxt ShellCtxtPtr, filename *c.Char, node NodePtr, node2 NodePtr) c.Int
+
+//go:linkname ShellPrintNode C.xmlShellPrintNode
+func ShellPrintNode(node NodePtr)
+
+//go:linkname ShellCat C.xmlShellCat
+func ShellCat(ctxt ShellCtxtPtr, arg *c.Char, node NodePtr, node2 NodePtr) c.Int
+
+//go:linkname ShellWrite C.xmlShellWrite
+func ShellWrite(ctxt ShellCtxtPtr, filename *c.Char, node NodePtr, node2 NodePtr) c.Int
+
+//go:linkname ShellSave C.xmlShellSave
+func ShellSave(ctxt ShellCtxtPtr, filename *c.Char, node NodePtr, node2 NodePtr) c.Int
+
+//go:linkname ShellValidate C.xmlShellValidate
+func ShellValidate(ctxt ShellCtxtPtr, dtd *c.Char, node NodePtr, node2 NodePtr) c.Int
+
+//go:linkname ShellDu C.xmlShellDu
+func ShellDu(ctxt ShellCtxtPtr, arg *c.Char, tree NodePtr, node2 NodePtr) c.Int
+
+//go:linkname ShellPwd C.xmlShellPwd
+func ShellPwd(ctxt ShellCtxtPtr, buffer *c.Char, node NodePtr, node2 NodePtr) c.Int
+
+/*
+ * The Shell interface.
+ */
+//go:linkname Shell C.xmlShell
+func Shell(doc DocPtr, filename *c.Char, input ShellReadlineFunc, output *c.FILE)
diff --git a/libxml2/dict.go b/libxml2/dict.go
new file mode 100644
index 0000000..0c232ba
--- /dev/null
+++ b/libxml2/dict.go
@@ -0,0 +1,60 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type Dict X_xmlDict
+type DictPtr *Dict
+
+/*
+ * Initializer
+ */
+//go:linkname InitializeDict C.xmlInitializeDict
+func InitializeDict() c.Int
+
+/*
+ * Constructor and destructor.
+ */
+//go:linkname DictCreate C.xmlDictCreate
+func DictCreate() DictPtr
+
+//go:linkname DictSetLimit C.xmlDictSetLimit
+func DictSetLimit(dict DictPtr, limit c.SizeT) c.SizeT
+
+//go:linkname DictGetUsage C.xmlDictGetUsage
+func DictGetUsage(dict DictPtr) c.SizeT
+
+//go:linkname DictCreateSub C.xmlDictCreateSub
+func DictCreateSub(sub DictPtr) DictPtr
+
+//go:linkname DictReference C.xmlDictReference
+func DictReference(dict DictPtr) c.Int
+
+//go:linkname DictFree C.xmlDictFree
+func DictFree(dict DictPtr)
+
+/*
+ * Lookup of entry in the dictionary.
+ */
+//go:linkname DictLookup C.xmlDictLookup
+func DictLookup(dict DictPtr, name *Char, len c.Int) *Char
+
+//go:linkname DictExists C.xmlDictExists
+func DictExists(dict DictPtr, name *Char, len c.Int) *Char
+
+//go:linkname DictQLookup C.xmlDictQLookup
+func DictQLookup(dict DictPtr, prefix *Char, name *Char) *Char
+
+//go:linkname DictOwns C.xmlDictOwns
+func DictOwns(dict DictPtr, str *Char) c.Int
+
+//go:linkname DictSize C.xmlDictSize
+func DictSize(dict DictPtr) c.Int
+
+/*
+ * Cleanup function
+ */
+//go:linkname DictCleanup C.xmlDictCleanup
+func DictCleanup()
diff --git a/libxml2/encoding.go b/libxml2/encoding.go
new file mode 100644
index 0000000..d80cb37
--- /dev/null
+++ b/libxml2/encoding.go
@@ -0,0 +1,150 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type CharEncError c.Int
+
+const (
+ ENC_ERR_SUCCESS CharEncError = 0
+ ENC_ERR_SPACE CharEncError = -1
+ ENC_ERR_INPUT CharEncError = -2
+ ENC_ERR_PARTIAL CharEncError = -3
+ ENC_ERR_INTERNAL CharEncError = -4
+ ENC_ERR_MEMORY CharEncError = -5
+)
+
+type CharEncoding c.Int
+
+const (
+ CHAR_ENCODING_ERROR CharEncoding = -1
+ CHAR_ENCODING_NONE CharEncoding = 0
+ CHAR_ENCODING_UTF8 CharEncoding = 1
+ CHAR_ENCODING_UTF16LE CharEncoding = 2
+ CHAR_ENCODING_UTF16BE CharEncoding = 3
+ CHAR_ENCODING_UCS4LE CharEncoding = 4
+ CHAR_ENCODING_UCS4BE CharEncoding = 5
+ CHAR_ENCODING_EBCDIC CharEncoding = 6
+ CHAR_ENCODING_UCS4_2143 CharEncoding = 7
+ CHAR_ENCODING_UCS4_3412 CharEncoding = 8
+ CHAR_ENCODING_UCS2 CharEncoding = 9
+ CHAR_ENCODING_8859_1 CharEncoding = 10
+ CHAR_ENCODING_8859_2 CharEncoding = 11
+ CHAR_ENCODING_8859_3 CharEncoding = 12
+ CHAR_ENCODING_8859_4 CharEncoding = 13
+ CHAR_ENCODING_8859_5 CharEncoding = 14
+ CHAR_ENCODING_8859_6 CharEncoding = 15
+ CHAR_ENCODING_8859_7 CharEncoding = 16
+ CHAR_ENCODING_8859_8 CharEncoding = 17
+ CHAR_ENCODING_8859_9 CharEncoding = 18
+ CHAR_ENCODING_2022_JP CharEncoding = 19
+ CHAR_ENCODING_SHIFT_JIS CharEncoding = 20
+ CHAR_ENCODING_EUC_JP CharEncoding = 21
+ CHAR_ENCODING_ASCII CharEncoding = 22
+)
+
+// llgo:type C
+type CharEncodingInputFunc func(*c.Char, *c.Int, *c.Char, *c.Int) c.Int
+
+// llgo:type C
+type CharEncodingOutputFunc func(*c.Char, *c.Int, *c.Char, *c.Int) c.Int
+
+type X_xmlCharEncodingHandler struct {
+ Name *c.Char
+ Input CharEncodingInputFunc
+ Output CharEncodingOutputFunc
+}
+type CharEncodingHandler X_xmlCharEncodingHandler
+type CharEncodingHandlerPtr *CharEncodingHandler
+
+/*
+ * Interfaces for encoding handlers.
+ */
+//go:linkname InitCharEncodingHandlers C.xmlInitCharEncodingHandlers
+func InitCharEncodingHandlers()
+
+//go:linkname CleanupCharEncodingHandlers C.xmlCleanupCharEncodingHandlers
+func CleanupCharEncodingHandlers()
+
+//go:linkname RegisterCharEncodingHandler C.xmlRegisterCharEncodingHandler
+func RegisterCharEncodingHandler(handler CharEncodingHandlerPtr)
+
+// llgo:link CharEncoding.LookupCharEncodingHandler C.xmlLookupCharEncodingHandler
+func (recv_ CharEncoding) LookupCharEncodingHandler(out *CharEncodingHandlerPtr) c.Int {
+ return 0
+}
+
+//go:linkname OpenCharEncodingHandler C.xmlOpenCharEncodingHandler
+func OpenCharEncodingHandler(name *c.Char, output c.Int, out *CharEncodingHandlerPtr) c.Int
+
+// llgo:link CharEncoding.GetCharEncodingHandler C.xmlGetCharEncodingHandler
+func (recv_ CharEncoding) GetCharEncodingHandler() CharEncodingHandlerPtr {
+ return nil
+}
+
+//go:linkname FindCharEncodingHandler C.xmlFindCharEncodingHandler
+func FindCharEncodingHandler(name *c.Char) CharEncodingHandlerPtr
+
+//go:linkname NewCharEncodingHandler C.xmlNewCharEncodingHandler
+func NewCharEncodingHandler(name *c.Char, input CharEncodingInputFunc, output CharEncodingOutputFunc) CharEncodingHandlerPtr
+
+/*
+ * Interfaces for encoding names and aliases.
+ */
+//go:linkname AddEncodingAlias C.xmlAddEncodingAlias
+func AddEncodingAlias(name *c.Char, alias *c.Char) c.Int
+
+//go:linkname DelEncodingAlias C.xmlDelEncodingAlias
+func DelEncodingAlias(alias *c.Char) c.Int
+
+//go:linkname GetEncodingAlias C.xmlGetEncodingAlias
+func GetEncodingAlias(alias *c.Char) *c.Char
+
+//go:linkname CleanupEncodingAliases C.xmlCleanupEncodingAliases
+func CleanupEncodingAliases()
+
+//go:linkname ParseCharEncoding C.xmlParseCharEncoding
+func ParseCharEncoding(name *c.Char) CharEncoding
+
+// llgo:link CharEncoding.GetCharEncodingName C.xmlGetCharEncodingName
+func (recv_ CharEncoding) GetCharEncodingName() *c.Char {
+ return nil
+}
+
+/*
+ * Interfaces directly used by the parsers.
+ */
+//go:linkname DetectCharEncoding C.xmlDetectCharEncoding
+func DetectCharEncoding(in *c.Char, len c.Int) CharEncoding
+
+/** DOC_ENABLE */
+// llgo:link (*CharEncodingHandler).CharEncOutFunc C.xmlCharEncOutFunc
+func (recv_ *CharEncodingHandler) CharEncOutFunc(out *X_xmlBuffer, in *X_xmlBuffer) c.Int {
+ return 0
+}
+
+// llgo:link (*CharEncodingHandler).CharEncInFunc C.xmlCharEncInFunc
+func (recv_ *CharEncodingHandler) CharEncInFunc(out *X_xmlBuffer, in *X_xmlBuffer) c.Int {
+ return 0
+}
+
+// llgo:link (*CharEncodingHandler).CharEncFirstLine C.xmlCharEncFirstLine
+func (recv_ *CharEncodingHandler) CharEncFirstLine(out *X_xmlBuffer, in *X_xmlBuffer) c.Int {
+ return 0
+}
+
+// llgo:link (*CharEncodingHandler).CharEncCloseFunc C.xmlCharEncCloseFunc
+func (recv_ *CharEncodingHandler) CharEncCloseFunc() c.Int {
+ return 0
+}
+
+/*
+ * Export a few useful functions
+ */
+//go:linkname UTF8Toisolat1 C.UTF8Toisolat1
+func UTF8Toisolat1(out *c.Char, outlen *c.Int, in *c.Char, inlen *c.Int) c.Int
+
+//go:linkname Isolat1ToUTF8 C.isolat1ToUTF8
+func Isolat1ToUTF8(out *c.Char, outlen *c.Int, in *c.Char, inlen *c.Int) c.Int
diff --git a/libxml2/entities.go b/libxml2/entities.go
new file mode 100644
index 0000000..bd28cb5
--- /dev/null
+++ b/libxml2/entities.go
@@ -0,0 +1,86 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type EntityType c.Int
+
+const (
+ INTERNAL_GENERAL_ENTITY EntityType = 1
+ EXTERNAL_GENERAL_PARSED_ENTITY EntityType = 2
+ EXTERNAL_GENERAL_UNPARSED_ENTITY EntityType = 3
+ INTERNAL_PARAMETER_ENTITY EntityType = 4
+ EXTERNAL_PARAMETER_ENTITY EntityType = 5
+ INTERNAL_PREDEFINED_ENTITY EntityType = 6
+)
+
+type EntitiesTable X_xmlHashTable
+type EntitiesTablePtr *EntitiesTable
+
+/*
+ * External functions:
+ */
+//go:linkname InitializePredefinedEntities C.xmlInitializePredefinedEntities
+func InitializePredefinedEntities()
+
+//go:linkname NewEntity C.xmlNewEntity
+func NewEntity(doc DocPtr, name *Char, type_ c.Int, ExternalID *Char, SystemID *Char, content *Char) EntityPtr
+
+//go:linkname FreeEntity C.xmlFreeEntity
+func FreeEntity(entity EntityPtr)
+
+//go:linkname AddEntity C.xmlAddEntity
+func AddEntity(doc DocPtr, extSubset c.Int, name *Char, type_ c.Int, ExternalID *Char, SystemID *Char, content *Char, out *EntityPtr) c.Int
+
+//go:linkname AddDocEntity C.xmlAddDocEntity
+func AddDocEntity(doc DocPtr, name *Char, type_ c.Int, ExternalID *Char, SystemID *Char, content *Char) EntityPtr
+
+//go:linkname AddDtdEntity C.xmlAddDtdEntity
+func AddDtdEntity(doc DocPtr, name *Char, type_ c.Int, ExternalID *Char, SystemID *Char, content *Char) EntityPtr
+
+// llgo:link (*Char).GetPredefinedEntity C.xmlGetPredefinedEntity
+func (recv_ *Char) GetPredefinedEntity() EntityPtr {
+ return nil
+}
+
+// llgo:link (*Doc).GetDocEntity C.xmlGetDocEntity
+func (recv_ *Doc) GetDocEntity(name *Char) EntityPtr {
+ return nil
+}
+
+//go:linkname GetDtdEntity C.xmlGetDtdEntity
+func GetDtdEntity(doc DocPtr, name *Char) EntityPtr
+
+//go:linkname GetParameterEntity C.xmlGetParameterEntity
+func GetParameterEntity(doc DocPtr, name *Char) EntityPtr
+
+//go:linkname EncodeEntities C.xmlEncodeEntities
+func EncodeEntities(doc DocPtr, input *Char) *Char
+
+//go:linkname EncodeEntitiesReentrant C.xmlEncodeEntitiesReentrant
+func EncodeEntitiesReentrant(doc DocPtr, input *Char) *Char
+
+// llgo:link (*Doc).EncodeSpecialChars C.xmlEncodeSpecialChars
+func (recv_ *Doc) EncodeSpecialChars(input *Char) *Char {
+ return nil
+}
+
+//go:linkname CreateEntitiesTable C.xmlCreateEntitiesTable
+func CreateEntitiesTable() EntitiesTablePtr
+
+//go:linkname CopyEntitiesTable C.xmlCopyEntitiesTable
+func CopyEntitiesTable(table EntitiesTablePtr) EntitiesTablePtr
+
+//go:linkname FreeEntitiesTable C.xmlFreeEntitiesTable
+func FreeEntitiesTable(table EntitiesTablePtr)
+
+//go:linkname DumpEntitiesTable C.xmlDumpEntitiesTable
+func DumpEntitiesTable(buf BufferPtr, table EntitiesTablePtr)
+
+//go:linkname DumpEntityDecl C.xmlDumpEntityDecl
+func DumpEntityDecl(buf BufferPtr, ent EntityPtr)
+
+//go:linkname CleanupPredefinedEntities C.xmlCleanupPredefinedEntities
+func CleanupPredefinedEntities()
diff --git a/libxml2/globals.go b/libxml2/globals.go
new file mode 100644
index 0000000..d0f6b23
--- /dev/null
+++ b/libxml2/globals.go
@@ -0,0 +1,15 @@
+package libxml2
+
+import _ "unsafe"
+
+type X_xmlGlobalState struct {
+ Unused [8]uint8
+}
+type GlobalState X_xmlGlobalState
+type GlobalStatePtr *GlobalState
+
+//go:linkname InitializeGlobalState C.xmlInitializeGlobalState
+func InitializeGlobalState(gs GlobalStatePtr)
+
+//go:linkname GetGlobalState C.xmlGetGlobalState
+func GetGlobalState() GlobalStatePtr
diff --git a/libxml2/go.mod b/libxml2/go.mod
new file mode 100644
index 0000000..7227c4f
--- /dev/null
+++ b/libxml2/go.mod
@@ -0,0 +1,5 @@
+module github.com/goplus/llpkg/libxml2
+
+go 1.20
+
+require github.com/goplus/lib v0.2.0
diff --git a/libxml2/go.sum b/libxml2/go.sum
new file mode 100644
index 0000000..512980a
--- /dev/null
+++ b/libxml2/go.sum
@@ -0,0 +1,2 @@
+github.com/goplus/lib v0.2.0 h1:AjqkN1XK5H23wZMMlpaUYAMCDAdSBQ2NMFrLtSh7W4g=
+github.com/goplus/lib v0.2.0/go.mod h1:SgJv3oPqLLHCu0gcL46ejOP3x7/2ry2Jtxu7ta32kp0=
diff --git a/libxml2/hash.go b/libxml2/hash.go
new file mode 100644
index 0000000..a7045f1
--- /dev/null
+++ b/libxml2/hash.go
@@ -0,0 +1,126 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type X_xmlHashTable struct {
+ Unused [8]uint8
+}
+type HashTable X_xmlHashTable
+type HashTablePtr *HashTable
+
+// llgo:type C
+type HashDeallocator func(c.Pointer, *Char)
+
+// llgo:type C
+type HashCopier func(c.Pointer, *Char) c.Pointer
+
+// llgo:type C
+type HashScanner func(c.Pointer, c.Pointer, *Char)
+
+// llgo:type C
+type HashScannerFull func(c.Pointer, c.Pointer, *Char, *Char, *Char)
+
+/*
+ * Constructor and destructor.
+ */
+//go:linkname HashCreate C.xmlHashCreate
+func HashCreate(size c.Int) HashTablePtr
+
+//go:linkname HashCreateDict C.xmlHashCreateDict
+func HashCreateDict(size c.Int, dict DictPtr) HashTablePtr
+
+//go:linkname HashFree C.xmlHashFree
+func HashFree(hash HashTablePtr, dealloc HashDeallocator)
+
+//go:linkname HashDefaultDeallocator C.xmlHashDefaultDeallocator
+func HashDefaultDeallocator(entry c.Pointer, name *Char)
+
+/*
+ * Add a new entry to the hash table.
+ */
+//go:linkname HashAdd C.xmlHashAdd
+func HashAdd(hash HashTablePtr, name *Char, userdata c.Pointer) c.Int
+
+//go:linkname HashAddEntry C.xmlHashAddEntry
+func HashAddEntry(hash HashTablePtr, name *Char, userdata c.Pointer) c.Int
+
+//go:linkname HashUpdateEntry C.xmlHashUpdateEntry
+func HashUpdateEntry(hash HashTablePtr, name *Char, userdata c.Pointer, dealloc HashDeallocator) c.Int
+
+//go:linkname HashAdd2 C.xmlHashAdd2
+func HashAdd2(hash HashTablePtr, name *Char, name2 *Char, userdata c.Pointer) c.Int
+
+//go:linkname HashAddEntry2 C.xmlHashAddEntry2
+func HashAddEntry2(hash HashTablePtr, name *Char, name2 *Char, userdata c.Pointer) c.Int
+
+//go:linkname HashUpdateEntry2 C.xmlHashUpdateEntry2
+func HashUpdateEntry2(hash HashTablePtr, name *Char, name2 *Char, userdata c.Pointer, dealloc HashDeallocator) c.Int
+
+//go:linkname HashAdd3 C.xmlHashAdd3
+func HashAdd3(hash HashTablePtr, name *Char, name2 *Char, name3 *Char, userdata c.Pointer) c.Int
+
+//go:linkname HashAddEntry3 C.xmlHashAddEntry3
+func HashAddEntry3(hash HashTablePtr, name *Char, name2 *Char, name3 *Char, userdata c.Pointer) c.Int
+
+//go:linkname HashUpdateEntry3 C.xmlHashUpdateEntry3
+func HashUpdateEntry3(hash HashTablePtr, name *Char, name2 *Char, name3 *Char, userdata c.Pointer, dealloc HashDeallocator) c.Int
+
+/*
+ * Remove an entry from the hash table.
+ */
+//go:linkname HashRemoveEntry C.xmlHashRemoveEntry
+func HashRemoveEntry(hash HashTablePtr, name *Char, dealloc HashDeallocator) c.Int
+
+//go:linkname HashRemoveEntry2 C.xmlHashRemoveEntry2
+func HashRemoveEntry2(hash HashTablePtr, name *Char, name2 *Char, dealloc HashDeallocator) c.Int
+
+//go:linkname HashRemoveEntry3 C.xmlHashRemoveEntry3
+func HashRemoveEntry3(hash HashTablePtr, name *Char, name2 *Char, name3 *Char, dealloc HashDeallocator) c.Int
+
+/*
+ * Retrieve the payload.
+ */
+//go:linkname HashLookup C.xmlHashLookup
+func HashLookup(hash HashTablePtr, name *Char) c.Pointer
+
+//go:linkname HashLookup2 C.xmlHashLookup2
+func HashLookup2(hash HashTablePtr, name *Char, name2 *Char) c.Pointer
+
+//go:linkname HashLookup3 C.xmlHashLookup3
+func HashLookup3(hash HashTablePtr, name *Char, name2 *Char, name3 *Char) c.Pointer
+
+//go:linkname HashQLookup C.xmlHashQLookup
+func HashQLookup(hash HashTablePtr, prefix *Char, name *Char) c.Pointer
+
+//go:linkname HashQLookup2 C.xmlHashQLookup2
+func HashQLookup2(hash HashTablePtr, prefix *Char, name *Char, prefix2 *Char, name2 *Char) c.Pointer
+
+//go:linkname HashQLookup3 C.xmlHashQLookup3
+func HashQLookup3(hash HashTablePtr, prefix *Char, name *Char, prefix2 *Char, name2 *Char, prefix3 *Char, name3 *Char) c.Pointer
+
+/*
+ * Helpers.
+ */
+//go:linkname HashCopySafe C.xmlHashCopySafe
+func HashCopySafe(hash HashTablePtr, copy HashCopier, dealloc HashDeallocator) HashTablePtr
+
+//go:linkname HashCopy C.xmlHashCopy
+func HashCopy(hash HashTablePtr, copy HashCopier) HashTablePtr
+
+//go:linkname HashSize C.xmlHashSize
+func HashSize(hash HashTablePtr) c.Int
+
+//go:linkname HashScan C.xmlHashScan
+func HashScan(hash HashTablePtr, scan HashScanner, data c.Pointer)
+
+//go:linkname HashScan3 C.xmlHashScan3
+func HashScan3(hash HashTablePtr, name *Char, name2 *Char, name3 *Char, scan HashScanner, data c.Pointer)
+
+//go:linkname HashScanFull C.xmlHashScanFull
+func HashScanFull(hash HashTablePtr, scan HashScannerFull, data c.Pointer)
+
+//go:linkname HashScanFull3 C.xmlHashScanFull3
+func HashScanFull3(hash HashTablePtr, name *Char, name2 *Char, name3 *Char, scan HashScannerFull, data c.Pointer)
diff --git a/libxml2/libxml2_autogen_link.go b/libxml2/libxml2_autogen_link.go
new file mode 100644
index 0000000..873db77
--- /dev/null
+++ b/libxml2/libxml2_autogen_link.go
@@ -0,0 +1,8 @@
+package libxml2
+
+import (
+ _ "github.com/goplus/lib/c"
+ _ "github.com/goplus/lib/c/os"
+)
+
+const LLGoPackage string = "link: $(pkg-config --libs libxml-2.0);"
diff --git a/libxml2/list.go b/libxml2/list.go
new file mode 100644
index 0000000..90d21f1
--- /dev/null
+++ b/libxml2/list.go
@@ -0,0 +1,109 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type X_xmlLink struct {
+ Unused [8]uint8
+}
+type Link X_xmlLink
+type LinkPtr *Link
+
+type X_xmlList struct {
+ Unused [8]uint8
+}
+type List X_xmlList
+type ListPtr *List
+
+// llgo:type C
+type ListDeallocator func(LinkPtr)
+
+// llgo:type C
+type ListDataCompare func(c.Pointer, c.Pointer) c.Int
+
+// llgo:type C
+type ListWalker func(c.Pointer, c.Pointer) c.Int
+
+/* Creation/Deletion */
+//go:linkname ListCreate C.xmlListCreate
+func ListCreate(deallocator ListDeallocator, compare ListDataCompare) ListPtr
+
+//go:linkname ListDelete C.xmlListDelete
+func ListDelete(l ListPtr)
+
+/* Basic Operators */
+//go:linkname ListSearch C.xmlListSearch
+func ListSearch(l ListPtr, data c.Pointer) c.Pointer
+
+//go:linkname ListReverseSearch C.xmlListReverseSearch
+func ListReverseSearch(l ListPtr, data c.Pointer) c.Pointer
+
+//go:linkname ListInsert C.xmlListInsert
+func ListInsert(l ListPtr, data c.Pointer) c.Int
+
+//go:linkname ListAppend C.xmlListAppend
+func ListAppend(l ListPtr, data c.Pointer) c.Int
+
+//go:linkname ListRemoveFirst C.xmlListRemoveFirst
+func ListRemoveFirst(l ListPtr, data c.Pointer) c.Int
+
+//go:linkname ListRemoveLast C.xmlListRemoveLast
+func ListRemoveLast(l ListPtr, data c.Pointer) c.Int
+
+//go:linkname ListRemoveAll C.xmlListRemoveAll
+func ListRemoveAll(l ListPtr, data c.Pointer) c.Int
+
+//go:linkname ListClear C.xmlListClear
+func ListClear(l ListPtr)
+
+//go:linkname ListEmpty C.xmlListEmpty
+func ListEmpty(l ListPtr) c.Int
+
+//go:linkname ListFront C.xmlListFront
+func ListFront(l ListPtr) LinkPtr
+
+//go:linkname ListEnd C.xmlListEnd
+func ListEnd(l ListPtr) LinkPtr
+
+//go:linkname ListSize C.xmlListSize
+func ListSize(l ListPtr) c.Int
+
+//go:linkname ListPopFront C.xmlListPopFront
+func ListPopFront(l ListPtr)
+
+//go:linkname ListPopBack C.xmlListPopBack
+func ListPopBack(l ListPtr)
+
+//go:linkname ListPushFront C.xmlListPushFront
+func ListPushFront(l ListPtr, data c.Pointer) c.Int
+
+//go:linkname ListPushBack C.xmlListPushBack
+func ListPushBack(l ListPtr, data c.Pointer) c.Int
+
+/* Advanced Operators */
+//go:linkname ListReverse C.xmlListReverse
+func ListReverse(l ListPtr)
+
+//go:linkname ListSort C.xmlListSort
+func ListSort(l ListPtr)
+
+//go:linkname ListWalk C.xmlListWalk
+func ListWalk(l ListPtr, walker ListWalker, user c.Pointer)
+
+//go:linkname ListReverseWalk C.xmlListReverseWalk
+func ListReverseWalk(l ListPtr, walker ListWalker, user c.Pointer)
+
+//go:linkname ListMerge C.xmlListMerge
+func ListMerge(l1 ListPtr, l2 ListPtr)
+
+//go:linkname ListDup C.xmlListDup
+func ListDup(old ListPtr) ListPtr
+
+//go:linkname ListCopy C.xmlListCopy
+func ListCopy(cur ListPtr, old ListPtr) c.Int
+
+/* Link operators */
+//go:linkname LinkGetData C.xmlLinkGetData
+func LinkGetData(lk LinkPtr) c.Pointer
diff --git a/libxml2/llcppg.cfg b/libxml2/llcppg.cfg
new file mode 100644
index 0000000..fd7811d
--- /dev/null
+++ b/libxml2/llcppg.cfg
@@ -0,0 +1,59 @@
+{
+ "name": "libxml2",
+ "cflags": "$(pkg-config --cflags libxml-2.0)",
+ "libs": "$(pkg-config --libs libxml-2.0)",
+ "include": [
+ "libxml/parserInternals.h",
+ "libxml/xmlschemastypes.h",
+ "libxml/globals.h",
+ "libxml/xmlreader.h",
+ "libxml/xpointer.h",
+ "libxml/HTMLtree.h",
+ "libxml/c14n.h",
+ "libxml/xpathInternals.h",
+ "libxml/debugXML.h",
+ "libxml/xpath.h",
+ "libxml/pattern.h",
+ "libxml/xmlsave.h",
+ "libxml/xlink.h",
+ "libxml/catalog.h",
+ "libxml/SAX2.h",
+ "libxml/xinclude.h",
+ "libxml/parser.h",
+ "libxml/SAX.h",
+ "libxml/xmlschemas.h",
+ "libxml/relaxng.h",
+ "libxml/schemasInternals.h",
+ "libxml/schematron.h",
+ "libxml/HTMLparser.h",
+ "libxml/tree.h",
+ "libxml/valid.h",
+ "libxml/xmlwriter.h",
+ "libxml/xmlIO.h",
+ "libxml/entities.h",
+ "libxml/hash.h",
+ "libxml/dict.h",
+ "libxml/xmlautomata.h",
+ "libxml/uri.h",
+ "libxml/chvalid.h",
+ "libxml/xmlregexp.h",
+ "libxml/threads.h",
+ "libxml/xmlmodule.h",
+ "libxml/xmlmemory.h",
+ "libxml/xmlerror.h",
+ "libxml/xmlstring.h",
+ "libxml/xmlunicode.h",
+ "libxml/nanohttp.h",
+ "libxml/nanoftp.h",
+ "libxml/list.h",
+ "libxml/encoding.h",
+ "libxml/xmlversion.h",
+ "libxml/xmlexports.h"
+ ],
+ "deps":["c","c/os"],
+ "trimPrefixes": ["xml","XML_","XML","LIBXML_"],
+ "cplusplus": false,
+ "symMap" :{
+ "attribute": "GetAttribute"
+ }
+}
diff --git a/libxml2/llcppg.pub b/libxml2/llcppg.pub
new file mode 100644
index 0000000..10830fc
--- /dev/null
+++ b/libxml2/llcppg.pub
@@ -0,0 +1,337 @@
+attributeDeclSAXFunc AttributeDeclSAXFunc
+attributeSAXFunc AttributeSAXFunc
+cdataBlockSAXFunc CdataBlockSAXFunc
+charactersSAXFunc CharactersSAXFunc
+commentSAXFunc CommentSAXFunc
+elementDeclSAXFunc ElementDeclSAXFunc
+endDocumentSAXFunc EndDocumentSAXFunc
+endElementNsSAX2Func EndElementNsSAX2Func
+endElementSAXFunc EndElementSAXFunc
+entityDeclSAXFunc EntityDeclSAXFunc
+errorSAXFunc ErrorSAXFunc
+externalSubsetSAXFunc ExternalSubsetSAXFunc
+fatalErrorSAXFunc FatalErrorSAXFunc
+ftpDataCallback FtpDataCallback
+ftpListCallback FtpListCallback
+getEntitySAXFunc GetEntitySAXFunc
+getParameterEntitySAXFunc GetParameterEntitySAXFunc
+hasExternalSubsetSAXFunc HasExternalSubsetSAXFunc
+hasInternalSubsetSAXFunc HasInternalSubsetSAXFunc
+htmlDocPtr HtmlDocPtr
+htmlElemDesc HtmlElemDesc
+htmlElemDescPtr HtmlElemDescPtr
+htmlEntityDesc HtmlEntityDesc
+htmlEntityDescPtr HtmlEntityDescPtr
+htmlNodePtr HtmlNodePtr
+htmlParserCtxt HtmlParserCtxt
+htmlParserCtxtPtr HtmlParserCtxtPtr
+htmlParserInput HtmlParserInput
+htmlParserInputPtr HtmlParserInputPtr
+htmlParserNodeInfo HtmlParserNodeInfo
+htmlParserOption HtmlParserOption
+htmlSAXHandler HtmlSAXHandler
+htmlSAXHandlerPtr HtmlSAXHandlerPtr
+htmlStatus HtmlStatus
+ignorableWhitespaceSAXFunc IgnorableWhitespaceSAXFunc
+internalSubsetSAXFunc InternalSubsetSAXFunc
+isStandaloneSAXFunc IsStandaloneSAXFunc
+notationDeclSAXFunc NotationDeclSAXFunc
+processingInstructionSAXFunc ProcessingInstructionSAXFunc
+referenceSAXFunc ReferenceSAXFunc
+resolveEntitySAXFunc ResolveEntitySAXFunc
+setDocumentLocatorSAXFunc SetDocumentLocatorSAXFunc
+startDocumentSAXFunc StartDocumentSAXFunc
+startElementNsSAX2Func StartElementNsSAX2Func
+startElementSAXFunc StartElementSAXFunc
+unparsedEntityDeclSAXFunc UnparsedEntityDeclSAXFunc
+warningSAXFunc WarningSAXFunc
+xlinkActuate XlinkActuate
+xlinkExtendedLinkFunk XlinkExtendedLinkFunk
+xlinkExtendedLinkSetFunk XlinkExtendedLinkSetFunk
+xlinkHRef XlinkHRef
+xlinkHandler XlinkHandler
+xlinkHandlerPtr XlinkHandlerPtr
+xlinkNodeDetectFunc XlinkNodeDetectFunc
+xlinkRole XlinkRole
+xlinkShow XlinkShow
+xlinkSimpleLinkFunk XlinkSimpleLinkFunk
+xlinkTitle XlinkTitle
+xlinkType XlinkType
+xmlAttr Attr
+xmlAttrHashBucket AttrHashBucket
+xmlAttrPtr AttrPtr
+xmlAttribute Attribute
+xmlAttributeDefault AttributeDefault
+xmlAttributePtr AttributePtr
+xmlAttributeTable AttributeTable
+xmlAttributeTablePtr AttributeTablePtr
+xmlAttributeType AttributeType
+xmlAutomata Automata
+xmlAutomataPtr AutomataPtr
+xmlAutomataState AutomataState
+xmlAutomataStatePtr AutomataStatePtr
+xmlBuf Buf
+xmlBufPtr BufPtr
+xmlBuffer Buffer
+xmlBufferAllocationScheme BufferAllocationScheme
+xmlBufferPtr BufferPtr
+xmlC14NIsVisibleCallback C14NIsVisibleCallback
+xmlC14NMode C14NMode
+xmlCatalog Catalog
+xmlCatalogAllow CatalogAllow
+xmlCatalogPrefer CatalogPrefer
+xmlCatalogPtr CatalogPtr
+xmlChLRange ChLRange
+xmlChLRangePtr ChLRangePtr
+xmlChRangeGroup ChRangeGroup
+xmlChRangeGroupPtr ChRangeGroupPtr
+xmlChSRange ChSRange
+xmlChSRangePtr ChSRangePtr
+xmlChar Char
+xmlCharEncError CharEncError
+xmlCharEncoding CharEncoding
+xmlCharEncodingHandler CharEncodingHandler
+xmlCharEncodingHandlerPtr CharEncodingHandlerPtr
+xmlCharEncodingInputFunc CharEncodingInputFunc
+xmlCharEncodingOutputFunc CharEncodingOutputFunc
+xmlDOMWrapAcquireNsFunction DOMWrapAcquireNsFunction
+xmlDOMWrapCtxt DOMWrapCtxt
+xmlDOMWrapCtxtPtr DOMWrapCtxtPtr
+xmlDeregisterNodeFunc DeregisterNodeFunc
+xmlDict Dict
+xmlDictPtr DictPtr
+xmlDoc Doc
+xmlDocProperties DocProperties
+xmlDocPtr DocPtr
+xmlDtd Dtd
+xmlDtdPtr DtdPtr
+xmlElement Element
+xmlElementContent ElementContent
+xmlElementContentOccur ElementContentOccur
+xmlElementContentPtr ElementContentPtr
+xmlElementContentType ElementContentType
+xmlElementPtr ElementPtr
+xmlElementTable ElementTable
+xmlElementTablePtr ElementTablePtr
+xmlElementType ElementType
+xmlElementTypeVal ElementTypeVal
+xmlEntitiesTable EntitiesTable
+xmlEntitiesTablePtr EntitiesTablePtr
+xmlEntity Entity
+xmlEntityPtr EntityPtr
+xmlEntityReferenceFunc EntityReferenceFunc
+xmlEntityType EntityType
+xmlEnumeration Enumeration
+xmlEnumerationPtr EnumerationPtr
+xmlError Error
+xmlErrorDomain ErrorDomain
+xmlErrorLevel ErrorLevel
+xmlErrorPtr ErrorPtr
+xmlExternalEntityLoader ExternalEntityLoader
+xmlFeature Feature
+xmlFreeFunc FreeFunc
+xmlGenericErrorFunc GenericErrorFunc
+xmlGlobalState GlobalState
+xmlGlobalStatePtr GlobalStatePtr
+xmlHashCopier HashCopier
+xmlHashDeallocator HashDeallocator
+xmlHashScanner HashScanner
+xmlHashScannerFull HashScannerFull
+xmlHashTable HashTable
+xmlHashTablePtr HashTablePtr
+xmlID ID
+xmlIDPtr IDPtr
+xmlIDTable IDTable
+xmlIDTablePtr IDTablePtr
+xmlInputCloseCallback InputCloseCallback
+xmlInputMatchCallback InputMatchCallback
+xmlInputOpenCallback InputOpenCallback
+xmlInputReadCallback InputReadCallback
+xmlLink Link
+xmlLinkPtr LinkPtr
+xmlList List
+xmlListDataCompare ListDataCompare
+xmlListDeallocator ListDeallocator
+xmlListPtr ListPtr
+xmlListWalker ListWalker
+xmlMallocFunc MallocFunc
+xmlModule Module
+xmlModuleOption ModuleOption
+xmlModulePtr ModulePtr
+xmlMutex Mutex
+xmlMutexPtr MutexPtr
+xmlNode Node
+xmlNodePtr NodePtr
+xmlNodeSet NodeSet
+xmlNodeSetPtr NodeSetPtr
+xmlNotation Notation
+xmlNotationPtr NotationPtr
+xmlNotationTable NotationTable
+xmlNotationTablePtr NotationTablePtr
+xmlNs Ns
+xmlNsPtr NsPtr
+xmlNsType NsType
+xmlOutputBuffer OutputBuffer
+xmlOutputBufferCreateFilenameFunc OutputBufferCreateFilenameFunc
+xmlOutputBufferPtr OutputBufferPtr
+xmlOutputCloseCallback OutputCloseCallback
+xmlOutputMatchCallback OutputMatchCallback
+xmlOutputOpenCallback OutputOpenCallback
+xmlOutputWriteCallback OutputWriteCallback
+xmlParserCtxt ParserCtxt
+xmlParserCtxtPtr ParserCtxtPtr
+xmlParserErrors ParserErrors
+xmlParserInput ParserInput
+xmlParserInputBuffer ParserInputBuffer
+xmlParserInputBufferCreateFilenameFunc ParserInputBufferCreateFilenameFunc
+xmlParserInputBufferPtr ParserInputBufferPtr
+xmlParserInputDeallocate ParserInputDeallocate
+xmlParserInputPtr ParserInputPtr
+xmlParserInputState ParserInputState
+xmlParserMode ParserMode
+xmlParserNodeInfo ParserNodeInfo
+xmlParserNodeInfoPtr ParserNodeInfoPtr
+xmlParserNodeInfoSeq ParserNodeInfoSeq
+xmlParserNodeInfoSeqPtr ParserNodeInfoSeqPtr
+xmlParserNsData ParserNsData
+xmlParserOption ParserOption
+xmlParserProperties ParserProperties
+xmlParserSeverities ParserSeverities
+xmlPattern Pattern
+xmlPatternFlags PatternFlags
+xmlPatternPtr PatternPtr
+xmlRMutex RMutex
+xmlRMutexPtr RMutexPtr
+xmlReaderTypes ReaderTypes
+xmlReallocFunc ReallocFunc
+xmlRef Ref
+xmlRefPtr RefPtr
+xmlRefTable RefTable
+xmlRefTablePtr RefTablePtr
+xmlRegExecCallbacks RegExecCallbacks
+xmlRegExecCtxt RegExecCtxt
+xmlRegExecCtxtPtr RegExecCtxtPtr
+xmlRegexp Regexp
+xmlRegexpPtr RegexpPtr
+xmlRegisterNodeFunc RegisterNodeFunc
+xmlRelaxNG RelaxNG
+xmlRelaxNGParserCtxt RelaxNGParserCtxt
+xmlRelaxNGParserCtxtPtr RelaxNGParserCtxtPtr
+xmlRelaxNGParserFlag RelaxNGParserFlag
+xmlRelaxNGPtr RelaxNGPtr
+xmlRelaxNGValidCtxt RelaxNGValidCtxt
+xmlRelaxNGValidCtxtPtr RelaxNGValidCtxtPtr
+xmlRelaxNGValidErr RelaxNGValidErr
+xmlRelaxNGValidityErrorFunc RelaxNGValidityErrorFunc
+xmlRelaxNGValidityWarningFunc RelaxNGValidityWarningFunc
+xmlSAXHandler SAXHandler
+xmlSAXHandlerPtr SAXHandlerPtr
+xmlSAXHandlerV1 SAXHandlerV1
+xmlSAXHandlerV1Ptr SAXHandlerV1Ptr
+xmlSAXLocator SAXLocator
+xmlSAXLocatorPtr SAXLocatorPtr
+xmlSaveCtxt SaveCtxt
+xmlSaveCtxtPtr SaveCtxtPtr
+xmlSaveOption SaveOption
+xmlSchema Schema
+xmlSchemaAnnot SchemaAnnot
+xmlSchemaAnnotPtr SchemaAnnotPtr
+xmlSchemaAttribute SchemaAttribute
+xmlSchemaAttributeGroup SchemaAttributeGroup
+xmlSchemaAttributeGroupPtr SchemaAttributeGroupPtr
+xmlSchemaAttributeLink SchemaAttributeLink
+xmlSchemaAttributeLinkPtr SchemaAttributeLinkPtr
+xmlSchemaAttributePtr SchemaAttributePtr
+xmlSchemaContentType SchemaContentType
+xmlSchemaElement SchemaElement
+xmlSchemaElementPtr SchemaElementPtr
+xmlSchemaFacet SchemaFacet
+xmlSchemaFacetLink SchemaFacetLink
+xmlSchemaFacetLinkPtr SchemaFacetLinkPtr
+xmlSchemaFacetPtr SchemaFacetPtr
+xmlSchemaNotation SchemaNotation
+xmlSchemaNotationPtr SchemaNotationPtr
+xmlSchemaParserCtxt SchemaParserCtxt
+xmlSchemaParserCtxtPtr SchemaParserCtxtPtr
+xmlSchemaPtr SchemaPtr
+xmlSchemaSAXPlugPtr SchemaSAXPlugPtr
+xmlSchemaSAXPlugStruct SchemaSAXPlugStruct
+xmlSchemaType SchemaType
+xmlSchemaTypeLink SchemaTypeLink
+xmlSchemaTypeLinkPtr SchemaTypeLinkPtr
+xmlSchemaTypePtr SchemaTypePtr
+xmlSchemaTypeType SchemaTypeType
+xmlSchemaVal SchemaVal
+xmlSchemaValPtr SchemaValPtr
+xmlSchemaValType SchemaValType
+xmlSchemaValidCtxt SchemaValidCtxt
+xmlSchemaValidCtxtPtr SchemaValidCtxtPtr
+xmlSchemaValidError SchemaValidError
+xmlSchemaValidOption SchemaValidOption
+xmlSchemaValidityErrorFunc SchemaValidityErrorFunc
+xmlSchemaValidityLocatorFunc SchemaValidityLocatorFunc
+xmlSchemaValidityWarningFunc SchemaValidityWarningFunc
+xmlSchemaWhitespaceValueType SchemaWhitespaceValueType
+xmlSchemaWildcard SchemaWildcard
+xmlSchemaWildcardNs SchemaWildcardNs
+xmlSchemaWildcardNsPtr SchemaWildcardNsPtr
+xmlSchemaWildcardPtr SchemaWildcardPtr
+xmlSchematron Schematron
+xmlSchematronParserCtxt SchematronParserCtxt
+xmlSchematronParserCtxtPtr SchematronParserCtxtPtr
+xmlSchematronPtr SchematronPtr
+xmlSchematronValidCtxt SchematronValidCtxt
+xmlSchematronValidCtxtPtr SchematronValidCtxtPtr
+xmlSchematronValidOptions SchematronValidOptions
+xmlSchematronValidityErrorFunc SchematronValidityErrorFunc
+xmlSchematronValidityWarningFunc SchematronValidityWarningFunc
+xmlShellCmd ShellCmd
+xmlShellCtxt ShellCtxt
+xmlShellCtxtPtr ShellCtxtPtr
+xmlShellReadlineFunc ShellReadlineFunc
+xmlStartTag StartTag
+xmlStrdupFunc StrdupFunc
+xmlStreamCtxt StreamCtxt
+xmlStreamCtxtPtr StreamCtxtPtr
+xmlStructuredErrorFunc StructuredErrorFunc
+xmlTextReader TextReader
+xmlTextReaderErrorFunc TextReaderErrorFunc
+xmlTextReaderLocatorPtr TextReaderLocatorPtr
+xmlTextReaderMode TextReaderMode
+xmlTextReaderPtr TextReaderPtr
+xmlTextWriter TextWriter
+xmlTextWriterPtr TextWriterPtr
+xmlURI URI
+xmlURIPtr URIPtr
+xmlValidCtxt ValidCtxt
+xmlValidCtxtPtr ValidCtxtPtr
+xmlValidState ValidState
+xmlValidStatePtr ValidStatePtr
+xmlValidityErrorFunc ValidityErrorFunc
+xmlValidityWarningFunc ValidityWarningFunc
+xmlXIncludeCtxt XIncludeCtxt
+xmlXIncludeCtxtPtr XIncludeCtxtPtr
+xmlXPathAxis XPathAxis
+xmlXPathAxisFunc XPathAxisFunc
+xmlXPathAxisPtr XPathAxisPtr
+xmlXPathCompExpr XPathCompExpr
+xmlXPathCompExprPtr XPathCompExprPtr
+xmlXPathContext XPathContext
+xmlXPathContextPtr XPathContextPtr
+xmlXPathConvertFunc XPathConvertFunc
+xmlXPathError XPathError
+xmlXPathEvalFunc XPathEvalFunc
+xmlXPathFuncLookupFunc XPathFuncLookupFunc
+xmlXPathFuncPtr XPathFuncPtr
+xmlXPathFunct XPathFunct
+xmlXPathFunction XPathFunction
+xmlXPathObject XPathObject
+xmlXPathObjectPtr XPathObjectPtr
+xmlXPathObjectType XPathObjectType
+xmlXPathParserContext XPathParserContext
+xmlXPathParserContextPtr XPathParserContextPtr
+xmlXPathType XPathType
+xmlXPathTypePtr XPathTypePtr
+xmlXPathVariable XPathVariable
+xmlXPathVariableLookupFunc XPathVariableLookupFunc
+xmlXPathVariablePtr XPathVariablePtr
\ No newline at end of file
diff --git a/libxml2/llpkg.cfg b/libxml2/llpkg.cfg
new file mode 100644
index 0000000..fdcf05e
--- /dev/null
+++ b/libxml2/llpkg.cfg
@@ -0,0 +1,14 @@
+{
+ "upstream": {
+ "package": {
+ "name": "libxml2",
+ "version": "2.13.6"
+ },
+ "installer":{
+ "name": "conan",
+ "config" : {
+ "options": "iconv=False"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/libxml2/nanoftp.go b/libxml2/nanoftp.go
new file mode 100644
index 0000000..d2c96b6
--- /dev/null
+++ b/libxml2/nanoftp.go
@@ -0,0 +1,93 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+// llgo:type C
+type FtpListCallback func(c.Pointer, *c.Char, *c.Char, *c.Char, *c.Char, c.Ulong, c.Int, c.Int, *c.Char, c.Int, c.Int, c.Int)
+
+// llgo:type C
+type FtpDataCallback func(c.Pointer, *c.Char, c.Int)
+
+/*
+ * Init
+ */
+//go:linkname NanoFTPInit C.xmlNanoFTPInit
+func NanoFTPInit()
+
+//go:linkname NanoFTPCleanup C.xmlNanoFTPCleanup
+func NanoFTPCleanup()
+
+/*
+ * Creating/freeing contexts.
+ */
+//go:linkname NanoFTPNewCtxt C.xmlNanoFTPNewCtxt
+func NanoFTPNewCtxt(URL *c.Char) c.Pointer
+
+//go:linkname NanoFTPFreeCtxt C.xmlNanoFTPFreeCtxt
+func NanoFTPFreeCtxt(ctx c.Pointer)
+
+//go:linkname NanoFTPConnectTo C.xmlNanoFTPConnectTo
+func NanoFTPConnectTo(server *c.Char, port c.Int) c.Pointer
+
+/*
+ * Opening/closing session connections.
+ */
+//go:linkname NanoFTPOpen C.xmlNanoFTPOpen
+func NanoFTPOpen(URL *c.Char) c.Pointer
+
+//go:linkname NanoFTPConnect C.xmlNanoFTPConnect
+func NanoFTPConnect(ctx c.Pointer) c.Int
+
+//go:linkname NanoFTPClose C.xmlNanoFTPClose
+func NanoFTPClose(ctx c.Pointer) c.Int
+
+//go:linkname NanoFTPQuit C.xmlNanoFTPQuit
+func NanoFTPQuit(ctx c.Pointer) c.Int
+
+//go:linkname NanoFTPScanProxy C.xmlNanoFTPScanProxy
+func NanoFTPScanProxy(URL *c.Char)
+
+//go:linkname NanoFTPProxy C.xmlNanoFTPProxy
+func NanoFTPProxy(host *c.Char, port c.Int, user *c.Char, passwd *c.Char, type_ c.Int)
+
+//go:linkname NanoFTPUpdateURL C.xmlNanoFTPUpdateURL
+func NanoFTPUpdateURL(ctx c.Pointer, URL *c.Char) c.Int
+
+/*
+ * Rather internal commands.
+ */
+//go:linkname NanoFTPGetResponse C.xmlNanoFTPGetResponse
+func NanoFTPGetResponse(ctx c.Pointer) c.Int
+
+//go:linkname NanoFTPCheckResponse C.xmlNanoFTPCheckResponse
+func NanoFTPCheckResponse(ctx c.Pointer) c.Int
+
+/*
+ * CD/DIR/GET handlers.
+ */
+//go:linkname NanoFTPCwd C.xmlNanoFTPCwd
+func NanoFTPCwd(ctx c.Pointer, directory *c.Char) c.Int
+
+//go:linkname NanoFTPDele C.xmlNanoFTPDele
+func NanoFTPDele(ctx c.Pointer, file *c.Char) c.Int
+
+//go:linkname NanoFTPGetConnection C.xmlNanoFTPGetConnection
+func NanoFTPGetConnection(ctx c.Pointer) c.Int
+
+//go:linkname NanoFTPCloseConnection C.xmlNanoFTPCloseConnection
+func NanoFTPCloseConnection(ctx c.Pointer) c.Int
+
+//go:linkname NanoFTPList C.xmlNanoFTPList
+func NanoFTPList(ctx c.Pointer, callback FtpListCallback, userData c.Pointer, filename *c.Char) c.Int
+
+//go:linkname NanoFTPGetSocket C.xmlNanoFTPGetSocket
+func NanoFTPGetSocket(ctx c.Pointer, filename *c.Char) c.Int
+
+//go:linkname NanoFTPGet C.xmlNanoFTPGet
+func NanoFTPGet(ctx c.Pointer, callback FtpDataCallback, userData c.Pointer, filename *c.Char) c.Int
+
+//go:linkname NanoFTPRead C.xmlNanoFTPRead
+func NanoFTPRead(ctx c.Pointer, dest c.Pointer, len c.Int) c.Int
diff --git a/libxml2/nanohttp.go b/libxml2/nanohttp.go
new file mode 100644
index 0000000..c59570c
--- /dev/null
+++ b/libxml2/nanohttp.go
@@ -0,0 +1,57 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+//go:linkname NanoHTTPInit C.xmlNanoHTTPInit
+func NanoHTTPInit()
+
+//go:linkname NanoHTTPCleanup C.xmlNanoHTTPCleanup
+func NanoHTTPCleanup()
+
+//go:linkname NanoHTTPScanProxy C.xmlNanoHTTPScanProxy
+func NanoHTTPScanProxy(URL *c.Char)
+
+//go:linkname NanoHTTPFetch C.xmlNanoHTTPFetch
+func NanoHTTPFetch(URL *c.Char, filename *c.Char, contentType **c.Char) c.Int
+
+//go:linkname NanoHTTPMethod C.xmlNanoHTTPMethod
+func NanoHTTPMethod(URL *c.Char, method *c.Char, input *c.Char, contentType **c.Char, headers *c.Char, ilen c.Int) c.Pointer
+
+//go:linkname NanoHTTPMethodRedir C.xmlNanoHTTPMethodRedir
+func NanoHTTPMethodRedir(URL *c.Char, method *c.Char, input *c.Char, contentType **c.Char, redir **c.Char, headers *c.Char, ilen c.Int) c.Pointer
+
+//go:linkname NanoHTTPOpen C.xmlNanoHTTPOpen
+func NanoHTTPOpen(URL *c.Char, contentType **c.Char) c.Pointer
+
+//go:linkname NanoHTTPOpenRedir C.xmlNanoHTTPOpenRedir
+func NanoHTTPOpenRedir(URL *c.Char, contentType **c.Char, redir **c.Char) c.Pointer
+
+//go:linkname NanoHTTPReturnCode C.xmlNanoHTTPReturnCode
+func NanoHTTPReturnCode(ctx c.Pointer) c.Int
+
+//go:linkname NanoHTTPAuthHeader C.xmlNanoHTTPAuthHeader
+func NanoHTTPAuthHeader(ctx c.Pointer) *c.Char
+
+//go:linkname NanoHTTPRedir C.xmlNanoHTTPRedir
+func NanoHTTPRedir(ctx c.Pointer) *c.Char
+
+//go:linkname NanoHTTPContentLength C.xmlNanoHTTPContentLength
+func NanoHTTPContentLength(ctx c.Pointer) c.Int
+
+//go:linkname NanoHTTPEncoding C.xmlNanoHTTPEncoding
+func NanoHTTPEncoding(ctx c.Pointer) *c.Char
+
+//go:linkname NanoHTTPMimeType C.xmlNanoHTTPMimeType
+func NanoHTTPMimeType(ctx c.Pointer) *c.Char
+
+//go:linkname NanoHTTPRead C.xmlNanoHTTPRead
+func NanoHTTPRead(ctx c.Pointer, dest c.Pointer, len c.Int) c.Int
+
+//go:linkname NanoHTTPSave C.xmlNanoHTTPSave
+func NanoHTTPSave(ctxt c.Pointer, filename *c.Char) c.Int
+
+//go:linkname NanoHTTPClose C.xmlNanoHTTPClose
+func NanoHTTPClose(ctx c.Pointer)
diff --git a/libxml2/parser.go b/libxml2/parser.go
new file mode 100644
index 0000000..91cb9e9
--- /dev/null
+++ b/libxml2/parser.go
@@ -0,0 +1,627 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+const DEFAULT_VERSION = "1.0"
+const DETECT_IDS = 2
+const COMPLETE_ATTRS = 4
+const SKIP_IDS = 8
+const SAX2_MAGIC = 0xDEEDBEAF
+
+// llgo:type C
+type ParserInputDeallocate func(*Char)
+
+type X_xmlParserNodeInfo struct {
+ Node *X_xmlNode
+ BeginPos c.Ulong
+ BeginLine c.Ulong
+ EndPos c.Ulong
+ EndLine c.Ulong
+}
+type ParserNodeInfo X_xmlParserNodeInfo
+type ParserNodeInfoPtr *ParserNodeInfo
+
+type X_xmlParserNodeInfoSeq struct {
+ Maximum c.Ulong
+ Length c.Ulong
+ Buffer *ParserNodeInfo
+}
+type ParserNodeInfoSeq X_xmlParserNodeInfoSeq
+type ParserNodeInfoSeqPtr *ParserNodeInfoSeq
+type ParserInputState c.Int
+
+const (
+ PARSER_EOF ParserInputState = -1
+ PARSER_START ParserInputState = 0
+ PARSER_MISC ParserInputState = 1
+ PARSER_PI ParserInputState = 2
+ PARSER_DTD ParserInputState = 3
+ PARSER_PROLOG ParserInputState = 4
+ PARSER_COMMENT ParserInputState = 5
+ PARSER_START_TAG ParserInputState = 6
+ PARSER_CONTENT ParserInputState = 7
+ PARSER_CDATA_SECTION ParserInputState = 8
+ PARSER_END_TAG ParserInputState = 9
+ PARSER_ENTITY_DECL ParserInputState = 10
+ PARSER_ENTITY_VALUE ParserInputState = 11
+ PARSER_ATTRIBUTE_VALUE ParserInputState = 12
+ PARSER_SYSTEM_LITERAL ParserInputState = 13
+ PARSER_EPILOG ParserInputState = 14
+ PARSER_IGNORE ParserInputState = 15
+ PARSER_PUBLIC_LITERAL ParserInputState = 16
+ PARSER_XML_DECL ParserInputState = 17
+)
+
+type ParserMode c.Int
+
+const (
+ PARSE_UNKNOWN ParserMode = 0
+ PARSE_DOM ParserMode = 1
+ PARSE_SAX ParserMode = 2
+ PARSE_PUSH_DOM ParserMode = 3
+ PARSE_PUSH_SAX ParserMode = 4
+ PARSE_READER ParserMode = 5
+)
+
+type X_xmlStartTag struct {
+ Unused [8]uint8
+}
+type StartTag X_xmlStartTag
+
+type X_xmlParserNsData struct {
+ Unused [8]uint8
+}
+type ParserNsData X_xmlParserNsData
+
+type X_xmlAttrHashBucket struct {
+ Unused [8]uint8
+}
+type AttrHashBucket X_xmlAttrHashBucket
+
+// llgo:type C
+type ResolveEntitySAXFunc func(c.Pointer, *Char, *Char) ParserInputPtr
+
+// llgo:type C
+type InternalSubsetSAXFunc func(c.Pointer, *Char, *Char, *Char)
+
+// llgo:type C
+type ExternalSubsetSAXFunc func(c.Pointer, *Char, *Char, *Char)
+
+// llgo:type C
+type GetEntitySAXFunc func(c.Pointer, *Char) EntityPtr
+
+// llgo:type C
+type GetParameterEntitySAXFunc func(c.Pointer, *Char) EntityPtr
+
+// llgo:type C
+type EntityDeclSAXFunc func(c.Pointer, *Char, c.Int, *Char, *Char, *Char)
+
+// llgo:type C
+type NotationDeclSAXFunc func(c.Pointer, *Char, *Char, *Char)
+
+// llgo:type C
+type AttributeDeclSAXFunc func(c.Pointer, *Char, *Char, c.Int, c.Int, *Char, EnumerationPtr)
+
+// llgo:type C
+type ElementDeclSAXFunc func(c.Pointer, *Char, c.Int, ElementContentPtr)
+
+// llgo:type C
+type UnparsedEntityDeclSAXFunc func(c.Pointer, *Char, *Char, *Char, *Char)
+
+// llgo:type C
+type SetDocumentLocatorSAXFunc func(c.Pointer, SAXLocatorPtr)
+
+// llgo:type C
+type StartDocumentSAXFunc func(c.Pointer)
+
+// llgo:type C
+type EndDocumentSAXFunc func(c.Pointer)
+
+// llgo:type C
+type StartElementSAXFunc func(c.Pointer, *Char, **Char)
+
+// llgo:type C
+type EndElementSAXFunc func(c.Pointer, *Char)
+
+// llgo:type C
+type AttributeSAXFunc func(c.Pointer, *Char, *Char)
+
+// llgo:type C
+type ReferenceSAXFunc func(c.Pointer, *Char)
+
+// llgo:type C
+type CharactersSAXFunc func(c.Pointer, *Char, c.Int)
+
+// llgo:type C
+type IgnorableWhitespaceSAXFunc func(c.Pointer, *Char, c.Int)
+
+// llgo:type C
+type ProcessingInstructionSAXFunc func(c.Pointer, *Char, *Char)
+
+// llgo:type C
+type CommentSAXFunc func(c.Pointer, *Char)
+
+// llgo:type C
+type CdataBlockSAXFunc func(c.Pointer, *Char, c.Int)
+
+// llgo:type C
+type WarningSAXFunc func(__llgo_arg_0 c.Pointer, __llgo_arg_1 *c.Char, __llgo_va_list ...interface{})
+
+// llgo:type C
+type ErrorSAXFunc func(__llgo_arg_0 c.Pointer, __llgo_arg_1 *c.Char, __llgo_va_list ...interface{})
+
+// llgo:type C
+type FatalErrorSAXFunc func(__llgo_arg_0 c.Pointer, __llgo_arg_1 *c.Char, __llgo_va_list ...interface{})
+
+// llgo:type C
+type IsStandaloneSAXFunc func(c.Pointer) c.Int
+
+// llgo:type C
+type HasInternalSubsetSAXFunc func(c.Pointer) c.Int
+
+// llgo:type C
+type HasExternalSubsetSAXFunc func(c.Pointer) c.Int
+
+// llgo:type C
+type StartElementNsSAX2Func func(c.Pointer, *Char, *Char, *Char, c.Int, **Char, c.Int, c.Int, **Char)
+
+// llgo:type C
+type EndElementNsSAX2Func func(c.Pointer, *Char, *Char, *Char)
+
+type X_xmlSAXHandlerV1 struct {
+ InternalSubset InternalSubsetSAXFunc
+ IsStandalone IsStandaloneSAXFunc
+ HasInternalSubset HasInternalSubsetSAXFunc
+ HasExternalSubset HasExternalSubsetSAXFunc
+ ResolveEntity ResolveEntitySAXFunc
+ GetEntity GetEntitySAXFunc
+ EntityDecl EntityDeclSAXFunc
+ NotationDecl NotationDeclSAXFunc
+ AttributeDecl AttributeDeclSAXFunc
+ ElementDecl ElementDeclSAXFunc
+ UnparsedEntityDecl UnparsedEntityDeclSAXFunc
+ SetDocumentLocator SetDocumentLocatorSAXFunc
+ StartDocument StartDocumentSAXFunc
+ EndDocument EndDocumentSAXFunc
+ StartElement StartElementSAXFunc
+ EndElement EndElementSAXFunc
+ Reference ReferenceSAXFunc
+ Characters CharactersSAXFunc
+ IgnorableWhitespace IgnorableWhitespaceSAXFunc
+ ProcessingInstruction ProcessingInstructionSAXFunc
+ Comment CommentSAXFunc
+ Warning WarningSAXFunc
+ Error ErrorSAXFunc
+ FatalError FatalErrorSAXFunc
+ GetParameterEntity GetParameterEntitySAXFunc
+ CdataBlock CdataBlockSAXFunc
+ ExternalSubset ExternalSubsetSAXFunc
+ Initialized c.Uint
+}
+type SAXHandlerV1 X_xmlSAXHandlerV1
+type SAXHandlerV1Ptr *SAXHandlerV1
+
+// llgo:type C
+type ExternalEntityLoader func(*c.Char, *c.Char, ParserCtxtPtr) ParserInputPtr
+
+/* backward compatibility */
+//go:linkname X__xmlParserVersion C.__xmlParserVersion
+func X__xmlParserVersion() **c.Char
+
+//go:linkname X__oldXMLWDcompatibility C.__oldXMLWDcompatibility
+func X__oldXMLWDcompatibility() *c.Int
+
+//go:linkname X__xmlParserDebugEntities C.__xmlParserDebugEntities
+func X__xmlParserDebugEntities() *c.Int
+
+//go:linkname X__xmlDefaultSAXLocator C.__xmlDefaultSAXLocator
+func X__xmlDefaultSAXLocator() *SAXLocator
+
+//go:linkname X__xmlDefaultSAXHandler C.__xmlDefaultSAXHandler
+func X__xmlDefaultSAXHandler() *SAXHandlerV1
+
+//go:linkname X__xmlDoValidityCheckingDefaultValue C.__xmlDoValidityCheckingDefaultValue
+func X__xmlDoValidityCheckingDefaultValue() *c.Int
+
+//go:linkname X__xmlGetWarningsDefaultValue C.__xmlGetWarningsDefaultValue
+func X__xmlGetWarningsDefaultValue() *c.Int
+
+//go:linkname X__xmlKeepBlanksDefaultValue C.__xmlKeepBlanksDefaultValue
+func X__xmlKeepBlanksDefaultValue() *c.Int
+
+//go:linkname X__xmlLineNumbersDefaultValue C.__xmlLineNumbersDefaultValue
+func X__xmlLineNumbersDefaultValue() *c.Int
+
+//go:linkname X__xmlLoadExtDtdDefaultValue C.__xmlLoadExtDtdDefaultValue
+func X__xmlLoadExtDtdDefaultValue() *c.Int
+
+//go:linkname X__xmlPedanticParserDefaultValue C.__xmlPedanticParserDefaultValue
+func X__xmlPedanticParserDefaultValue() *c.Int
+
+//go:linkname X__xmlSubstituteEntitiesDefaultValue C.__xmlSubstituteEntitiesDefaultValue
+func X__xmlSubstituteEntitiesDefaultValue() *c.Int
+
+//go:linkname X__xmlIndentTreeOutput C.__xmlIndentTreeOutput
+func X__xmlIndentTreeOutput() *c.Int
+
+//go:linkname X__xmlTreeIndentString C.__xmlTreeIndentString
+func X__xmlTreeIndentString() **c.Char
+
+//go:linkname X__xmlSaveNoEmptyTags C.__xmlSaveNoEmptyTags
+func X__xmlSaveNoEmptyTags() *c.Int
+
+/*
+ * Init/Cleanup
+ */
+//go:linkname InitParser C.xmlInitParser
+func InitParser()
+
+//go:linkname CleanupParser C.xmlCleanupParser
+func CleanupParser()
+
+//go:linkname InitGlobals C.xmlInitGlobals
+func InitGlobals()
+
+//go:linkname CleanupGlobals C.xmlCleanupGlobals
+func CleanupGlobals()
+
+/*
+ * Input functions
+ */
+//go:linkname ParserInputRead C.xmlParserInputRead
+func ParserInputRead(in ParserInputPtr, len c.Int) c.Int
+
+//go:linkname ParserInputGrow C.xmlParserInputGrow
+func ParserInputGrow(in ParserInputPtr, len c.Int) c.Int
+
+/*
+ * Basic parsing Interfaces
+ */
+// llgo:link (*Char).ParseDoc C.xmlParseDoc
+func (recv_ *Char) ParseDoc() DocPtr {
+ return nil
+}
+
+//go:linkname ParseFile C.xmlParseFile
+func ParseFile(filename *c.Char) DocPtr
+
+//go:linkname ParseMemory C.xmlParseMemory
+func ParseMemory(buffer *c.Char, size c.Int) DocPtr
+
+//go:linkname SubstituteEntitiesDefault C.xmlSubstituteEntitiesDefault
+func SubstituteEntitiesDefault(val c.Int) c.Int
+
+//go:linkname ThrDefSubstituteEntitiesDefaultValue C.xmlThrDefSubstituteEntitiesDefaultValue
+func ThrDefSubstituteEntitiesDefaultValue(v c.Int) c.Int
+
+//go:linkname KeepBlanksDefault C.xmlKeepBlanksDefault
+func KeepBlanksDefault(val c.Int) c.Int
+
+//go:linkname ThrDefKeepBlanksDefaultValue C.xmlThrDefKeepBlanksDefaultValue
+func ThrDefKeepBlanksDefaultValue(v c.Int) c.Int
+
+//go:linkname StopParser C.xmlStopParser
+func StopParser(ctxt ParserCtxtPtr)
+
+//go:linkname PedanticParserDefault C.xmlPedanticParserDefault
+func PedanticParserDefault(val c.Int) c.Int
+
+//go:linkname ThrDefPedanticParserDefaultValue C.xmlThrDefPedanticParserDefaultValue
+func ThrDefPedanticParserDefaultValue(v c.Int) c.Int
+
+//go:linkname LineNumbersDefault C.xmlLineNumbersDefault
+func LineNumbersDefault(val c.Int) c.Int
+
+//go:linkname ThrDefLineNumbersDefaultValue C.xmlThrDefLineNumbersDefaultValue
+func ThrDefLineNumbersDefaultValue(v c.Int) c.Int
+
+//go:linkname ThrDefDoValidityCheckingDefaultValue C.xmlThrDefDoValidityCheckingDefaultValue
+func ThrDefDoValidityCheckingDefaultValue(v c.Int) c.Int
+
+//go:linkname ThrDefGetWarningsDefaultValue C.xmlThrDefGetWarningsDefaultValue
+func ThrDefGetWarningsDefaultValue(v c.Int) c.Int
+
+//go:linkname ThrDefLoadExtDtdDefaultValue C.xmlThrDefLoadExtDtdDefaultValue
+func ThrDefLoadExtDtdDefaultValue(v c.Int) c.Int
+
+//go:linkname ThrDefParserDebugEntities C.xmlThrDefParserDebugEntities
+func ThrDefParserDebugEntities(v c.Int) c.Int
+
+/*
+ * Recovery mode
+ */
+// llgo:link (*Char).RecoverDoc C.xmlRecoverDoc
+func (recv_ *Char) RecoverDoc() DocPtr {
+ return nil
+}
+
+//go:linkname RecoverMemory C.xmlRecoverMemory
+func RecoverMemory(buffer *c.Char, size c.Int) DocPtr
+
+//go:linkname RecoverFile C.xmlRecoverFile
+func RecoverFile(filename *c.Char) DocPtr
+
+/*
+ * Less common routines and SAX interfaces
+ */
+//go:linkname ParseDocument C.xmlParseDocument
+func ParseDocument(ctxt ParserCtxtPtr) c.Int
+
+//go:linkname ParseExtParsedEnt C.xmlParseExtParsedEnt
+func ParseExtParsedEnt(ctxt ParserCtxtPtr) c.Int
+
+//go:linkname SAXUserParseFile C.xmlSAXUserParseFile
+func SAXUserParseFile(sax SAXHandlerPtr, user_data c.Pointer, filename *c.Char) c.Int
+
+//go:linkname SAXUserParseMemory C.xmlSAXUserParseMemory
+func SAXUserParseMemory(sax SAXHandlerPtr, user_data c.Pointer, buffer *c.Char, size c.Int) c.Int
+
+//go:linkname SAXParseDoc C.xmlSAXParseDoc
+func SAXParseDoc(sax SAXHandlerPtr, cur *Char, recovery c.Int) DocPtr
+
+//go:linkname SAXParseMemory C.xmlSAXParseMemory
+func SAXParseMemory(sax SAXHandlerPtr, buffer *c.Char, size c.Int, recovery c.Int) DocPtr
+
+//go:linkname SAXParseMemoryWithData C.xmlSAXParseMemoryWithData
+func SAXParseMemoryWithData(sax SAXHandlerPtr, buffer *c.Char, size c.Int, recovery c.Int, data c.Pointer) DocPtr
+
+//go:linkname SAXParseFile C.xmlSAXParseFile
+func SAXParseFile(sax SAXHandlerPtr, filename *c.Char, recovery c.Int) DocPtr
+
+//go:linkname SAXParseFileWithData C.xmlSAXParseFileWithData
+func SAXParseFileWithData(sax SAXHandlerPtr, filename *c.Char, recovery c.Int, data c.Pointer) DocPtr
+
+//go:linkname SAXParseEntity C.xmlSAXParseEntity
+func SAXParseEntity(sax SAXHandlerPtr, filename *c.Char) DocPtr
+
+//go:linkname ParseEntity C.xmlParseEntity
+func ParseEntity(filename *c.Char) DocPtr
+
+//go:linkname SAXParseDTD C.xmlSAXParseDTD
+func SAXParseDTD(sax SAXHandlerPtr, ExternalID *Char, SystemID *Char) DtdPtr
+
+// llgo:link (*Char).ParseDTD C.xmlParseDTD
+func (recv_ *Char) ParseDTD(SystemID *Char) DtdPtr {
+ return nil
+}
+
+//go:linkname IOParseDTD C.xmlIOParseDTD
+func IOParseDTD(sax SAXHandlerPtr, input ParserInputBufferPtr, enc CharEncoding) DtdPtr
+
+//go:linkname ParseBalancedChunkMemory C.xmlParseBalancedChunkMemory
+func ParseBalancedChunkMemory(doc DocPtr, sax SAXHandlerPtr, user_data c.Pointer, depth c.Int, string *Char, lst *NodePtr) c.Int
+
+//go:linkname ParseInNodeContext C.xmlParseInNodeContext
+func ParseInNodeContext(node NodePtr, data *c.Char, datalen c.Int, options c.Int, lst *NodePtr) ParserErrors
+
+//go:linkname ParseBalancedChunkMemoryRecover C.xmlParseBalancedChunkMemoryRecover
+func ParseBalancedChunkMemoryRecover(doc DocPtr, sax SAXHandlerPtr, user_data c.Pointer, depth c.Int, string *Char, lst *NodePtr, recover c.Int) c.Int
+
+//go:linkname ParseExternalEntity C.xmlParseExternalEntity
+func ParseExternalEntity(doc DocPtr, sax SAXHandlerPtr, user_data c.Pointer, depth c.Int, URL *Char, ID *Char, lst *NodePtr) c.Int
+
+//go:linkname ParseCtxtExternalEntity C.xmlParseCtxtExternalEntity
+func ParseCtxtExternalEntity(ctx ParserCtxtPtr, URL *Char, ID *Char, lst *NodePtr) c.Int
+
+/*
+ * Parser contexts handling.
+ */
+//go:linkname NewParserCtxt C.xmlNewParserCtxt
+func NewParserCtxt() ParserCtxtPtr
+
+// llgo:link (*SAXHandler).NewSAXParserCtxt C.xmlNewSAXParserCtxt
+func (recv_ *SAXHandler) NewSAXParserCtxt(userData c.Pointer) ParserCtxtPtr {
+ return nil
+}
+
+//go:linkname InitParserCtxt C.xmlInitParserCtxt
+func InitParserCtxt(ctxt ParserCtxtPtr) c.Int
+
+//go:linkname ClearParserCtxt C.xmlClearParserCtxt
+func ClearParserCtxt(ctxt ParserCtxtPtr)
+
+//go:linkname FreeParserCtxt C.xmlFreeParserCtxt
+func FreeParserCtxt(ctxt ParserCtxtPtr)
+
+//go:linkname SetupParserForBuffer C.xmlSetupParserForBuffer
+func SetupParserForBuffer(ctxt ParserCtxtPtr, buffer *Char, filename *c.Char)
+
+// llgo:link (*Char).CreateDocParserCtxt C.xmlCreateDocParserCtxt
+func (recv_ *Char) CreateDocParserCtxt() ParserCtxtPtr {
+ return nil
+}
+
+/*
+ * Reading/setting optional parsing features.
+ */
+//go:linkname GetFeaturesList C.xmlGetFeaturesList
+func GetFeaturesList(len *c.Int, result **c.Char) c.Int
+
+//go:linkname GetFeature C.xmlGetFeature
+func GetFeature(ctxt ParserCtxtPtr, name *c.Char, result c.Pointer) c.Int
+
+//go:linkname SetFeature C.xmlSetFeature
+func SetFeature(ctxt ParserCtxtPtr, name *c.Char, value c.Pointer) c.Int
+
+/*
+ * Interfaces for the Push mode.
+ */
+//go:linkname CreatePushParserCtxt C.xmlCreatePushParserCtxt
+func CreatePushParserCtxt(sax SAXHandlerPtr, user_data c.Pointer, chunk *c.Char, size c.Int, filename *c.Char) ParserCtxtPtr
+
+//go:linkname ParseChunk C.xmlParseChunk
+func ParseChunk(ctxt ParserCtxtPtr, chunk *c.Char, size c.Int, terminate c.Int) c.Int
+
+/*
+ * Special I/O mode.
+ */
+//go:linkname CreateIOParserCtxt C.xmlCreateIOParserCtxt
+func CreateIOParserCtxt(sax SAXHandlerPtr, user_data c.Pointer, ioread InputReadCallback, ioclose InputCloseCallback, ioctx c.Pointer, enc CharEncoding) ParserCtxtPtr
+
+//go:linkname NewIOInputStream C.xmlNewIOInputStream
+func NewIOInputStream(ctxt ParserCtxtPtr, input ParserInputBufferPtr, enc CharEncoding) ParserInputPtr
+
+/*
+ * Node infos.
+ */
+//go:linkname ParserFindNodeInfo C.xmlParserFindNodeInfo
+func ParserFindNodeInfo(ctxt ParserCtxtPtr, node NodePtr) *ParserNodeInfo
+
+//go:linkname InitNodeInfoSeq C.xmlInitNodeInfoSeq
+func InitNodeInfoSeq(seq ParserNodeInfoSeqPtr)
+
+//go:linkname ClearNodeInfoSeq C.xmlClearNodeInfoSeq
+func ClearNodeInfoSeq(seq ParserNodeInfoSeqPtr)
+
+//go:linkname ParserFindNodeInfoIndex C.xmlParserFindNodeInfoIndex
+func ParserFindNodeInfoIndex(seq ParserNodeInfoSeqPtr, node NodePtr) c.Ulong
+
+//go:linkname ParserAddNodeInfo C.xmlParserAddNodeInfo
+func ParserAddNodeInfo(ctxt ParserCtxtPtr, info ParserNodeInfoPtr)
+
+/*
+ * External entities handling actually implemented in xmlIO.
+ */
+//go:linkname SetExternalEntityLoader C.xmlSetExternalEntityLoader
+func SetExternalEntityLoader(f ExternalEntityLoader)
+
+//go:linkname GetExternalEntityLoader C.xmlGetExternalEntityLoader
+func GetExternalEntityLoader() ExternalEntityLoader
+
+//go:linkname LoadExternalEntity C.xmlLoadExternalEntity
+func LoadExternalEntity(URL *c.Char, ID *c.Char, ctxt ParserCtxtPtr) ParserInputPtr
+
+/*
+ * Index lookup, actually implemented in the encoding module
+ */
+//go:linkname ByteConsumed C.xmlByteConsumed
+func ByteConsumed(ctxt ParserCtxtPtr) c.Long
+
+type ParserOption c.Int
+
+const (
+ PARSE_RECOVER ParserOption = 1
+ PARSE_NOENT ParserOption = 2
+ PARSE_DTDLOAD ParserOption = 4
+ PARSE_DTDATTR ParserOption = 8
+ PARSE_DTDVALID ParserOption = 16
+ PARSE_NOERROR ParserOption = 32
+ PARSE_NOWARNING ParserOption = 64
+ PARSE_PEDANTIC ParserOption = 128
+ PARSE_NOBLANKS ParserOption = 256
+ PARSE_SAX1 ParserOption = 512
+ PARSE_XINCLUDE ParserOption = 1024
+ PARSE_NONET ParserOption = 2048
+ PARSE_NODICT ParserOption = 4096
+ PARSE_NSCLEAN ParserOption = 8192
+ PARSE_NOCDATA ParserOption = 16384
+ PARSE_NOXINCNODE ParserOption = 32768
+ PARSE_COMPACT ParserOption = 65536
+ PARSE_OLD10 ParserOption = 131072
+ PARSE_NOBASEFIX ParserOption = 262144
+ PARSE_HUGE ParserOption = 524288
+ PARSE_OLDSAX ParserOption = 1048576
+ PARSE_IGNORE_ENC ParserOption = 2097152
+ PARSE_BIG_LINES ParserOption = 4194304
+ PARSE_NO_XXE ParserOption = 8388608
+)
+
+//go:linkname CtxtReset C.xmlCtxtReset
+func CtxtReset(ctxt ParserCtxtPtr)
+
+//go:linkname CtxtResetPush C.xmlCtxtResetPush
+func CtxtResetPush(ctxt ParserCtxtPtr, chunk *c.Char, size c.Int, filename *c.Char, encoding *c.Char) c.Int
+
+//go:linkname CtxtSetOptions C.xmlCtxtSetOptions
+func CtxtSetOptions(ctxt ParserCtxtPtr, options c.Int) c.Int
+
+//go:linkname CtxtUseOptions C.xmlCtxtUseOptions
+func CtxtUseOptions(ctxt ParserCtxtPtr, options c.Int) c.Int
+
+//go:linkname CtxtSetErrorHandler C.xmlCtxtSetErrorHandler
+func CtxtSetErrorHandler(ctxt ParserCtxtPtr, handler StructuredErrorFunc, data c.Pointer)
+
+//go:linkname CtxtSetMaxAmplification C.xmlCtxtSetMaxAmplification
+func CtxtSetMaxAmplification(ctxt ParserCtxtPtr, maxAmpl c.Uint)
+
+// llgo:link (*Char).ReadDoc C.xmlReadDoc
+func (recv_ *Char) ReadDoc(URL *c.Char, encoding *c.Char, options c.Int) DocPtr {
+ return nil
+}
+
+//go:linkname ReadFile C.xmlReadFile
+func ReadFile(URL *c.Char, encoding *c.Char, options c.Int) DocPtr
+
+//go:linkname ReadMemory C.xmlReadMemory
+func ReadMemory(buffer *c.Char, size c.Int, URL *c.Char, encoding *c.Char, options c.Int) DocPtr
+
+//go:linkname ReadFd C.xmlReadFd
+func ReadFd(fd c.Int, URL *c.Char, encoding *c.Char, options c.Int) DocPtr
+
+//go:linkname ReadIO C.xmlReadIO
+func ReadIO(ioread InputReadCallback, ioclose InputCloseCallback, ioctx c.Pointer, URL *c.Char, encoding *c.Char, options c.Int) DocPtr
+
+//go:linkname CtxtParseDocument C.xmlCtxtParseDocument
+func CtxtParseDocument(ctxt ParserCtxtPtr, input ParserInputPtr) DocPtr
+
+//go:linkname CtxtReadDoc C.xmlCtxtReadDoc
+func CtxtReadDoc(ctxt ParserCtxtPtr, cur *Char, URL *c.Char, encoding *c.Char, options c.Int) DocPtr
+
+//go:linkname CtxtReadFile C.xmlCtxtReadFile
+func CtxtReadFile(ctxt ParserCtxtPtr, filename *c.Char, encoding *c.Char, options c.Int) DocPtr
+
+//go:linkname CtxtReadMemory C.xmlCtxtReadMemory
+func CtxtReadMemory(ctxt ParserCtxtPtr, buffer *c.Char, size c.Int, URL *c.Char, encoding *c.Char, options c.Int) DocPtr
+
+//go:linkname CtxtReadFd C.xmlCtxtReadFd
+func CtxtReadFd(ctxt ParserCtxtPtr, fd c.Int, URL *c.Char, encoding *c.Char, options c.Int) DocPtr
+
+//go:linkname CtxtReadIO C.xmlCtxtReadIO
+func CtxtReadIO(ctxt ParserCtxtPtr, ioread InputReadCallback, ioclose InputCloseCallback, ioctx c.Pointer, URL *c.Char, encoding *c.Char, options c.Int) DocPtr
+
+type Feature c.Int
+
+const (
+ WITH_THREAD Feature = 1
+ WITH_TREE Feature = 2
+ WITH_OUTPUT Feature = 3
+ WITH_PUSH Feature = 4
+ WITH_READER Feature = 5
+ WITH_PATTERN Feature = 6
+ WITH_WRITER Feature = 7
+ WITH_SAX1 Feature = 8
+ WITH_FTP Feature = 9
+ WITH_HTTP Feature = 10
+ WITH_VALID Feature = 11
+ WITH_HTML Feature = 12
+ WITH_LEGACY Feature = 13
+ WITH_C14N Feature = 14
+ WITH_CATALOG Feature = 15
+ WITH_XPATH Feature = 16
+ WITH_XPTR Feature = 17
+ WITH_XINCLUDE Feature = 18
+ WITH_ICONV Feature = 19
+ WITH_ISO8859X Feature = 20
+ WITH_UNICODE Feature = 21
+ WITH_REGEXP Feature = 22
+ WITH_AUTOMATA Feature = 23
+ WITH_EXPR Feature = 24
+ WITH_SCHEMAS Feature = 25
+ WITH_SCHEMATRON Feature = 26
+ WITH_MODULES Feature = 27
+ WITH_DEBUG Feature = 28
+ WITH_DEBUG_MEM Feature = 29
+ WITH_DEBUG_RUN Feature = 30
+ WITH_ZLIB Feature = 31
+ WITH_ICU Feature = 32
+ WITH_LZMA Feature = 33
+ WITH_NONE Feature = 99999
+)
+
+// llgo:link Feature.HasFeature C.xmlHasFeature
+func (recv_ Feature) HasFeature() c.Int {
+ return 0
+}
diff --git a/libxml2/parserInternals.go b/libxml2/parserInternals.go
new file mode 100644
index 0000000..fa0d184
--- /dev/null
+++ b/libxml2/parserInternals.go
@@ -0,0 +1,321 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+const MAX_TEXT_LENGTH = 10000000
+const MAX_HUGE_LENGTH = 1000000000
+const MAX_NAME_LENGTH = 50000
+const MAX_DICTIONARY_LIMIT = 10000000
+const MAX_LOOKUP_LIMIT = 10000000
+const MAX_NAMELEN = 100
+const INPUT_CHUNK = 250
+const SUBSTITUTE_NONE = 0
+const SUBSTITUTE_REF = 1
+const SUBSTITUTE_PEREF = 2
+const SUBSTITUTE_BOTH = 3
+
+/*
+ * Function to finish the work of the macros where needed.
+ */
+//go:linkname IsLetter C.xmlIsLetter
+func IsLetter(c c.Int) c.Int
+
+/**
+ * Parser context.
+ */
+//go:linkname CreateFileParserCtxt C.xmlCreateFileParserCtxt
+func CreateFileParserCtxt(filename *c.Char) ParserCtxtPtr
+
+//go:linkname CreateURLParserCtxt C.xmlCreateURLParserCtxt
+func CreateURLParserCtxt(filename *c.Char, options c.Int) ParserCtxtPtr
+
+//go:linkname CreateMemoryParserCtxt C.xmlCreateMemoryParserCtxt
+func CreateMemoryParserCtxt(buffer *c.Char, size c.Int) ParserCtxtPtr
+
+// llgo:link (*Char).CreateEntityParserCtxt C.xmlCreateEntityParserCtxt
+func (recv_ *Char) CreateEntityParserCtxt(ID *Char, base *Char) ParserCtxtPtr {
+ return nil
+}
+
+//go:linkname CtxtErrMemory C.xmlCtxtErrMemory
+func CtxtErrMemory(ctxt ParserCtxtPtr)
+
+//go:linkname SwitchEncoding C.xmlSwitchEncoding
+func SwitchEncoding(ctxt ParserCtxtPtr, enc CharEncoding) c.Int
+
+//go:linkname SwitchEncodingName C.xmlSwitchEncodingName
+func SwitchEncodingName(ctxt ParserCtxtPtr, encoding *c.Char) c.Int
+
+//go:linkname SwitchToEncoding C.xmlSwitchToEncoding
+func SwitchToEncoding(ctxt ParserCtxtPtr, handler CharEncodingHandlerPtr) c.Int
+
+//go:linkname SwitchInputEncoding C.xmlSwitchInputEncoding
+func SwitchInputEncoding(ctxt ParserCtxtPtr, input ParserInputPtr, handler CharEncodingHandlerPtr) c.Int
+
+/**
+ * Input Streams.
+ */
+//go:linkname NewStringInputStream C.xmlNewStringInputStream
+func NewStringInputStream(ctxt ParserCtxtPtr, buffer *Char) ParserInputPtr
+
+//go:linkname NewEntityInputStream C.xmlNewEntityInputStream
+func NewEntityInputStream(ctxt ParserCtxtPtr, entity EntityPtr) ParserInputPtr
+
+//go:linkname PushInput C.xmlPushInput
+func PushInput(ctxt ParserCtxtPtr, input ParserInputPtr) c.Int
+
+//go:linkname PopInput C.xmlPopInput
+func PopInput(ctxt ParserCtxtPtr) Char
+
+//go:linkname FreeInputStream C.xmlFreeInputStream
+func FreeInputStream(input ParserInputPtr)
+
+//go:linkname NewInputFromFile C.xmlNewInputFromFile
+func NewInputFromFile(ctxt ParserCtxtPtr, filename *c.Char) ParserInputPtr
+
+//go:linkname NewInputStream C.xmlNewInputStream
+func NewInputStream(ctxt ParserCtxtPtr) ParserInputPtr
+
+/**
+ * Namespaces.
+ */
+//go:linkname SplitQName C.xmlSplitQName
+func SplitQName(ctxt ParserCtxtPtr, name *Char, prefix **Char) *Char
+
+/**
+ * Generic production rules.
+ */
+//go:linkname ParseName C.xmlParseName
+func ParseName(ctxt ParserCtxtPtr) *Char
+
+//go:linkname ParseNmtoken C.xmlParseNmtoken
+func ParseNmtoken(ctxt ParserCtxtPtr) *Char
+
+//go:linkname ParseEntityValue C.xmlParseEntityValue
+func ParseEntityValue(ctxt ParserCtxtPtr, orig **Char) *Char
+
+//go:linkname ParseAttValue C.xmlParseAttValue
+func ParseAttValue(ctxt ParserCtxtPtr) *Char
+
+//go:linkname ParseSystemLiteral C.xmlParseSystemLiteral
+func ParseSystemLiteral(ctxt ParserCtxtPtr) *Char
+
+//go:linkname ParsePubidLiteral C.xmlParsePubidLiteral
+func ParsePubidLiteral(ctxt ParserCtxtPtr) *Char
+
+//go:linkname ParseCharData C.xmlParseCharData
+func ParseCharData(ctxt ParserCtxtPtr, cdata c.Int)
+
+//go:linkname ParseExternalID C.xmlParseExternalID
+func ParseExternalID(ctxt ParserCtxtPtr, publicID **Char, strict c.Int) *Char
+
+//go:linkname ParseComment C.xmlParseComment
+func ParseComment(ctxt ParserCtxtPtr)
+
+//go:linkname ParsePITarget C.xmlParsePITarget
+func ParsePITarget(ctxt ParserCtxtPtr) *Char
+
+//go:linkname ParsePI C.xmlParsePI
+func ParsePI(ctxt ParserCtxtPtr)
+
+//go:linkname ParseNotationDecl C.xmlParseNotationDecl
+func ParseNotationDecl(ctxt ParserCtxtPtr)
+
+//go:linkname ParseEntityDecl C.xmlParseEntityDecl
+func ParseEntityDecl(ctxt ParserCtxtPtr)
+
+//go:linkname ParseDefaultDecl C.xmlParseDefaultDecl
+func ParseDefaultDecl(ctxt ParserCtxtPtr, value **Char) c.Int
+
+//go:linkname ParseNotationType C.xmlParseNotationType
+func ParseNotationType(ctxt ParserCtxtPtr) EnumerationPtr
+
+//go:linkname ParseEnumerationType C.xmlParseEnumerationType
+func ParseEnumerationType(ctxt ParserCtxtPtr) EnumerationPtr
+
+//go:linkname ParseEnumeratedType C.xmlParseEnumeratedType
+func ParseEnumeratedType(ctxt ParserCtxtPtr, tree *EnumerationPtr) c.Int
+
+//go:linkname ParseAttributeType C.xmlParseAttributeType
+func ParseAttributeType(ctxt ParserCtxtPtr, tree *EnumerationPtr) c.Int
+
+//go:linkname ParseAttributeListDecl C.xmlParseAttributeListDecl
+func ParseAttributeListDecl(ctxt ParserCtxtPtr)
+
+//go:linkname ParseElementMixedContentDecl C.xmlParseElementMixedContentDecl
+func ParseElementMixedContentDecl(ctxt ParserCtxtPtr, inputchk c.Int) ElementContentPtr
+
+//go:linkname ParseElementChildrenContentDecl C.xmlParseElementChildrenContentDecl
+func ParseElementChildrenContentDecl(ctxt ParserCtxtPtr, inputchk c.Int) ElementContentPtr
+
+//go:linkname ParseElementContentDecl C.xmlParseElementContentDecl
+func ParseElementContentDecl(ctxt ParserCtxtPtr, name *Char, result *ElementContentPtr) c.Int
+
+//go:linkname ParseElementDecl C.xmlParseElementDecl
+func ParseElementDecl(ctxt ParserCtxtPtr) c.Int
+
+//go:linkname ParseMarkupDecl C.xmlParseMarkupDecl
+func ParseMarkupDecl(ctxt ParserCtxtPtr)
+
+//go:linkname ParseCharRef C.xmlParseCharRef
+func ParseCharRef(ctxt ParserCtxtPtr) c.Int
+
+//go:linkname ParseEntityRef C.xmlParseEntityRef
+func ParseEntityRef(ctxt ParserCtxtPtr) EntityPtr
+
+//go:linkname ParseReference C.xmlParseReference
+func ParseReference(ctxt ParserCtxtPtr)
+
+//go:linkname ParsePEReference C.xmlParsePEReference
+func ParsePEReference(ctxt ParserCtxtPtr)
+
+//go:linkname ParseDocTypeDecl C.xmlParseDocTypeDecl
+func ParseDocTypeDecl(ctxt ParserCtxtPtr)
+
+//go:linkname ParseAttribute C.xmlParseAttribute
+func ParseAttribute(ctxt ParserCtxtPtr, value **Char) *Char
+
+//go:linkname ParseStartTag C.xmlParseStartTag
+func ParseStartTag(ctxt ParserCtxtPtr) *Char
+
+//go:linkname ParseEndTag C.xmlParseEndTag
+func ParseEndTag(ctxt ParserCtxtPtr)
+
+//go:linkname ParseCDSect C.xmlParseCDSect
+func ParseCDSect(ctxt ParserCtxtPtr)
+
+//go:linkname ParseContent C.xmlParseContent
+func ParseContent(ctxt ParserCtxtPtr)
+
+//go:linkname ParseElement C.xmlParseElement
+func ParseElement(ctxt ParserCtxtPtr)
+
+//go:linkname ParseVersionNum C.xmlParseVersionNum
+func ParseVersionNum(ctxt ParserCtxtPtr) *Char
+
+//go:linkname ParseVersionInfo C.xmlParseVersionInfo
+func ParseVersionInfo(ctxt ParserCtxtPtr) *Char
+
+//go:linkname ParseEncName C.xmlParseEncName
+func ParseEncName(ctxt ParserCtxtPtr) *Char
+
+//go:linkname ParseEncodingDecl C.xmlParseEncodingDecl
+func ParseEncodingDecl(ctxt ParserCtxtPtr) *Char
+
+//go:linkname ParseSDDecl C.xmlParseSDDecl
+func ParseSDDecl(ctxt ParserCtxtPtr) c.Int
+
+//go:linkname ParseXMLDecl C.xmlParseXMLDecl
+func ParseXMLDecl(ctxt ParserCtxtPtr)
+
+//go:linkname ParseTextDecl C.xmlParseTextDecl
+func ParseTextDecl(ctxt ParserCtxtPtr)
+
+//go:linkname ParseMisc C.xmlParseMisc
+func ParseMisc(ctxt ParserCtxtPtr)
+
+//go:linkname ParseExternalSubset C.xmlParseExternalSubset
+func ParseExternalSubset(ctxt ParserCtxtPtr, ExternalID *Char, SystemID *Char)
+
+//go:linkname StringDecodeEntities C.xmlStringDecodeEntities
+func StringDecodeEntities(ctxt ParserCtxtPtr, str *Char, what c.Int, end Char, end2 Char, end3 Char) *Char
+
+//go:linkname StringLenDecodeEntities C.xmlStringLenDecodeEntities
+func StringLenDecodeEntities(ctxt ParserCtxtPtr, str *Char, len c.Int, what c.Int, end Char, end2 Char, end3 Char) *Char
+
+/*
+ * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP.
+ */
+//go:linkname NodePush C.nodePush
+func NodePush(ctxt ParserCtxtPtr, value NodePtr) c.Int
+
+//go:linkname NodePop C.nodePop
+func NodePop(ctxt ParserCtxtPtr) NodePtr
+
+//go:linkname InputPush C.inputPush
+func InputPush(ctxt ParserCtxtPtr, value ParserInputPtr) c.Int
+
+//go:linkname InputPop C.inputPop
+func InputPop(ctxt ParserCtxtPtr) ParserInputPtr
+
+//go:linkname NamePop C.namePop
+func NamePop(ctxt ParserCtxtPtr) *Char
+
+//go:linkname NamePush C.namePush
+func NamePush(ctxt ParserCtxtPtr, value *Char) c.Int
+
+/*
+ * other commodities shared between parser.c and parserInternals.
+ */
+//go:linkname SkipBlankChars C.xmlSkipBlankChars
+func SkipBlankChars(ctxt ParserCtxtPtr) c.Int
+
+//go:linkname StringCurrentChar C.xmlStringCurrentChar
+func StringCurrentChar(ctxt ParserCtxtPtr, cur *Char, len *c.Int) c.Int
+
+//go:linkname ParserHandlePEReference C.xmlParserHandlePEReference
+func ParserHandlePEReference(ctxt ParserCtxtPtr)
+
+// llgo:link (*Char).CheckLanguageID C.xmlCheckLanguageID
+func (recv_ *Char) CheckLanguageID() c.Int {
+ return 0
+}
+
+/*
+ * Really core function shared with HTML parser.
+ */
+//go:linkname CurrentChar C.xmlCurrentChar
+func CurrentChar(ctxt ParserCtxtPtr, len *c.Int) c.Int
+
+// llgo:link (*Char).CopyCharMultiByte C.xmlCopyCharMultiByte
+func (recv_ *Char) CopyCharMultiByte(val c.Int) c.Int {
+ return 0
+}
+
+//go:linkname CopyChar C.xmlCopyChar
+func CopyChar(len c.Int, out *Char, val c.Int) c.Int
+
+//go:linkname NextChar C.xmlNextChar
+func NextChar(ctxt ParserCtxtPtr)
+
+//go:linkname ParserInputShrink C.xmlParserInputShrink
+func ParserInputShrink(in ParserInputPtr)
+
+// llgo:type C
+type EntityReferenceFunc func(EntityPtr, NodePtr, NodePtr)
+
+//go:linkname SetEntityReferenceFunc C.xmlSetEntityReferenceFunc
+func SetEntityReferenceFunc(func_ EntityReferenceFunc)
+
+//go:linkname ParseQuotedString C.xmlParseQuotedString
+func ParseQuotedString(ctxt ParserCtxtPtr) *Char
+
+//go:linkname ParseNamespace C.xmlParseNamespace
+func ParseNamespace(ctxt ParserCtxtPtr)
+
+//go:linkname NamespaceParseNSDef C.xmlNamespaceParseNSDef
+func NamespaceParseNSDef(ctxt ParserCtxtPtr) *Char
+
+//go:linkname ScanName C.xmlScanName
+func ScanName(ctxt ParserCtxtPtr) *Char
+
+//go:linkname NamespaceParseNCName C.xmlNamespaceParseNCName
+func NamespaceParseNCName(ctxt ParserCtxtPtr) *Char
+
+//go:linkname ParserHandleReference C.xmlParserHandleReference
+func ParserHandleReference(ctxt ParserCtxtPtr)
+
+//go:linkname NamespaceParseQName C.xmlNamespaceParseQName
+func NamespaceParseQName(ctxt ParserCtxtPtr, prefix **Char) *Char
+
+/**
+ * Entities
+ */
+//go:linkname DecodeEntities C.xmlDecodeEntities
+func DecodeEntities(ctxt ParserCtxtPtr, len c.Int, what c.Int, end Char, end2 Char, end3 Char) *Char
+
+//go:linkname HandleEntity C.xmlHandleEntity
+func HandleEntity(ctxt ParserCtxtPtr, entity EntityPtr)
diff --git a/libxml2/pattern.go b/libxml2/pattern.go
new file mode 100644
index 0000000..e43848d
--- /dev/null
+++ b/libxml2/pattern.go
@@ -0,0 +1,78 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type X_xmlPattern struct {
+ Unused [8]uint8
+}
+type Pattern X_xmlPattern
+type PatternPtr *Pattern
+type PatternFlags c.Int
+
+const (
+ PATTERN_DEFAULT PatternFlags = 0
+ PATTERN_XPATH PatternFlags = 1
+ PATTERN_XSSEL PatternFlags = 2
+ PATTERN_XSFIELD PatternFlags = 4
+)
+
+//go:linkname FreePattern C.xmlFreePattern
+func FreePattern(comp PatternPtr)
+
+//go:linkname FreePatternList C.xmlFreePatternList
+func FreePatternList(comp PatternPtr)
+
+// llgo:link (*Char).Patterncompile C.xmlPatterncompile
+func (recv_ *Char) Patterncompile(dict *Dict, flags c.Int, namespaces **Char) PatternPtr {
+ return nil
+}
+
+// llgo:link (*Char).PatternCompileSafe C.xmlPatternCompileSafe
+func (recv_ *Char) PatternCompileSafe(dict *Dict, flags c.Int, namespaces **Char, patternOut *PatternPtr) c.Int {
+ return 0
+}
+
+//go:linkname PatternMatch C.xmlPatternMatch
+func PatternMatch(comp PatternPtr, node NodePtr) c.Int
+
+type X_xmlStreamCtxt struct {
+ Unused [8]uint8
+}
+type StreamCtxt X_xmlStreamCtxt
+type StreamCtxtPtr *StreamCtxt
+
+//go:linkname PatternStreamable C.xmlPatternStreamable
+func PatternStreamable(comp PatternPtr) c.Int
+
+//go:linkname PatternMaxDepth C.xmlPatternMaxDepth
+func PatternMaxDepth(comp PatternPtr) c.Int
+
+//go:linkname PatternMinDepth C.xmlPatternMinDepth
+func PatternMinDepth(comp PatternPtr) c.Int
+
+//go:linkname PatternFromRoot C.xmlPatternFromRoot
+func PatternFromRoot(comp PatternPtr) c.Int
+
+//go:linkname PatternGetStreamCtxt C.xmlPatternGetStreamCtxt
+func PatternGetStreamCtxt(comp PatternPtr) StreamCtxtPtr
+
+//go:linkname FreeStreamCtxt C.xmlFreeStreamCtxt
+func FreeStreamCtxt(stream StreamCtxtPtr)
+
+//go:linkname StreamPushNode C.xmlStreamPushNode
+func StreamPushNode(stream StreamCtxtPtr, name *Char, ns *Char, nodeType c.Int) c.Int
+
+//go:linkname StreamPush C.xmlStreamPush
+func StreamPush(stream StreamCtxtPtr, name *Char, ns *Char) c.Int
+
+//go:linkname StreamPushAttr C.xmlStreamPushAttr
+func StreamPushAttr(stream StreamCtxtPtr, name *Char, ns *Char) c.Int
+
+//go:linkname StreamPop C.xmlStreamPop
+func StreamPop(stream StreamCtxtPtr) c.Int
+
+//go:linkname StreamWantsAnyNode C.xmlStreamWantsAnyNode
+func StreamWantsAnyNode(stream StreamCtxtPtr) c.Int
diff --git a/libxml2/relaxng.go b/libxml2/relaxng.go
new file mode 100644
index 0000000..4b04c38
--- /dev/null
+++ b/libxml2/relaxng.go
@@ -0,0 +1,163 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type X_xmlRelaxNG struct {
+ Unused [8]uint8
+}
+type RelaxNG X_xmlRelaxNG
+type RelaxNGPtr *RelaxNG
+
+// llgo:type C
+type RelaxNGValidityErrorFunc func(__llgo_arg_0 c.Pointer, __llgo_arg_1 *c.Char, __llgo_va_list ...interface{})
+
+// llgo:type C
+type RelaxNGValidityWarningFunc func(__llgo_arg_0 c.Pointer, __llgo_arg_1 *c.Char, __llgo_va_list ...interface{})
+
+type X_xmlRelaxNGParserCtxt struct {
+ Unused [8]uint8
+}
+type RelaxNGParserCtxt X_xmlRelaxNGParserCtxt
+type RelaxNGParserCtxtPtr *RelaxNGParserCtxt
+
+type X_xmlRelaxNGValidCtxt struct {
+ Unused [8]uint8
+}
+type RelaxNGValidCtxt X_xmlRelaxNGValidCtxt
+type RelaxNGValidCtxtPtr *RelaxNGValidCtxt
+type RelaxNGValidErr c.Int
+
+const (
+ RELAXNG_OK RelaxNGValidErr = 0
+ RELAXNG_ERR_MEMORY RelaxNGValidErr = 1
+ RELAXNG_ERR_TYPE RelaxNGValidErr = 2
+ RELAXNG_ERR_TYPEVAL RelaxNGValidErr = 3
+ RELAXNG_ERR_DUPID RelaxNGValidErr = 4
+ RELAXNG_ERR_TYPECMP RelaxNGValidErr = 5
+ RELAXNG_ERR_NOSTATE RelaxNGValidErr = 6
+ RELAXNG_ERR_NODEFINE RelaxNGValidErr = 7
+ RELAXNG_ERR_LISTEXTRA RelaxNGValidErr = 8
+ RELAXNG_ERR_LISTEMPTY RelaxNGValidErr = 9
+ RELAXNG_ERR_INTERNODATA RelaxNGValidErr = 10
+ RELAXNG_ERR_INTERSEQ RelaxNGValidErr = 11
+ RELAXNG_ERR_INTEREXTRA RelaxNGValidErr = 12
+ RELAXNG_ERR_ELEMNAME RelaxNGValidErr = 13
+ RELAXNG_ERR_ATTRNAME RelaxNGValidErr = 14
+ RELAXNG_ERR_ELEMNONS RelaxNGValidErr = 15
+ RELAXNG_ERR_ATTRNONS RelaxNGValidErr = 16
+ RELAXNG_ERR_ELEMWRONGNS RelaxNGValidErr = 17
+ RELAXNG_ERR_ATTRWRONGNS RelaxNGValidErr = 18
+ RELAXNG_ERR_ELEMEXTRANS RelaxNGValidErr = 19
+ RELAXNG_ERR_ATTREXTRANS RelaxNGValidErr = 20
+ RELAXNG_ERR_ELEMNOTEMPTY RelaxNGValidErr = 21
+ RELAXNG_ERR_NOELEM RelaxNGValidErr = 22
+ RELAXNG_ERR_NOTELEM RelaxNGValidErr = 23
+ RELAXNG_ERR_ATTRVALID RelaxNGValidErr = 24
+ RELAXNG_ERR_CONTENTVALID RelaxNGValidErr = 25
+ RELAXNG_ERR_EXTRACONTENT RelaxNGValidErr = 26
+ RELAXNG_ERR_INVALIDATTR RelaxNGValidErr = 27
+ RELAXNG_ERR_DATAELEM RelaxNGValidErr = 28
+ RELAXNG_ERR_VALELEM RelaxNGValidErr = 29
+ RELAXNG_ERR_LISTELEM RelaxNGValidErr = 30
+ RELAXNG_ERR_DATATYPE RelaxNGValidErr = 31
+ RELAXNG_ERR_VALUE RelaxNGValidErr = 32
+ RELAXNG_ERR_LIST RelaxNGValidErr = 33
+ RELAXNG_ERR_NOGRAMMAR RelaxNGValidErr = 34
+ RELAXNG_ERR_EXTRADATA RelaxNGValidErr = 35
+ RELAXNG_ERR_LACKDATA RelaxNGValidErr = 36
+ RELAXNG_ERR_INTERNAL RelaxNGValidErr = 37
+ RELAXNG_ERR_ELEMWRONG RelaxNGValidErr = 38
+ RELAXNG_ERR_TEXTWRONG RelaxNGValidErr = 39
+)
+
+type RelaxNGParserFlag c.Int
+
+const (
+ RELAXNGP_NONE RelaxNGParserFlag = 0
+ RELAXNGP_FREE_DOC RelaxNGParserFlag = 1
+ RELAXNGP_CRNG RelaxNGParserFlag = 2
+)
+
+//go:linkname RelaxNGInitTypes C.xmlRelaxNGInitTypes
+func RelaxNGInitTypes() c.Int
+
+//go:linkname RelaxNGCleanupTypes C.xmlRelaxNGCleanupTypes
+func RelaxNGCleanupTypes()
+
+/*
+ * Interfaces for parsing.
+ */
+//go:linkname RelaxNGNewParserCtxt C.xmlRelaxNGNewParserCtxt
+func RelaxNGNewParserCtxt(URL *c.Char) RelaxNGParserCtxtPtr
+
+//go:linkname RelaxNGNewMemParserCtxt C.xmlRelaxNGNewMemParserCtxt
+func RelaxNGNewMemParserCtxt(buffer *c.Char, size c.Int) RelaxNGParserCtxtPtr
+
+//go:linkname RelaxNGNewDocParserCtxt C.xmlRelaxNGNewDocParserCtxt
+func RelaxNGNewDocParserCtxt(doc DocPtr) RelaxNGParserCtxtPtr
+
+//go:linkname RelaxParserSetFlag C.xmlRelaxParserSetFlag
+func RelaxParserSetFlag(ctxt RelaxNGParserCtxtPtr, flag c.Int) c.Int
+
+//go:linkname RelaxNGFreeParserCtxt C.xmlRelaxNGFreeParserCtxt
+func RelaxNGFreeParserCtxt(ctxt RelaxNGParserCtxtPtr)
+
+//go:linkname RelaxNGSetParserErrors C.xmlRelaxNGSetParserErrors
+func RelaxNGSetParserErrors(ctxt RelaxNGParserCtxtPtr, err RelaxNGValidityErrorFunc, warn RelaxNGValidityWarningFunc, ctx c.Pointer)
+
+//go:linkname RelaxNGGetParserErrors C.xmlRelaxNGGetParserErrors
+func RelaxNGGetParserErrors(ctxt RelaxNGParserCtxtPtr, err RelaxNGValidityErrorFunc, warn RelaxNGValidityWarningFunc, ctx *c.Pointer) c.Int
+
+//go:linkname RelaxNGSetParserStructuredErrors C.xmlRelaxNGSetParserStructuredErrors
+func RelaxNGSetParserStructuredErrors(ctxt RelaxNGParserCtxtPtr, serror StructuredErrorFunc, ctx c.Pointer)
+
+//go:linkname RelaxNGParse C.xmlRelaxNGParse
+func RelaxNGParse(ctxt RelaxNGParserCtxtPtr) RelaxNGPtr
+
+//go:linkname RelaxNGFree C.xmlRelaxNGFree
+func RelaxNGFree(schema RelaxNGPtr)
+
+//go:linkname RelaxNGDump C.xmlRelaxNGDump
+func RelaxNGDump(output *c.FILE, schema RelaxNGPtr)
+
+//go:linkname RelaxNGDumpTree C.xmlRelaxNGDumpTree
+func RelaxNGDumpTree(output *c.FILE, schema RelaxNGPtr)
+
+/*
+ * Interfaces for validating
+ */
+//go:linkname RelaxNGSetValidErrors C.xmlRelaxNGSetValidErrors
+func RelaxNGSetValidErrors(ctxt RelaxNGValidCtxtPtr, err RelaxNGValidityErrorFunc, warn RelaxNGValidityWarningFunc, ctx c.Pointer)
+
+//go:linkname RelaxNGGetValidErrors C.xmlRelaxNGGetValidErrors
+func RelaxNGGetValidErrors(ctxt RelaxNGValidCtxtPtr, err RelaxNGValidityErrorFunc, warn RelaxNGValidityWarningFunc, ctx *c.Pointer) c.Int
+
+//go:linkname RelaxNGSetValidStructuredErrors C.xmlRelaxNGSetValidStructuredErrors
+func RelaxNGSetValidStructuredErrors(ctxt RelaxNGValidCtxtPtr, serror StructuredErrorFunc, ctx c.Pointer)
+
+//go:linkname RelaxNGNewValidCtxt C.xmlRelaxNGNewValidCtxt
+func RelaxNGNewValidCtxt(schema RelaxNGPtr) RelaxNGValidCtxtPtr
+
+//go:linkname RelaxNGFreeValidCtxt C.xmlRelaxNGFreeValidCtxt
+func RelaxNGFreeValidCtxt(ctxt RelaxNGValidCtxtPtr)
+
+//go:linkname RelaxNGValidateDoc C.xmlRelaxNGValidateDoc
+func RelaxNGValidateDoc(ctxt RelaxNGValidCtxtPtr, doc DocPtr) c.Int
+
+/*
+ * Interfaces for progressive validation when possible
+ */
+//go:linkname RelaxNGValidatePushElement C.xmlRelaxNGValidatePushElement
+func RelaxNGValidatePushElement(ctxt RelaxNGValidCtxtPtr, doc DocPtr, elem NodePtr) c.Int
+
+//go:linkname RelaxNGValidatePushCData C.xmlRelaxNGValidatePushCData
+func RelaxNGValidatePushCData(ctxt RelaxNGValidCtxtPtr, data *Char, len c.Int) c.Int
+
+//go:linkname RelaxNGValidatePopElement C.xmlRelaxNGValidatePopElement
+func RelaxNGValidatePopElement(ctxt RelaxNGValidCtxtPtr, doc DocPtr, elem NodePtr) c.Int
+
+//go:linkname RelaxNGValidateFullElement C.xmlRelaxNGValidateFullElement
+func RelaxNGValidateFullElement(ctxt RelaxNGValidCtxtPtr, doc DocPtr, elem NodePtr) c.Int
diff --git a/libxml2/schemasInternals.go b/libxml2/schemasInternals.go
new file mode 100644
index 0000000..0a62c67
--- /dev/null
+++ b/libxml2/schemasInternals.go
@@ -0,0 +1,358 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+const SCHEMAS_ANYATTR_SKIP = 1
+const SCHEMAS_ANYATTR_LAX = 2
+const SCHEMAS_ANYATTR_STRICT = 3
+const SCHEMAS_ANY_SKIP = 1
+const SCHEMAS_ANY_LAX = 2
+const SCHEMAS_ANY_STRICT = 3
+const SCHEMAS_ATTR_USE_PROHIBITED = 0
+const SCHEMAS_ATTR_USE_REQUIRED = 1
+const SCHEMAS_ATTR_USE_OPTIONAL = 2
+const SCHEMAS_FACET_UNKNOWN = 0
+const SCHEMAS_FACET_PRESERVE = 1
+const SCHEMAS_FACET_REPLACE = 2
+const SCHEMAS_FACET_COLLAPSE = 3
+
+type SchemaValType c.Int
+
+const (
+ SCHEMAS_UNKNOWN SchemaValType = 0
+ SCHEMAS_STRING SchemaValType = 1
+ SCHEMAS_NORMSTRING SchemaValType = 2
+ SCHEMAS_DECIMAL SchemaValType = 3
+ SCHEMAS_TIME SchemaValType = 4
+ SCHEMAS_GDAY SchemaValType = 5
+ SCHEMAS_GMONTH SchemaValType = 6
+ SCHEMAS_GMONTHDAY SchemaValType = 7
+ SCHEMAS_GYEAR SchemaValType = 8
+ SCHEMAS_GYEARMONTH SchemaValType = 9
+ SCHEMAS_DATE SchemaValType = 10
+ SCHEMAS_DATETIME SchemaValType = 11
+ SCHEMAS_DURATION SchemaValType = 12
+ SCHEMAS_FLOAT SchemaValType = 13
+ SCHEMAS_DOUBLE SchemaValType = 14
+ SCHEMAS_BOOLEAN SchemaValType = 15
+ SCHEMAS_TOKEN SchemaValType = 16
+ SCHEMAS_LANGUAGE SchemaValType = 17
+ SCHEMAS_NMTOKEN SchemaValType = 18
+ SCHEMAS_NMTOKENS SchemaValType = 19
+ SCHEMAS_NAME SchemaValType = 20
+ SCHEMAS_QNAME SchemaValType = 21
+ SCHEMAS_NCNAME SchemaValType = 22
+ SCHEMAS_ID SchemaValType = 23
+ SCHEMAS_IDREF SchemaValType = 24
+ SCHEMAS_IDREFS SchemaValType = 25
+ SCHEMAS_ENTITY SchemaValType = 26
+ SCHEMAS_ENTITIES SchemaValType = 27
+ SCHEMAS_NOTATION SchemaValType = 28
+ SCHEMAS_ANYURI SchemaValType = 29
+ SCHEMAS_INTEGER SchemaValType = 30
+ SCHEMAS_NPINTEGER SchemaValType = 31
+ SCHEMAS_NINTEGER SchemaValType = 32
+ SCHEMAS_NNINTEGER SchemaValType = 33
+ SCHEMAS_PINTEGER SchemaValType = 34
+ SCHEMAS_INT SchemaValType = 35
+ SCHEMAS_UINT SchemaValType = 36
+ SCHEMAS_LONG SchemaValType = 37
+ SCHEMAS_ULONG SchemaValType = 38
+ SCHEMAS_SHORT SchemaValType = 39
+ SCHEMAS_USHORT SchemaValType = 40
+ SCHEMAS_BYTE SchemaValType = 41
+ SCHEMAS_UBYTE SchemaValType = 42
+ SCHEMAS_HEXBINARY SchemaValType = 43
+ SCHEMAS_BASE64BINARY SchemaValType = 44
+ SCHEMAS_ANYTYPE SchemaValType = 45
+ SCHEMAS_ANYSIMPLETYPE SchemaValType = 46
+)
+
+type SchemaTypeType c.Int
+
+const (
+ SCHEMA_TYPE_BASIC SchemaTypeType = 1
+ SCHEMA_TYPE_ANY SchemaTypeType = 2
+ SCHEMA_TYPE_FACET SchemaTypeType = 3
+ SCHEMA_TYPE_SIMPLE SchemaTypeType = 4
+ SCHEMA_TYPE_COMPLEX SchemaTypeType = 5
+ SCHEMA_TYPE_SEQUENCE SchemaTypeType = 6
+ SCHEMA_TYPE_CHOICE SchemaTypeType = 7
+ SCHEMA_TYPE_ALL SchemaTypeType = 8
+ SCHEMA_TYPE_SIMPLE_CONTENT SchemaTypeType = 9
+ SCHEMA_TYPE_COMPLEX_CONTENT SchemaTypeType = 10
+ SCHEMA_TYPE_UR SchemaTypeType = 11
+ SCHEMA_TYPE_RESTRICTION SchemaTypeType = 12
+ SCHEMA_TYPE_EXTENSION SchemaTypeType = 13
+ SCHEMA_TYPE_ELEMENT SchemaTypeType = 14
+ SCHEMA_TYPE_ATTRIBUTE SchemaTypeType = 15
+ SCHEMA_TYPE_ATTRIBUTEGROUP SchemaTypeType = 16
+ SCHEMA_TYPE_GROUP SchemaTypeType = 17
+ SCHEMA_TYPE_NOTATION SchemaTypeType = 18
+ SCHEMA_TYPE_LIST SchemaTypeType = 19
+ SCHEMA_TYPE_UNION SchemaTypeType = 20
+ SCHEMA_TYPE_ANY_ATTRIBUTE SchemaTypeType = 21
+ SCHEMA_TYPE_IDC_UNIQUE SchemaTypeType = 22
+ SCHEMA_TYPE_IDC_KEY SchemaTypeType = 23
+ SCHEMA_TYPE_IDC_KEYREF SchemaTypeType = 24
+ SCHEMA_TYPE_PARTICLE SchemaTypeType = 25
+ SCHEMA_TYPE_ATTRIBUTE_USE SchemaTypeType = 26
+ SCHEMA_FACET_MININCLUSIVE SchemaTypeType = 1000
+ SCHEMA_FACET_MINEXCLUSIVE SchemaTypeType = 1001
+ SCHEMA_FACET_MAXINCLUSIVE SchemaTypeType = 1002
+ SCHEMA_FACET_MAXEXCLUSIVE SchemaTypeType = 1003
+ SCHEMA_FACET_TOTALDIGITS SchemaTypeType = 1004
+ SCHEMA_FACET_FRACTIONDIGITS SchemaTypeType = 1005
+ SCHEMA_FACET_PATTERN SchemaTypeType = 1006
+ SCHEMA_FACET_ENUMERATION SchemaTypeType = 1007
+ SCHEMA_FACET_WHITESPACE SchemaTypeType = 1008
+ SCHEMA_FACET_LENGTH SchemaTypeType = 1009
+ SCHEMA_FACET_MAXLENGTH SchemaTypeType = 1010
+ SCHEMA_FACET_MINLENGTH SchemaTypeType = 1011
+ SCHEMA_EXTRA_QNAMEREF SchemaTypeType = 2000
+ SCHEMA_EXTRA_ATTR_USE_PROHIB SchemaTypeType = 2001
+)
+
+type SchemaContentType c.Int
+
+const (
+ SCHEMA_CONTENT_UNKNOWN SchemaContentType = 0
+ SCHEMA_CONTENT_EMPTY SchemaContentType = 1
+ SCHEMA_CONTENT_ELEMENTS SchemaContentType = 2
+ SCHEMA_CONTENT_MIXED SchemaContentType = 3
+ SCHEMA_CONTENT_SIMPLE SchemaContentType = 4
+ SCHEMA_CONTENT_MIXED_OR_ELEMENTS SchemaContentType = 5
+ SCHEMA_CONTENT_BASIC SchemaContentType = 6
+ SCHEMA_CONTENT_ANY SchemaContentType = 7
+)
+
+type X_xmlSchemaVal struct {
+ Unused [8]uint8
+}
+type SchemaVal X_xmlSchemaVal
+type SchemaValPtr *SchemaVal
+
+type X_xmlSchemaType struct {
+ Type SchemaTypeType
+ Next *X_xmlSchemaType
+ Name *Char
+ Id *Char
+ Ref *Char
+ RefNs *Char
+ Annot SchemaAnnotPtr
+ Subtypes SchemaTypePtr
+ Attributes SchemaAttributePtr
+ Node NodePtr
+ MinOccurs c.Int
+ MaxOccurs c.Int
+ Flags c.Int
+ ContentType SchemaContentType
+ Base *Char
+ BaseNs *Char
+ BaseType SchemaTypePtr
+ Facets SchemaFacetPtr
+ Redef *X_xmlSchemaType
+ Recurse c.Int
+ AttributeUses *SchemaAttributeLinkPtr
+ AttributeWildcard SchemaWildcardPtr
+ BuiltInType c.Int
+ MemberTypes SchemaTypeLinkPtr
+ FacetSet SchemaFacetLinkPtr
+ RefPrefix *Char
+ ContentTypeDef SchemaTypePtr
+ ContModel RegexpPtr
+ TargetNamespace *Char
+ AttrUses c.Pointer
+}
+type SchemaType X_xmlSchemaType
+type SchemaTypePtr *SchemaType
+
+type X_xmlSchemaFacet struct {
+ Type SchemaTypeType
+ Next *X_xmlSchemaFacet
+ Value *Char
+ Id *Char
+ Annot SchemaAnnotPtr
+ Node NodePtr
+ Fixed c.Int
+ Whitespace c.Int
+ Val SchemaValPtr
+ Regexp RegexpPtr
+}
+type SchemaFacet X_xmlSchemaFacet
+type SchemaFacetPtr *SchemaFacet
+
+type X_xmlSchemaAnnot struct {
+ Next *X_xmlSchemaAnnot
+ Content NodePtr
+}
+type SchemaAnnot X_xmlSchemaAnnot
+type SchemaAnnotPtr *SchemaAnnot
+
+type X_xmlSchemaAttribute struct {
+ Type SchemaTypeType
+ Next *X_xmlSchemaAttribute
+ Name *Char
+ Id *Char
+ Ref *Char
+ RefNs *Char
+ TypeName *Char
+ TypeNs *Char
+ Annot SchemaAnnotPtr
+ Base SchemaTypePtr
+ Occurs c.Int
+ DefValue *Char
+ Subtypes SchemaTypePtr
+ Node NodePtr
+ TargetNamespace *Char
+ Flags c.Int
+ RefPrefix *Char
+ DefVal SchemaValPtr
+ RefDecl SchemaAttributePtr
+}
+type SchemaAttribute X_xmlSchemaAttribute
+type SchemaAttributePtr *SchemaAttribute
+
+type X_xmlSchemaAttributeLink struct {
+ Next *X_xmlSchemaAttributeLink
+ Attr *X_xmlSchemaAttribute
+}
+type SchemaAttributeLink X_xmlSchemaAttributeLink
+type SchemaAttributeLinkPtr *SchemaAttributeLink
+
+type X_xmlSchemaWildcardNs struct {
+ Next *X_xmlSchemaWildcardNs
+ Value *Char
+}
+type SchemaWildcardNs X_xmlSchemaWildcardNs
+type SchemaWildcardNsPtr *SchemaWildcardNs
+
+type X_xmlSchemaWildcard struct {
+ Type SchemaTypeType
+ Id *Char
+ Annot SchemaAnnotPtr
+ Node NodePtr
+ MinOccurs c.Int
+ MaxOccurs c.Int
+ ProcessContents c.Int
+ Any c.Int
+ NsSet SchemaWildcardNsPtr
+ NegNsSet SchemaWildcardNsPtr
+ Flags c.Int
+}
+type SchemaWildcard X_xmlSchemaWildcard
+type SchemaWildcardPtr *SchemaWildcard
+
+type X_xmlSchemaAttributeGroup struct {
+ Type SchemaTypeType
+ Next *X_xmlSchemaAttribute
+ Name *Char
+ Id *Char
+ Ref *Char
+ RefNs *Char
+ Annot SchemaAnnotPtr
+ Attributes SchemaAttributePtr
+ Node NodePtr
+ Flags c.Int
+ AttributeWildcard SchemaWildcardPtr
+ RefPrefix *Char
+ RefItem SchemaAttributeGroupPtr
+ TargetNamespace *Char
+ AttrUses c.Pointer
+}
+type SchemaAttributeGroup X_xmlSchemaAttributeGroup
+type SchemaAttributeGroupPtr *SchemaAttributeGroup
+
+type X_xmlSchemaTypeLink struct {
+ Next *X_xmlSchemaTypeLink
+ Type SchemaTypePtr
+}
+type SchemaTypeLink X_xmlSchemaTypeLink
+type SchemaTypeLinkPtr *SchemaTypeLink
+
+type X_xmlSchemaFacetLink struct {
+ Next *X_xmlSchemaFacetLink
+ Facet SchemaFacetPtr
+}
+type SchemaFacetLink X_xmlSchemaFacetLink
+type SchemaFacetLinkPtr *SchemaFacetLink
+
+type X_xmlSchemaElement struct {
+ Type SchemaTypeType
+ Next *X_xmlSchemaType
+ Name *Char
+ Id *Char
+ Ref *Char
+ RefNs *Char
+ Annot SchemaAnnotPtr
+ Subtypes SchemaTypePtr
+ Attributes SchemaAttributePtr
+ Node NodePtr
+ MinOccurs c.Int
+ MaxOccurs c.Int
+ Flags c.Int
+ TargetNamespace *Char
+ NamedType *Char
+ NamedTypeNs *Char
+ SubstGroup *Char
+ SubstGroupNs *Char
+ Scope *Char
+ Value *Char
+ RefDecl *X_xmlSchemaElement
+ ContModel RegexpPtr
+ ContentType SchemaContentType
+ RefPrefix *Char
+ DefVal SchemaValPtr
+ Idcs c.Pointer
+}
+type SchemaElement X_xmlSchemaElement
+type SchemaElementPtr *SchemaElement
+
+type X_xmlSchemaNotation struct {
+ Type SchemaTypeType
+ Name *Char
+ Annot SchemaAnnotPtr
+ Identifier *Char
+ TargetNamespace *Char
+}
+type SchemaNotation X_xmlSchemaNotation
+type SchemaNotationPtr *SchemaNotation
+
+/**
+ * _xmlSchema:
+ *
+ * A Schemas definition
+ */
+
+type X_xmlSchema struct {
+ Name *Char
+ TargetNamespace *Char
+ Version *Char
+ Id *Char
+ Doc DocPtr
+ Annot SchemaAnnotPtr
+ Flags c.Int
+ TypeDecl HashTablePtr
+ AttrDecl HashTablePtr
+ AttrgrpDecl HashTablePtr
+ ElemDecl HashTablePtr
+ NotaDecl HashTablePtr
+ SchemasImports HashTablePtr
+ X_private c.Pointer
+ GroupDecl HashTablePtr
+ Dict DictPtr
+ Includes c.Pointer
+ Preserve c.Int
+ Counter c.Int
+ IdcDef HashTablePtr
+ Volatiles c.Pointer
+}
+
+//go:linkname SchemaFreeType C.xmlSchemaFreeType
+func SchemaFreeType(type_ SchemaTypePtr)
+
+//go:linkname SchemaFreeWildcard C.xmlSchemaFreeWildcard
+func SchemaFreeWildcard(wildcard SchemaWildcardPtr)
diff --git a/libxml2/schematron.go b/libxml2/schematron.go
new file mode 100644
index 0000000..c6ac9cc
--- /dev/null
+++ b/libxml2/schematron.go
@@ -0,0 +1,112 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type SchematronValidOptions c.Int
+
+const (
+ SCHEMATRON_OUT_QUIET SchematronValidOptions = 1
+ SCHEMATRON_OUT_TEXT SchematronValidOptions = 2
+ SCHEMATRON_OUT_XML SchematronValidOptions = 4
+ SCHEMATRON_OUT_ERROR SchematronValidOptions = 8
+ SCHEMATRON_OUT_FILE SchematronValidOptions = 256
+ SCHEMATRON_OUT_BUFFER SchematronValidOptions = 512
+ SCHEMATRON_OUT_IO SchematronValidOptions = 1024
+)
+
+type X_xmlSchematron struct {
+ Unused [8]uint8
+}
+type Schematron X_xmlSchematron
+type SchematronPtr *Schematron
+
+// llgo:type C
+type SchematronValidityErrorFunc func(__llgo_arg_0 c.Pointer, __llgo_arg_1 *c.Char, __llgo_va_list ...interface{})
+
+// llgo:type C
+type SchematronValidityWarningFunc func(__llgo_arg_0 c.Pointer, __llgo_arg_1 *c.Char, __llgo_va_list ...interface{})
+
+type X_xmlSchematronParserCtxt struct {
+ Unused [8]uint8
+}
+type SchematronParserCtxt X_xmlSchematronParserCtxt
+type SchematronParserCtxtPtr *SchematronParserCtxt
+
+type X_xmlSchematronValidCtxt struct {
+ Unused [8]uint8
+}
+type SchematronValidCtxt X_xmlSchematronValidCtxt
+type SchematronValidCtxtPtr *SchematronValidCtxt
+
+/*
+ * Interfaces for parsing.
+ */
+//go:linkname SchematronNewParserCtxt C.xmlSchematronNewParserCtxt
+func SchematronNewParserCtxt(URL *c.Char) SchematronParserCtxtPtr
+
+//go:linkname SchematronNewMemParserCtxt C.xmlSchematronNewMemParserCtxt
+func SchematronNewMemParserCtxt(buffer *c.Char, size c.Int) SchematronParserCtxtPtr
+
+//go:linkname SchematronNewDocParserCtxt C.xmlSchematronNewDocParserCtxt
+func SchematronNewDocParserCtxt(doc DocPtr) SchematronParserCtxtPtr
+
+//go:linkname SchematronFreeParserCtxt C.xmlSchematronFreeParserCtxt
+func SchematronFreeParserCtxt(ctxt SchematronParserCtxtPtr)
+
+/*****
+XMLPUBFUN void
+ xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt,
+ xmlSchematronValidityErrorFunc err,
+ xmlSchematronValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN int
+ xmlSchematronGetParserErrors(xmlSchematronParserCtxtPtr ctxt,
+ xmlSchematronValidityErrorFunc * err,
+ xmlSchematronValidityWarningFunc * warn,
+ void **ctx);
+XMLPUBFUN int
+ xmlSchematronIsValid (xmlSchematronValidCtxtPtr ctxt);
+ *****/
+//go:linkname SchematronParse C.xmlSchematronParse
+func SchematronParse(ctxt SchematronParserCtxtPtr) SchematronPtr
+
+//go:linkname SchematronFree C.xmlSchematronFree
+func SchematronFree(schema SchematronPtr)
+
+/*
+ * Interfaces for validating
+ */
+//go:linkname SchematronSetValidStructuredErrors C.xmlSchematronSetValidStructuredErrors
+func SchematronSetValidStructuredErrors(ctxt SchematronValidCtxtPtr, serror StructuredErrorFunc, ctx c.Pointer)
+
+/******
+XMLPUBFUN void
+ xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt,
+ xmlSchematronValidityErrorFunc err,
+ xmlSchematronValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN int
+ xmlSchematronGetValidErrors (xmlSchematronValidCtxtPtr ctxt,
+ xmlSchematronValidityErrorFunc *err,
+ xmlSchematronValidityWarningFunc *warn,
+ void **ctx);
+XMLPUBFUN int
+ xmlSchematronSetValidOptions(xmlSchematronValidCtxtPtr ctxt,
+ int options);
+XMLPUBFUN int
+ xmlSchematronValidCtxtGetOptions(xmlSchematronValidCtxtPtr ctxt);
+XMLPUBFUN int
+ xmlSchematronValidateOneElement (xmlSchematronValidCtxtPtr ctxt,
+ xmlNodePtr elem);
+ *******/
+//go:linkname SchematronNewValidCtxt C.xmlSchematronNewValidCtxt
+func SchematronNewValidCtxt(schema SchematronPtr, options c.Int) SchematronValidCtxtPtr
+
+//go:linkname SchematronFreeValidCtxt C.xmlSchematronFreeValidCtxt
+func SchematronFreeValidCtxt(ctxt SchematronValidCtxtPtr)
+
+//go:linkname SchematronValidateDoc C.xmlSchematronValidateDoc
+func SchematronValidateDoc(ctxt SchematronValidCtxtPtr, instance DocPtr) c.Int
diff --git a/libxml2/threads.go b/libxml2/threads.go
new file mode 100644
index 0000000..9592dc5
--- /dev/null
+++ b/libxml2/threads.go
@@ -0,0 +1,66 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type X_xmlMutex struct {
+ Unused [8]uint8
+}
+type Mutex X_xmlMutex
+type MutexPtr *Mutex
+
+type X_xmlRMutex struct {
+ Unused [8]uint8
+}
+type RMutex X_xmlRMutex
+type RMutexPtr *RMutex
+
+//go:linkname CheckThreadLocalStorage C.xmlCheckThreadLocalStorage
+func CheckThreadLocalStorage() c.Int
+
+//go:linkname NewMutex C.xmlNewMutex
+func NewMutex() MutexPtr
+
+//go:linkname MutexLock C.xmlMutexLock
+func MutexLock(tok MutexPtr)
+
+//go:linkname MutexUnlock C.xmlMutexUnlock
+func MutexUnlock(tok MutexPtr)
+
+//go:linkname FreeMutex C.xmlFreeMutex
+func FreeMutex(tok MutexPtr)
+
+//go:linkname NewRMutex C.xmlNewRMutex
+func NewRMutex() RMutexPtr
+
+//go:linkname RMutexLock C.xmlRMutexLock
+func RMutexLock(tok RMutexPtr)
+
+//go:linkname RMutexUnlock C.xmlRMutexUnlock
+func RMutexUnlock(tok RMutexPtr)
+
+//go:linkname FreeRMutex C.xmlFreeRMutex
+func FreeRMutex(tok RMutexPtr)
+
+/*
+ * Library wide APIs.
+ */
+//go:linkname InitThreads C.xmlInitThreads
+func InitThreads()
+
+//go:linkname LockLibrary C.xmlLockLibrary
+func LockLibrary()
+
+//go:linkname UnlockLibrary C.xmlUnlockLibrary
+func UnlockLibrary()
+
+//go:linkname GetThreadId C.xmlGetThreadId
+func GetThreadId() c.Int
+
+//go:linkname IsMainThread C.xmlIsMainThread
+func IsMainThread() c.Int
+
+//go:linkname CleanupThreads C.xmlCleanupThreads
+func CleanupThreads()
diff --git a/libxml2/tree.go b/libxml2/tree.go
new file mode 100644
index 0000000..70aca25
--- /dev/null
+++ b/libxml2/tree.go
@@ -0,0 +1,1227 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+const BASE_BUFFER_SIZE = 4096
+const DOCB_DOCUMENT_NODE = 21
+
+type X_xmlParserInputBuffer struct {
+ Context c.Pointer
+ Readcallback InputReadCallback
+ Closecallback InputCloseCallback
+ Encoder CharEncodingHandlerPtr
+ Buffer BufPtr
+ Raw BufPtr
+ Compressed c.Int
+ Error c.Int
+ Rawconsumed c.Ulong
+}
+type ParserInputBuffer X_xmlParserInputBuffer
+type ParserInputBufferPtr *ParserInputBuffer
+
+type X_xmlOutputBuffer struct {
+ Context c.Pointer
+ Writecallback OutputWriteCallback
+ Closecallback OutputCloseCallback
+ Encoder CharEncodingHandlerPtr
+ Buffer BufPtr
+ Conv BufPtr
+ Written c.Int
+ Error c.Int
+}
+type OutputBuffer X_xmlOutputBuffer
+type OutputBufferPtr *OutputBuffer
+
+type X_xmlParserInput struct {
+ Buf ParserInputBufferPtr
+ Filename *c.Char
+ Directory *c.Char
+ Base *Char
+ Cur *Char
+ End *Char
+ Length c.Int
+ Line c.Int
+ Col c.Int
+ Consumed c.Ulong
+ Free ParserInputDeallocate
+ Encoding *Char
+ Version *Char
+ Flags c.Int
+ Id c.Int
+ ParentConsumed c.Ulong
+ Entity EntityPtr
+}
+type ParserInput X_xmlParserInput
+type ParserInputPtr *ParserInput
+
+type X_xmlParserCtxt struct {
+ Sax *X_xmlSAXHandler
+ UserData c.Pointer
+ MyDoc DocPtr
+ WellFormed c.Int
+ ReplaceEntities c.Int
+ Version *Char
+ Encoding *Char
+ Standalone c.Int
+ Html c.Int
+ Input ParserInputPtr
+ InputNr c.Int
+ InputMax c.Int
+ InputTab *ParserInputPtr
+ Node NodePtr
+ NodeNr c.Int
+ NodeMax c.Int
+ NodeTab *NodePtr
+ RecordInfo c.Int
+ NodeSeq ParserNodeInfoSeq
+ ErrNo c.Int
+ HasExternalSubset c.Int
+ HasPErefs c.Int
+ External c.Int
+ Valid c.Int
+ Validate c.Int
+ Vctxt ValidCtxt
+ Instate ParserInputState
+ Token c.Int
+ Directory *c.Char
+ Name *Char
+ NameNr c.Int
+ NameMax c.Int
+ NameTab **Char
+ NbChars c.Long
+ CheckIndex c.Long
+ KeepBlanks c.Int
+ DisableSAX c.Int
+ InSubset c.Int
+ IntSubName *Char
+ ExtSubURI *Char
+ ExtSubSystem *Char
+ Space *c.Int
+ SpaceNr c.Int
+ SpaceMax c.Int
+ SpaceTab *c.Int
+ Depth c.Int
+ Entity ParserInputPtr
+ Charset c.Int
+ Nodelen c.Int
+ Nodemem c.Int
+ Pedantic c.Int
+ X_private c.Pointer
+ Loadsubset c.Int
+ Linenumbers c.Int
+ Catalogs c.Pointer
+ Recovery c.Int
+ Progressive c.Int
+ Dict DictPtr
+ Atts **Char
+ Maxatts c.Int
+ Docdict c.Int
+ StrXml *Char
+ StrXmlns *Char
+ StrXmlNs *Char
+ Sax2 c.Int
+ NsNr c.Int
+ NsMax c.Int
+ NsTab **Char
+ Attallocs *c.Uint
+ PushTab *StartTag
+ AttsDefault HashTablePtr
+ AttsSpecial HashTablePtr
+ NsWellFormed c.Int
+ Options c.Int
+ DictNames c.Int
+ FreeElemsNr c.Int
+ FreeElems NodePtr
+ FreeAttrsNr c.Int
+ FreeAttrs AttrPtr
+ LastError Error
+ ParseMode ParserMode
+ Nbentities c.Ulong
+ Sizeentities c.Ulong
+ NodeInfo *ParserNodeInfo
+ NodeInfoNr c.Int
+ NodeInfoMax c.Int
+ NodeInfoTab *ParserNodeInfo
+ InputId c.Int
+ Sizeentcopy c.Ulong
+ EndCheckState c.Int
+ NbErrors uint16
+ NbWarnings uint16
+ MaxAmpl c.Uint
+ Nsdb *ParserNsData
+ AttrHashMax c.Uint
+ AttrHash *AttrHashBucket
+ ErrorHandler StructuredErrorFunc
+ ErrorCtxt c.Pointer
+}
+type ParserCtxt X_xmlParserCtxt
+type ParserCtxtPtr *ParserCtxt
+
+type X_xmlSAXLocator struct {
+ GetPublicId c.Pointer
+ GetSystemId c.Pointer
+ GetLineNumber c.Pointer
+ GetColumnNumber c.Pointer
+}
+type SAXLocator X_xmlSAXLocator
+type SAXLocatorPtr *SAXLocator
+
+type X_xmlSAXHandler struct {
+ InternalSubset InternalSubsetSAXFunc
+ IsStandalone IsStandaloneSAXFunc
+ HasInternalSubset HasInternalSubsetSAXFunc
+ HasExternalSubset HasExternalSubsetSAXFunc
+ ResolveEntity ResolveEntitySAXFunc
+ GetEntity GetEntitySAXFunc
+ EntityDecl EntityDeclSAXFunc
+ NotationDecl NotationDeclSAXFunc
+ AttributeDecl AttributeDeclSAXFunc
+ ElementDecl ElementDeclSAXFunc
+ UnparsedEntityDecl UnparsedEntityDeclSAXFunc
+ SetDocumentLocator SetDocumentLocatorSAXFunc
+ StartDocument StartDocumentSAXFunc
+ EndDocument EndDocumentSAXFunc
+ StartElement StartElementSAXFunc
+ EndElement EndElementSAXFunc
+ Reference ReferenceSAXFunc
+ Characters CharactersSAXFunc
+ IgnorableWhitespace IgnorableWhitespaceSAXFunc
+ ProcessingInstruction ProcessingInstructionSAXFunc
+ Comment CommentSAXFunc
+ Warning WarningSAXFunc
+ Error ErrorSAXFunc
+ FatalError FatalErrorSAXFunc
+ GetParameterEntity GetParameterEntitySAXFunc
+ CdataBlock CdataBlockSAXFunc
+ ExternalSubset ExternalSubsetSAXFunc
+ Initialized c.Uint
+ X_private c.Pointer
+ StartElementNs StartElementNsSAX2Func
+ EndElementNs EndElementNsSAX2Func
+ Serror StructuredErrorFunc
+}
+type SAXHandler X_xmlSAXHandler
+type SAXHandlerPtr *SAXHandler
+
+type X_xmlEntity struct {
+ X_private c.Pointer
+ Type ElementType
+ Name *Char
+ Children *X_xmlNode
+ Last *X_xmlNode
+ Parent *X_xmlDtd
+ Next *X_xmlNode
+ Prev *X_xmlNode
+ Doc *X_xmlDoc
+ Orig *Char
+ Content *Char
+ Length c.Int
+ Etype EntityType
+ ExternalID *Char
+ SystemID *Char
+ Nexte *X_xmlEntity
+ URI *Char
+ Owner c.Int
+ Flags c.Int
+ ExpandedSize c.Ulong
+}
+type Entity X_xmlEntity
+type EntityPtr *Entity
+type BufferAllocationScheme c.Int
+
+const (
+ BUFFER_ALLOC_DOUBLEIT BufferAllocationScheme = 0
+ BUFFER_ALLOC_EXACT BufferAllocationScheme = 1
+ BUFFER_ALLOC_IMMUTABLE BufferAllocationScheme = 2
+ BUFFER_ALLOC_IO BufferAllocationScheme = 3
+ BUFFER_ALLOC_HYBRID BufferAllocationScheme = 4
+ BUFFER_ALLOC_BOUNDED BufferAllocationScheme = 5
+)
+
+type X_xmlBuffer struct {
+ Content *Char
+ Use c.Uint
+ Size c.Uint
+ Alloc BufferAllocationScheme
+ ContentIO *Char
+}
+type Buffer X_xmlBuffer
+type BufferPtr *Buffer
+
+type X_xmlBuf struct {
+ Unused [8]uint8
+}
+type Buf X_xmlBuf
+type BufPtr *Buf
+
+/*
+ * A few public routines for xmlBuf. As those are expected to be used
+ * mostly internally the bulk of the routines are internal in buf.h
+ */
+// llgo:link (*Buf).BufContent C.xmlBufContent
+func (recv_ *Buf) BufContent() *Char {
+ return nil
+}
+
+//go:linkname BufEnd C.xmlBufEnd
+func BufEnd(buf BufPtr) *Char
+
+//go:linkname BufUse C.xmlBufUse
+func BufUse(buf BufPtr) c.SizeT
+
+//go:linkname BufShrink C.xmlBufShrink
+func BufShrink(buf BufPtr, len c.SizeT) c.SizeT
+
+type ElementType c.Int
+
+const (
+ ELEMENT_NODE ElementType = 1
+ ATTRIBUTE_NODE ElementType = 2
+ TEXT_NODE ElementType = 3
+ CDATA_SECTION_NODE ElementType = 4
+ ENTITY_REF_NODE ElementType = 5
+ ENTITY_NODE ElementType = 6
+ PI_NODE ElementType = 7
+ COMMENT_NODE ElementType = 8
+ DOCUMENT_NODE ElementType = 9
+ DOCUMENT_TYPE_NODE ElementType = 10
+ DOCUMENT_FRAG_NODE ElementType = 11
+ NOTATION_NODE ElementType = 12
+ HTML_DOCUMENT_NODE ElementType = 13
+ DTD_NODE ElementType = 14
+ ELEMENT_DECL ElementType = 15
+ ATTRIBUTE_DECL ElementType = 16
+ ENTITY_DECL ElementType = 17
+ NAMESPACE_DECL ElementType = 18
+ XINCLUDE_START ElementType = 19
+ XINCLUDE_END ElementType = 20
+)
+
+type X_xmlNotation struct {
+ Name *Char
+ PublicID *Char
+ SystemID *Char
+}
+type Notation X_xmlNotation
+type NotationPtr *Notation
+type AttributeType c.Int
+
+const (
+ ATTRIBUTE_CDATA AttributeType = 1
+ ATTRIBUTE_ID AttributeType = 2
+ ATTRIBUTE_IDREF AttributeType = 3
+ ATTRIBUTE_IDREFS AttributeType = 4
+ ATTRIBUTE_ENTITY AttributeType = 5
+ ATTRIBUTE_ENTITIES AttributeType = 6
+ ATTRIBUTE_NMTOKEN AttributeType = 7
+ ATTRIBUTE_NMTOKENS AttributeType = 8
+ ATTRIBUTE_ENUMERATION AttributeType = 9
+ ATTRIBUTE_NOTATION AttributeType = 10
+)
+
+type AttributeDefault c.Int
+
+const (
+ ATTRIBUTE_NONE AttributeDefault = 1
+ ATTRIBUTE_REQUIRED AttributeDefault = 2
+ ATTRIBUTE_IMPLIED AttributeDefault = 3
+ ATTRIBUTE_FIXED AttributeDefault = 4
+)
+
+type X_xmlEnumeration struct {
+ Next *X_xmlEnumeration
+ Name *Char
+}
+type Enumeration X_xmlEnumeration
+type EnumerationPtr *Enumeration
+
+type X_xmlAttribute struct {
+ X_private c.Pointer
+ Type ElementType
+ Name *Char
+ Children *X_xmlNode
+ Last *X_xmlNode
+ Parent *X_xmlDtd
+ Next *X_xmlNode
+ Prev *X_xmlNode
+ Doc *X_xmlDoc
+ Nexth *X_xmlAttribute
+ Atype AttributeType
+ Def AttributeDefault
+ DefaultValue *Char
+ Tree EnumerationPtr
+ Prefix *Char
+ Elem *Char
+}
+type Attribute X_xmlAttribute
+type AttributePtr *Attribute
+
+type X_xmlNode struct {
+ X_private c.Pointer
+ Type ElementType
+ Name *Char
+ Children *X_xmlNode
+ Last *X_xmlNode
+ Parent *X_xmlNode
+ Next *X_xmlNode
+ Prev *X_xmlNode
+ Doc *X_xmlDoc
+ Ns *Ns
+ Content *Char
+ Properties *X_xmlAttr
+ NsDef *Ns
+ Psvi c.Pointer
+ Line uint16
+ Extra uint16
+}
+
+type X_xmlDtd struct {
+ X_private c.Pointer
+ Type ElementType
+ Name *Char
+ Children *X_xmlNode
+ Last *X_xmlNode
+ Parent *X_xmlDoc
+ Next *X_xmlNode
+ Prev *X_xmlNode
+ Doc *X_xmlDoc
+ Notations c.Pointer
+ Elements c.Pointer
+ Attributes c.Pointer
+ Entities c.Pointer
+ ExternalID *Char
+ SystemID *Char
+ Pentities c.Pointer
+}
+
+type X_xmlDoc struct {
+ X_private c.Pointer
+ Type ElementType
+ Name *c.Char
+ Children *X_xmlNode
+ Last *X_xmlNode
+ Parent *X_xmlNode
+ Next *X_xmlNode
+ Prev *X_xmlNode
+ Doc *X_xmlDoc
+ Compression c.Int
+ Standalone c.Int
+ IntSubset *X_xmlDtd
+ ExtSubset *X_xmlDtd
+ OldNs *X_xmlNs
+ Version *Char
+ Encoding *Char
+ Ids c.Pointer
+ Refs c.Pointer
+ URL *Char
+ Charset c.Int
+ Dict *X_xmlDict
+ Psvi c.Pointer
+ ParseFlags c.Int
+ Properties c.Int
+}
+type ElementContentType c.Int
+
+const (
+ ELEMENT_CONTENT_PCDATA ElementContentType = 1
+ ELEMENT_CONTENT_ELEMENT ElementContentType = 2
+ ELEMENT_CONTENT_SEQ ElementContentType = 3
+ ELEMENT_CONTENT_OR ElementContentType = 4
+)
+
+type ElementContentOccur c.Int
+
+const (
+ ELEMENT_CONTENT_ONCE ElementContentOccur = 1
+ ELEMENT_CONTENT_OPT ElementContentOccur = 2
+ ELEMENT_CONTENT_MULT ElementContentOccur = 3
+ ELEMENT_CONTENT_PLUS ElementContentOccur = 4
+)
+
+type X_xmlElementContent struct {
+ Type ElementContentType
+ Ocur ElementContentOccur
+ Name *Char
+ C1 *X_xmlElementContent
+ C2 *X_xmlElementContent
+ Parent *X_xmlElementContent
+ Prefix *Char
+}
+type ElementContent X_xmlElementContent
+type ElementContentPtr *ElementContent
+type ElementTypeVal c.Int
+
+const (
+ ELEMENT_TYPE_UNDEFINED ElementTypeVal = 0
+ ELEMENT_TYPE_EMPTY ElementTypeVal = 1
+ ELEMENT_TYPE_ANY ElementTypeVal = 2
+ ELEMENT_TYPE_MIXED ElementTypeVal = 3
+ ELEMENT_TYPE_ELEMENT ElementTypeVal = 4
+)
+
+type X_xmlElement struct {
+ X_private c.Pointer
+ Type ElementType
+ Name *Char
+ Children *X_xmlNode
+ Last *X_xmlNode
+ Parent *X_xmlDtd
+ Next *X_xmlNode
+ Prev *X_xmlNode
+ Doc *X_xmlDoc
+ Etype ElementTypeVal
+ Content ElementContentPtr
+ Attributes AttributePtr
+ Prefix *Char
+ ContModel RegexpPtr
+}
+type Element X_xmlElement
+type ElementPtr *Element
+type NsType ElementType
+
+type X_xmlNs struct {
+ Next *X_xmlNs
+ Type NsType
+ Href *Char
+ Prefix *Char
+ X_private c.Pointer
+ Context *X_xmlDoc
+}
+type Ns X_xmlNs
+type NsPtr *Ns
+type Dtd X_xmlDtd
+type DtdPtr *Dtd
+
+type X_xmlAttr struct {
+ X_private c.Pointer
+ Type ElementType
+ Name *Char
+ Children *X_xmlNode
+ Last *X_xmlNode
+ Parent *X_xmlNode
+ Next *X_xmlAttr
+ Prev *X_xmlAttr
+ Doc *X_xmlDoc
+ Ns *Ns
+ Atype AttributeType
+ Psvi c.Pointer
+ Id *X_xmlID
+}
+type Attr X_xmlAttr
+type AttrPtr *Attr
+
+type X_xmlID struct {
+ Next *X_xmlID
+ Value *Char
+ Attr AttrPtr
+ Name *Char
+ Lineno c.Int
+ Doc *X_xmlDoc
+}
+type ID X_xmlID
+type IDPtr *ID
+
+type X_xmlRef struct {
+ Next *X_xmlRef
+ Value *Char
+ Attr AttrPtr
+ Name *Char
+ Lineno c.Int
+}
+type Ref X_xmlRef
+type RefPtr *Ref
+type Node X_xmlNode
+type NodePtr *Node
+type DocProperties c.Int
+
+const (
+ DOC_WELLFORMED DocProperties = 1
+ DOC_NSVALID DocProperties = 2
+ DOC_OLD10 DocProperties = 4
+ DOC_DTDVALID DocProperties = 8
+ DOC_XINCLUDE DocProperties = 16
+ DOC_USERBUILT DocProperties = 32
+ DOC_INTERNAL DocProperties = 64
+ DOC_HTML DocProperties = 128
+)
+
+type Doc X_xmlDoc
+type DocPtr *Doc
+
+type X_xmlDict struct {
+ Unused [8]uint8
+}
+
+type X_xmlDOMWrapCtxt struct {
+ X_private c.Pointer
+ Type c.Int
+ NamespaceMap c.Pointer
+ GetNsForNodeFunc DOMWrapAcquireNsFunction
+}
+type DOMWrapCtxt X_xmlDOMWrapCtxt
+type DOMWrapCtxtPtr *DOMWrapCtxt
+
+// llgo:type C
+type DOMWrapAcquireNsFunction func(DOMWrapCtxtPtr, NodePtr, *Char, *Char) NsPtr
+
+// llgo:type C
+type RegisterNodeFunc func(NodePtr)
+
+// llgo:type C
+type DeregisterNodeFunc func(NodePtr)
+
+//go:linkname X__xmlBufferAllocScheme C.__xmlBufferAllocScheme
+func X__xmlBufferAllocScheme() *BufferAllocationScheme
+
+//go:linkname X__xmlDefaultBufferSize C.__xmlDefaultBufferSize
+func X__xmlDefaultBufferSize() *c.Int
+
+//go:linkname X__xmlRegisterNodeDefaultValue C.__xmlRegisterNodeDefaultValue
+func X__xmlRegisterNodeDefaultValue() RegisterNodeFunc
+
+//go:linkname X__xmlDeregisterNodeDefaultValue C.__xmlDeregisterNodeDefaultValue
+func X__xmlDeregisterNodeDefaultValue() DeregisterNodeFunc
+
+/*
+ * Some helper functions
+ */
+// llgo:link (*Char).ValidateNCName C.xmlValidateNCName
+func (recv_ *Char) ValidateNCName(space c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*Char).ValidateQName C.xmlValidateQName
+func (recv_ *Char) ValidateQName(space c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*Char).ValidateName C.xmlValidateName
+func (recv_ *Char) ValidateName(space c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*Char).ValidateNMToken C.xmlValidateNMToken
+func (recv_ *Char) ValidateNMToken(space c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*Char).BuildQName C.xmlBuildQName
+func (recv_ *Char) BuildQName(prefix *Char, memory *Char, len c.Int) *Char {
+ return nil
+}
+
+// llgo:link (*Char).SplitQName2 C.xmlSplitQName2
+func (recv_ *Char) SplitQName2(prefix **Char) *Char {
+ return nil
+}
+
+// llgo:link (*Char).SplitQName3 C.xmlSplitQName3
+func (recv_ *Char) SplitQName3(len *c.Int) *Char {
+ return nil
+}
+
+/*
+ * Handling Buffers, the old ones see @xmlBuf for the new ones.
+ */
+// llgo:link BufferAllocationScheme.SetBufferAllocationScheme C.xmlSetBufferAllocationScheme
+func (recv_ BufferAllocationScheme) SetBufferAllocationScheme() {
+}
+
+//go:linkname GetBufferAllocationScheme C.xmlGetBufferAllocationScheme
+func GetBufferAllocationScheme() BufferAllocationScheme
+
+//go:linkname BufferCreate C.xmlBufferCreate
+func BufferCreate() BufferPtr
+
+//go:linkname BufferCreateSize C.xmlBufferCreateSize
+func BufferCreateSize(size c.SizeT) BufferPtr
+
+//go:linkname BufferCreateStatic C.xmlBufferCreateStatic
+func BufferCreateStatic(mem c.Pointer, size c.SizeT) BufferPtr
+
+//go:linkname BufferResize C.xmlBufferResize
+func BufferResize(buf BufferPtr, size c.Uint) c.Int
+
+//go:linkname BufferFree C.xmlBufferFree
+func BufferFree(buf BufferPtr)
+
+//go:linkname BufferDump C.xmlBufferDump
+func BufferDump(file *c.FILE, buf BufferPtr) c.Int
+
+//go:linkname BufferAdd C.xmlBufferAdd
+func BufferAdd(buf BufferPtr, str *Char, len c.Int) c.Int
+
+//go:linkname BufferAddHead C.xmlBufferAddHead
+func BufferAddHead(buf BufferPtr, str *Char, len c.Int) c.Int
+
+//go:linkname BufferCat C.xmlBufferCat
+func BufferCat(buf BufferPtr, str *Char) c.Int
+
+//go:linkname BufferCCat C.xmlBufferCCat
+func BufferCCat(buf BufferPtr, str *c.Char) c.Int
+
+//go:linkname BufferShrink C.xmlBufferShrink
+func BufferShrink(buf BufferPtr, len c.Uint) c.Int
+
+//go:linkname BufferGrow C.xmlBufferGrow
+func BufferGrow(buf BufferPtr, len c.Uint) c.Int
+
+//go:linkname BufferEmpty C.xmlBufferEmpty
+func BufferEmpty(buf BufferPtr)
+
+// llgo:link (*Buffer).BufferContent C.xmlBufferContent
+func (recv_ *Buffer) BufferContent() *Char {
+ return nil
+}
+
+//go:linkname BufferDetach C.xmlBufferDetach
+func BufferDetach(buf BufferPtr) *Char
+
+//go:linkname BufferSetAllocationScheme C.xmlBufferSetAllocationScheme
+func BufferSetAllocationScheme(buf BufferPtr, scheme BufferAllocationScheme)
+
+// llgo:link (*Buffer).BufferLength C.xmlBufferLength
+func (recv_ *Buffer) BufferLength() c.Int {
+ return 0
+}
+
+/*
+ * Creating/freeing new structures.
+ */
+//go:linkname CreateIntSubset C.xmlCreateIntSubset
+func CreateIntSubset(doc DocPtr, name *Char, ExternalID *Char, SystemID *Char) DtdPtr
+
+//go:linkname NewDtd C.xmlNewDtd
+func NewDtd(doc DocPtr, name *Char, ExternalID *Char, SystemID *Char) DtdPtr
+
+// llgo:link (*Doc).GetIntSubset C.xmlGetIntSubset
+func (recv_ *Doc) GetIntSubset() DtdPtr {
+ return nil
+}
+
+//go:linkname FreeDtd C.xmlFreeDtd
+func FreeDtd(cur DtdPtr)
+
+//go:linkname NewGlobalNs C.xmlNewGlobalNs
+func NewGlobalNs(doc DocPtr, href *Char, prefix *Char) NsPtr
+
+//go:linkname NewNs C.xmlNewNs
+func NewNs(node NodePtr, href *Char, prefix *Char) NsPtr
+
+//go:linkname FreeNs C.xmlFreeNs
+func FreeNs(cur NsPtr)
+
+//go:linkname FreeNsList C.xmlFreeNsList
+func FreeNsList(cur NsPtr)
+
+// llgo:link (*Char).NewDoc C.xmlNewDoc
+func (recv_ *Char) NewDoc() DocPtr {
+ return nil
+}
+
+//go:linkname FreeDoc C.xmlFreeDoc
+func FreeDoc(cur DocPtr)
+
+//go:linkname NewDocProp C.xmlNewDocProp
+func NewDocProp(doc DocPtr, name *Char, value *Char) AttrPtr
+
+//go:linkname NewProp C.xmlNewProp
+func NewProp(node NodePtr, name *Char, value *Char) AttrPtr
+
+//go:linkname NewNsProp C.xmlNewNsProp
+func NewNsProp(node NodePtr, ns NsPtr, name *Char, value *Char) AttrPtr
+
+//go:linkname NewNsPropEatName C.xmlNewNsPropEatName
+func NewNsPropEatName(node NodePtr, ns NsPtr, name *Char, value *Char) AttrPtr
+
+//go:linkname FreePropList C.xmlFreePropList
+func FreePropList(cur AttrPtr)
+
+//go:linkname FreeProp C.xmlFreeProp
+func FreeProp(cur AttrPtr)
+
+//go:linkname CopyProp C.xmlCopyProp
+func CopyProp(target NodePtr, cur AttrPtr) AttrPtr
+
+//go:linkname CopyPropList C.xmlCopyPropList
+func CopyPropList(target NodePtr, cur AttrPtr) AttrPtr
+
+//go:linkname CopyDtd C.xmlCopyDtd
+func CopyDtd(dtd DtdPtr) DtdPtr
+
+//go:linkname CopyDoc C.xmlCopyDoc
+func CopyDoc(doc DocPtr, recursive c.Int) DocPtr
+
+/*
+ * Creating new nodes.
+ */
+//go:linkname NewDocNode C.xmlNewDocNode
+func NewDocNode(doc DocPtr, ns NsPtr, name *Char, content *Char) NodePtr
+
+//go:linkname NewDocNodeEatName C.xmlNewDocNodeEatName
+func NewDocNodeEatName(doc DocPtr, ns NsPtr, name *Char, content *Char) NodePtr
+
+//go:linkname NewNode C.xmlNewNode
+func NewNode(ns NsPtr, name *Char) NodePtr
+
+//go:linkname NewNodeEatName C.xmlNewNodeEatName
+func NewNodeEatName(ns NsPtr, name *Char) NodePtr
+
+//go:linkname NewChild C.xmlNewChild
+func NewChild(parent NodePtr, ns NsPtr, name *Char, content *Char) NodePtr
+
+// llgo:link (*Doc).NewDocText C.xmlNewDocText
+func (recv_ *Doc) NewDocText(content *Char) NodePtr {
+ return nil
+}
+
+// llgo:link (*Char).NewText C.xmlNewText
+func (recv_ *Char) NewText() NodePtr {
+ return nil
+}
+
+//go:linkname NewDocPI C.xmlNewDocPI
+func NewDocPI(doc DocPtr, name *Char, content *Char) NodePtr
+
+// llgo:link (*Char).NewPI C.xmlNewPI
+func (recv_ *Char) NewPI(content *Char) NodePtr {
+ return nil
+}
+
+//go:linkname NewDocTextLen C.xmlNewDocTextLen
+func NewDocTextLen(doc DocPtr, content *Char, len c.Int) NodePtr
+
+// llgo:link (*Char).NewTextLen C.xmlNewTextLen
+func (recv_ *Char) NewTextLen(len c.Int) NodePtr {
+ return nil
+}
+
+//go:linkname NewDocComment C.xmlNewDocComment
+func NewDocComment(doc DocPtr, content *Char) NodePtr
+
+// llgo:link (*Char).NewComment C.xmlNewComment
+func (recv_ *Char) NewComment() NodePtr {
+ return nil
+}
+
+//go:linkname NewCDataBlock C.xmlNewCDataBlock
+func NewCDataBlock(doc DocPtr, content *Char, len c.Int) NodePtr
+
+//go:linkname NewCharRef C.xmlNewCharRef
+func NewCharRef(doc DocPtr, name *Char) NodePtr
+
+// llgo:link (*Doc).NewReference C.xmlNewReference
+func (recv_ *Doc) NewReference(name *Char) NodePtr {
+ return nil
+}
+
+//go:linkname CopyNode C.xmlCopyNode
+func CopyNode(node NodePtr, recursive c.Int) NodePtr
+
+//go:linkname DocCopyNode C.xmlDocCopyNode
+func DocCopyNode(node NodePtr, doc DocPtr, recursive c.Int) NodePtr
+
+//go:linkname DocCopyNodeList C.xmlDocCopyNodeList
+func DocCopyNodeList(doc DocPtr, node NodePtr) NodePtr
+
+//go:linkname CopyNodeList C.xmlCopyNodeList
+func CopyNodeList(node NodePtr) NodePtr
+
+//go:linkname NewTextChild C.xmlNewTextChild
+func NewTextChild(parent NodePtr, ns NsPtr, name *Char, content *Char) NodePtr
+
+//go:linkname NewDocRawNode C.xmlNewDocRawNode
+func NewDocRawNode(doc DocPtr, ns NsPtr, name *Char, content *Char) NodePtr
+
+//go:linkname NewDocFragment C.xmlNewDocFragment
+func NewDocFragment(doc DocPtr) NodePtr
+
+/*
+ * Navigating.
+ */
+// llgo:link (*Node).GetLineNo C.xmlGetLineNo
+func (recv_ *Node) GetLineNo() c.Long {
+ return 0
+}
+
+// llgo:link (*Node).GetNodePath C.xmlGetNodePath
+func (recv_ *Node) GetNodePath() *Char {
+ return nil
+}
+
+// llgo:link (*Doc).DocGetRootElement C.xmlDocGetRootElement
+func (recv_ *Doc) DocGetRootElement() NodePtr {
+ return nil
+}
+
+// llgo:link (*Node).GetLastChild C.xmlGetLastChild
+func (recv_ *Node) GetLastChild() NodePtr {
+ return nil
+}
+
+// llgo:link (*Node).NodeIsText C.xmlNodeIsText
+func (recv_ *Node) NodeIsText() c.Int {
+ return 0
+}
+
+// llgo:link (*Node).IsBlankNode C.xmlIsBlankNode
+func (recv_ *Node) IsBlankNode() c.Int {
+ return 0
+}
+
+/*
+ * Changing the structure.
+ */
+//go:linkname DocSetRootElement C.xmlDocSetRootElement
+func DocSetRootElement(doc DocPtr, root NodePtr) NodePtr
+
+//go:linkname NodeSetName C.xmlNodeSetName
+func NodeSetName(cur NodePtr, name *Char)
+
+//go:linkname AddChild C.xmlAddChild
+func AddChild(parent NodePtr, cur NodePtr) NodePtr
+
+//go:linkname AddChildList C.xmlAddChildList
+func AddChildList(parent NodePtr, cur NodePtr) NodePtr
+
+//go:linkname ReplaceNode C.xmlReplaceNode
+func ReplaceNode(old NodePtr, cur NodePtr) NodePtr
+
+//go:linkname AddPrevSibling C.xmlAddPrevSibling
+func AddPrevSibling(cur NodePtr, elem NodePtr) NodePtr
+
+//go:linkname AddSibling C.xmlAddSibling
+func AddSibling(cur NodePtr, elem NodePtr) NodePtr
+
+//go:linkname AddNextSibling C.xmlAddNextSibling
+func AddNextSibling(cur NodePtr, elem NodePtr) NodePtr
+
+//go:linkname UnlinkNode C.xmlUnlinkNode
+func UnlinkNode(cur NodePtr)
+
+//go:linkname TextMerge C.xmlTextMerge
+func TextMerge(first NodePtr, second NodePtr) NodePtr
+
+//go:linkname TextConcat C.xmlTextConcat
+func TextConcat(node NodePtr, content *Char, len c.Int) c.Int
+
+//go:linkname FreeNodeList C.xmlFreeNodeList
+func FreeNodeList(cur NodePtr)
+
+//go:linkname FreeNode C.xmlFreeNode
+func FreeNode(cur NodePtr)
+
+//go:linkname SetTreeDoc C.xmlSetTreeDoc
+func SetTreeDoc(tree NodePtr, doc DocPtr) c.Int
+
+//go:linkname SetListDoc C.xmlSetListDoc
+func SetListDoc(list NodePtr, doc DocPtr) c.Int
+
+/*
+ * Namespaces.
+ */
+//go:linkname SearchNs C.xmlSearchNs
+func SearchNs(doc DocPtr, node NodePtr, nameSpace *Char) NsPtr
+
+//go:linkname SearchNsByHref C.xmlSearchNsByHref
+func SearchNsByHref(doc DocPtr, node NodePtr, href *Char) NsPtr
+
+// llgo:link (*Doc).GetNsListSafe C.xmlGetNsListSafe
+func (recv_ *Doc) GetNsListSafe(node *Node, out **NsPtr) c.Int {
+ return 0
+}
+
+// llgo:link (*Doc).GetNsList C.xmlGetNsList
+func (recv_ *Doc) GetNsList(node *Node) *NsPtr {
+ return nil
+}
+
+//go:linkname SetNs C.xmlSetNs
+func SetNs(node NodePtr, ns NsPtr)
+
+//go:linkname CopyNamespace C.xmlCopyNamespace
+func CopyNamespace(cur NsPtr) NsPtr
+
+//go:linkname CopyNamespaceList C.xmlCopyNamespaceList
+func CopyNamespaceList(cur NsPtr) NsPtr
+
+/*
+ * Changing the content.
+ */
+//go:linkname SetProp C.xmlSetProp
+func SetProp(node NodePtr, name *Char, value *Char) AttrPtr
+
+//go:linkname SetNsProp C.xmlSetNsProp
+func SetNsProp(node NodePtr, ns NsPtr, name *Char, value *Char) AttrPtr
+
+// llgo:link (*Node).NodeGetAttrValue C.xmlNodeGetAttrValue
+func (recv_ *Node) NodeGetAttrValue(name *Char, nsUri *Char, out **Char) c.Int {
+ return 0
+}
+
+// llgo:link (*Node).GetNoNsProp C.xmlGetNoNsProp
+func (recv_ *Node) GetNoNsProp(name *Char) *Char {
+ return nil
+}
+
+// llgo:link (*Node).GetProp C.xmlGetProp
+func (recv_ *Node) GetProp(name *Char) *Char {
+ return nil
+}
+
+// llgo:link (*Node).HasProp C.xmlHasProp
+func (recv_ *Node) HasProp(name *Char) AttrPtr {
+ return nil
+}
+
+// llgo:link (*Node).HasNsProp C.xmlHasNsProp
+func (recv_ *Node) HasNsProp(name *Char, nameSpace *Char) AttrPtr {
+ return nil
+}
+
+// llgo:link (*Node).GetNsProp C.xmlGetNsProp
+func (recv_ *Node) GetNsProp(name *Char, nameSpace *Char) *Char {
+ return nil
+}
+
+// llgo:link (*Doc).StringGetNodeList C.xmlStringGetNodeList
+func (recv_ *Doc) StringGetNodeList(value *Char) NodePtr {
+ return nil
+}
+
+// llgo:link (*Doc).StringLenGetNodeList C.xmlStringLenGetNodeList
+func (recv_ *Doc) StringLenGetNodeList(value *Char, len c.Int) NodePtr {
+ return nil
+}
+
+//go:linkname NodeListGetString C.xmlNodeListGetString
+func NodeListGetString(doc DocPtr, list *Node, inLine c.Int) *Char
+
+// llgo:link (*Doc).NodeListGetRawString C.xmlNodeListGetRawString
+func (recv_ *Doc) NodeListGetRawString(list *Node, inLine c.Int) *Char {
+ return nil
+}
+
+//go:linkname NodeSetContent C.xmlNodeSetContent
+func NodeSetContent(cur NodePtr, content *Char) c.Int
+
+//go:linkname NodeSetContentLen C.xmlNodeSetContentLen
+func NodeSetContentLen(cur NodePtr, content *Char, len c.Int) c.Int
+
+//go:linkname NodeAddContent C.xmlNodeAddContent
+func NodeAddContent(cur NodePtr, content *Char) c.Int
+
+//go:linkname NodeAddContentLen C.xmlNodeAddContentLen
+func NodeAddContentLen(cur NodePtr, content *Char, len c.Int) c.Int
+
+// llgo:link (*Node).NodeGetContent C.xmlNodeGetContent
+func (recv_ *Node) NodeGetContent() *Char {
+ return nil
+}
+
+//go:linkname NodeBufGetContent C.xmlNodeBufGetContent
+func NodeBufGetContent(buffer BufferPtr, cur *Node) c.Int
+
+//go:linkname BufGetNodeContent C.xmlBufGetNodeContent
+func BufGetNodeContent(buf BufPtr, cur *Node) c.Int
+
+// llgo:link (*Node).NodeGetLang C.xmlNodeGetLang
+func (recv_ *Node) NodeGetLang() *Char {
+ return nil
+}
+
+// llgo:link (*Node).NodeGetSpacePreserve C.xmlNodeGetSpacePreserve
+func (recv_ *Node) NodeGetSpacePreserve() c.Int {
+ return 0
+}
+
+//go:linkname NodeSetLang C.xmlNodeSetLang
+func NodeSetLang(cur NodePtr, lang *Char) c.Int
+
+//go:linkname NodeSetSpacePreserve C.xmlNodeSetSpacePreserve
+func NodeSetSpacePreserve(cur NodePtr, val c.Int) c.Int
+
+// llgo:link (*Doc).NodeGetBaseSafe C.xmlNodeGetBaseSafe
+func (recv_ *Doc) NodeGetBaseSafe(cur *Node, baseOut **Char) c.Int {
+ return 0
+}
+
+// llgo:link (*Doc).NodeGetBase C.xmlNodeGetBase
+func (recv_ *Doc) NodeGetBase(cur *Node) *Char {
+ return nil
+}
+
+//go:linkname NodeSetBase C.xmlNodeSetBase
+func NodeSetBase(cur NodePtr, uri *Char) c.Int
+
+/*
+ * Removing content.
+ */
+//go:linkname RemoveProp C.xmlRemoveProp
+func RemoveProp(cur AttrPtr) c.Int
+
+//go:linkname UnsetNsProp C.xmlUnsetNsProp
+func UnsetNsProp(node NodePtr, ns NsPtr, name *Char) c.Int
+
+//go:linkname UnsetProp C.xmlUnsetProp
+func UnsetProp(node NodePtr, name *Char) c.Int
+
+/*
+ * Internal, don't use.
+ */
+//go:linkname BufferWriteCHAR C.xmlBufferWriteCHAR
+func BufferWriteCHAR(buf BufferPtr, string *Char)
+
+//go:linkname BufferWriteChar C.xmlBufferWriteChar
+func BufferWriteChar(buf BufferPtr, string *c.Char)
+
+//go:linkname BufferWriteQuotedString C.xmlBufferWriteQuotedString
+func BufferWriteQuotedString(buf BufferPtr, string *Char)
+
+//go:linkname AttrSerializeTxtContent C.xmlAttrSerializeTxtContent
+func AttrSerializeTxtContent(buf BufferPtr, doc DocPtr, attr AttrPtr, string *Char)
+
+/*
+ * Namespace handling.
+ */
+//go:linkname ReconciliateNs C.xmlReconciliateNs
+func ReconciliateNs(doc DocPtr, tree NodePtr) c.Int
+
+/*
+ * Saving.
+ */
+//go:linkname DocDumpFormatMemory C.xmlDocDumpFormatMemory
+func DocDumpFormatMemory(cur DocPtr, mem **Char, size *c.Int, format c.Int)
+
+//go:linkname DocDumpMemory C.xmlDocDumpMemory
+func DocDumpMemory(cur DocPtr, mem **Char, size *c.Int)
+
+//go:linkname DocDumpMemoryEnc C.xmlDocDumpMemoryEnc
+func DocDumpMemoryEnc(out_doc DocPtr, doc_txt_ptr **Char, doc_txt_len *c.Int, txt_encoding *c.Char)
+
+//go:linkname DocDumpFormatMemoryEnc C.xmlDocDumpFormatMemoryEnc
+func DocDumpFormatMemoryEnc(out_doc DocPtr, doc_txt_ptr **Char, doc_txt_len *c.Int, txt_encoding *c.Char, format c.Int)
+
+//go:linkname DocFormatDump C.xmlDocFormatDump
+func DocFormatDump(f *c.FILE, cur DocPtr, format c.Int) c.Int
+
+//go:linkname DocDump C.xmlDocDump
+func DocDump(f *c.FILE, cur DocPtr) c.Int
+
+//go:linkname ElemDump C.xmlElemDump
+func ElemDump(f *c.FILE, doc DocPtr, cur NodePtr)
+
+//go:linkname SaveFile C.xmlSaveFile
+func SaveFile(filename *c.Char, cur DocPtr) c.Int
+
+//go:linkname SaveFormatFile C.xmlSaveFormatFile
+func SaveFormatFile(filename *c.Char, cur DocPtr, format c.Int) c.Int
+
+//go:linkname BufNodeDump C.xmlBufNodeDump
+func BufNodeDump(buf BufPtr, doc DocPtr, cur NodePtr, level c.Int, format c.Int) c.SizeT
+
+//go:linkname NodeDump C.xmlNodeDump
+func NodeDump(buf BufferPtr, doc DocPtr, cur NodePtr, level c.Int, format c.Int) c.Int
+
+//go:linkname SaveFileTo C.xmlSaveFileTo
+func SaveFileTo(buf OutputBufferPtr, cur DocPtr, encoding *c.Char) c.Int
+
+//go:linkname SaveFormatFileTo C.xmlSaveFormatFileTo
+func SaveFormatFileTo(buf OutputBufferPtr, cur DocPtr, encoding *c.Char, format c.Int) c.Int
+
+//go:linkname NodeDumpOutput C.xmlNodeDumpOutput
+func NodeDumpOutput(buf OutputBufferPtr, doc DocPtr, cur NodePtr, level c.Int, format c.Int, encoding *c.Char)
+
+//go:linkname SaveFormatFileEnc C.xmlSaveFormatFileEnc
+func SaveFormatFileEnc(filename *c.Char, cur DocPtr, encoding *c.Char, format c.Int) c.Int
+
+//go:linkname SaveFileEnc C.xmlSaveFileEnc
+func SaveFileEnc(filename *c.Char, cur DocPtr, encoding *c.Char) c.Int
+
+/*
+ * XHTML
+ */
+// llgo:link (*Char).IsXHTML C.xmlIsXHTML
+func (recv_ *Char) IsXHTML(publicID *Char) c.Int {
+ return 0
+}
+
+/*
+ * Compression.
+ */
+// llgo:link (*Doc).GetDocCompressMode C.xmlGetDocCompressMode
+func (recv_ *Doc) GetDocCompressMode() c.Int {
+ return 0
+}
+
+//go:linkname SetDocCompressMode C.xmlSetDocCompressMode
+func SetDocCompressMode(doc DocPtr, mode c.Int)
+
+//go:linkname GetCompressMode C.xmlGetCompressMode
+func GetCompressMode() c.Int
+
+//go:linkname SetCompressMode C.xmlSetCompressMode
+func SetCompressMode(mode c.Int)
+
+/*
+* DOM-wrapper helper functions.
+ */
+//go:linkname DOMWrapNewCtxt C.xmlDOMWrapNewCtxt
+func DOMWrapNewCtxt() DOMWrapCtxtPtr
+
+//go:linkname DOMWrapFreeCtxt C.xmlDOMWrapFreeCtxt
+func DOMWrapFreeCtxt(ctxt DOMWrapCtxtPtr)
+
+//go:linkname DOMWrapReconcileNamespaces C.xmlDOMWrapReconcileNamespaces
+func DOMWrapReconcileNamespaces(ctxt DOMWrapCtxtPtr, elem NodePtr, options c.Int) c.Int
+
+//go:linkname DOMWrapAdoptNode C.xmlDOMWrapAdoptNode
+func DOMWrapAdoptNode(ctxt DOMWrapCtxtPtr, sourceDoc DocPtr, node NodePtr, destDoc DocPtr, destParent NodePtr, options c.Int) c.Int
+
+//go:linkname DOMWrapRemoveNode C.xmlDOMWrapRemoveNode
+func DOMWrapRemoveNode(ctxt DOMWrapCtxtPtr, doc DocPtr, node NodePtr, options c.Int) c.Int
+
+//go:linkname DOMWrapCloneNode C.xmlDOMWrapCloneNode
+func DOMWrapCloneNode(ctxt DOMWrapCtxtPtr, sourceDoc DocPtr, node NodePtr, clonedNode *NodePtr, destDoc DocPtr, destParent NodePtr, deep c.Int, options c.Int) c.Int
+
+/*
+ * 5 interfaces from DOM ElementTraversal, but different in entities
+ * traversal.
+ */
+//go:linkname ChildElementCount C.xmlChildElementCount
+func ChildElementCount(parent NodePtr) c.Ulong
+
+//go:linkname NextElementSibling C.xmlNextElementSibling
+func NextElementSibling(node NodePtr) NodePtr
+
+//go:linkname FirstElementChild C.xmlFirstElementChild
+func FirstElementChild(parent NodePtr) NodePtr
+
+//go:linkname LastElementChild C.xmlLastElementChild
+func LastElementChild(parent NodePtr) NodePtr
+
+//go:linkname PreviousElementSibling C.xmlPreviousElementSibling
+func PreviousElementSibling(node NodePtr) NodePtr
+
+//go:linkname RegisterNodeDefault C.xmlRegisterNodeDefault
+func RegisterNodeDefault(func_ RegisterNodeFunc) RegisterNodeFunc
+
+//go:linkname DeregisterNodeDefault C.xmlDeregisterNodeDefault
+func DeregisterNodeDefault(func_ DeregisterNodeFunc) DeregisterNodeFunc
+
+//go:linkname ThrDefRegisterNodeDefault C.xmlThrDefRegisterNodeDefault
+func ThrDefRegisterNodeDefault(func_ RegisterNodeFunc) RegisterNodeFunc
+
+//go:linkname ThrDefDeregisterNodeDefault C.xmlThrDefDeregisterNodeDefault
+func ThrDefDeregisterNodeDefault(func_ DeregisterNodeFunc) DeregisterNodeFunc
+
+// llgo:link BufferAllocationScheme.ThrDefBufferAllocScheme C.xmlThrDefBufferAllocScheme
+func (recv_ BufferAllocationScheme) ThrDefBufferAllocScheme() BufferAllocationScheme {
+ return 0
+}
+
+//go:linkname ThrDefDefaultBufferSize C.xmlThrDefDefaultBufferSize
+func ThrDefDefaultBufferSize(v c.Int) c.Int
diff --git a/libxml2/uri.go b/libxml2/uri.go
new file mode 100644
index 0000000..39c0685
--- /dev/null
+++ b/libxml2/uri.go
@@ -0,0 +1,97 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type X_xmlURI struct {
+ Scheme *c.Char
+ Opaque *c.Char
+ Authority *c.Char
+ Server *c.Char
+ User *c.Char
+ Port c.Int
+ Path *c.Char
+ Query *c.Char
+ Fragment *c.Char
+ Cleanup c.Int
+ QueryRaw *c.Char
+}
+type URI X_xmlURI
+type URIPtr *URI
+
+/*
+ * This function is in tree.h:
+ * xmlChar * xmlNodeGetBase (xmlDocPtr doc,
+ * xmlNodePtr cur);
+ */
+//go:linkname CreateURI C.xmlCreateURI
+func CreateURI() URIPtr
+
+// llgo:link (*Char).BuildURISafe C.xmlBuildURISafe
+func (recv_ *Char) BuildURISafe(base *Char, out **Char) c.Int {
+ return 0
+}
+
+// llgo:link (*Char).BuildURI C.xmlBuildURI
+func (recv_ *Char) BuildURI(base *Char) *Char {
+ return nil
+}
+
+// llgo:link (*Char).BuildRelativeURISafe C.xmlBuildRelativeURISafe
+func (recv_ *Char) BuildRelativeURISafe(base *Char, out **Char) c.Int {
+ return 0
+}
+
+// llgo:link (*Char).BuildRelativeURI C.xmlBuildRelativeURI
+func (recv_ *Char) BuildRelativeURI(base *Char) *Char {
+ return nil
+}
+
+//go:linkname ParseURI C.xmlParseURI
+func ParseURI(str *c.Char) URIPtr
+
+//go:linkname ParseURISafe C.xmlParseURISafe
+func ParseURISafe(str *c.Char, uri *URIPtr) c.Int
+
+//go:linkname ParseURIRaw C.xmlParseURIRaw
+func ParseURIRaw(str *c.Char, raw c.Int) URIPtr
+
+//go:linkname ParseURIReference C.xmlParseURIReference
+func ParseURIReference(uri URIPtr, str *c.Char) c.Int
+
+//go:linkname SaveUri C.xmlSaveUri
+func SaveUri(uri URIPtr) *Char
+
+//go:linkname PrintURI C.xmlPrintURI
+func PrintURI(stream *c.FILE, uri URIPtr)
+
+// llgo:link (*Char).URIEscapeStr C.xmlURIEscapeStr
+func (recv_ *Char) URIEscapeStr(list *Char) *Char {
+ return nil
+}
+
+//go:linkname URIUnescapeString C.xmlURIUnescapeString
+func URIUnescapeString(str *c.Char, len c.Int, target *c.Char) *c.Char
+
+//go:linkname NormalizeURIPath C.xmlNormalizeURIPath
+func NormalizeURIPath(path *c.Char) c.Int
+
+// llgo:link (*Char).URIEscape C.xmlURIEscape
+func (recv_ *Char) URIEscape() *Char {
+ return nil
+}
+
+//go:linkname FreeURI C.xmlFreeURI
+func FreeURI(uri URIPtr)
+
+// llgo:link (*Char).CanonicPath C.xmlCanonicPath
+func (recv_ *Char) CanonicPath() *Char {
+ return nil
+}
+
+// llgo:link (*Char).PathToURI C.xmlPathToURI
+func (recv_ *Char) PathToURI() *Char {
+ return nil
+}
diff --git a/libxml2/valid.go b/libxml2/valid.go
new file mode 100644
index 0000000..2ca85a7
--- /dev/null
+++ b/libxml2/valid.go
@@ -0,0 +1,294 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type X_xmlValidState struct {
+ Unused [8]uint8
+}
+type ValidState X_xmlValidState
+type ValidStatePtr *ValidState
+
+// llgo:type C
+type ValidityErrorFunc func(__llgo_arg_0 c.Pointer, __llgo_arg_1 *c.Char, __llgo_va_list ...interface{})
+
+// llgo:type C
+type ValidityWarningFunc func(__llgo_arg_0 c.Pointer, __llgo_arg_1 *c.Char, __llgo_va_list ...interface{})
+
+type X_xmlValidCtxt struct {
+ UserData c.Pointer
+ Error ValidityErrorFunc
+ Warning ValidityWarningFunc
+ Node NodePtr
+ NodeNr c.Int
+ NodeMax c.Int
+ NodeTab *NodePtr
+ Flags c.Uint
+ Doc DocPtr
+ Valid c.Int
+ Vstate *ValidState
+ VstateNr c.Int
+ VstateMax c.Int
+ VstateTab *ValidState
+ Am AutomataPtr
+ State AutomataStatePtr
+}
+type ValidCtxt X_xmlValidCtxt
+type ValidCtxtPtr *ValidCtxt
+type NotationTable X_xmlHashTable
+type NotationTablePtr *NotationTable
+type ElementTable X_xmlHashTable
+type ElementTablePtr *ElementTable
+type AttributeTable X_xmlHashTable
+type AttributeTablePtr *AttributeTable
+type IDTable X_xmlHashTable
+type IDTablePtr *IDTable
+type RefTable X_xmlHashTable
+type RefTablePtr *RefTable
+
+/* Notation */
+//go:linkname AddNotationDecl C.xmlAddNotationDecl
+func AddNotationDecl(ctxt ValidCtxtPtr, dtd DtdPtr, name *Char, PublicID *Char, SystemID *Char) NotationPtr
+
+//go:linkname CopyNotationTable C.xmlCopyNotationTable
+func CopyNotationTable(table NotationTablePtr) NotationTablePtr
+
+//go:linkname FreeNotationTable C.xmlFreeNotationTable
+func FreeNotationTable(table NotationTablePtr)
+
+//go:linkname DumpNotationDecl C.xmlDumpNotationDecl
+func DumpNotationDecl(buf BufferPtr, nota NotationPtr)
+
+/* XML_DEPRECATED, still used in lxml */
+//go:linkname DumpNotationTable C.xmlDumpNotationTable
+func DumpNotationTable(buf BufferPtr, table NotationTablePtr)
+
+/* Element Content */
+/* the non Doc version are being deprecated */
+// llgo:link (*Char).NewElementContent C.xmlNewElementContent
+func (recv_ *Char) NewElementContent(type_ ElementContentType) ElementContentPtr {
+ return nil
+}
+
+//go:linkname CopyElementContent C.xmlCopyElementContent
+func CopyElementContent(content ElementContentPtr) ElementContentPtr
+
+//go:linkname FreeElementContent C.xmlFreeElementContent
+func FreeElementContent(cur ElementContentPtr)
+
+/* the new versions with doc argument */
+//go:linkname NewDocElementContent C.xmlNewDocElementContent
+func NewDocElementContent(doc DocPtr, name *Char, type_ ElementContentType) ElementContentPtr
+
+//go:linkname CopyDocElementContent C.xmlCopyDocElementContent
+func CopyDocElementContent(doc DocPtr, content ElementContentPtr) ElementContentPtr
+
+//go:linkname FreeDocElementContent C.xmlFreeDocElementContent
+func FreeDocElementContent(doc DocPtr, cur ElementContentPtr)
+
+//go:linkname SnprintfElementContent C.xmlSnprintfElementContent
+func SnprintfElementContent(buf *c.Char, size c.Int, content ElementContentPtr, englob c.Int)
+
+//go:linkname SprintfElementContent C.xmlSprintfElementContent
+func SprintfElementContent(buf *c.Char, content ElementContentPtr, englob c.Int)
+
+/* Element */
+//go:linkname AddElementDecl C.xmlAddElementDecl
+func AddElementDecl(ctxt ValidCtxtPtr, dtd DtdPtr, name *Char, type_ ElementTypeVal, content ElementContentPtr) ElementPtr
+
+//go:linkname CopyElementTable C.xmlCopyElementTable
+func CopyElementTable(table ElementTablePtr) ElementTablePtr
+
+//go:linkname FreeElementTable C.xmlFreeElementTable
+func FreeElementTable(table ElementTablePtr)
+
+//go:linkname DumpElementTable C.xmlDumpElementTable
+func DumpElementTable(buf BufferPtr, table ElementTablePtr)
+
+//go:linkname DumpElementDecl C.xmlDumpElementDecl
+func DumpElementDecl(buf BufferPtr, elem ElementPtr)
+
+/* Enumeration */
+// llgo:link (*Char).CreateEnumeration C.xmlCreateEnumeration
+func (recv_ *Char) CreateEnumeration() EnumerationPtr {
+ return nil
+}
+
+//go:linkname FreeEnumeration C.xmlFreeEnumeration
+func FreeEnumeration(cur EnumerationPtr)
+
+//go:linkname CopyEnumeration C.xmlCopyEnumeration
+func CopyEnumeration(cur EnumerationPtr) EnumerationPtr
+
+/* Attribute */
+//go:linkname AddAttributeDecl C.xmlAddAttributeDecl
+func AddAttributeDecl(ctxt ValidCtxtPtr, dtd DtdPtr, elem *Char, name *Char, ns *Char, type_ AttributeType, def AttributeDefault, defaultValue *Char, tree EnumerationPtr) AttributePtr
+
+//go:linkname CopyAttributeTable C.xmlCopyAttributeTable
+func CopyAttributeTable(table AttributeTablePtr) AttributeTablePtr
+
+//go:linkname FreeAttributeTable C.xmlFreeAttributeTable
+func FreeAttributeTable(table AttributeTablePtr)
+
+//go:linkname DumpAttributeTable C.xmlDumpAttributeTable
+func DumpAttributeTable(buf BufferPtr, table AttributeTablePtr)
+
+//go:linkname DumpAttributeDecl C.xmlDumpAttributeDecl
+func DumpAttributeDecl(buf BufferPtr, attr AttributePtr)
+
+/* IDs */
+//go:linkname AddIDSafe C.xmlAddIDSafe
+func AddIDSafe(attr AttrPtr, value *Char) c.Int
+
+//go:linkname AddID C.xmlAddID
+func AddID(ctxt ValidCtxtPtr, doc DocPtr, value *Char, attr AttrPtr) IDPtr
+
+//go:linkname FreeIDTable C.xmlFreeIDTable
+func FreeIDTable(table IDTablePtr)
+
+//go:linkname GetID C.xmlGetID
+func GetID(doc DocPtr, ID *Char) AttrPtr
+
+//go:linkname IsID C.xmlIsID
+func IsID(doc DocPtr, elem NodePtr, attr AttrPtr) c.Int
+
+//go:linkname RemoveID C.xmlRemoveID
+func RemoveID(doc DocPtr, attr AttrPtr) c.Int
+
+/* IDREFs */
+//go:linkname AddRef C.xmlAddRef
+func AddRef(ctxt ValidCtxtPtr, doc DocPtr, value *Char, attr AttrPtr) RefPtr
+
+//go:linkname FreeRefTable C.xmlFreeRefTable
+func FreeRefTable(table RefTablePtr)
+
+//go:linkname IsRef C.xmlIsRef
+func IsRef(doc DocPtr, elem NodePtr, attr AttrPtr) c.Int
+
+//go:linkname RemoveRef C.xmlRemoveRef
+func RemoveRef(doc DocPtr, attr AttrPtr) c.Int
+
+//go:linkname GetRefs C.xmlGetRefs
+func GetRefs(doc DocPtr, ID *Char) ListPtr
+
+/* Allocate/Release Validation Contexts */
+//go:linkname NewValidCtxt C.xmlNewValidCtxt
+func NewValidCtxt() ValidCtxtPtr
+
+//go:linkname FreeValidCtxt C.xmlFreeValidCtxt
+func FreeValidCtxt(ValidCtxtPtr)
+
+//go:linkname ValidateRoot C.xmlValidateRoot
+func ValidateRoot(ctxt ValidCtxtPtr, doc DocPtr) c.Int
+
+//go:linkname ValidateElementDecl C.xmlValidateElementDecl
+func ValidateElementDecl(ctxt ValidCtxtPtr, doc DocPtr, elem ElementPtr) c.Int
+
+//go:linkname ValidNormalizeAttributeValue C.xmlValidNormalizeAttributeValue
+func ValidNormalizeAttributeValue(doc DocPtr, elem NodePtr, name *Char, value *Char) *Char
+
+//go:linkname ValidCtxtNormalizeAttributeValue C.xmlValidCtxtNormalizeAttributeValue
+func ValidCtxtNormalizeAttributeValue(ctxt ValidCtxtPtr, doc DocPtr, elem NodePtr, name *Char, value *Char) *Char
+
+//go:linkname ValidateAttributeDecl C.xmlValidateAttributeDecl
+func ValidateAttributeDecl(ctxt ValidCtxtPtr, doc DocPtr, attr AttributePtr) c.Int
+
+// llgo:link AttributeType.ValidateAttributeValue C.xmlValidateAttributeValue
+func (recv_ AttributeType) ValidateAttributeValue(value *Char) c.Int {
+ return 0
+}
+
+//go:linkname ValidateNotationDecl C.xmlValidateNotationDecl
+func ValidateNotationDecl(ctxt ValidCtxtPtr, doc DocPtr, nota NotationPtr) c.Int
+
+//go:linkname ValidateDtd C.xmlValidateDtd
+func ValidateDtd(ctxt ValidCtxtPtr, doc DocPtr, dtd DtdPtr) c.Int
+
+//go:linkname ValidateDtdFinal C.xmlValidateDtdFinal
+func ValidateDtdFinal(ctxt ValidCtxtPtr, doc DocPtr) c.Int
+
+//go:linkname ValidateDocument C.xmlValidateDocument
+func ValidateDocument(ctxt ValidCtxtPtr, doc DocPtr) c.Int
+
+//go:linkname ValidateElement C.xmlValidateElement
+func ValidateElement(ctxt ValidCtxtPtr, doc DocPtr, elem NodePtr) c.Int
+
+//go:linkname ValidateOneElement C.xmlValidateOneElement
+func ValidateOneElement(ctxt ValidCtxtPtr, doc DocPtr, elem NodePtr) c.Int
+
+//go:linkname ValidateOneAttribute C.xmlValidateOneAttribute
+func ValidateOneAttribute(ctxt ValidCtxtPtr, doc DocPtr, elem NodePtr, attr AttrPtr, value *Char) c.Int
+
+//go:linkname ValidateOneNamespace C.xmlValidateOneNamespace
+func ValidateOneNamespace(ctxt ValidCtxtPtr, doc DocPtr, elem NodePtr, prefix *Char, ns NsPtr, value *Char) c.Int
+
+//go:linkname ValidateDocumentFinal C.xmlValidateDocumentFinal
+func ValidateDocumentFinal(ctxt ValidCtxtPtr, doc DocPtr) c.Int
+
+//go:linkname ValidateNotationUse C.xmlValidateNotationUse
+func ValidateNotationUse(ctxt ValidCtxtPtr, doc DocPtr, notationName *Char) c.Int
+
+//go:linkname IsMixedElement C.xmlIsMixedElement
+func IsMixedElement(doc DocPtr, name *Char) c.Int
+
+//go:linkname GetDtdAttrDesc C.xmlGetDtdAttrDesc
+func GetDtdAttrDesc(dtd DtdPtr, elem *Char, name *Char) AttributePtr
+
+//go:linkname GetDtdQAttrDesc C.xmlGetDtdQAttrDesc
+func GetDtdQAttrDesc(dtd DtdPtr, elem *Char, name *Char, prefix *Char) AttributePtr
+
+//go:linkname GetDtdNotationDesc C.xmlGetDtdNotationDesc
+func GetDtdNotationDesc(dtd DtdPtr, name *Char) NotationPtr
+
+//go:linkname GetDtdQElementDesc C.xmlGetDtdQElementDesc
+func GetDtdQElementDesc(dtd DtdPtr, name *Char, prefix *Char) ElementPtr
+
+//go:linkname GetDtdElementDesc C.xmlGetDtdElementDesc
+func GetDtdElementDesc(dtd DtdPtr, name *Char) ElementPtr
+
+// llgo:link (*ElementContent).ValidGetPotentialChildren C.xmlValidGetPotentialChildren
+func (recv_ *ElementContent) ValidGetPotentialChildren(names **Char, len *c.Int, max c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*Node).ValidGetValidElements C.xmlValidGetValidElements
+func (recv_ *Node) ValidGetValidElements(next *Node, names **Char, max c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*Char).ValidateNameValue C.xmlValidateNameValue
+func (recv_ *Char) ValidateNameValue() c.Int {
+ return 0
+}
+
+// llgo:link (*Char).ValidateNamesValue C.xmlValidateNamesValue
+func (recv_ *Char) ValidateNamesValue() c.Int {
+ return 0
+}
+
+// llgo:link (*Char).ValidateNmtokenValue C.xmlValidateNmtokenValue
+func (recv_ *Char) ValidateNmtokenValue() c.Int {
+ return 0
+}
+
+// llgo:link (*Char).ValidateNmtokensValue C.xmlValidateNmtokensValue
+func (recv_ *Char) ValidateNmtokensValue() c.Int {
+ return 0
+}
+
+/*
+ * Validation based on the regexp support
+ */
+//go:linkname ValidBuildContentModel C.xmlValidBuildContentModel
+func ValidBuildContentModel(ctxt ValidCtxtPtr, elem ElementPtr) c.Int
+
+//go:linkname ValidatePushElement C.xmlValidatePushElement
+func ValidatePushElement(ctxt ValidCtxtPtr, doc DocPtr, elem NodePtr, qname *Char) c.Int
+
+//go:linkname ValidatePushCData C.xmlValidatePushCData
+func ValidatePushCData(ctxt ValidCtxtPtr, data *Char, len c.Int) c.Int
+
+//go:linkname ValidatePopElement C.xmlValidatePopElement
+func ValidatePopElement(ctxt ValidCtxtPtr, doc DocPtr, elem NodePtr, qname *Char) c.Int
diff --git a/libxml2/xinclude.go b/libxml2/xinclude.go
new file mode 100644
index 0000000..fa7a014
--- /dev/null
+++ b/libxml2/xinclude.go
@@ -0,0 +1,54 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type X_xmlXIncludeCtxt struct {
+ Unused [8]uint8
+}
+type XIncludeCtxt X_xmlXIncludeCtxt
+type XIncludeCtxtPtr *XIncludeCtxt
+
+/*
+ * standalone processing
+ */
+//go:linkname XIncludeProcess C.xmlXIncludeProcess
+func XIncludeProcess(doc DocPtr) c.Int
+
+//go:linkname XIncludeProcessFlags C.xmlXIncludeProcessFlags
+func XIncludeProcessFlags(doc DocPtr, flags c.Int) c.Int
+
+//go:linkname XIncludeProcessFlagsData C.xmlXIncludeProcessFlagsData
+func XIncludeProcessFlagsData(doc DocPtr, flags c.Int, data c.Pointer) c.Int
+
+//go:linkname XIncludeProcessTreeFlagsData C.xmlXIncludeProcessTreeFlagsData
+func XIncludeProcessTreeFlagsData(tree NodePtr, flags c.Int, data c.Pointer) c.Int
+
+//go:linkname XIncludeProcessTree C.xmlXIncludeProcessTree
+func XIncludeProcessTree(tree NodePtr) c.Int
+
+//go:linkname XIncludeProcessTreeFlags C.xmlXIncludeProcessTreeFlags
+func XIncludeProcessTreeFlags(tree NodePtr, flags c.Int) c.Int
+
+/*
+ * contextual processing
+ */
+//go:linkname XIncludeNewContext C.xmlXIncludeNewContext
+func XIncludeNewContext(doc DocPtr) XIncludeCtxtPtr
+
+//go:linkname XIncludeSetFlags C.xmlXIncludeSetFlags
+func XIncludeSetFlags(ctxt XIncludeCtxtPtr, flags c.Int) c.Int
+
+//go:linkname XIncludeSetErrorHandler C.xmlXIncludeSetErrorHandler
+func XIncludeSetErrorHandler(ctxt XIncludeCtxtPtr, handler StructuredErrorFunc, data c.Pointer)
+
+//go:linkname XIncludeGetLastError C.xmlXIncludeGetLastError
+func XIncludeGetLastError(ctxt XIncludeCtxtPtr) c.Int
+
+//go:linkname XIncludeFreeContext C.xmlXIncludeFreeContext
+func XIncludeFreeContext(ctxt XIncludeCtxtPtr)
+
+//go:linkname XIncludeProcessNode C.xmlXIncludeProcessNode
+func XIncludeProcessNode(ctxt XIncludeCtxtPtr, tree NodePtr) c.Int
diff --git a/libxml2/xlink.go b/libxml2/xlink.go
new file mode 100644
index 0000000..638fc3d
--- /dev/null
+++ b/libxml2/xlink.go
@@ -0,0 +1,80 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type XlinkHRef *Char
+type XlinkRole *Char
+type XlinkTitle *Char
+type XlinkType c.Int
+
+const (
+ XLINK_TYPE_NONE XlinkType = 0
+ XLINK_TYPE_SIMPLE XlinkType = 1
+ XLINK_TYPE_EXTENDED XlinkType = 2
+ XLINK_TYPE_EXTENDED_SET XlinkType = 3
+)
+
+type XlinkShow c.Int
+
+const (
+ XLINK_SHOW_NONE XlinkShow = 0
+ XLINK_SHOW_NEW XlinkShow = 1
+ XLINK_SHOW_EMBED XlinkShow = 2
+ XLINK_SHOW_REPLACE XlinkShow = 3
+)
+
+type XlinkActuate c.Int
+
+const (
+ XLINK_ACTUATE_NONE XlinkActuate = 0
+ XLINK_ACTUATE_AUTO XlinkActuate = 1
+ XLINK_ACTUATE_ONREQUEST XlinkActuate = 2
+)
+
+// llgo:type C
+type XlinkNodeDetectFunc func(c.Pointer, NodePtr)
+
+// llgo:type C
+type XlinkSimpleLinkFunk func(c.Pointer, NodePtr, XlinkHRef, XlinkRole, XlinkTitle)
+
+// llgo:type C
+type XlinkExtendedLinkFunk func(c.Pointer, NodePtr, c.Int, *XlinkHRef, *XlinkRole, c.Int, *XlinkRole, *XlinkRole, *XlinkShow, *XlinkActuate, c.Int, *XlinkTitle, **Char)
+
+// llgo:type C
+type XlinkExtendedLinkSetFunk func(c.Pointer, NodePtr, c.Int, *XlinkHRef, *XlinkRole, c.Int, *XlinkTitle, **Char)
+
+type X_xlinkHandler struct {
+ Simple XlinkSimpleLinkFunk
+ Extended XlinkExtendedLinkFunk
+ Set XlinkExtendedLinkSetFunk
+}
+type XlinkHandler X_xlinkHandler
+type XlinkHandlerPtr *XlinkHandler
+
+/*
+ * The default detection routine, can be overridden, they call the default
+ * detection callbacks.
+ */
+//go:linkname XlinkGetDefaultDetect C.xlinkGetDefaultDetect
+func XlinkGetDefaultDetect() XlinkNodeDetectFunc
+
+//go:linkname XlinkSetDefaultDetect C.xlinkSetDefaultDetect
+func XlinkSetDefaultDetect(func_ XlinkNodeDetectFunc)
+
+/*
+ * Routines to set/get the default handlers.
+ */
+//go:linkname XlinkGetDefaultHandler C.xlinkGetDefaultHandler
+func XlinkGetDefaultHandler() XlinkHandlerPtr
+
+//go:linkname XlinkSetDefaultHandler C.xlinkSetDefaultHandler
+func XlinkSetDefaultHandler(handler XlinkHandlerPtr)
+
+/*
+ * Link detection module itself.
+ */
+//go:linkname XlinkIsLink C.xlinkIsLink
+func XlinkIsLink(doc DocPtr, node NodePtr) XlinkType
diff --git a/libxml2/xmlIO.go b/libxml2/xmlIO.go
new file mode 100644
index 0000000..3d392e7
--- /dev/null
+++ b/libxml2/xmlIO.go
@@ -0,0 +1,237 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+// llgo:type C
+type InputMatchCallback func(*c.Char) c.Int
+
+// llgo:type C
+type InputOpenCallback func(*c.Char) c.Pointer
+
+// llgo:type C
+type InputReadCallback func(c.Pointer, *c.Char, c.Int) c.Int
+
+// llgo:type C
+type InputCloseCallback func(c.Pointer) c.Int
+
+// llgo:type C
+type OutputMatchCallback func(*c.Char) c.Int
+
+// llgo:type C
+type OutputOpenCallback func(*c.Char) c.Pointer
+
+// llgo:type C
+type OutputWriteCallback func(c.Pointer, *c.Char, c.Int) c.Int
+
+// llgo:type C
+type OutputCloseCallback func(c.Pointer) c.Int
+
+// llgo:type C
+type ParserInputBufferCreateFilenameFunc func(*c.Char, CharEncoding) ParserInputBufferPtr
+
+// llgo:type C
+type OutputBufferCreateFilenameFunc func(*c.Char, CharEncodingHandlerPtr, c.Int) OutputBufferPtr
+
+//go:linkname X__xmlParserInputBufferCreateFilenameValue C.__xmlParserInputBufferCreateFilenameValue
+func X__xmlParserInputBufferCreateFilenameValue() ParserInputBufferCreateFilenameFunc
+
+//go:linkname X__xmlOutputBufferCreateFilenameValue C.__xmlOutputBufferCreateFilenameValue
+func X__xmlOutputBufferCreateFilenameValue() OutputBufferCreateFilenameFunc
+
+/*
+ * Interfaces for input
+ */
+//go:linkname CleanupInputCallbacks C.xmlCleanupInputCallbacks
+func CleanupInputCallbacks()
+
+//go:linkname PopInputCallbacks C.xmlPopInputCallbacks
+func PopInputCallbacks() c.Int
+
+//go:linkname RegisterDefaultInputCallbacks C.xmlRegisterDefaultInputCallbacks
+func RegisterDefaultInputCallbacks()
+
+// llgo:link CharEncoding.AllocParserInputBuffer C.xmlAllocParserInputBuffer
+func (recv_ CharEncoding) AllocParserInputBuffer() ParserInputBufferPtr {
+ return nil
+}
+
+//go:linkname ParserInputBufferCreateFilename C.xmlParserInputBufferCreateFilename
+func ParserInputBufferCreateFilename(URI *c.Char, enc CharEncoding) ParserInputBufferPtr
+
+//go:linkname ParserInputBufferCreateFile C.xmlParserInputBufferCreateFile
+func ParserInputBufferCreateFile(file *c.FILE, enc CharEncoding) ParserInputBufferPtr
+
+//go:linkname ParserInputBufferCreateFd C.xmlParserInputBufferCreateFd
+func ParserInputBufferCreateFd(fd c.Int, enc CharEncoding) ParserInputBufferPtr
+
+//go:linkname ParserInputBufferCreateMem C.xmlParserInputBufferCreateMem
+func ParserInputBufferCreateMem(mem *c.Char, size c.Int, enc CharEncoding) ParserInputBufferPtr
+
+//go:linkname ParserInputBufferCreateStatic C.xmlParserInputBufferCreateStatic
+func ParserInputBufferCreateStatic(mem *c.Char, size c.Int, enc CharEncoding) ParserInputBufferPtr
+
+//go:linkname ParserInputBufferCreateIO C.xmlParserInputBufferCreateIO
+func ParserInputBufferCreateIO(ioread InputReadCallback, ioclose InputCloseCallback, ioctx c.Pointer, enc CharEncoding) ParserInputBufferPtr
+
+//go:linkname ParserInputBufferRead C.xmlParserInputBufferRead
+func ParserInputBufferRead(in ParserInputBufferPtr, len c.Int) c.Int
+
+//go:linkname ParserInputBufferGrow C.xmlParserInputBufferGrow
+func ParserInputBufferGrow(in ParserInputBufferPtr, len c.Int) c.Int
+
+//go:linkname ParserInputBufferPush C.xmlParserInputBufferPush
+func ParserInputBufferPush(in ParserInputBufferPtr, len c.Int, buf *c.Char) c.Int
+
+//go:linkname FreeParserInputBuffer C.xmlFreeParserInputBuffer
+func FreeParserInputBuffer(in ParserInputBufferPtr)
+
+//go:linkname ParserGetDirectory C.xmlParserGetDirectory
+func ParserGetDirectory(filename *c.Char) *c.Char
+
+//go:linkname RegisterInputCallbacks C.xmlRegisterInputCallbacks
+func RegisterInputCallbacks(matchFunc InputMatchCallback, openFunc InputOpenCallback, readFunc InputReadCallback, closeFunc InputCloseCallback) c.Int
+
+//go:linkname X__xmlParserInputBufferCreateFilename C.__xmlParserInputBufferCreateFilename
+func X__xmlParserInputBufferCreateFilename(URI *c.Char, enc CharEncoding) ParserInputBufferPtr
+
+/*
+ * Interfaces for output
+ */
+//go:linkname CleanupOutputCallbacks C.xmlCleanupOutputCallbacks
+func CleanupOutputCallbacks()
+
+//go:linkname PopOutputCallbacks C.xmlPopOutputCallbacks
+func PopOutputCallbacks() c.Int
+
+//go:linkname RegisterDefaultOutputCallbacks C.xmlRegisterDefaultOutputCallbacks
+func RegisterDefaultOutputCallbacks()
+
+//go:linkname AllocOutputBuffer C.xmlAllocOutputBuffer
+func AllocOutputBuffer(encoder CharEncodingHandlerPtr) OutputBufferPtr
+
+//go:linkname OutputBufferCreateFilename C.xmlOutputBufferCreateFilename
+func OutputBufferCreateFilename(URI *c.Char, encoder CharEncodingHandlerPtr, compression c.Int) OutputBufferPtr
+
+//go:linkname OutputBufferCreateFile C.xmlOutputBufferCreateFile
+func OutputBufferCreateFile(file *c.FILE, encoder CharEncodingHandlerPtr) OutputBufferPtr
+
+//go:linkname OutputBufferCreateBuffer C.xmlOutputBufferCreateBuffer
+func OutputBufferCreateBuffer(buffer BufferPtr, encoder CharEncodingHandlerPtr) OutputBufferPtr
+
+//go:linkname OutputBufferCreateFd C.xmlOutputBufferCreateFd
+func OutputBufferCreateFd(fd c.Int, encoder CharEncodingHandlerPtr) OutputBufferPtr
+
+//go:linkname OutputBufferCreateIO C.xmlOutputBufferCreateIO
+func OutputBufferCreateIO(iowrite OutputWriteCallback, ioclose OutputCloseCallback, ioctx c.Pointer, encoder CharEncodingHandlerPtr) OutputBufferPtr
+
+/* Couple of APIs to get the output without digging into the buffers */
+//go:linkname OutputBufferGetContent C.xmlOutputBufferGetContent
+func OutputBufferGetContent(out OutputBufferPtr) *Char
+
+//go:linkname OutputBufferGetSize C.xmlOutputBufferGetSize
+func OutputBufferGetSize(out OutputBufferPtr) c.SizeT
+
+//go:linkname OutputBufferWrite C.xmlOutputBufferWrite
+func OutputBufferWrite(out OutputBufferPtr, len c.Int, buf *c.Char) c.Int
+
+//go:linkname OutputBufferWriteString C.xmlOutputBufferWriteString
+func OutputBufferWriteString(out OutputBufferPtr, str *c.Char) c.Int
+
+//go:linkname OutputBufferWriteEscape C.xmlOutputBufferWriteEscape
+func OutputBufferWriteEscape(out OutputBufferPtr, str *Char, escaping CharEncodingOutputFunc) c.Int
+
+//go:linkname OutputBufferFlush C.xmlOutputBufferFlush
+func OutputBufferFlush(out OutputBufferPtr) c.Int
+
+//go:linkname OutputBufferClose C.xmlOutputBufferClose
+func OutputBufferClose(out OutputBufferPtr) c.Int
+
+//go:linkname RegisterOutputCallbacks C.xmlRegisterOutputCallbacks
+func RegisterOutputCallbacks(matchFunc OutputMatchCallback, openFunc OutputOpenCallback, writeFunc OutputWriteCallback, closeFunc OutputCloseCallback) c.Int
+
+//go:linkname X__xmlOutputBufferCreateFilename C.__xmlOutputBufferCreateFilename
+func X__xmlOutputBufferCreateFilename(URI *c.Char, encoder CharEncodingHandlerPtr, compression c.Int) OutputBufferPtr
+
+/* This function only exists if HTTP support built into the library */
+//go:linkname RegisterHTTPPostCallbacks C.xmlRegisterHTTPPostCallbacks
+func RegisterHTTPPostCallbacks()
+
+//go:linkname CheckHTTPInput C.xmlCheckHTTPInput
+func CheckHTTPInput(ctxt ParserCtxtPtr, ret ParserInputPtr) ParserInputPtr
+
+/*
+ * A predefined entity loader disabling network accesses
+ */
+//go:linkname NoNetExternalEntityLoader C.xmlNoNetExternalEntityLoader
+func NoNetExternalEntityLoader(URL *c.Char, ID *c.Char, ctxt ParserCtxtPtr) ParserInputPtr
+
+// llgo:link (*Char).NormalizeWindowsPath C.xmlNormalizeWindowsPath
+func (recv_ *Char) NormalizeWindowsPath() *Char {
+ return nil
+}
+
+//go:linkname CheckFilename C.xmlCheckFilename
+func CheckFilename(path *c.Char) c.Int
+
+/**
+ * Default 'file://' protocol callbacks
+ */
+//go:linkname FileMatch C.xmlFileMatch
+func FileMatch(filename *c.Char) c.Int
+
+//go:linkname FileOpen C.xmlFileOpen
+func FileOpen(filename *c.Char) c.Pointer
+
+//go:linkname FileRead C.xmlFileRead
+func FileRead(context c.Pointer, buffer *c.Char, len c.Int) c.Int
+
+//go:linkname FileClose C.xmlFileClose
+func FileClose(context c.Pointer) c.Int
+
+/**
+ * Default 'http://' protocol callbacks
+ */
+//go:linkname IOHTTPMatch C.xmlIOHTTPMatch
+func IOHTTPMatch(filename *c.Char) c.Int
+
+//go:linkname IOHTTPOpen C.xmlIOHTTPOpen
+func IOHTTPOpen(filename *c.Char) c.Pointer
+
+//go:linkname IOHTTPOpenW C.xmlIOHTTPOpenW
+func IOHTTPOpenW(post_uri *c.Char, compression c.Int) c.Pointer
+
+//go:linkname IOHTTPRead C.xmlIOHTTPRead
+func IOHTTPRead(context c.Pointer, buffer *c.Char, len c.Int) c.Int
+
+//go:linkname IOHTTPClose C.xmlIOHTTPClose
+func IOHTTPClose(context c.Pointer) c.Int
+
+/**
+ * Default 'ftp://' protocol callbacks
+ */
+//go:linkname IOFTPMatch C.xmlIOFTPMatch
+func IOFTPMatch(filename *c.Char) c.Int
+
+//go:linkname IOFTPOpen C.xmlIOFTPOpen
+func IOFTPOpen(filename *c.Char) c.Pointer
+
+//go:linkname IOFTPRead C.xmlIOFTPRead
+func IOFTPRead(context c.Pointer, buffer *c.Char, len c.Int) c.Int
+
+//go:linkname IOFTPClose C.xmlIOFTPClose
+func IOFTPClose(context c.Pointer) c.Int
+
+//go:linkname ParserInputBufferCreateFilenameDefault C.xmlParserInputBufferCreateFilenameDefault
+func ParserInputBufferCreateFilenameDefault(func_ ParserInputBufferCreateFilenameFunc) ParserInputBufferCreateFilenameFunc
+
+//go:linkname OutputBufferCreateFilenameDefault C.xmlOutputBufferCreateFilenameDefault
+func OutputBufferCreateFilenameDefault(func_ OutputBufferCreateFilenameFunc) OutputBufferCreateFilenameFunc
+
+//go:linkname ThrDefOutputBufferCreateFilenameDefault C.xmlThrDefOutputBufferCreateFilenameDefault
+func ThrDefOutputBufferCreateFilenameDefault(func_ OutputBufferCreateFilenameFunc) OutputBufferCreateFilenameFunc
+
+//go:linkname ThrDefParserInputBufferCreateFilenameDefault C.xmlThrDefParserInputBufferCreateFilenameDefault
+func ThrDefParserInputBufferCreateFilenameDefault(func_ ParserInputBufferCreateFilenameFunc) ParserInputBufferCreateFilenameFunc
diff --git a/libxml2/xmlautomata.go b/libxml2/xmlautomata.go
new file mode 100644
index 0000000..c4c6a6a
--- /dev/null
+++ b/libxml2/xmlautomata.go
@@ -0,0 +1,78 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type X_xmlAutomata struct {
+ Unused [8]uint8
+}
+type Automata X_xmlAutomata
+type AutomataPtr *Automata
+
+type X_xmlAutomataState struct {
+ Unused [8]uint8
+}
+type AutomataState X_xmlAutomataState
+type AutomataStatePtr *AutomataState
+
+/*
+ * Building API
+ */
+//go:linkname NewAutomata C.xmlNewAutomata
+func NewAutomata() AutomataPtr
+
+//go:linkname FreeAutomata C.xmlFreeAutomata
+func FreeAutomata(am AutomataPtr)
+
+//go:linkname AutomataGetInitState C.xmlAutomataGetInitState
+func AutomataGetInitState(am AutomataPtr) AutomataStatePtr
+
+//go:linkname AutomataSetFinalState C.xmlAutomataSetFinalState
+func AutomataSetFinalState(am AutomataPtr, state AutomataStatePtr) c.Int
+
+//go:linkname AutomataNewState C.xmlAutomataNewState
+func AutomataNewState(am AutomataPtr) AutomataStatePtr
+
+//go:linkname AutomataNewTransition C.xmlAutomataNewTransition
+func AutomataNewTransition(am AutomataPtr, from AutomataStatePtr, to AutomataStatePtr, token *Char, data c.Pointer) AutomataStatePtr
+
+//go:linkname AutomataNewTransition2 C.xmlAutomataNewTransition2
+func AutomataNewTransition2(am AutomataPtr, from AutomataStatePtr, to AutomataStatePtr, token *Char, token2 *Char, data c.Pointer) AutomataStatePtr
+
+//go:linkname AutomataNewNegTrans C.xmlAutomataNewNegTrans
+func AutomataNewNegTrans(am AutomataPtr, from AutomataStatePtr, to AutomataStatePtr, token *Char, token2 *Char, data c.Pointer) AutomataStatePtr
+
+//go:linkname AutomataNewCountTrans C.xmlAutomataNewCountTrans
+func AutomataNewCountTrans(am AutomataPtr, from AutomataStatePtr, to AutomataStatePtr, token *Char, min c.Int, max c.Int, data c.Pointer) AutomataStatePtr
+
+//go:linkname AutomataNewCountTrans2 C.xmlAutomataNewCountTrans2
+func AutomataNewCountTrans2(am AutomataPtr, from AutomataStatePtr, to AutomataStatePtr, token *Char, token2 *Char, min c.Int, max c.Int, data c.Pointer) AutomataStatePtr
+
+//go:linkname AutomataNewOnceTrans C.xmlAutomataNewOnceTrans
+func AutomataNewOnceTrans(am AutomataPtr, from AutomataStatePtr, to AutomataStatePtr, token *Char, min c.Int, max c.Int, data c.Pointer) AutomataStatePtr
+
+//go:linkname AutomataNewOnceTrans2 C.xmlAutomataNewOnceTrans2
+func AutomataNewOnceTrans2(am AutomataPtr, from AutomataStatePtr, to AutomataStatePtr, token *Char, token2 *Char, min c.Int, max c.Int, data c.Pointer) AutomataStatePtr
+
+//go:linkname AutomataNewAllTrans C.xmlAutomataNewAllTrans
+func AutomataNewAllTrans(am AutomataPtr, from AutomataStatePtr, to AutomataStatePtr, lax c.Int) AutomataStatePtr
+
+//go:linkname AutomataNewEpsilon C.xmlAutomataNewEpsilon
+func AutomataNewEpsilon(am AutomataPtr, from AutomataStatePtr, to AutomataStatePtr) AutomataStatePtr
+
+//go:linkname AutomataNewCountedTrans C.xmlAutomataNewCountedTrans
+func AutomataNewCountedTrans(am AutomataPtr, from AutomataStatePtr, to AutomataStatePtr, counter c.Int) AutomataStatePtr
+
+//go:linkname AutomataNewCounterTrans C.xmlAutomataNewCounterTrans
+func AutomataNewCounterTrans(am AutomataPtr, from AutomataStatePtr, to AutomataStatePtr, counter c.Int) AutomataStatePtr
+
+//go:linkname AutomataNewCounter C.xmlAutomataNewCounter
+func AutomataNewCounter(am AutomataPtr, min c.Int, max c.Int) c.Int
+
+//go:linkname AutomataCompile C.xmlAutomataCompile
+func AutomataCompile(am AutomataPtr) *X_xmlRegexp
+
+//go:linkname AutomataIsDeterminist C.xmlAutomataIsDeterminist
+func AutomataIsDeterminist(am AutomataPtr) c.Int
diff --git a/libxml2/xmlerror.go b/libxml2/xmlerror.go
new file mode 100644
index 0000000..0699bbc
--- /dev/null
+++ b/libxml2/xmlerror.go
@@ -0,0 +1,908 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type ErrorLevel c.Int
+
+const (
+ ERR_NONE ErrorLevel = 0
+ ERR_WARNING ErrorLevel = 1
+ ERR_ERROR ErrorLevel = 2
+ ERR_FATAL ErrorLevel = 3
+)
+
+type ErrorDomain c.Int
+
+const (
+ FROM_NONE ErrorDomain = 0
+ FROM_PARSER ErrorDomain = 1
+ FROM_TREE ErrorDomain = 2
+ FROM_NAMESPACE ErrorDomain = 3
+ FROM_DTD ErrorDomain = 4
+ FROM_HTML ErrorDomain = 5
+ FROM_MEMORY ErrorDomain = 6
+ FROM_OUTPUT ErrorDomain = 7
+ FROM_IO ErrorDomain = 8
+ FROM_FTP ErrorDomain = 9
+ FROM_HTTP ErrorDomain = 10
+ FROM_XINCLUDE ErrorDomain = 11
+ FROM_XPATH ErrorDomain = 12
+ FROM_XPOINTER ErrorDomain = 13
+ FROM_REGEXP ErrorDomain = 14
+ FROM_DATATYPE ErrorDomain = 15
+ FROM_SCHEMASP ErrorDomain = 16
+ FROM_SCHEMASV ErrorDomain = 17
+ FROM_RELAXNGP ErrorDomain = 18
+ FROM_RELAXNGV ErrorDomain = 19
+ FROM_CATALOG ErrorDomain = 20
+ FROM_C14N ErrorDomain = 21
+ FROM_XSLT ErrorDomain = 22
+ FROM_VALID ErrorDomain = 23
+ FROM_CHECK ErrorDomain = 24
+ FROM_WRITER ErrorDomain = 25
+ FROM_MODULE ErrorDomain = 26
+ FROM_I18N ErrorDomain = 27
+ FROM_SCHEMATRONV ErrorDomain = 28
+ FROM_BUFFER ErrorDomain = 29
+ FROM_URI ErrorDomain = 30
+)
+
+type X_xmlError struct {
+ Domain c.Int
+ Code c.Int
+ Message *c.Char
+ Level ErrorLevel
+ File *c.Char
+ Line c.Int
+ Str1 *c.Char
+ Str2 *c.Char
+ Str3 *c.Char
+ Int1 c.Int
+ Int2 c.Int
+ Ctxt c.Pointer
+ Node c.Pointer
+}
+type Error X_xmlError
+type ErrorPtr *Error
+type ParserErrors c.Int
+
+const (
+ ERR_OK ParserErrors = 0
+ ERR_INTERNAL_ERROR ParserErrors = 1
+ ERR_NO_MEMORY ParserErrors = 2
+ ERR_DOCUMENT_START ParserErrors = 3
+ ERR_DOCUMENT_EMPTY ParserErrors = 4
+ ERR_DOCUMENT_END ParserErrors = 5
+ ERR_INVALID_HEX_CHARREF ParserErrors = 6
+ ERR_INVALID_DEC_CHARREF ParserErrors = 7
+ ERR_INVALID_CHARREF ParserErrors = 8
+ ERR_INVALID_CHAR ParserErrors = 9
+ ERR_CHARREF_AT_EOF ParserErrors = 10
+ ERR_CHARREF_IN_PROLOG ParserErrors = 11
+ ERR_CHARREF_IN_EPILOG ParserErrors = 12
+ ERR_CHARREF_IN_DTD ParserErrors = 13
+ ERR_ENTITYREF_AT_EOF ParserErrors = 14
+ ERR_ENTITYREF_IN_PROLOG ParserErrors = 15
+ ERR_ENTITYREF_IN_EPILOG ParserErrors = 16
+ ERR_ENTITYREF_IN_DTD ParserErrors = 17
+ ERR_PEREF_AT_EOF ParserErrors = 18
+ ERR_PEREF_IN_PROLOG ParserErrors = 19
+ ERR_PEREF_IN_EPILOG ParserErrors = 20
+ ERR_PEREF_IN_INT_SUBSET ParserErrors = 21
+ ERR_ENTITYREF_NO_NAME ParserErrors = 22
+ ERR_ENTITYREF_SEMICOL_MISSING ParserErrors = 23
+ ERR_PEREF_NO_NAME ParserErrors = 24
+ ERR_PEREF_SEMICOL_MISSING ParserErrors = 25
+ ERR_UNDECLARED_ENTITY ParserErrors = 26
+ WAR_UNDECLARED_ENTITY ParserErrors = 27
+ ERR_UNPARSED_ENTITY ParserErrors = 28
+ ERR_ENTITY_IS_EXTERNAL ParserErrors = 29
+ ERR_ENTITY_IS_PARAMETER ParserErrors = 30
+ ERR_UNKNOWN_ENCODING ParserErrors = 31
+ ERR_UNSUPPORTED_ENCODING ParserErrors = 32
+ ERR_STRING_NOT_STARTED ParserErrors = 33
+ ERR_STRING_NOT_CLOSED ParserErrors = 34
+ ERR_NS_DECL_ERROR ParserErrors = 35
+ ERR_ENTITY_NOT_STARTED ParserErrors = 36
+ ERR_ENTITY_NOT_FINISHED ParserErrors = 37
+ ERR_LT_IN_ATTRIBUTE ParserErrors = 38
+ ERR_ATTRIBUTE_NOT_STARTED ParserErrors = 39
+ ERR_ATTRIBUTE_NOT_FINISHED ParserErrors = 40
+ ERR_ATTRIBUTE_WITHOUT_VALUE ParserErrors = 41
+ ERR_ATTRIBUTE_REDEFINED ParserErrors = 42
+ ERR_LITERAL_NOT_STARTED ParserErrors = 43
+ ERR_LITERAL_NOT_FINISHED ParserErrors = 44
+ ERR_COMMENT_NOT_FINISHED ParserErrors = 45
+ ERR_PI_NOT_STARTED ParserErrors = 46
+ ERR_PI_NOT_FINISHED ParserErrors = 47
+ ERR_NOTATION_NOT_STARTED ParserErrors = 48
+ ERR_NOTATION_NOT_FINISHED ParserErrors = 49
+ ERR_ATTLIST_NOT_STARTED ParserErrors = 50
+ ERR_ATTLIST_NOT_FINISHED ParserErrors = 51
+ ERR_MIXED_NOT_STARTED ParserErrors = 52
+ ERR_MIXED_NOT_FINISHED ParserErrors = 53
+ ERR_ELEMCONTENT_NOT_STARTED ParserErrors = 54
+ ERR_ELEMCONTENT_NOT_FINISHED ParserErrors = 55
+ ERR_XMLDECL_NOT_STARTED ParserErrors = 56
+ ERR_XMLDECL_NOT_FINISHED ParserErrors = 57
+ ERR_CONDSEC_NOT_STARTED ParserErrors = 58
+ ERR_CONDSEC_NOT_FINISHED ParserErrors = 59
+ ERR_EXT_SUBSET_NOT_FINISHED ParserErrors = 60
+ ERR_DOCTYPE_NOT_FINISHED ParserErrors = 61
+ ERR_MISPLACED_CDATA_END ParserErrors = 62
+ ERR_CDATA_NOT_FINISHED ParserErrors = 63
+ ERR_RESERVED_XML_NAME ParserErrors = 64
+ ERR_SPACE_REQUIRED ParserErrors = 65
+ ERR_SEPARATOR_REQUIRED ParserErrors = 66
+ ERR_NMTOKEN_REQUIRED ParserErrors = 67
+ ERR_NAME_REQUIRED ParserErrors = 68
+ ERR_PCDATA_REQUIRED ParserErrors = 69
+ ERR_URI_REQUIRED ParserErrors = 70
+ ERR_PUBID_REQUIRED ParserErrors = 71
+ ERR_LT_REQUIRED ParserErrors = 72
+ ERR_GT_REQUIRED ParserErrors = 73
+ ERR_LTSLASH_REQUIRED ParserErrors = 74
+ ERR_EQUAL_REQUIRED ParserErrors = 75
+ ERR_TAG_NAME_MISMATCH ParserErrors = 76
+ ERR_TAG_NOT_FINISHED ParserErrors = 77
+ ERR_STANDALONE_VALUE ParserErrors = 78
+ ERR_ENCODING_NAME ParserErrors = 79
+ ERR_HYPHEN_IN_COMMENT ParserErrors = 80
+ ERR_INVALID_ENCODING ParserErrors = 81
+ ERR_EXT_ENTITY_STANDALONE ParserErrors = 82
+ ERR_CONDSEC_INVALID ParserErrors = 83
+ ERR_VALUE_REQUIRED ParserErrors = 84
+ ERR_NOT_WELL_BALANCED ParserErrors = 85
+ ERR_EXTRA_CONTENT ParserErrors = 86
+ ERR_ENTITY_CHAR_ERROR ParserErrors = 87
+ ERR_ENTITY_PE_INTERNAL ParserErrors = 88
+ ERR_ENTITY_LOOP ParserErrors = 89
+ ERR_ENTITY_BOUNDARY ParserErrors = 90
+ ERR_INVALID_URI ParserErrors = 91
+ ERR_URI_FRAGMENT ParserErrors = 92
+ WAR_CATALOG_PI ParserErrors = 93
+ ERR_NO_DTD ParserErrors = 94
+ ERR_CONDSEC_INVALID_KEYWORD ParserErrors = 95
+ ERR_VERSION_MISSING ParserErrors = 96
+ WAR_UNKNOWN_VERSION ParserErrors = 97
+ WAR_LANG_VALUE ParserErrors = 98
+ WAR_NS_URI ParserErrors = 99
+ WAR_NS_URI_RELATIVE ParserErrors = 100
+ ERR_MISSING_ENCODING ParserErrors = 101
+ WAR_SPACE_VALUE ParserErrors = 102
+ ERR_NOT_STANDALONE ParserErrors = 103
+ ERR_ENTITY_PROCESSING ParserErrors = 104
+ ERR_NOTATION_PROCESSING ParserErrors = 105
+ WAR_NS_COLUMN ParserErrors = 106
+ WAR_ENTITY_REDEFINED ParserErrors = 107
+ ERR_UNKNOWN_VERSION ParserErrors = 108
+ ERR_VERSION_MISMATCH ParserErrors = 109
+ ERR_NAME_TOO_LONG ParserErrors = 110
+ ERR_USER_STOP ParserErrors = 111
+ ERR_COMMENT_ABRUPTLY_ENDED ParserErrors = 112
+ WAR_ENCODING_MISMATCH ParserErrors = 113
+ ERR_RESOURCE_LIMIT ParserErrors = 114
+ ERR_ARGUMENT ParserErrors = 115
+ ERR_SYSTEM ParserErrors = 116
+ ERR_REDECL_PREDEF_ENTITY ParserErrors = 117
+ ERR_INT_SUBSET_NOT_FINISHED ParserErrors = 118
+ NS_ERR_XML_NAMESPACE ParserErrors = 200
+ NS_ERR_UNDEFINED_NAMESPACE ParserErrors = 201
+ NS_ERR_QNAME ParserErrors = 202
+ NS_ERR_ATTRIBUTE_REDEFINED ParserErrors = 203
+ NS_ERR_EMPTY ParserErrors = 204
+ NS_ERR_COLON ParserErrors = 205
+ DTD_ATTRIBUTE_DEFAULT ParserErrors = 500
+ DTD_ATTRIBUTE_REDEFINED ParserErrors = 501
+ DTD_ATTRIBUTE_VALUE ParserErrors = 502
+ DTD_CONTENT_ERROR ParserErrors = 503
+ DTD_CONTENT_MODEL ParserErrors = 504
+ DTD_CONTENT_NOT_DETERMINIST ParserErrors = 505
+ DTD_DIFFERENT_PREFIX ParserErrors = 506
+ DTD_ELEM_DEFAULT_NAMESPACE ParserErrors = 507
+ DTD_ELEM_NAMESPACE ParserErrors = 508
+ DTD_ELEM_REDEFINED ParserErrors = 509
+ DTD_EMPTY_NOTATION ParserErrors = 510
+ DTD_ENTITY_TYPE ParserErrors = 511
+ DTD_ID_FIXED ParserErrors = 512
+ DTD_ID_REDEFINED ParserErrors = 513
+ DTD_ID_SUBSET ParserErrors = 514
+ DTD_INVALID_CHILD ParserErrors = 515
+ DTD_INVALID_DEFAULT ParserErrors = 516
+ DTD_LOAD_ERROR ParserErrors = 517
+ DTD_MISSING_ATTRIBUTE ParserErrors = 518
+ DTD_MIXED_CORRUPT ParserErrors = 519
+ DTD_MULTIPLE_ID ParserErrors = 520
+ DTD_NO_DOC ParserErrors = 521
+ DTD_NO_DTD ParserErrors = 522
+ DTD_NO_ELEM_NAME ParserErrors = 523
+ DTD_NO_PREFIX ParserErrors = 524
+ DTD_NO_ROOT ParserErrors = 525
+ DTD_NOTATION_REDEFINED ParserErrors = 526
+ DTD_NOTATION_VALUE ParserErrors = 527
+ DTD_NOT_EMPTY ParserErrors = 528
+ DTD_NOT_PCDATA ParserErrors = 529
+ DTD_NOT_STANDALONE ParserErrors = 530
+ DTD_ROOT_NAME ParserErrors = 531
+ DTD_STANDALONE_WHITE_SPACE ParserErrors = 532
+ DTD_UNKNOWN_ATTRIBUTE ParserErrors = 533
+ DTD_UNKNOWN_ELEM ParserErrors = 534
+ DTD_UNKNOWN_ENTITY ParserErrors = 535
+ DTD_UNKNOWN_ID ParserErrors = 536
+ DTD_UNKNOWN_NOTATION ParserErrors = 537
+ DTD_STANDALONE_DEFAULTED ParserErrors = 538
+ DTD_XMLID_VALUE ParserErrors = 539
+ DTD_XMLID_TYPE ParserErrors = 540
+ DTD_DUP_TOKEN ParserErrors = 541
+ HTML_STRUCURE_ERROR ParserErrors = 800
+ HTML_UNKNOWN_TAG ParserErrors = 801
+ HTML_INCORRECTLY_OPENED_COMMENT ParserErrors = 802
+ RNGP_ANYNAME_ATTR_ANCESTOR ParserErrors = 1000
+ RNGP_ATTR_CONFLICT ParserErrors = 1001
+ RNGP_ATTRIBUTE_CHILDREN ParserErrors = 1002
+ RNGP_ATTRIBUTE_CONTENT ParserErrors = 1003
+ RNGP_ATTRIBUTE_EMPTY ParserErrors = 1004
+ RNGP_ATTRIBUTE_NOOP ParserErrors = 1005
+ RNGP_CHOICE_CONTENT ParserErrors = 1006
+ RNGP_CHOICE_EMPTY ParserErrors = 1007
+ RNGP_CREATE_FAILURE ParserErrors = 1008
+ RNGP_DATA_CONTENT ParserErrors = 1009
+ RNGP_DEF_CHOICE_AND_INTERLEAVE ParserErrors = 1010
+ RNGP_DEFINE_CREATE_FAILED ParserErrors = 1011
+ RNGP_DEFINE_EMPTY ParserErrors = 1012
+ RNGP_DEFINE_MISSING ParserErrors = 1013
+ RNGP_DEFINE_NAME_MISSING ParserErrors = 1014
+ RNGP_ELEM_CONTENT_EMPTY ParserErrors = 1015
+ RNGP_ELEM_CONTENT_ERROR ParserErrors = 1016
+ RNGP_ELEMENT_EMPTY ParserErrors = 1017
+ RNGP_ELEMENT_CONTENT ParserErrors = 1018
+ RNGP_ELEMENT_NAME ParserErrors = 1019
+ RNGP_ELEMENT_NO_CONTENT ParserErrors = 1020
+ RNGP_ELEM_TEXT_CONFLICT ParserErrors = 1021
+ RNGP_EMPTY ParserErrors = 1022
+ RNGP_EMPTY_CONSTRUCT ParserErrors = 1023
+ RNGP_EMPTY_CONTENT ParserErrors = 1024
+ RNGP_EMPTY_NOT_EMPTY ParserErrors = 1025
+ RNGP_ERROR_TYPE_LIB ParserErrors = 1026
+ RNGP_EXCEPT_EMPTY ParserErrors = 1027
+ RNGP_EXCEPT_MISSING ParserErrors = 1028
+ RNGP_EXCEPT_MULTIPLE ParserErrors = 1029
+ RNGP_EXCEPT_NO_CONTENT ParserErrors = 1030
+ RNGP_EXTERNALREF_EMTPY ParserErrors = 1031
+ RNGP_EXTERNAL_REF_FAILURE ParserErrors = 1032
+ RNGP_EXTERNALREF_RECURSE ParserErrors = 1033
+ RNGP_FORBIDDEN_ATTRIBUTE ParserErrors = 1034
+ RNGP_FOREIGN_ELEMENT ParserErrors = 1035
+ RNGP_GRAMMAR_CONTENT ParserErrors = 1036
+ RNGP_GRAMMAR_EMPTY ParserErrors = 1037
+ RNGP_GRAMMAR_MISSING ParserErrors = 1038
+ RNGP_GRAMMAR_NO_START ParserErrors = 1039
+ RNGP_GROUP_ATTR_CONFLICT ParserErrors = 1040
+ RNGP_HREF_ERROR ParserErrors = 1041
+ RNGP_INCLUDE_EMPTY ParserErrors = 1042
+ RNGP_INCLUDE_FAILURE ParserErrors = 1043
+ RNGP_INCLUDE_RECURSE ParserErrors = 1044
+ RNGP_INTERLEAVE_ADD ParserErrors = 1045
+ RNGP_INTERLEAVE_CREATE_FAILED ParserErrors = 1046
+ RNGP_INTERLEAVE_EMPTY ParserErrors = 1047
+ RNGP_INTERLEAVE_NO_CONTENT ParserErrors = 1048
+ RNGP_INVALID_DEFINE_NAME ParserErrors = 1049
+ RNGP_INVALID_URI ParserErrors = 1050
+ RNGP_INVALID_VALUE ParserErrors = 1051
+ RNGP_MISSING_HREF ParserErrors = 1052
+ RNGP_NAME_MISSING ParserErrors = 1053
+ RNGP_NEED_COMBINE ParserErrors = 1054
+ RNGP_NOTALLOWED_NOT_EMPTY ParserErrors = 1055
+ RNGP_NSNAME_ATTR_ANCESTOR ParserErrors = 1056
+ RNGP_NSNAME_NO_NS ParserErrors = 1057
+ RNGP_PARAM_FORBIDDEN ParserErrors = 1058
+ RNGP_PARAM_NAME_MISSING ParserErrors = 1059
+ RNGP_PARENTREF_CREATE_FAILED ParserErrors = 1060
+ RNGP_PARENTREF_NAME_INVALID ParserErrors = 1061
+ RNGP_PARENTREF_NO_NAME ParserErrors = 1062
+ RNGP_PARENTREF_NO_PARENT ParserErrors = 1063
+ RNGP_PARENTREF_NOT_EMPTY ParserErrors = 1064
+ RNGP_PARSE_ERROR ParserErrors = 1065
+ RNGP_PAT_ANYNAME_EXCEPT_ANYNAME ParserErrors = 1066
+ RNGP_PAT_ATTR_ATTR ParserErrors = 1067
+ RNGP_PAT_ATTR_ELEM ParserErrors = 1068
+ RNGP_PAT_DATA_EXCEPT_ATTR ParserErrors = 1069
+ RNGP_PAT_DATA_EXCEPT_ELEM ParserErrors = 1070
+ RNGP_PAT_DATA_EXCEPT_EMPTY ParserErrors = 1071
+ RNGP_PAT_DATA_EXCEPT_GROUP ParserErrors = 1072
+ RNGP_PAT_DATA_EXCEPT_INTERLEAVE ParserErrors = 1073
+ RNGP_PAT_DATA_EXCEPT_LIST ParserErrors = 1074
+ RNGP_PAT_DATA_EXCEPT_ONEMORE ParserErrors = 1075
+ RNGP_PAT_DATA_EXCEPT_REF ParserErrors = 1076
+ RNGP_PAT_DATA_EXCEPT_TEXT ParserErrors = 1077
+ RNGP_PAT_LIST_ATTR ParserErrors = 1078
+ RNGP_PAT_LIST_ELEM ParserErrors = 1079
+ RNGP_PAT_LIST_INTERLEAVE ParserErrors = 1080
+ RNGP_PAT_LIST_LIST ParserErrors = 1081
+ RNGP_PAT_LIST_REF ParserErrors = 1082
+ RNGP_PAT_LIST_TEXT ParserErrors = 1083
+ RNGP_PAT_NSNAME_EXCEPT_ANYNAME ParserErrors = 1084
+ RNGP_PAT_NSNAME_EXCEPT_NSNAME ParserErrors = 1085
+ RNGP_PAT_ONEMORE_GROUP_ATTR ParserErrors = 1086
+ RNGP_PAT_ONEMORE_INTERLEAVE_ATTR ParserErrors = 1087
+ RNGP_PAT_START_ATTR ParserErrors = 1088
+ RNGP_PAT_START_DATA ParserErrors = 1089
+ RNGP_PAT_START_EMPTY ParserErrors = 1090
+ RNGP_PAT_START_GROUP ParserErrors = 1091
+ RNGP_PAT_START_INTERLEAVE ParserErrors = 1092
+ RNGP_PAT_START_LIST ParserErrors = 1093
+ RNGP_PAT_START_ONEMORE ParserErrors = 1094
+ RNGP_PAT_START_TEXT ParserErrors = 1095
+ RNGP_PAT_START_VALUE ParserErrors = 1096
+ RNGP_PREFIX_UNDEFINED ParserErrors = 1097
+ RNGP_REF_CREATE_FAILED ParserErrors = 1098
+ RNGP_REF_CYCLE ParserErrors = 1099
+ RNGP_REF_NAME_INVALID ParserErrors = 1100
+ RNGP_REF_NO_DEF ParserErrors = 1101
+ RNGP_REF_NO_NAME ParserErrors = 1102
+ RNGP_REF_NOT_EMPTY ParserErrors = 1103
+ RNGP_START_CHOICE_AND_INTERLEAVE ParserErrors = 1104
+ RNGP_START_CONTENT ParserErrors = 1105
+ RNGP_START_EMPTY ParserErrors = 1106
+ RNGP_START_MISSING ParserErrors = 1107
+ RNGP_TEXT_EXPECTED ParserErrors = 1108
+ RNGP_TEXT_HAS_CHILD ParserErrors = 1109
+ RNGP_TYPE_MISSING ParserErrors = 1110
+ RNGP_TYPE_NOT_FOUND ParserErrors = 1111
+ RNGP_TYPE_VALUE ParserErrors = 1112
+ RNGP_UNKNOWN_ATTRIBUTE ParserErrors = 1113
+ RNGP_UNKNOWN_COMBINE ParserErrors = 1114
+ RNGP_UNKNOWN_CONSTRUCT ParserErrors = 1115
+ RNGP_UNKNOWN_TYPE_LIB ParserErrors = 1116
+ RNGP_URI_FRAGMENT ParserErrors = 1117
+ RNGP_URI_NOT_ABSOLUTE ParserErrors = 1118
+ RNGP_VALUE_EMPTY ParserErrors = 1119
+ RNGP_VALUE_NO_CONTENT ParserErrors = 1120
+ RNGP_XMLNS_NAME ParserErrors = 1121
+ RNGP_XML_NS ParserErrors = 1122
+ XPATH_EXPRESSION_OK ParserErrors = 1200
+ XPATH_NUMBER_ERROR ParserErrors = 1201
+ XPATH_UNFINISHED_LITERAL_ERROR ParserErrors = 1202
+ XPATH_START_LITERAL_ERROR ParserErrors = 1203
+ XPATH_VARIABLE_REF_ERROR ParserErrors = 1204
+ XPATH_UNDEF_VARIABLE_ERROR ParserErrors = 1205
+ XPATH_INVALID_PREDICATE_ERROR ParserErrors = 1206
+ XPATH_EXPR_ERROR ParserErrors = 1207
+ XPATH_UNCLOSED_ERROR ParserErrors = 1208
+ XPATH_UNKNOWN_FUNC_ERROR ParserErrors = 1209
+ XPATH_INVALID_OPERAND ParserErrors = 1210
+ XPATH_INVALID_TYPE ParserErrors = 1211
+ XPATH_INVALID_ARITY ParserErrors = 1212
+ XPATH_INVALID_CTXT_SIZE ParserErrors = 1213
+ XPATH_INVALID_CTXT_POSITION ParserErrors = 1214
+ XPATH_MEMORY_ERROR ParserErrors = 1215
+ XPTR_SYNTAX_ERROR ParserErrors = 1216
+ XPTR_RESOURCE_ERROR ParserErrors = 1217
+ XPTR_SUB_RESOURCE_ERROR ParserErrors = 1218
+ XPATH_UNDEF_PREFIX_ERROR ParserErrors = 1219
+ XPATH_ENCODING_ERROR ParserErrors = 1220
+ XPATH_INVALID_CHAR_ERROR ParserErrors = 1221
+ TREE_INVALID_HEX ParserErrors = 1300
+ TREE_INVALID_DEC ParserErrors = 1301
+ TREE_UNTERMINATED_ENTITY ParserErrors = 1302
+ TREE_NOT_UTF8 ParserErrors = 1303
+ SAVE_NOT_UTF8 ParserErrors = 1400
+ SAVE_CHAR_INVALID ParserErrors = 1401
+ SAVE_NO_DOCTYPE ParserErrors = 1402
+ SAVE_UNKNOWN_ENCODING ParserErrors = 1403
+ REGEXP_COMPILE_ERROR ParserErrors = 1450
+ IO_UNKNOWN ParserErrors = 1500
+ IO_EACCES ParserErrors = 1501
+ IO_EAGAIN ParserErrors = 1502
+ IO_EBADF ParserErrors = 1503
+ IO_EBADMSG ParserErrors = 1504
+ IO_EBUSY ParserErrors = 1505
+ IO_ECANCELED ParserErrors = 1506
+ IO_ECHILD ParserErrors = 1507
+ IO_EDEADLK ParserErrors = 1508
+ IO_EDOM ParserErrors = 1509
+ IO_EEXIST ParserErrors = 1510
+ IO_EFAULT ParserErrors = 1511
+ IO_EFBIG ParserErrors = 1512
+ IO_EINPROGRESS ParserErrors = 1513
+ IO_EINTR ParserErrors = 1514
+ IO_EINVAL ParserErrors = 1515
+ IO_EIO ParserErrors = 1516
+ IO_EISDIR ParserErrors = 1517
+ IO_EMFILE ParserErrors = 1518
+ IO_EMLINK ParserErrors = 1519
+ IO_EMSGSIZE ParserErrors = 1520
+ IO_ENAMETOOLONG ParserErrors = 1521
+ IO_ENFILE ParserErrors = 1522
+ IO_ENODEV ParserErrors = 1523
+ IO_ENOENT ParserErrors = 1524
+ IO_ENOEXEC ParserErrors = 1525
+ IO_ENOLCK ParserErrors = 1526
+ IO_ENOMEM ParserErrors = 1527
+ IO_ENOSPC ParserErrors = 1528
+ IO_ENOSYS ParserErrors = 1529
+ IO_ENOTDIR ParserErrors = 1530
+ IO_ENOTEMPTY ParserErrors = 1531
+ IO_ENOTSUP ParserErrors = 1532
+ IO_ENOTTY ParserErrors = 1533
+ IO_ENXIO ParserErrors = 1534
+ IO_EPERM ParserErrors = 1535
+ IO_EPIPE ParserErrors = 1536
+ IO_ERANGE ParserErrors = 1537
+ IO_EROFS ParserErrors = 1538
+ IO_ESPIPE ParserErrors = 1539
+ IO_ESRCH ParserErrors = 1540
+ IO_ETIMEDOUT ParserErrors = 1541
+ IO_EXDEV ParserErrors = 1542
+ IO_NETWORK_ATTEMPT ParserErrors = 1543
+ IO_ENCODER ParserErrors = 1544
+ IO_FLUSH ParserErrors = 1545
+ IO_WRITE ParserErrors = 1546
+ IO_NO_INPUT ParserErrors = 1547
+ IO_BUFFER_FULL ParserErrors = 1548
+ IO_LOAD_ERROR ParserErrors = 1549
+ IO_ENOTSOCK ParserErrors = 1550
+ IO_EISCONN ParserErrors = 1551
+ IO_ECONNREFUSED ParserErrors = 1552
+ IO_ENETUNREACH ParserErrors = 1553
+ IO_EADDRINUSE ParserErrors = 1554
+ IO_EALREADY ParserErrors = 1555
+ IO_EAFNOSUPPORT ParserErrors = 1556
+ IO_UNSUPPORTED_PROTOCOL ParserErrors = 1557
+ XINCLUDE_RECURSION ParserErrors = 1600
+ XINCLUDE_PARSE_VALUE ParserErrors = 1601
+ XINCLUDE_ENTITY_DEF_MISMATCH ParserErrors = 1602
+ XINCLUDE_NO_HREF ParserErrors = 1603
+ XINCLUDE_NO_FALLBACK ParserErrors = 1604
+ XINCLUDE_HREF_URI ParserErrors = 1605
+ XINCLUDE_TEXT_FRAGMENT ParserErrors = 1606
+ XINCLUDE_TEXT_DOCUMENT ParserErrors = 1607
+ XINCLUDE_INVALID_CHAR ParserErrors = 1608
+ XINCLUDE_BUILD_FAILED ParserErrors = 1609
+ XINCLUDE_UNKNOWN_ENCODING ParserErrors = 1610
+ XINCLUDE_MULTIPLE_ROOT ParserErrors = 1611
+ XINCLUDE_XPTR_FAILED ParserErrors = 1612
+ XINCLUDE_XPTR_RESULT ParserErrors = 1613
+ XINCLUDE_INCLUDE_IN_INCLUDE ParserErrors = 1614
+ XINCLUDE_FALLBACKS_IN_INCLUDE ParserErrors = 1615
+ XINCLUDE_FALLBACK_NOT_IN_INCLUDE ParserErrors = 1616
+ XINCLUDE_DEPRECATED_NS ParserErrors = 1617
+ XINCLUDE_FRAGMENT_ID ParserErrors = 1618
+ CATALOG_MISSING_ATTR ParserErrors = 1650
+ CATALOG_ENTRY_BROKEN ParserErrors = 1651
+ CATALOG_PREFER_VALUE ParserErrors = 1652
+ CATALOG_NOT_CATALOG ParserErrors = 1653
+ CATALOG_RECURSION ParserErrors = 1654
+ SCHEMAP_PREFIX_UNDEFINED ParserErrors = 1700
+ SCHEMAP_ATTRFORMDEFAULT_VALUE ParserErrors = 1701
+ SCHEMAP_ATTRGRP_NONAME_NOREF ParserErrors = 1702
+ SCHEMAP_ATTR_NONAME_NOREF ParserErrors = 1703
+ SCHEMAP_COMPLEXTYPE_NONAME_NOREF ParserErrors = 1704
+ SCHEMAP_ELEMFORMDEFAULT_VALUE ParserErrors = 1705
+ SCHEMAP_ELEM_NONAME_NOREF ParserErrors = 1706
+ SCHEMAP_EXTENSION_NO_BASE ParserErrors = 1707
+ SCHEMAP_FACET_NO_VALUE ParserErrors = 1708
+ SCHEMAP_FAILED_BUILD_IMPORT ParserErrors = 1709
+ SCHEMAP_GROUP_NONAME_NOREF ParserErrors = 1710
+ SCHEMAP_IMPORT_NAMESPACE_NOT_URI ParserErrors = 1711
+ SCHEMAP_IMPORT_REDEFINE_NSNAME ParserErrors = 1712
+ SCHEMAP_IMPORT_SCHEMA_NOT_URI ParserErrors = 1713
+ SCHEMAP_INVALID_BOOLEAN ParserErrors = 1714
+ SCHEMAP_INVALID_ENUM ParserErrors = 1715
+ SCHEMAP_INVALID_FACET ParserErrors = 1716
+ SCHEMAP_INVALID_FACET_VALUE ParserErrors = 1717
+ SCHEMAP_INVALID_MAXOCCURS ParserErrors = 1718
+ SCHEMAP_INVALID_MINOCCURS ParserErrors = 1719
+ SCHEMAP_INVALID_REF_AND_SUBTYPE ParserErrors = 1720
+ SCHEMAP_INVALID_WHITE_SPACE ParserErrors = 1721
+ SCHEMAP_NOATTR_NOREF ParserErrors = 1722
+ SCHEMAP_NOTATION_NO_NAME ParserErrors = 1723
+ SCHEMAP_NOTYPE_NOREF ParserErrors = 1724
+ SCHEMAP_REF_AND_SUBTYPE ParserErrors = 1725
+ SCHEMAP_RESTRICTION_NONAME_NOREF ParserErrors = 1726
+ SCHEMAP_SIMPLETYPE_NONAME ParserErrors = 1727
+ SCHEMAP_TYPE_AND_SUBTYPE ParserErrors = 1728
+ SCHEMAP_UNKNOWN_ALL_CHILD ParserErrors = 1729
+ SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD ParserErrors = 1730
+ SCHEMAP_UNKNOWN_ATTR_CHILD ParserErrors = 1731
+ SCHEMAP_UNKNOWN_ATTRGRP_CHILD ParserErrors = 1732
+ SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP ParserErrors = 1733
+ SCHEMAP_UNKNOWN_BASE_TYPE ParserErrors = 1734
+ SCHEMAP_UNKNOWN_CHOICE_CHILD ParserErrors = 1735
+ SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD ParserErrors = 1736
+ SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD ParserErrors = 1737
+ SCHEMAP_UNKNOWN_ELEM_CHILD ParserErrors = 1738
+ SCHEMAP_UNKNOWN_EXTENSION_CHILD ParserErrors = 1739
+ SCHEMAP_UNKNOWN_FACET_CHILD ParserErrors = 1740
+ SCHEMAP_UNKNOWN_FACET_TYPE ParserErrors = 1741
+ SCHEMAP_UNKNOWN_GROUP_CHILD ParserErrors = 1742
+ SCHEMAP_UNKNOWN_IMPORT_CHILD ParserErrors = 1743
+ SCHEMAP_UNKNOWN_LIST_CHILD ParserErrors = 1744
+ SCHEMAP_UNKNOWN_NOTATION_CHILD ParserErrors = 1745
+ SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD ParserErrors = 1746
+ SCHEMAP_UNKNOWN_REF ParserErrors = 1747
+ SCHEMAP_UNKNOWN_RESTRICTION_CHILD ParserErrors = 1748
+ SCHEMAP_UNKNOWN_SCHEMAS_CHILD ParserErrors = 1749
+ SCHEMAP_UNKNOWN_SEQUENCE_CHILD ParserErrors = 1750
+ SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD ParserErrors = 1751
+ SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD ParserErrors = 1752
+ SCHEMAP_UNKNOWN_TYPE ParserErrors = 1753
+ SCHEMAP_UNKNOWN_UNION_CHILD ParserErrors = 1754
+ SCHEMAP_ELEM_DEFAULT_FIXED ParserErrors = 1755
+ SCHEMAP_REGEXP_INVALID ParserErrors = 1756
+ SCHEMAP_FAILED_LOAD ParserErrors = 1757
+ SCHEMAP_NOTHING_TO_PARSE ParserErrors = 1758
+ SCHEMAP_NOROOT ParserErrors = 1759
+ SCHEMAP_REDEFINED_GROUP ParserErrors = 1760
+ SCHEMAP_REDEFINED_TYPE ParserErrors = 1761
+ SCHEMAP_REDEFINED_ELEMENT ParserErrors = 1762
+ SCHEMAP_REDEFINED_ATTRGROUP ParserErrors = 1763
+ SCHEMAP_REDEFINED_ATTR ParserErrors = 1764
+ SCHEMAP_REDEFINED_NOTATION ParserErrors = 1765
+ SCHEMAP_FAILED_PARSE ParserErrors = 1766
+ SCHEMAP_UNKNOWN_PREFIX ParserErrors = 1767
+ SCHEMAP_DEF_AND_PREFIX ParserErrors = 1768
+ SCHEMAP_UNKNOWN_INCLUDE_CHILD ParserErrors = 1769
+ SCHEMAP_INCLUDE_SCHEMA_NOT_URI ParserErrors = 1770
+ SCHEMAP_INCLUDE_SCHEMA_NO_URI ParserErrors = 1771
+ SCHEMAP_NOT_SCHEMA ParserErrors = 1772
+ SCHEMAP_UNKNOWN_MEMBER_TYPE ParserErrors = 1773
+ SCHEMAP_INVALID_ATTR_USE ParserErrors = 1774
+ SCHEMAP_RECURSIVE ParserErrors = 1775
+ SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE ParserErrors = 1776
+ SCHEMAP_INVALID_ATTR_COMBINATION ParserErrors = 1777
+ SCHEMAP_INVALID_ATTR_INLINE_COMBINATION ParserErrors = 1778
+ SCHEMAP_MISSING_SIMPLETYPE_CHILD ParserErrors = 1779
+ SCHEMAP_INVALID_ATTR_NAME ParserErrors = 1780
+ SCHEMAP_REF_AND_CONTENT ParserErrors = 1781
+ SCHEMAP_CT_PROPS_CORRECT_1 ParserErrors = 1782
+ SCHEMAP_CT_PROPS_CORRECT_2 ParserErrors = 1783
+ SCHEMAP_CT_PROPS_CORRECT_3 ParserErrors = 1784
+ SCHEMAP_CT_PROPS_CORRECT_4 ParserErrors = 1785
+ SCHEMAP_CT_PROPS_CORRECT_5 ParserErrors = 1786
+ SCHEMAP_DERIVATION_OK_RESTRICTION_1 ParserErrors = 1787
+ SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1 ParserErrors = 1788
+ SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2 ParserErrors = 1789
+ SCHEMAP_DERIVATION_OK_RESTRICTION_2_2 ParserErrors = 1790
+ SCHEMAP_DERIVATION_OK_RESTRICTION_3 ParserErrors = 1791
+ SCHEMAP_WILDCARD_INVALID_NS_MEMBER ParserErrors = 1792
+ SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE ParserErrors = 1793
+ SCHEMAP_UNION_NOT_EXPRESSIBLE ParserErrors = 1794
+ SCHEMAP_SRC_IMPORT_3_1 ParserErrors = 1795
+ SCHEMAP_SRC_IMPORT_3_2 ParserErrors = 1796
+ SCHEMAP_DERIVATION_OK_RESTRICTION_4_1 ParserErrors = 1797
+ SCHEMAP_DERIVATION_OK_RESTRICTION_4_2 ParserErrors = 1798
+ SCHEMAP_DERIVATION_OK_RESTRICTION_4_3 ParserErrors = 1799
+ SCHEMAP_COS_CT_EXTENDS_1_3 ParserErrors = 1800
+ SCHEMAV_NOROOT ParserErrors = 1801
+ SCHEMAV_UNDECLAREDELEM ParserErrors = 1802
+ SCHEMAV_NOTTOPLEVEL ParserErrors = 1803
+ SCHEMAV_MISSING ParserErrors = 1804
+ SCHEMAV_WRONGELEM ParserErrors = 1805
+ SCHEMAV_NOTYPE ParserErrors = 1806
+ SCHEMAV_NOROLLBACK ParserErrors = 1807
+ SCHEMAV_ISABSTRACT ParserErrors = 1808
+ SCHEMAV_NOTEMPTY ParserErrors = 1809
+ SCHEMAV_ELEMCONT ParserErrors = 1810
+ SCHEMAV_HAVEDEFAULT ParserErrors = 1811
+ SCHEMAV_NOTNILLABLE ParserErrors = 1812
+ SCHEMAV_EXTRACONTENT ParserErrors = 1813
+ SCHEMAV_INVALIDATTR ParserErrors = 1814
+ SCHEMAV_INVALIDELEM ParserErrors = 1815
+ SCHEMAV_NOTDETERMINIST ParserErrors = 1816
+ SCHEMAV_CONSTRUCT ParserErrors = 1817
+ SCHEMAV_INTERNAL ParserErrors = 1818
+ SCHEMAV_NOTSIMPLE ParserErrors = 1819
+ SCHEMAV_ATTRUNKNOWN ParserErrors = 1820
+ SCHEMAV_ATTRINVALID ParserErrors = 1821
+ SCHEMAV_VALUE ParserErrors = 1822
+ SCHEMAV_FACET ParserErrors = 1823
+ SCHEMAV_CVC_DATATYPE_VALID_1_2_1 ParserErrors = 1824
+ SCHEMAV_CVC_DATATYPE_VALID_1_2_2 ParserErrors = 1825
+ SCHEMAV_CVC_DATATYPE_VALID_1_2_3 ParserErrors = 1826
+ SCHEMAV_CVC_TYPE_3_1_1 ParserErrors = 1827
+ SCHEMAV_CVC_TYPE_3_1_2 ParserErrors = 1828
+ SCHEMAV_CVC_FACET_VALID ParserErrors = 1829
+ SCHEMAV_CVC_LENGTH_VALID ParserErrors = 1830
+ SCHEMAV_CVC_MINLENGTH_VALID ParserErrors = 1831
+ SCHEMAV_CVC_MAXLENGTH_VALID ParserErrors = 1832
+ SCHEMAV_CVC_MININCLUSIVE_VALID ParserErrors = 1833
+ SCHEMAV_CVC_MAXINCLUSIVE_VALID ParserErrors = 1834
+ SCHEMAV_CVC_MINEXCLUSIVE_VALID ParserErrors = 1835
+ SCHEMAV_CVC_MAXEXCLUSIVE_VALID ParserErrors = 1836
+ SCHEMAV_CVC_TOTALDIGITS_VALID ParserErrors = 1837
+ SCHEMAV_CVC_FRACTIONDIGITS_VALID ParserErrors = 1838
+ SCHEMAV_CVC_PATTERN_VALID ParserErrors = 1839
+ SCHEMAV_CVC_ENUMERATION_VALID ParserErrors = 1840
+ SCHEMAV_CVC_COMPLEX_TYPE_2_1 ParserErrors = 1841
+ SCHEMAV_CVC_COMPLEX_TYPE_2_2 ParserErrors = 1842
+ SCHEMAV_CVC_COMPLEX_TYPE_2_3 ParserErrors = 1843
+ SCHEMAV_CVC_COMPLEX_TYPE_2_4 ParserErrors = 1844
+ SCHEMAV_CVC_ELT_1 ParserErrors = 1845
+ SCHEMAV_CVC_ELT_2 ParserErrors = 1846
+ SCHEMAV_CVC_ELT_3_1 ParserErrors = 1847
+ SCHEMAV_CVC_ELT_3_2_1 ParserErrors = 1848
+ SCHEMAV_CVC_ELT_3_2_2 ParserErrors = 1849
+ SCHEMAV_CVC_ELT_4_1 ParserErrors = 1850
+ SCHEMAV_CVC_ELT_4_2 ParserErrors = 1851
+ SCHEMAV_CVC_ELT_4_3 ParserErrors = 1852
+ SCHEMAV_CVC_ELT_5_1_1 ParserErrors = 1853
+ SCHEMAV_CVC_ELT_5_1_2 ParserErrors = 1854
+ SCHEMAV_CVC_ELT_5_2_1 ParserErrors = 1855
+ SCHEMAV_CVC_ELT_5_2_2_1 ParserErrors = 1856
+ SCHEMAV_CVC_ELT_5_2_2_2_1 ParserErrors = 1857
+ SCHEMAV_CVC_ELT_5_2_2_2_2 ParserErrors = 1858
+ SCHEMAV_CVC_ELT_6 ParserErrors = 1859
+ SCHEMAV_CVC_ELT_7 ParserErrors = 1860
+ SCHEMAV_CVC_ATTRIBUTE_1 ParserErrors = 1861
+ SCHEMAV_CVC_ATTRIBUTE_2 ParserErrors = 1862
+ SCHEMAV_CVC_ATTRIBUTE_3 ParserErrors = 1863
+ SCHEMAV_CVC_ATTRIBUTE_4 ParserErrors = 1864
+ SCHEMAV_CVC_COMPLEX_TYPE_3_1 ParserErrors = 1865
+ SCHEMAV_CVC_COMPLEX_TYPE_3_2_1 ParserErrors = 1866
+ SCHEMAV_CVC_COMPLEX_TYPE_3_2_2 ParserErrors = 1867
+ SCHEMAV_CVC_COMPLEX_TYPE_4 ParserErrors = 1868
+ SCHEMAV_CVC_COMPLEX_TYPE_5_1 ParserErrors = 1869
+ SCHEMAV_CVC_COMPLEX_TYPE_5_2 ParserErrors = 1870
+ SCHEMAV_ELEMENT_CONTENT ParserErrors = 1871
+ SCHEMAV_DOCUMENT_ELEMENT_MISSING ParserErrors = 1872
+ SCHEMAV_CVC_COMPLEX_TYPE_1 ParserErrors = 1873
+ SCHEMAV_CVC_AU ParserErrors = 1874
+ SCHEMAV_CVC_TYPE_1 ParserErrors = 1875
+ SCHEMAV_CVC_TYPE_2 ParserErrors = 1876
+ SCHEMAV_CVC_IDC ParserErrors = 1877
+ SCHEMAV_CVC_WILDCARD ParserErrors = 1878
+ SCHEMAV_MISC ParserErrors = 1879
+ XPTR_UNKNOWN_SCHEME ParserErrors = 1900
+ XPTR_CHILDSEQ_START ParserErrors = 1901
+ XPTR_EVAL_FAILED ParserErrors = 1902
+ XPTR_EXTRA_OBJECTS ParserErrors = 1903
+ C14N_CREATE_CTXT ParserErrors = 1950
+ C14N_REQUIRES_UTF8 ParserErrors = 1951
+ C14N_CREATE_STACK ParserErrors = 1952
+ C14N_INVALID_NODE ParserErrors = 1953
+ C14N_UNKNOW_NODE ParserErrors = 1954
+ C14N_RELATIVE_NAMESPACE ParserErrors = 1955
+ FTP_PASV_ANSWER ParserErrors = 2000
+ FTP_EPSV_ANSWER ParserErrors = 2001
+ FTP_ACCNT ParserErrors = 2002
+ FTP_URL_SYNTAX ParserErrors = 2003
+ HTTP_URL_SYNTAX ParserErrors = 2020
+ HTTP_USE_IP ParserErrors = 2021
+ HTTP_UNKNOWN_HOST ParserErrors = 2022
+ SCHEMAP_SRC_SIMPLE_TYPE_1 ParserErrors = 3000
+ SCHEMAP_SRC_SIMPLE_TYPE_2 ParserErrors = 3001
+ SCHEMAP_SRC_SIMPLE_TYPE_3 ParserErrors = 3002
+ SCHEMAP_SRC_SIMPLE_TYPE_4 ParserErrors = 3003
+ SCHEMAP_SRC_RESOLVE ParserErrors = 3004
+ SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE ParserErrors = 3005
+ SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE ParserErrors = 3006
+ SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES ParserErrors = 3007
+ SCHEMAP_ST_PROPS_CORRECT_1 ParserErrors = 3008
+ SCHEMAP_ST_PROPS_CORRECT_2 ParserErrors = 3009
+ SCHEMAP_ST_PROPS_CORRECT_3 ParserErrors = 3010
+ SCHEMAP_COS_ST_RESTRICTS_1_1 ParserErrors = 3011
+ SCHEMAP_COS_ST_RESTRICTS_1_2 ParserErrors = 3012
+ SCHEMAP_COS_ST_RESTRICTS_1_3_1 ParserErrors = 3013
+ SCHEMAP_COS_ST_RESTRICTS_1_3_2 ParserErrors = 3014
+ SCHEMAP_COS_ST_RESTRICTS_2_1 ParserErrors = 3015
+ SCHEMAP_COS_ST_RESTRICTS_2_3_1_1 ParserErrors = 3016
+ SCHEMAP_COS_ST_RESTRICTS_2_3_1_2 ParserErrors = 3017
+ SCHEMAP_COS_ST_RESTRICTS_2_3_2_1 ParserErrors = 3018
+ SCHEMAP_COS_ST_RESTRICTS_2_3_2_2 ParserErrors = 3019
+ SCHEMAP_COS_ST_RESTRICTS_2_3_2_3 ParserErrors = 3020
+ SCHEMAP_COS_ST_RESTRICTS_2_3_2_4 ParserErrors = 3021
+ SCHEMAP_COS_ST_RESTRICTS_2_3_2_5 ParserErrors = 3022
+ SCHEMAP_COS_ST_RESTRICTS_3_1 ParserErrors = 3023
+ SCHEMAP_COS_ST_RESTRICTS_3_3_1 ParserErrors = 3024
+ SCHEMAP_COS_ST_RESTRICTS_3_3_1_2 ParserErrors = 3025
+ SCHEMAP_COS_ST_RESTRICTS_3_3_2_2 ParserErrors = 3026
+ SCHEMAP_COS_ST_RESTRICTS_3_3_2_1 ParserErrors = 3027
+ SCHEMAP_COS_ST_RESTRICTS_3_3_2_3 ParserErrors = 3028
+ SCHEMAP_COS_ST_RESTRICTS_3_3_2_4 ParserErrors = 3029
+ SCHEMAP_COS_ST_RESTRICTS_3_3_2_5 ParserErrors = 3030
+ SCHEMAP_COS_ST_DERIVED_OK_2_1 ParserErrors = 3031
+ SCHEMAP_COS_ST_DERIVED_OK_2_2 ParserErrors = 3032
+ SCHEMAP_S4S_ELEM_NOT_ALLOWED ParserErrors = 3033
+ SCHEMAP_S4S_ELEM_MISSING ParserErrors = 3034
+ SCHEMAP_S4S_ATTR_NOT_ALLOWED ParserErrors = 3035
+ SCHEMAP_S4S_ATTR_MISSING ParserErrors = 3036
+ SCHEMAP_S4S_ATTR_INVALID_VALUE ParserErrors = 3037
+ SCHEMAP_SRC_ELEMENT_1 ParserErrors = 3038
+ SCHEMAP_SRC_ELEMENT_2_1 ParserErrors = 3039
+ SCHEMAP_SRC_ELEMENT_2_2 ParserErrors = 3040
+ SCHEMAP_SRC_ELEMENT_3 ParserErrors = 3041
+ SCHEMAP_P_PROPS_CORRECT_1 ParserErrors = 3042
+ SCHEMAP_P_PROPS_CORRECT_2_1 ParserErrors = 3043
+ SCHEMAP_P_PROPS_CORRECT_2_2 ParserErrors = 3044
+ SCHEMAP_E_PROPS_CORRECT_2 ParserErrors = 3045
+ SCHEMAP_E_PROPS_CORRECT_3 ParserErrors = 3046
+ SCHEMAP_E_PROPS_CORRECT_4 ParserErrors = 3047
+ SCHEMAP_E_PROPS_CORRECT_5 ParserErrors = 3048
+ SCHEMAP_E_PROPS_CORRECT_6 ParserErrors = 3049
+ SCHEMAP_SRC_INCLUDE ParserErrors = 3050
+ SCHEMAP_SRC_ATTRIBUTE_1 ParserErrors = 3051
+ SCHEMAP_SRC_ATTRIBUTE_2 ParserErrors = 3052
+ SCHEMAP_SRC_ATTRIBUTE_3_1 ParserErrors = 3053
+ SCHEMAP_SRC_ATTRIBUTE_3_2 ParserErrors = 3054
+ SCHEMAP_SRC_ATTRIBUTE_4 ParserErrors = 3055
+ SCHEMAP_NO_XMLNS ParserErrors = 3056
+ SCHEMAP_NO_XSI ParserErrors = 3057
+ SCHEMAP_COS_VALID_DEFAULT_1 ParserErrors = 3058
+ SCHEMAP_COS_VALID_DEFAULT_2_1 ParserErrors = 3059
+ SCHEMAP_COS_VALID_DEFAULT_2_2_1 ParserErrors = 3060
+ SCHEMAP_COS_VALID_DEFAULT_2_2_2 ParserErrors = 3061
+ SCHEMAP_CVC_SIMPLE_TYPE ParserErrors = 3062
+ SCHEMAP_COS_CT_EXTENDS_1_1 ParserErrors = 3063
+ SCHEMAP_SRC_IMPORT_1_1 ParserErrors = 3064
+ SCHEMAP_SRC_IMPORT_1_2 ParserErrors = 3065
+ SCHEMAP_SRC_IMPORT_2 ParserErrors = 3066
+ SCHEMAP_SRC_IMPORT_2_1 ParserErrors = 3067
+ SCHEMAP_SRC_IMPORT_2_2 ParserErrors = 3068
+ SCHEMAP_INTERNAL ParserErrors = 3069
+ SCHEMAP_NOT_DETERMINISTIC ParserErrors = 3070
+ SCHEMAP_SRC_ATTRIBUTE_GROUP_1 ParserErrors = 3071
+ SCHEMAP_SRC_ATTRIBUTE_GROUP_2 ParserErrors = 3072
+ SCHEMAP_SRC_ATTRIBUTE_GROUP_3 ParserErrors = 3073
+ SCHEMAP_MG_PROPS_CORRECT_1 ParserErrors = 3074
+ SCHEMAP_MG_PROPS_CORRECT_2 ParserErrors = 3075
+ SCHEMAP_SRC_CT_1 ParserErrors = 3076
+ SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3 ParserErrors = 3077
+ SCHEMAP_AU_PROPS_CORRECT_2 ParserErrors = 3078
+ SCHEMAP_A_PROPS_CORRECT_2 ParserErrors = 3079
+ SCHEMAP_C_PROPS_CORRECT ParserErrors = 3080
+ SCHEMAP_SRC_REDEFINE ParserErrors = 3081
+ SCHEMAP_SRC_IMPORT ParserErrors = 3082
+ SCHEMAP_WARN_SKIP_SCHEMA ParserErrors = 3083
+ SCHEMAP_WARN_UNLOCATED_SCHEMA ParserErrors = 3084
+ SCHEMAP_WARN_ATTR_REDECL_PROH ParserErrors = 3085
+ SCHEMAP_WARN_ATTR_POINTLESS_PROH ParserErrors = 3086
+ SCHEMAP_AG_PROPS_CORRECT ParserErrors = 3087
+ SCHEMAP_COS_CT_EXTENDS_1_2 ParserErrors = 3088
+ SCHEMAP_AU_PROPS_CORRECT ParserErrors = 3089
+ SCHEMAP_A_PROPS_CORRECT_3 ParserErrors = 3090
+ SCHEMAP_COS_ALL_LIMITED ParserErrors = 3091
+ SCHEMATRONV_ASSERT ParserErrors = 4000
+ SCHEMATRONV_REPORT ParserErrors = 4001
+ MODULE_OPEN ParserErrors = 4900
+ MODULE_CLOSE ParserErrors = 4901
+ CHECK_FOUND_ELEMENT ParserErrors = 5000
+ CHECK_FOUND_ATTRIBUTE ParserErrors = 5001
+ CHECK_FOUND_TEXT ParserErrors = 5002
+ CHECK_FOUND_CDATA ParserErrors = 5003
+ CHECK_FOUND_ENTITYREF ParserErrors = 5004
+ CHECK_FOUND_ENTITY ParserErrors = 5005
+ CHECK_FOUND_PI ParserErrors = 5006
+ CHECK_FOUND_COMMENT ParserErrors = 5007
+ CHECK_FOUND_DOCTYPE ParserErrors = 5008
+ CHECK_FOUND_FRAGMENT ParserErrors = 5009
+ CHECK_FOUND_NOTATION ParserErrors = 5010
+ CHECK_UNKNOWN_NODE ParserErrors = 5011
+ CHECK_ENTITY_TYPE ParserErrors = 5012
+ CHECK_NO_PARENT ParserErrors = 5013
+ CHECK_NO_DOC ParserErrors = 5014
+ CHECK_NO_NAME ParserErrors = 5015
+ CHECK_NO_ELEM ParserErrors = 5016
+ CHECK_WRONG_DOC ParserErrors = 5017
+ CHECK_NO_PREV ParserErrors = 5018
+ CHECK_WRONG_PREV ParserErrors = 5019
+ CHECK_NO_NEXT ParserErrors = 5020
+ CHECK_WRONG_NEXT ParserErrors = 5021
+ CHECK_NOT_DTD ParserErrors = 5022
+ CHECK_NOT_ATTR ParserErrors = 5023
+ CHECK_NOT_ATTR_DECL ParserErrors = 5024
+ CHECK_NOT_ELEM_DECL ParserErrors = 5025
+ CHECK_NOT_ENTITY_DECL ParserErrors = 5026
+ CHECK_NOT_NS_DECL ParserErrors = 5027
+ CHECK_NO_HREF ParserErrors = 5028
+ CHECK_WRONG_PARENT ParserErrors = 5029
+ CHECK_NS_SCOPE ParserErrors = 5030
+ CHECK_NS_ANCESTOR ParserErrors = 5031
+ CHECK_NOT_UTF8 ParserErrors = 5032
+ CHECK_NO_DICT ParserErrors = 5033
+ CHECK_NOT_NCNAME ParserErrors = 5034
+ CHECK_OUTSIDE_DICT ParserErrors = 5035
+ CHECK_WRONG_NAME ParserErrors = 5036
+ CHECK_NAME_NOT_NULL ParserErrors = 5037
+ I18N_NO_NAME ParserErrors = 6000
+ I18N_NO_HANDLER ParserErrors = 6001
+ I18N_EXCESS_HANDLER ParserErrors = 6002
+ I18N_CONV_FAILED ParserErrors = 6003
+ I18N_NO_OUTPUT ParserErrors = 6004
+ BUF_OVERFLOW ParserErrors = 7000
+)
+
+// llgo:type C
+type GenericErrorFunc func(__llgo_arg_0 c.Pointer, __llgo_arg_1 *c.Char, __llgo_va_list ...interface{})
+
+// llgo:type C
+type StructuredErrorFunc func(c.Pointer, *Error)
+
+//go:linkname X__xmlLastError C.__xmlLastError
+func X__xmlLastError() *Error
+
+//go:linkname X__xmlGenericError C.__xmlGenericError
+func X__xmlGenericError() GenericErrorFunc
+
+//go:linkname X__xmlGenericErrorContext C.__xmlGenericErrorContext
+func X__xmlGenericErrorContext() *c.Pointer
+
+//go:linkname X__xmlStructuredError C.__xmlStructuredError
+func X__xmlStructuredError() StructuredErrorFunc
+
+//go:linkname X__xmlStructuredErrorContext C.__xmlStructuredErrorContext
+func X__xmlStructuredErrorContext() *c.Pointer
+
+/*
+ * Use the following function to reset the two global variables
+ * xmlGenericError and xmlGenericErrorContext.
+ */
+//go:linkname SetGenericErrorFunc C.xmlSetGenericErrorFunc
+func SetGenericErrorFunc(ctx c.Pointer, handler GenericErrorFunc)
+
+//go:linkname ThrDefSetGenericErrorFunc C.xmlThrDefSetGenericErrorFunc
+func ThrDefSetGenericErrorFunc(ctx c.Pointer, handler GenericErrorFunc)
+
+//go:linkname InitGenericErrorDefaultFunc C.initGenericErrorDefaultFunc
+func InitGenericErrorDefaultFunc(handler GenericErrorFunc)
+
+//go:linkname SetStructuredErrorFunc C.xmlSetStructuredErrorFunc
+func SetStructuredErrorFunc(ctx c.Pointer, handler StructuredErrorFunc)
+
+//go:linkname ThrDefSetStructuredErrorFunc C.xmlThrDefSetStructuredErrorFunc
+func ThrDefSetStructuredErrorFunc(ctx c.Pointer, handler StructuredErrorFunc)
+
+/*
+ * Default message routines used by SAX and Valid context for error
+ * and warning reporting.
+ */
+//go:linkname ParserError C.xmlParserError
+func ParserError(ctx c.Pointer, msg *c.Char, __llgo_va_list ...interface{})
+
+//go:linkname ParserWarning C.xmlParserWarning
+func ParserWarning(ctx c.Pointer, msg *c.Char, __llgo_va_list ...interface{})
+
+//go:linkname ParserValidityError C.xmlParserValidityError
+func ParserValidityError(ctx c.Pointer, msg *c.Char, __llgo_va_list ...interface{})
+
+//go:linkname ParserValidityWarning C.xmlParserValidityWarning
+func ParserValidityWarning(ctx c.Pointer, msg *c.Char, __llgo_va_list ...interface{})
+
+/** DOC_ENABLE */
+// llgo:link (*X_xmlParserInput).ParserPrintFileInfo C.xmlParserPrintFileInfo
+func (recv_ *X_xmlParserInput) ParserPrintFileInfo() {
+}
+
+// llgo:link (*X_xmlParserInput).ParserPrintFileContext C.xmlParserPrintFileContext
+func (recv_ *X_xmlParserInput) ParserPrintFileContext() {
+}
+
+// llgo:link (*Error).FormatError C.xmlFormatError
+func (recv_ *Error) FormatError(channel GenericErrorFunc, data c.Pointer) {
+}
+
+/*
+ * Extended error information routines
+ */
+//go:linkname GetLastError C.xmlGetLastError
+func GetLastError() *Error
+
+//go:linkname ResetLastError C.xmlResetLastError
+func ResetLastError()
+
+//go:linkname CtxtGetLastError C.xmlCtxtGetLastError
+func CtxtGetLastError(ctx c.Pointer) *Error
+
+//go:linkname CtxtResetLastError C.xmlCtxtResetLastError
+func CtxtResetLastError(ctx c.Pointer)
+
+//go:linkname ResetError C.xmlResetError
+func ResetError(err ErrorPtr)
+
+// llgo:link (*Error).CopyError C.xmlCopyError
+func (recv_ *Error) CopyError(to ErrorPtr) c.Int {
+ return 0
+}
diff --git a/libxml2/xmlexports.go b/libxml2/xmlexports.go
new file mode 100644
index 0000000..31e3a10
--- /dev/null
+++ b/libxml2/xmlexports.go
@@ -0,0 +1,12 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+/*
+ * Originally declared in xmlversion.h which is generated
+ */
+//go:linkname CheckVersion C.xmlCheckVersion
+func CheckVersion(version c.Int)
diff --git a/libxml2/xmlmemory.go b/libxml2/xmlmemory.go
new file mode 100644
index 0000000..9debab3
--- /dev/null
+++ b/libxml2/xmlmemory.go
@@ -0,0 +1,95 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+// llgo:type C
+type FreeFunc func(c.Pointer)
+
+// llgo:type C
+type MallocFunc func(c.SizeT) c.Pointer
+
+// llgo:type C
+type ReallocFunc func(c.Pointer, c.SizeT) c.Pointer
+
+// llgo:type C
+type StrdupFunc func(*c.Char) *c.Char
+
+/*
+ * The way to overload the existing functions.
+ * The xmlGc function have an extra entry for atomic block
+ * allocations useful for garbage collected memory allocators
+ */
+//go:linkname MemSetup C.xmlMemSetup
+func MemSetup(freeFunc FreeFunc, mallocFunc MallocFunc, reallocFunc ReallocFunc, strdupFunc StrdupFunc) c.Int
+
+//go:linkname MemGet C.xmlMemGet
+func MemGet(freeFunc FreeFunc, mallocFunc MallocFunc, reallocFunc ReallocFunc, strdupFunc StrdupFunc) c.Int
+
+//go:linkname GcMemSetup C.xmlGcMemSetup
+func GcMemSetup(freeFunc FreeFunc, mallocFunc MallocFunc, mallocAtomicFunc MallocFunc, reallocFunc ReallocFunc, strdupFunc StrdupFunc) c.Int
+
+//go:linkname GcMemGet C.xmlGcMemGet
+func GcMemGet(freeFunc FreeFunc, mallocFunc MallocFunc, mallocAtomicFunc MallocFunc, reallocFunc ReallocFunc, strdupFunc StrdupFunc) c.Int
+
+/*
+ * Initialization of the memory layer.
+ */
+//go:linkname InitMemory C.xmlInitMemory
+func InitMemory() c.Int
+
+/*
+ * Cleanup of the memory layer.
+ */
+//go:linkname CleanupMemory C.xmlCleanupMemory
+func CleanupMemory()
+
+/*
+ * These are specific to the XML debug memory wrapper.
+ */
+//go:linkname MemSize C.xmlMemSize
+func MemSize(ptr c.Pointer) c.SizeT
+
+//go:linkname MemUsed C.xmlMemUsed
+func MemUsed() c.Int
+
+//go:linkname MemBlocks C.xmlMemBlocks
+func MemBlocks() c.Int
+
+//go:linkname MemDisplay C.xmlMemDisplay
+func MemDisplay(fp *c.FILE)
+
+//go:linkname MemDisplayLast C.xmlMemDisplayLast
+func MemDisplayLast(fp *c.FILE, nbBytes c.Long)
+
+//go:linkname MemShow C.xmlMemShow
+func MemShow(fp *c.FILE, nr c.Int)
+
+//go:linkname MemoryDump C.xmlMemoryDump
+func MemoryDump()
+
+//go:linkname MemMalloc C.xmlMemMalloc
+func MemMalloc(size c.SizeT) c.Pointer
+
+//go:linkname MemRealloc C.xmlMemRealloc
+func MemRealloc(ptr c.Pointer, size c.SizeT) c.Pointer
+
+//go:linkname MemFree C.xmlMemFree
+func MemFree(ptr c.Pointer)
+
+//go:linkname MemoryStrdup C.xmlMemoryStrdup
+func MemoryStrdup(str *c.Char) *c.Char
+
+//go:linkname MallocLoc C.xmlMallocLoc
+func MallocLoc(size c.SizeT, file *c.Char, line c.Int) c.Pointer
+
+//go:linkname ReallocLoc C.xmlReallocLoc
+func ReallocLoc(ptr c.Pointer, size c.SizeT, file *c.Char, line c.Int) c.Pointer
+
+//go:linkname MallocAtomicLoc C.xmlMallocAtomicLoc
+func MallocAtomicLoc(size c.SizeT, file *c.Char, line c.Int) c.Pointer
+
+//go:linkname MemStrdupLoc C.xmlMemStrdupLoc
+func MemStrdupLoc(str *c.Char, file *c.Char, line c.Int) *c.Char
diff --git a/libxml2/xmlmodule.go b/libxml2/xmlmodule.go
new file mode 100644
index 0000000..8d66f5e
--- /dev/null
+++ b/libxml2/xmlmodule.go
@@ -0,0 +1,30 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type X_xmlModule struct {
+ Unused [8]uint8
+}
+type Module X_xmlModule
+type ModulePtr *Module
+type ModuleOption c.Int
+
+const (
+ MODULE_LAZY ModuleOption = 1
+ MODULE_LOCAL ModuleOption = 2
+)
+
+//go:linkname ModuleOpen C.xmlModuleOpen
+func ModuleOpen(filename *c.Char, options c.Int) ModulePtr
+
+//go:linkname ModuleSymbol C.xmlModuleSymbol
+func ModuleSymbol(module ModulePtr, name *c.Char, result *c.Pointer) c.Int
+
+//go:linkname ModuleClose C.xmlModuleClose
+func ModuleClose(module ModulePtr) c.Int
+
+//go:linkname ModuleFree C.xmlModuleFree
+func ModuleFree(module ModulePtr) c.Int
diff --git a/libxml2/xmlreader.go b/libxml2/xmlreader.go
new file mode 100644
index 0000000..0cf89be
--- /dev/null
+++ b/libxml2/xmlreader.go
@@ -0,0 +1,360 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type ParserSeverities c.Int
+
+const (
+ PARSER_SEVERITY_VALIDITY_WARNING ParserSeverities = 1
+ PARSER_SEVERITY_VALIDITY_ERROR ParserSeverities = 2
+ PARSER_SEVERITY_WARNING ParserSeverities = 3
+ PARSER_SEVERITY_ERROR ParserSeverities = 4
+)
+
+type TextReaderMode c.Int
+
+const (
+ TEXTREADER_MODE_INITIAL TextReaderMode = 0
+ TEXTREADER_MODE_INTERACTIVE TextReaderMode = 1
+ TEXTREADER_MODE_ERROR TextReaderMode = 2
+ TEXTREADER_MODE_EOF TextReaderMode = 3
+ TEXTREADER_MODE_CLOSED TextReaderMode = 4
+ TEXTREADER_MODE_READING TextReaderMode = 5
+)
+
+type ParserProperties c.Int
+
+const (
+ PARSER_LOADDTD ParserProperties = 1
+ PARSER_DEFAULTATTRS ParserProperties = 2
+ PARSER_VALIDATE ParserProperties = 3
+ PARSER_SUBST_ENTITIES ParserProperties = 4
+)
+
+type ReaderTypes c.Int
+
+const (
+ READER_TYPE_NONE ReaderTypes = 0
+ READER_TYPE_ELEMENT ReaderTypes = 1
+ READER_TYPE_ATTRIBUTE ReaderTypes = 2
+ READER_TYPE_TEXT ReaderTypes = 3
+ READER_TYPE_CDATA ReaderTypes = 4
+ READER_TYPE_ENTITY_REFERENCE ReaderTypes = 5
+ READER_TYPE_ENTITY ReaderTypes = 6
+ READER_TYPE_PROCESSING_INSTRUCTION ReaderTypes = 7
+ READER_TYPE_COMMENT ReaderTypes = 8
+ READER_TYPE_DOCUMENT ReaderTypes = 9
+ READER_TYPE_DOCUMENT_TYPE ReaderTypes = 10
+ READER_TYPE_DOCUMENT_FRAGMENT ReaderTypes = 11
+ READER_TYPE_NOTATION ReaderTypes = 12
+ READER_TYPE_WHITESPACE ReaderTypes = 13
+ READER_TYPE_SIGNIFICANT_WHITESPACE ReaderTypes = 14
+ READER_TYPE_END_ELEMENT ReaderTypes = 15
+ READER_TYPE_END_ENTITY ReaderTypes = 16
+ READER_TYPE_XML_DECLARATION ReaderTypes = 17
+)
+
+type X_xmlTextReader struct {
+ Unused [8]uint8
+}
+type TextReader X_xmlTextReader
+type TextReaderPtr *TextReader
+
+/*
+ * Constructors & Destructor
+ */
+//go:linkname NewTextReader C.xmlNewTextReader
+func NewTextReader(input ParserInputBufferPtr, URI *c.Char) TextReaderPtr
+
+//go:linkname NewTextReaderFilename C.xmlNewTextReaderFilename
+func NewTextReaderFilename(URI *c.Char) TextReaderPtr
+
+//go:linkname FreeTextReader C.xmlFreeTextReader
+func FreeTextReader(reader TextReaderPtr)
+
+//go:linkname TextReaderSetup C.xmlTextReaderSetup
+func TextReaderSetup(reader TextReaderPtr, input ParserInputBufferPtr, URL *c.Char, encoding *c.Char, options c.Int) c.Int
+
+//go:linkname TextReaderSetMaxAmplification C.xmlTextReaderSetMaxAmplification
+func TextReaderSetMaxAmplification(reader TextReaderPtr, maxAmpl c.Uint)
+
+//go:linkname TextReaderGetLastError C.xmlTextReaderGetLastError
+func TextReaderGetLastError(reader TextReaderPtr) *Error
+
+/*
+ * Iterators
+ */
+//go:linkname TextReaderRead C.xmlTextReaderRead
+func TextReaderRead(reader TextReaderPtr) c.Int
+
+//go:linkname TextReaderReadInnerXml C.xmlTextReaderReadInnerXml
+func TextReaderReadInnerXml(reader TextReaderPtr) *Char
+
+//go:linkname TextReaderReadOuterXml C.xmlTextReaderReadOuterXml
+func TextReaderReadOuterXml(reader TextReaderPtr) *Char
+
+//go:linkname TextReaderReadString C.xmlTextReaderReadString
+func TextReaderReadString(reader TextReaderPtr) *Char
+
+//go:linkname TextReaderReadAttributeValue C.xmlTextReaderReadAttributeValue
+func TextReaderReadAttributeValue(reader TextReaderPtr) c.Int
+
+/*
+ * Attributes of the node
+ */
+//go:linkname TextReaderAttributeCount C.xmlTextReaderAttributeCount
+func TextReaderAttributeCount(reader TextReaderPtr) c.Int
+
+//go:linkname TextReaderDepth C.xmlTextReaderDepth
+func TextReaderDepth(reader TextReaderPtr) c.Int
+
+//go:linkname TextReaderHasAttributes C.xmlTextReaderHasAttributes
+func TextReaderHasAttributes(reader TextReaderPtr) c.Int
+
+//go:linkname TextReaderHasValue C.xmlTextReaderHasValue
+func TextReaderHasValue(reader TextReaderPtr) c.Int
+
+//go:linkname TextReaderIsDefault C.xmlTextReaderIsDefault
+func TextReaderIsDefault(reader TextReaderPtr) c.Int
+
+//go:linkname TextReaderIsEmptyElement C.xmlTextReaderIsEmptyElement
+func TextReaderIsEmptyElement(reader TextReaderPtr) c.Int
+
+//go:linkname TextReaderNodeType C.xmlTextReaderNodeType
+func TextReaderNodeType(reader TextReaderPtr) c.Int
+
+//go:linkname TextReaderQuoteChar C.xmlTextReaderQuoteChar
+func TextReaderQuoteChar(reader TextReaderPtr) c.Int
+
+//go:linkname TextReaderReadState C.xmlTextReaderReadState
+func TextReaderReadState(reader TextReaderPtr) c.Int
+
+//go:linkname TextReaderIsNamespaceDecl C.xmlTextReaderIsNamespaceDecl
+func TextReaderIsNamespaceDecl(reader TextReaderPtr) c.Int
+
+//go:linkname TextReaderConstBaseUri C.xmlTextReaderConstBaseUri
+func TextReaderConstBaseUri(reader TextReaderPtr) *Char
+
+//go:linkname TextReaderConstLocalName C.xmlTextReaderConstLocalName
+func TextReaderConstLocalName(reader TextReaderPtr) *Char
+
+//go:linkname TextReaderConstName C.xmlTextReaderConstName
+func TextReaderConstName(reader TextReaderPtr) *Char
+
+//go:linkname TextReaderConstNamespaceUri C.xmlTextReaderConstNamespaceUri
+func TextReaderConstNamespaceUri(reader TextReaderPtr) *Char
+
+//go:linkname TextReaderConstPrefix C.xmlTextReaderConstPrefix
+func TextReaderConstPrefix(reader TextReaderPtr) *Char
+
+//go:linkname TextReaderConstXmlLang C.xmlTextReaderConstXmlLang
+func TextReaderConstXmlLang(reader TextReaderPtr) *Char
+
+//go:linkname TextReaderConstString C.xmlTextReaderConstString
+func TextReaderConstString(reader TextReaderPtr, str *Char) *Char
+
+//go:linkname TextReaderConstValue C.xmlTextReaderConstValue
+func TextReaderConstValue(reader TextReaderPtr) *Char
+
+/*
+ * use the Const version of the routine for
+ * better performance and simpler code
+ */
+//go:linkname TextReaderBaseUri C.xmlTextReaderBaseUri
+func TextReaderBaseUri(reader TextReaderPtr) *Char
+
+//go:linkname TextReaderLocalName C.xmlTextReaderLocalName
+func TextReaderLocalName(reader TextReaderPtr) *Char
+
+//go:linkname TextReaderName C.xmlTextReaderName
+func TextReaderName(reader TextReaderPtr) *Char
+
+//go:linkname TextReaderNamespaceUri C.xmlTextReaderNamespaceUri
+func TextReaderNamespaceUri(reader TextReaderPtr) *Char
+
+//go:linkname TextReaderPrefix C.xmlTextReaderPrefix
+func TextReaderPrefix(reader TextReaderPtr) *Char
+
+//go:linkname TextReaderXmlLang C.xmlTextReaderXmlLang
+func TextReaderXmlLang(reader TextReaderPtr) *Char
+
+//go:linkname TextReaderValue C.xmlTextReaderValue
+func TextReaderValue(reader TextReaderPtr) *Char
+
+/*
+ * Methods of the XmlTextReader
+ */
+//go:linkname TextReaderClose C.xmlTextReaderClose
+func TextReaderClose(reader TextReaderPtr) c.Int
+
+//go:linkname TextReaderGetAttributeNo C.xmlTextReaderGetAttributeNo
+func TextReaderGetAttributeNo(reader TextReaderPtr, no c.Int) *Char
+
+//go:linkname TextReaderGetAttribute C.xmlTextReaderGetAttribute
+func TextReaderGetAttribute(reader TextReaderPtr, name *Char) *Char
+
+//go:linkname TextReaderGetAttributeNs C.xmlTextReaderGetAttributeNs
+func TextReaderGetAttributeNs(reader TextReaderPtr, localName *Char, namespaceURI *Char) *Char
+
+//go:linkname TextReaderGetRemainder C.xmlTextReaderGetRemainder
+func TextReaderGetRemainder(reader TextReaderPtr) ParserInputBufferPtr
+
+//go:linkname TextReaderLookupNamespace C.xmlTextReaderLookupNamespace
+func TextReaderLookupNamespace(reader TextReaderPtr, prefix *Char) *Char
+
+//go:linkname TextReaderMoveToAttributeNo C.xmlTextReaderMoveToAttributeNo
+func TextReaderMoveToAttributeNo(reader TextReaderPtr, no c.Int) c.Int
+
+//go:linkname TextReaderMoveToAttribute C.xmlTextReaderMoveToAttribute
+func TextReaderMoveToAttribute(reader TextReaderPtr, name *Char) c.Int
+
+//go:linkname TextReaderMoveToAttributeNs C.xmlTextReaderMoveToAttributeNs
+func TextReaderMoveToAttributeNs(reader TextReaderPtr, localName *Char, namespaceURI *Char) c.Int
+
+//go:linkname TextReaderMoveToFirstAttribute C.xmlTextReaderMoveToFirstAttribute
+func TextReaderMoveToFirstAttribute(reader TextReaderPtr) c.Int
+
+//go:linkname TextReaderMoveToNextAttribute C.xmlTextReaderMoveToNextAttribute
+func TextReaderMoveToNextAttribute(reader TextReaderPtr) c.Int
+
+//go:linkname TextReaderMoveToElement C.xmlTextReaderMoveToElement
+func TextReaderMoveToElement(reader TextReaderPtr) c.Int
+
+//go:linkname TextReaderNormalization C.xmlTextReaderNormalization
+func TextReaderNormalization(reader TextReaderPtr) c.Int
+
+//go:linkname TextReaderConstEncoding C.xmlTextReaderConstEncoding
+func TextReaderConstEncoding(reader TextReaderPtr) *Char
+
+/*
+ * Extensions
+ */
+//go:linkname TextReaderSetParserProp C.xmlTextReaderSetParserProp
+func TextReaderSetParserProp(reader TextReaderPtr, prop c.Int, value c.Int) c.Int
+
+//go:linkname TextReaderGetParserProp C.xmlTextReaderGetParserProp
+func TextReaderGetParserProp(reader TextReaderPtr, prop c.Int) c.Int
+
+//go:linkname TextReaderCurrentNode C.xmlTextReaderCurrentNode
+func TextReaderCurrentNode(reader TextReaderPtr) NodePtr
+
+//go:linkname TextReaderGetParserLineNumber C.xmlTextReaderGetParserLineNumber
+func TextReaderGetParserLineNumber(reader TextReaderPtr) c.Int
+
+//go:linkname TextReaderGetParserColumnNumber C.xmlTextReaderGetParserColumnNumber
+func TextReaderGetParserColumnNumber(reader TextReaderPtr) c.Int
+
+//go:linkname TextReaderPreserve C.xmlTextReaderPreserve
+func TextReaderPreserve(reader TextReaderPtr) NodePtr
+
+//go:linkname TextReaderPreservePattern C.xmlTextReaderPreservePattern
+func TextReaderPreservePattern(reader TextReaderPtr, pattern *Char, namespaces **Char) c.Int
+
+//go:linkname TextReaderCurrentDoc C.xmlTextReaderCurrentDoc
+func TextReaderCurrentDoc(reader TextReaderPtr) DocPtr
+
+//go:linkname TextReaderExpand C.xmlTextReaderExpand
+func TextReaderExpand(reader TextReaderPtr) NodePtr
+
+//go:linkname TextReaderNext C.xmlTextReaderNext
+func TextReaderNext(reader TextReaderPtr) c.Int
+
+//go:linkname TextReaderNextSibling C.xmlTextReaderNextSibling
+func TextReaderNextSibling(reader TextReaderPtr) c.Int
+
+//go:linkname TextReaderIsValid C.xmlTextReaderIsValid
+func TextReaderIsValid(reader TextReaderPtr) c.Int
+
+//go:linkname TextReaderRelaxNGValidate C.xmlTextReaderRelaxNGValidate
+func TextReaderRelaxNGValidate(reader TextReaderPtr, rng *c.Char) c.Int
+
+//go:linkname TextReaderRelaxNGValidateCtxt C.xmlTextReaderRelaxNGValidateCtxt
+func TextReaderRelaxNGValidateCtxt(reader TextReaderPtr, ctxt RelaxNGValidCtxtPtr, options c.Int) c.Int
+
+//go:linkname TextReaderRelaxNGSetSchema C.xmlTextReaderRelaxNGSetSchema
+func TextReaderRelaxNGSetSchema(reader TextReaderPtr, schema RelaxNGPtr) c.Int
+
+//go:linkname TextReaderSchemaValidate C.xmlTextReaderSchemaValidate
+func TextReaderSchemaValidate(reader TextReaderPtr, xsd *c.Char) c.Int
+
+//go:linkname TextReaderSchemaValidateCtxt C.xmlTextReaderSchemaValidateCtxt
+func TextReaderSchemaValidateCtxt(reader TextReaderPtr, ctxt SchemaValidCtxtPtr, options c.Int) c.Int
+
+//go:linkname TextReaderSetSchema C.xmlTextReaderSetSchema
+func TextReaderSetSchema(reader TextReaderPtr, schema SchemaPtr) c.Int
+
+//go:linkname TextReaderConstXmlVersion C.xmlTextReaderConstXmlVersion
+func TextReaderConstXmlVersion(reader TextReaderPtr) *Char
+
+//go:linkname TextReaderStandalone C.xmlTextReaderStandalone
+func TextReaderStandalone(reader TextReaderPtr) c.Int
+
+/*
+ * Index lookup
+ */
+//go:linkname TextReaderByteConsumed C.xmlTextReaderByteConsumed
+func TextReaderByteConsumed(reader TextReaderPtr) c.Long
+
+/*
+ * New more complete APIs for simpler creation and reuse of readers
+ */
+//go:linkname ReaderWalker C.xmlReaderWalker
+func ReaderWalker(doc DocPtr) TextReaderPtr
+
+// llgo:link (*Char).ReaderForDoc C.xmlReaderForDoc
+func (recv_ *Char) ReaderForDoc(URL *c.Char, encoding *c.Char, options c.Int) TextReaderPtr {
+ return nil
+}
+
+//go:linkname ReaderForFile C.xmlReaderForFile
+func ReaderForFile(filename *c.Char, encoding *c.Char, options c.Int) TextReaderPtr
+
+//go:linkname ReaderForMemory C.xmlReaderForMemory
+func ReaderForMemory(buffer *c.Char, size c.Int, URL *c.Char, encoding *c.Char, options c.Int) TextReaderPtr
+
+//go:linkname ReaderForFd C.xmlReaderForFd
+func ReaderForFd(fd c.Int, URL *c.Char, encoding *c.Char, options c.Int) TextReaderPtr
+
+//go:linkname ReaderForIO C.xmlReaderForIO
+func ReaderForIO(ioread InputReadCallback, ioclose InputCloseCallback, ioctx c.Pointer, URL *c.Char, encoding *c.Char, options c.Int) TextReaderPtr
+
+//go:linkname ReaderNewWalker C.xmlReaderNewWalker
+func ReaderNewWalker(reader TextReaderPtr, doc DocPtr) c.Int
+
+//go:linkname ReaderNewDoc C.xmlReaderNewDoc
+func ReaderNewDoc(reader TextReaderPtr, cur *Char, URL *c.Char, encoding *c.Char, options c.Int) c.Int
+
+//go:linkname ReaderNewFile C.xmlReaderNewFile
+func ReaderNewFile(reader TextReaderPtr, filename *c.Char, encoding *c.Char, options c.Int) c.Int
+
+//go:linkname ReaderNewMemory C.xmlReaderNewMemory
+func ReaderNewMemory(reader TextReaderPtr, buffer *c.Char, size c.Int, URL *c.Char, encoding *c.Char, options c.Int) c.Int
+
+//go:linkname ReaderNewFd C.xmlReaderNewFd
+func ReaderNewFd(reader TextReaderPtr, fd c.Int, URL *c.Char, encoding *c.Char, options c.Int) c.Int
+
+//go:linkname ReaderNewIO C.xmlReaderNewIO
+func ReaderNewIO(reader TextReaderPtr, ioread InputReadCallback, ioclose InputCloseCallback, ioctx c.Pointer, URL *c.Char, encoding *c.Char, options c.Int) c.Int
+
+type TextReaderLocatorPtr c.Pointer
+
+// llgo:type C
+type TextReaderErrorFunc func(c.Pointer, *c.Char, ParserSeverities, TextReaderLocatorPtr)
+
+//go:linkname TextReaderLocatorLineNumber C.xmlTextReaderLocatorLineNumber
+func TextReaderLocatorLineNumber(locator TextReaderLocatorPtr) c.Int
+
+//go:linkname TextReaderLocatorBaseURI C.xmlTextReaderLocatorBaseURI
+func TextReaderLocatorBaseURI(locator TextReaderLocatorPtr) *Char
+
+//go:linkname TextReaderSetErrorHandler C.xmlTextReaderSetErrorHandler
+func TextReaderSetErrorHandler(reader TextReaderPtr, f TextReaderErrorFunc, arg c.Pointer)
+
+//go:linkname TextReaderSetStructuredErrorHandler C.xmlTextReaderSetStructuredErrorHandler
+func TextReaderSetStructuredErrorHandler(reader TextReaderPtr, f StructuredErrorFunc, arg c.Pointer)
+
+//go:linkname TextReaderGetErrorHandler C.xmlTextReaderGetErrorHandler
+func TextReaderGetErrorHandler(reader TextReaderPtr, f TextReaderErrorFunc, arg *c.Pointer)
diff --git a/libxml2/xmlregexp.go b/libxml2/xmlregexp.go
new file mode 100644
index 0000000..9f18e62
--- /dev/null
+++ b/libxml2/xmlregexp.go
@@ -0,0 +1,62 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type X_xmlRegexp struct {
+ Unused [8]uint8
+}
+type Regexp X_xmlRegexp
+type RegexpPtr *Regexp
+
+type X_xmlRegExecCtxt struct {
+ Unused [8]uint8
+}
+type RegExecCtxt X_xmlRegExecCtxt
+type RegExecCtxtPtr *RegExecCtxt
+
+/*
+ * The POSIX like API
+ */
+// llgo:link (*Char).RegexpCompile C.xmlRegexpCompile
+func (recv_ *Char) RegexpCompile() RegexpPtr {
+ return nil
+}
+
+//go:linkname RegFreeRegexp C.xmlRegFreeRegexp
+func RegFreeRegexp(regexp RegexpPtr)
+
+//go:linkname RegexpExec C.xmlRegexpExec
+func RegexpExec(comp RegexpPtr, value *Char) c.Int
+
+//go:linkname RegexpPrint C.xmlRegexpPrint
+func RegexpPrint(output *c.FILE, regexp RegexpPtr)
+
+//go:linkname RegexpIsDeterminist C.xmlRegexpIsDeterminist
+func RegexpIsDeterminist(comp RegexpPtr) c.Int
+
+// llgo:type C
+type RegExecCallbacks func(RegExecCtxtPtr, *Char, c.Pointer, c.Pointer)
+
+/*
+ * The progressive API
+ */
+//go:linkname RegNewExecCtxt C.xmlRegNewExecCtxt
+func RegNewExecCtxt(comp RegexpPtr, callback RegExecCallbacks, data c.Pointer) RegExecCtxtPtr
+
+//go:linkname RegFreeExecCtxt C.xmlRegFreeExecCtxt
+func RegFreeExecCtxt(exec RegExecCtxtPtr)
+
+//go:linkname RegExecPushString C.xmlRegExecPushString
+func RegExecPushString(exec RegExecCtxtPtr, value *Char, data c.Pointer) c.Int
+
+//go:linkname RegExecPushString2 C.xmlRegExecPushString2
+func RegExecPushString2(exec RegExecCtxtPtr, value *Char, value2 *Char, data c.Pointer) c.Int
+
+//go:linkname RegExecNextValues C.xmlRegExecNextValues
+func RegExecNextValues(exec RegExecCtxtPtr, nbval *c.Int, nbneg *c.Int, values **Char, terminal *c.Int) c.Int
+
+//go:linkname RegExecErrInfo C.xmlRegExecErrInfo
+func RegExecErrInfo(exec RegExecCtxtPtr, string **Char, nbval *c.Int, nbneg *c.Int, values **Char, terminal *c.Int) c.Int
diff --git a/libxml2/xmlsave.go b/libxml2/xmlsave.go
new file mode 100644
index 0000000..0248cbc
--- /dev/null
+++ b/libxml2/xmlsave.go
@@ -0,0 +1,67 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type SaveOption c.Int
+
+const (
+ SAVE_FORMAT SaveOption = 1
+ SAVE_NO_DECL SaveOption = 2
+ SAVE_NO_EMPTY SaveOption = 4
+ SAVE_NO_XHTML SaveOption = 8
+ SAVE_XHTML SaveOption = 16
+ SAVE_AS_XML SaveOption = 32
+ SAVE_AS_HTML SaveOption = 64
+ SAVE_WSNONSIG SaveOption = 128
+)
+
+type X_xmlSaveCtxt struct {
+ Unused [8]uint8
+}
+type SaveCtxt X_xmlSaveCtxt
+type SaveCtxtPtr *SaveCtxt
+
+//go:linkname SaveToFd C.xmlSaveToFd
+func SaveToFd(fd c.Int, encoding *c.Char, options c.Int) SaveCtxtPtr
+
+//go:linkname SaveToFilename C.xmlSaveToFilename
+func SaveToFilename(filename *c.Char, encoding *c.Char, options c.Int) SaveCtxtPtr
+
+//go:linkname SaveToBuffer C.xmlSaveToBuffer
+func SaveToBuffer(buffer BufferPtr, encoding *c.Char, options c.Int) SaveCtxtPtr
+
+//go:linkname SaveToIO C.xmlSaveToIO
+func SaveToIO(iowrite OutputWriteCallback, ioclose OutputCloseCallback, ioctx c.Pointer, encoding *c.Char, options c.Int) SaveCtxtPtr
+
+//go:linkname SaveDoc C.xmlSaveDoc
+func SaveDoc(ctxt SaveCtxtPtr, doc DocPtr) c.Long
+
+//go:linkname SaveTree C.xmlSaveTree
+func SaveTree(ctxt SaveCtxtPtr, node NodePtr) c.Long
+
+//go:linkname SaveFlush C.xmlSaveFlush
+func SaveFlush(ctxt SaveCtxtPtr) c.Int
+
+//go:linkname SaveClose C.xmlSaveClose
+func SaveClose(ctxt SaveCtxtPtr) c.Int
+
+//go:linkname SaveFinish C.xmlSaveFinish
+func SaveFinish(ctxt SaveCtxtPtr) c.Int
+
+//go:linkname SaveSetEscape C.xmlSaveSetEscape
+func SaveSetEscape(ctxt SaveCtxtPtr, escape CharEncodingOutputFunc) c.Int
+
+//go:linkname SaveSetAttrEscape C.xmlSaveSetAttrEscape
+func SaveSetAttrEscape(ctxt SaveCtxtPtr, escape CharEncodingOutputFunc) c.Int
+
+//go:linkname ThrDefIndentTreeOutput C.xmlThrDefIndentTreeOutput
+func ThrDefIndentTreeOutput(v c.Int) c.Int
+
+//go:linkname ThrDefTreeIndentString C.xmlThrDefTreeIndentString
+func ThrDefTreeIndentString(v *c.Char) *c.Char
+
+//go:linkname ThrDefSaveNoEmptyTags C.xmlThrDefSaveNoEmptyTags
+func ThrDefSaveNoEmptyTags(v c.Int) c.Int
diff --git a/libxml2/xmlschemas.go b/libxml2/xmlschemas.go
new file mode 100644
index 0000000..792a0fd
--- /dev/null
+++ b/libxml2/xmlschemas.go
@@ -0,0 +1,158 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type SchemaValidError c.Int
+
+const (
+ SCHEMAS_ERR_OK SchemaValidError = 0
+ SCHEMAS_ERR_NOROOT SchemaValidError = 1
+ SCHEMAS_ERR_UNDECLAREDELEM SchemaValidError = 2
+ SCHEMAS_ERR_NOTTOPLEVEL SchemaValidError = 3
+ SCHEMAS_ERR_MISSING SchemaValidError = 4
+ SCHEMAS_ERR_WRONGELEM SchemaValidError = 5
+ SCHEMAS_ERR_NOTYPE SchemaValidError = 6
+ SCHEMAS_ERR_NOROLLBACK SchemaValidError = 7
+ SCHEMAS_ERR_ISABSTRACT SchemaValidError = 8
+ SCHEMAS_ERR_NOTEMPTY SchemaValidError = 9
+ SCHEMAS_ERR_ELEMCONT SchemaValidError = 10
+ SCHEMAS_ERR_HAVEDEFAULT SchemaValidError = 11
+ SCHEMAS_ERR_NOTNILLABLE SchemaValidError = 12
+ SCHEMAS_ERR_EXTRACONTENT SchemaValidError = 13
+ SCHEMAS_ERR_INVALIDATTR SchemaValidError = 14
+ SCHEMAS_ERR_INVALIDELEM SchemaValidError = 15
+ SCHEMAS_ERR_NOTDETERMINIST SchemaValidError = 16
+ SCHEMAS_ERR_CONSTRUCT SchemaValidError = 17
+ SCHEMAS_ERR_INTERNAL SchemaValidError = 18
+ SCHEMAS_ERR_NOTSIMPLE SchemaValidError = 19
+ SCHEMAS_ERR_ATTRUNKNOWN SchemaValidError = 20
+ SCHEMAS_ERR_ATTRINVALID SchemaValidError = 21
+ SCHEMAS_ERR_VALUE SchemaValidError = 22
+ SCHEMAS_ERR_FACET SchemaValidError = 23
+ SCHEMAS_ERR_ SchemaValidError = 24
+ SCHEMAS_ERR_XXX SchemaValidError = 25
+)
+
+type SchemaValidOption c.Int
+
+const SCHEMA_VAL_VC_I_CREATE SchemaValidOption = 1
+
+type Schema X_xmlSchema
+type SchemaPtr *Schema
+
+// llgo:type C
+type SchemaValidityErrorFunc func(__llgo_arg_0 c.Pointer, __llgo_arg_1 *c.Char, __llgo_va_list ...interface{})
+
+// llgo:type C
+type SchemaValidityWarningFunc func(__llgo_arg_0 c.Pointer, __llgo_arg_1 *c.Char, __llgo_va_list ...interface{})
+
+type X_xmlSchemaParserCtxt struct {
+ Unused [8]uint8
+}
+type SchemaParserCtxt X_xmlSchemaParserCtxt
+type SchemaParserCtxtPtr *SchemaParserCtxt
+
+type X_xmlSchemaValidCtxt struct {
+ Unused [8]uint8
+}
+type SchemaValidCtxt X_xmlSchemaValidCtxt
+type SchemaValidCtxtPtr *SchemaValidCtxt
+
+// llgo:type C
+type SchemaValidityLocatorFunc func(c.Pointer, **c.Char, *c.Ulong) c.Int
+
+/*
+ * Interfaces for parsing.
+ */
+//go:linkname SchemaNewParserCtxt C.xmlSchemaNewParserCtxt
+func SchemaNewParserCtxt(URL *c.Char) SchemaParserCtxtPtr
+
+//go:linkname SchemaNewMemParserCtxt C.xmlSchemaNewMemParserCtxt
+func SchemaNewMemParserCtxt(buffer *c.Char, size c.Int) SchemaParserCtxtPtr
+
+//go:linkname SchemaNewDocParserCtxt C.xmlSchemaNewDocParserCtxt
+func SchemaNewDocParserCtxt(doc DocPtr) SchemaParserCtxtPtr
+
+//go:linkname SchemaFreeParserCtxt C.xmlSchemaFreeParserCtxt
+func SchemaFreeParserCtxt(ctxt SchemaParserCtxtPtr)
+
+//go:linkname SchemaSetParserErrors C.xmlSchemaSetParserErrors
+func SchemaSetParserErrors(ctxt SchemaParserCtxtPtr, err SchemaValidityErrorFunc, warn SchemaValidityWarningFunc, ctx c.Pointer)
+
+//go:linkname SchemaSetParserStructuredErrors C.xmlSchemaSetParserStructuredErrors
+func SchemaSetParserStructuredErrors(ctxt SchemaParserCtxtPtr, serror StructuredErrorFunc, ctx c.Pointer)
+
+//go:linkname SchemaGetParserErrors C.xmlSchemaGetParserErrors
+func SchemaGetParserErrors(ctxt SchemaParserCtxtPtr, err SchemaValidityErrorFunc, warn SchemaValidityWarningFunc, ctx *c.Pointer) c.Int
+
+//go:linkname SchemaIsValid C.xmlSchemaIsValid
+func SchemaIsValid(ctxt SchemaValidCtxtPtr) c.Int
+
+//go:linkname SchemaParse C.xmlSchemaParse
+func SchemaParse(ctxt SchemaParserCtxtPtr) SchemaPtr
+
+//go:linkname SchemaFree C.xmlSchemaFree
+func SchemaFree(schema SchemaPtr)
+
+//go:linkname SchemaDump C.xmlSchemaDump
+func SchemaDump(output *c.FILE, schema SchemaPtr)
+
+/*
+ * Interfaces for validating
+ */
+//go:linkname SchemaSetValidErrors C.xmlSchemaSetValidErrors
+func SchemaSetValidErrors(ctxt SchemaValidCtxtPtr, err SchemaValidityErrorFunc, warn SchemaValidityWarningFunc, ctx c.Pointer)
+
+//go:linkname SchemaSetValidStructuredErrors C.xmlSchemaSetValidStructuredErrors
+func SchemaSetValidStructuredErrors(ctxt SchemaValidCtxtPtr, serror StructuredErrorFunc, ctx c.Pointer)
+
+//go:linkname SchemaGetValidErrors C.xmlSchemaGetValidErrors
+func SchemaGetValidErrors(ctxt SchemaValidCtxtPtr, err SchemaValidityErrorFunc, warn SchemaValidityWarningFunc, ctx *c.Pointer) c.Int
+
+//go:linkname SchemaSetValidOptions C.xmlSchemaSetValidOptions
+func SchemaSetValidOptions(ctxt SchemaValidCtxtPtr, options c.Int) c.Int
+
+//go:linkname SchemaValidateSetFilename C.xmlSchemaValidateSetFilename
+func SchemaValidateSetFilename(vctxt SchemaValidCtxtPtr, filename *c.Char)
+
+//go:linkname SchemaValidCtxtGetOptions C.xmlSchemaValidCtxtGetOptions
+func SchemaValidCtxtGetOptions(ctxt SchemaValidCtxtPtr) c.Int
+
+//go:linkname SchemaNewValidCtxt C.xmlSchemaNewValidCtxt
+func SchemaNewValidCtxt(schema SchemaPtr) SchemaValidCtxtPtr
+
+//go:linkname SchemaFreeValidCtxt C.xmlSchemaFreeValidCtxt
+func SchemaFreeValidCtxt(ctxt SchemaValidCtxtPtr)
+
+//go:linkname SchemaValidateDoc C.xmlSchemaValidateDoc
+func SchemaValidateDoc(ctxt SchemaValidCtxtPtr, instance DocPtr) c.Int
+
+//go:linkname SchemaValidateOneElement C.xmlSchemaValidateOneElement
+func SchemaValidateOneElement(ctxt SchemaValidCtxtPtr, elem NodePtr) c.Int
+
+//go:linkname SchemaValidateStream C.xmlSchemaValidateStream
+func SchemaValidateStream(ctxt SchemaValidCtxtPtr, input ParserInputBufferPtr, enc CharEncoding, sax SAXHandlerPtr, user_data c.Pointer) c.Int
+
+//go:linkname SchemaValidateFile C.xmlSchemaValidateFile
+func SchemaValidateFile(ctxt SchemaValidCtxtPtr, filename *c.Char, options c.Int) c.Int
+
+//go:linkname SchemaValidCtxtGetParserCtxt C.xmlSchemaValidCtxtGetParserCtxt
+func SchemaValidCtxtGetParserCtxt(ctxt SchemaValidCtxtPtr) ParserCtxtPtr
+
+type X_xmlSchemaSAXPlug struct {
+ Unused [8]uint8
+}
+type SchemaSAXPlugStruct X_xmlSchemaSAXPlug
+type SchemaSAXPlugPtr *SchemaSAXPlugStruct
+
+//go:linkname SchemaSAXPlug C.xmlSchemaSAXPlug
+func SchemaSAXPlug(ctxt SchemaValidCtxtPtr, sax *SAXHandlerPtr, user_data *c.Pointer) SchemaSAXPlugPtr
+
+//go:linkname SchemaSAXUnplug C.xmlSchemaSAXUnplug
+func SchemaSAXUnplug(plug SchemaSAXPlugPtr) c.Int
+
+//go:linkname SchemaValidateSetLocator C.xmlSchemaValidateSetLocator
+func SchemaValidateSetLocator(vctxt SchemaValidCtxtPtr, f SchemaValidityLocatorFunc, ctxt c.Pointer)
diff --git a/libxml2/xmlschemastypes.go b/libxml2/xmlschemastypes.go
new file mode 100644
index 0000000..41a261a
--- /dev/null
+++ b/libxml2/xmlschemastypes.go
@@ -0,0 +1,131 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type SchemaWhitespaceValueType c.Int
+
+const (
+ SCHEMA_WHITESPACE_UNKNOWN SchemaWhitespaceValueType = 0
+ SCHEMA_WHITESPACE_PRESERVE SchemaWhitespaceValueType = 1
+ SCHEMA_WHITESPACE_REPLACE SchemaWhitespaceValueType = 2
+ SCHEMA_WHITESPACE_COLLAPSE SchemaWhitespaceValueType = 3
+)
+
+//go:linkname SchemaInitTypes C.xmlSchemaInitTypes
+func SchemaInitTypes() c.Int
+
+//go:linkname SchemaCleanupTypes C.xmlSchemaCleanupTypes
+func SchemaCleanupTypes()
+
+// llgo:link (*Char).SchemaGetPredefinedType C.xmlSchemaGetPredefinedType
+func (recv_ *Char) SchemaGetPredefinedType(ns *Char) SchemaTypePtr {
+ return nil
+}
+
+//go:linkname SchemaValidatePredefinedType C.xmlSchemaValidatePredefinedType
+func SchemaValidatePredefinedType(type_ SchemaTypePtr, value *Char, val *SchemaValPtr) c.Int
+
+//go:linkname SchemaValPredefTypeNode C.xmlSchemaValPredefTypeNode
+func SchemaValPredefTypeNode(type_ SchemaTypePtr, value *Char, val *SchemaValPtr, node NodePtr) c.Int
+
+//go:linkname SchemaValidateFacet C.xmlSchemaValidateFacet
+func SchemaValidateFacet(base SchemaTypePtr, facet SchemaFacetPtr, value *Char, val SchemaValPtr) c.Int
+
+//go:linkname SchemaValidateFacetWhtsp C.xmlSchemaValidateFacetWhtsp
+func SchemaValidateFacetWhtsp(facet SchemaFacetPtr, fws SchemaWhitespaceValueType, valType SchemaValType, value *Char, val SchemaValPtr, ws SchemaWhitespaceValueType) c.Int
+
+//go:linkname SchemaFreeValue C.xmlSchemaFreeValue
+func SchemaFreeValue(val SchemaValPtr)
+
+//go:linkname SchemaNewFacet C.xmlSchemaNewFacet
+func SchemaNewFacet() SchemaFacetPtr
+
+//go:linkname SchemaCheckFacet C.xmlSchemaCheckFacet
+func SchemaCheckFacet(facet SchemaFacetPtr, typeDecl SchemaTypePtr, ctxt SchemaParserCtxtPtr, name *Char) c.Int
+
+//go:linkname SchemaFreeFacet C.xmlSchemaFreeFacet
+func SchemaFreeFacet(facet SchemaFacetPtr)
+
+//go:linkname SchemaCompareValues C.xmlSchemaCompareValues
+func SchemaCompareValues(x SchemaValPtr, y SchemaValPtr) c.Int
+
+//go:linkname SchemaGetBuiltInListSimpleTypeItemType C.xmlSchemaGetBuiltInListSimpleTypeItemType
+func SchemaGetBuiltInListSimpleTypeItemType(type_ SchemaTypePtr) SchemaTypePtr
+
+//go:linkname SchemaValidateListSimpleTypeFacet C.xmlSchemaValidateListSimpleTypeFacet
+func SchemaValidateListSimpleTypeFacet(facet SchemaFacetPtr, value *Char, actualLen c.Ulong, expectedLen *c.Ulong) c.Int
+
+// llgo:link SchemaValType.SchemaGetBuiltInType C.xmlSchemaGetBuiltInType
+func (recv_ SchemaValType) SchemaGetBuiltInType() SchemaTypePtr {
+ return nil
+}
+
+//go:linkname SchemaIsBuiltInTypeFacet C.xmlSchemaIsBuiltInTypeFacet
+func SchemaIsBuiltInTypeFacet(type_ SchemaTypePtr, facetType c.Int) c.Int
+
+// llgo:link (*Char).SchemaCollapseString C.xmlSchemaCollapseString
+func (recv_ *Char) SchemaCollapseString() *Char {
+ return nil
+}
+
+// llgo:link (*Char).SchemaWhiteSpaceReplace C.xmlSchemaWhiteSpaceReplace
+func (recv_ *Char) SchemaWhiteSpaceReplace() *Char {
+ return nil
+}
+
+//go:linkname SchemaGetFacetValueAsULong C.xmlSchemaGetFacetValueAsULong
+func SchemaGetFacetValueAsULong(facet SchemaFacetPtr) c.Ulong
+
+//go:linkname SchemaValidateLengthFacet C.xmlSchemaValidateLengthFacet
+func SchemaValidateLengthFacet(type_ SchemaTypePtr, facet SchemaFacetPtr, value *Char, val SchemaValPtr, length *c.Ulong) c.Int
+
+//go:linkname SchemaValidateLengthFacetWhtsp C.xmlSchemaValidateLengthFacetWhtsp
+func SchemaValidateLengthFacetWhtsp(facet SchemaFacetPtr, valType SchemaValType, value *Char, val SchemaValPtr, length *c.Ulong, ws SchemaWhitespaceValueType) c.Int
+
+//go:linkname SchemaValPredefTypeNodeNoNorm C.xmlSchemaValPredefTypeNodeNoNorm
+func SchemaValPredefTypeNodeNoNorm(type_ SchemaTypePtr, value *Char, val *SchemaValPtr, node NodePtr) c.Int
+
+//go:linkname SchemaGetCanonValue C.xmlSchemaGetCanonValue
+func SchemaGetCanonValue(val SchemaValPtr, retValue **Char) c.Int
+
+//go:linkname SchemaGetCanonValueWhtsp C.xmlSchemaGetCanonValueWhtsp
+func SchemaGetCanonValueWhtsp(val SchemaValPtr, retValue **Char, ws SchemaWhitespaceValueType) c.Int
+
+//go:linkname SchemaValueAppend C.xmlSchemaValueAppend
+func SchemaValueAppend(prev SchemaValPtr, cur SchemaValPtr) c.Int
+
+//go:linkname SchemaValueGetNext C.xmlSchemaValueGetNext
+func SchemaValueGetNext(cur SchemaValPtr) SchemaValPtr
+
+//go:linkname SchemaValueGetAsString C.xmlSchemaValueGetAsString
+func SchemaValueGetAsString(val SchemaValPtr) *Char
+
+//go:linkname SchemaValueGetAsBoolean C.xmlSchemaValueGetAsBoolean
+func SchemaValueGetAsBoolean(val SchemaValPtr) c.Int
+
+// llgo:link SchemaValType.SchemaNewStringValue C.xmlSchemaNewStringValue
+func (recv_ SchemaValType) SchemaNewStringValue(value *Char) SchemaValPtr {
+ return nil
+}
+
+// llgo:link (*Char).SchemaNewNOTATIONValue C.xmlSchemaNewNOTATIONValue
+func (recv_ *Char) SchemaNewNOTATIONValue(ns *Char) SchemaValPtr {
+ return nil
+}
+
+// llgo:link (*Char).SchemaNewQNameValue C.xmlSchemaNewQNameValue
+func (recv_ *Char) SchemaNewQNameValue(localName *Char) SchemaValPtr {
+ return nil
+}
+
+//go:linkname SchemaCompareValuesWhtsp C.xmlSchemaCompareValuesWhtsp
+func SchemaCompareValuesWhtsp(x SchemaValPtr, xws SchemaWhitespaceValueType, y SchemaValPtr, yws SchemaWhitespaceValueType) c.Int
+
+//go:linkname SchemaCopyValue C.xmlSchemaCopyValue
+func SchemaCopyValue(val SchemaValPtr) SchemaValPtr
+
+//go:linkname SchemaGetValType C.xmlSchemaGetValType
+func SchemaGetValType(val SchemaValPtr) SchemaValType
diff --git a/libxml2/xmlstring.go b/libxml2/xmlstring.go
new file mode 100644
index 0000000..c24fea9
--- /dev/null
+++ b/libxml2/xmlstring.go
@@ -0,0 +1,151 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type Char c.Char
+
+/*
+ * xmlChar handling
+ */
+// llgo:link (*Char).Strdup C.xmlStrdup
+func (recv_ *Char) Strdup() *Char {
+ return nil
+}
+
+// llgo:link (*Char).Strndup C.xmlStrndup
+func (recv_ *Char) Strndup(len c.Int) *Char {
+ return nil
+}
+
+//go:linkname CharStrndup C.xmlCharStrndup
+func CharStrndup(cur *c.Char, len c.Int) *Char
+
+//go:linkname CharStrdup C.xmlCharStrdup
+func CharStrdup(cur *c.Char) *Char
+
+// llgo:link (*Char).Strsub C.xmlStrsub
+func (recv_ *Char) Strsub(start c.Int, len c.Int) *Char {
+ return nil
+}
+
+// llgo:link (*Char).Strchr C.xmlStrchr
+func (recv_ *Char) Strchr(val Char) *Char {
+ return nil
+}
+
+// llgo:link (*Char).Strstr C.xmlStrstr
+func (recv_ *Char) Strstr(val *Char) *Char {
+ return nil
+}
+
+// llgo:link (*Char).Strcasestr C.xmlStrcasestr
+func (recv_ *Char) Strcasestr(val *Char) *Char {
+ return nil
+}
+
+// llgo:link (*Char).Strcmp C.xmlStrcmp
+func (recv_ *Char) Strcmp(str2 *Char) c.Int {
+ return 0
+}
+
+// llgo:link (*Char).Strncmp C.xmlStrncmp
+func (recv_ *Char) Strncmp(str2 *Char, len c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*Char).Strcasecmp C.xmlStrcasecmp
+func (recv_ *Char) Strcasecmp(str2 *Char) c.Int {
+ return 0
+}
+
+// llgo:link (*Char).Strncasecmp C.xmlStrncasecmp
+func (recv_ *Char) Strncasecmp(str2 *Char, len c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*Char).StrEqual C.xmlStrEqual
+func (recv_ *Char) StrEqual(str2 *Char) c.Int {
+ return 0
+}
+
+// llgo:link (*Char).StrQEqual C.xmlStrQEqual
+func (recv_ *Char) StrQEqual(name *Char, str *Char) c.Int {
+ return 0
+}
+
+// llgo:link (*Char).Strlen C.xmlStrlen
+func (recv_ *Char) Strlen() c.Int {
+ return 0
+}
+
+// llgo:link (*Char).Strcat C.xmlStrcat
+func (recv_ *Char) Strcat(add *Char) *Char {
+ return nil
+}
+
+// llgo:link (*Char).Strncat C.xmlStrncat
+func (recv_ *Char) Strncat(add *Char, len c.Int) *Char {
+ return nil
+}
+
+// llgo:link (*Char).StrncatNew C.xmlStrncatNew
+func (recv_ *Char) StrncatNew(str2 *Char, len c.Int) *Char {
+ return nil
+}
+
+//go:linkname StrPrintf C.xmlStrPrintf
+func StrPrintf(buf *Char, len c.Int, msg *c.Char, __llgo_va_list ...interface{}) c.Int
+
+// llgo:link (*Char).StrVPrintf C.xmlStrVPrintf
+func (recv_ *Char) StrVPrintf(len c.Int, msg *c.Char, ap c.VaList) c.Int {
+ return 0
+}
+
+//go:linkname GetUTF8Char C.xmlGetUTF8Char
+func GetUTF8Char(utf *c.Char, len *c.Int) c.Int
+
+//go:linkname CheckUTF8 C.xmlCheckUTF8
+func CheckUTF8(utf *c.Char) c.Int
+
+// llgo:link (*Char).UTF8Strsize C.xmlUTF8Strsize
+func (recv_ *Char) UTF8Strsize(len c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*Char).UTF8Strndup C.xmlUTF8Strndup
+func (recv_ *Char) UTF8Strndup(len c.Int) *Char {
+ return nil
+}
+
+// llgo:link (*Char).UTF8Strpos C.xmlUTF8Strpos
+func (recv_ *Char) UTF8Strpos(pos c.Int) *Char {
+ return nil
+}
+
+// llgo:link (*Char).UTF8Strloc C.xmlUTF8Strloc
+func (recv_ *Char) UTF8Strloc(utfchar *Char) c.Int {
+ return 0
+}
+
+// llgo:link (*Char).UTF8Strsub C.xmlUTF8Strsub
+func (recv_ *Char) UTF8Strsub(start c.Int, len c.Int) *Char {
+ return nil
+}
+
+// llgo:link (*Char).UTF8Strlen C.xmlUTF8Strlen
+func (recv_ *Char) UTF8Strlen() c.Int {
+ return 0
+}
+
+// llgo:link (*Char).UTF8Size C.xmlUTF8Size
+func (recv_ *Char) UTF8Size() c.Int {
+ return 0
+}
+
+// llgo:link (*Char).UTF8Charcmp C.xmlUTF8Charcmp
+func (recv_ *Char) UTF8Charcmp(utf2 *Char) c.Int {
+ return 0
+}
diff --git a/libxml2/xmlunicode.go b/libxml2/xmlunicode.go
new file mode 100644
index 0000000..1545f17
--- /dev/null
+++ b/libxml2/xmlunicode.go
@@ -0,0 +1,504 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+//go:linkname UCSIsAegeanNumbers C.xmlUCSIsAegeanNumbers
+func UCSIsAegeanNumbers(code c.Int) c.Int
+
+//go:linkname UCSIsAlphabeticPresentationForms C.xmlUCSIsAlphabeticPresentationForms
+func UCSIsAlphabeticPresentationForms(code c.Int) c.Int
+
+//go:linkname UCSIsArabic C.xmlUCSIsArabic
+func UCSIsArabic(code c.Int) c.Int
+
+//go:linkname UCSIsArabicPresentationFormsA C.xmlUCSIsArabicPresentationFormsA
+func UCSIsArabicPresentationFormsA(code c.Int) c.Int
+
+//go:linkname UCSIsArabicPresentationFormsB C.xmlUCSIsArabicPresentationFormsB
+func UCSIsArabicPresentationFormsB(code c.Int) c.Int
+
+//go:linkname UCSIsArmenian C.xmlUCSIsArmenian
+func UCSIsArmenian(code c.Int) c.Int
+
+//go:linkname UCSIsArrows C.xmlUCSIsArrows
+func UCSIsArrows(code c.Int) c.Int
+
+//go:linkname UCSIsBasicLatin C.xmlUCSIsBasicLatin
+func UCSIsBasicLatin(code c.Int) c.Int
+
+//go:linkname UCSIsBengali C.xmlUCSIsBengali
+func UCSIsBengali(code c.Int) c.Int
+
+//go:linkname UCSIsBlockElements C.xmlUCSIsBlockElements
+func UCSIsBlockElements(code c.Int) c.Int
+
+//go:linkname UCSIsBopomofo C.xmlUCSIsBopomofo
+func UCSIsBopomofo(code c.Int) c.Int
+
+//go:linkname UCSIsBopomofoExtended C.xmlUCSIsBopomofoExtended
+func UCSIsBopomofoExtended(code c.Int) c.Int
+
+//go:linkname UCSIsBoxDrawing C.xmlUCSIsBoxDrawing
+func UCSIsBoxDrawing(code c.Int) c.Int
+
+//go:linkname UCSIsBraillePatterns C.xmlUCSIsBraillePatterns
+func UCSIsBraillePatterns(code c.Int) c.Int
+
+//go:linkname UCSIsBuhid C.xmlUCSIsBuhid
+func UCSIsBuhid(code c.Int) c.Int
+
+//go:linkname UCSIsByzantineMusicalSymbols C.xmlUCSIsByzantineMusicalSymbols
+func UCSIsByzantineMusicalSymbols(code c.Int) c.Int
+
+//go:linkname UCSIsCJKCompatibility C.xmlUCSIsCJKCompatibility
+func UCSIsCJKCompatibility(code c.Int) c.Int
+
+//go:linkname UCSIsCJKCompatibilityForms C.xmlUCSIsCJKCompatibilityForms
+func UCSIsCJKCompatibilityForms(code c.Int) c.Int
+
+//go:linkname UCSIsCJKCompatibilityIdeographs C.xmlUCSIsCJKCompatibilityIdeographs
+func UCSIsCJKCompatibilityIdeographs(code c.Int) c.Int
+
+//go:linkname UCSIsCJKCompatibilityIdeographsSupplement C.xmlUCSIsCJKCompatibilityIdeographsSupplement
+func UCSIsCJKCompatibilityIdeographsSupplement(code c.Int) c.Int
+
+//go:linkname UCSIsCJKRadicalsSupplement C.xmlUCSIsCJKRadicalsSupplement
+func UCSIsCJKRadicalsSupplement(code c.Int) c.Int
+
+//go:linkname UCSIsCJKSymbolsandPunctuation C.xmlUCSIsCJKSymbolsandPunctuation
+func UCSIsCJKSymbolsandPunctuation(code c.Int) c.Int
+
+//go:linkname UCSIsCJKUnifiedIdeographs C.xmlUCSIsCJKUnifiedIdeographs
+func UCSIsCJKUnifiedIdeographs(code c.Int) c.Int
+
+//go:linkname UCSIsCJKUnifiedIdeographsExtensionA C.xmlUCSIsCJKUnifiedIdeographsExtensionA
+func UCSIsCJKUnifiedIdeographsExtensionA(code c.Int) c.Int
+
+//go:linkname UCSIsCJKUnifiedIdeographsExtensionB C.xmlUCSIsCJKUnifiedIdeographsExtensionB
+func UCSIsCJKUnifiedIdeographsExtensionB(code c.Int) c.Int
+
+//go:linkname UCSIsCherokee C.xmlUCSIsCherokee
+func UCSIsCherokee(code c.Int) c.Int
+
+//go:linkname UCSIsCombiningDiacriticalMarks C.xmlUCSIsCombiningDiacriticalMarks
+func UCSIsCombiningDiacriticalMarks(code c.Int) c.Int
+
+//go:linkname UCSIsCombiningDiacriticalMarksforSymbols C.xmlUCSIsCombiningDiacriticalMarksforSymbols
+func UCSIsCombiningDiacriticalMarksforSymbols(code c.Int) c.Int
+
+//go:linkname UCSIsCombiningHalfMarks C.xmlUCSIsCombiningHalfMarks
+func UCSIsCombiningHalfMarks(code c.Int) c.Int
+
+//go:linkname UCSIsCombiningMarksforSymbols C.xmlUCSIsCombiningMarksforSymbols
+func UCSIsCombiningMarksforSymbols(code c.Int) c.Int
+
+//go:linkname UCSIsControlPictures C.xmlUCSIsControlPictures
+func UCSIsControlPictures(code c.Int) c.Int
+
+//go:linkname UCSIsCurrencySymbols C.xmlUCSIsCurrencySymbols
+func UCSIsCurrencySymbols(code c.Int) c.Int
+
+//go:linkname UCSIsCypriotSyllabary C.xmlUCSIsCypriotSyllabary
+func UCSIsCypriotSyllabary(code c.Int) c.Int
+
+//go:linkname UCSIsCyrillic C.xmlUCSIsCyrillic
+func UCSIsCyrillic(code c.Int) c.Int
+
+//go:linkname UCSIsCyrillicSupplement C.xmlUCSIsCyrillicSupplement
+func UCSIsCyrillicSupplement(code c.Int) c.Int
+
+//go:linkname UCSIsDeseret C.xmlUCSIsDeseret
+func UCSIsDeseret(code c.Int) c.Int
+
+//go:linkname UCSIsDevanagari C.xmlUCSIsDevanagari
+func UCSIsDevanagari(code c.Int) c.Int
+
+//go:linkname UCSIsDingbats C.xmlUCSIsDingbats
+func UCSIsDingbats(code c.Int) c.Int
+
+//go:linkname UCSIsEnclosedAlphanumerics C.xmlUCSIsEnclosedAlphanumerics
+func UCSIsEnclosedAlphanumerics(code c.Int) c.Int
+
+//go:linkname UCSIsEnclosedCJKLettersandMonths C.xmlUCSIsEnclosedCJKLettersandMonths
+func UCSIsEnclosedCJKLettersandMonths(code c.Int) c.Int
+
+//go:linkname UCSIsEthiopic C.xmlUCSIsEthiopic
+func UCSIsEthiopic(code c.Int) c.Int
+
+//go:linkname UCSIsGeneralPunctuation C.xmlUCSIsGeneralPunctuation
+func UCSIsGeneralPunctuation(code c.Int) c.Int
+
+//go:linkname UCSIsGeometricShapes C.xmlUCSIsGeometricShapes
+func UCSIsGeometricShapes(code c.Int) c.Int
+
+//go:linkname UCSIsGeorgian C.xmlUCSIsGeorgian
+func UCSIsGeorgian(code c.Int) c.Int
+
+//go:linkname UCSIsGothic C.xmlUCSIsGothic
+func UCSIsGothic(code c.Int) c.Int
+
+//go:linkname UCSIsGreek C.xmlUCSIsGreek
+func UCSIsGreek(code c.Int) c.Int
+
+//go:linkname UCSIsGreekExtended C.xmlUCSIsGreekExtended
+func UCSIsGreekExtended(code c.Int) c.Int
+
+//go:linkname UCSIsGreekandCoptic C.xmlUCSIsGreekandCoptic
+func UCSIsGreekandCoptic(code c.Int) c.Int
+
+//go:linkname UCSIsGujarati C.xmlUCSIsGujarati
+func UCSIsGujarati(code c.Int) c.Int
+
+//go:linkname UCSIsGurmukhi C.xmlUCSIsGurmukhi
+func UCSIsGurmukhi(code c.Int) c.Int
+
+//go:linkname UCSIsHalfwidthandFullwidthForms C.xmlUCSIsHalfwidthandFullwidthForms
+func UCSIsHalfwidthandFullwidthForms(code c.Int) c.Int
+
+//go:linkname UCSIsHangulCompatibilityJamo C.xmlUCSIsHangulCompatibilityJamo
+func UCSIsHangulCompatibilityJamo(code c.Int) c.Int
+
+//go:linkname UCSIsHangulJamo C.xmlUCSIsHangulJamo
+func UCSIsHangulJamo(code c.Int) c.Int
+
+//go:linkname UCSIsHangulSyllables C.xmlUCSIsHangulSyllables
+func UCSIsHangulSyllables(code c.Int) c.Int
+
+//go:linkname UCSIsHanunoo C.xmlUCSIsHanunoo
+func UCSIsHanunoo(code c.Int) c.Int
+
+//go:linkname UCSIsHebrew C.xmlUCSIsHebrew
+func UCSIsHebrew(code c.Int) c.Int
+
+//go:linkname UCSIsHighPrivateUseSurrogates C.xmlUCSIsHighPrivateUseSurrogates
+func UCSIsHighPrivateUseSurrogates(code c.Int) c.Int
+
+//go:linkname UCSIsHighSurrogates C.xmlUCSIsHighSurrogates
+func UCSIsHighSurrogates(code c.Int) c.Int
+
+//go:linkname UCSIsHiragana C.xmlUCSIsHiragana
+func UCSIsHiragana(code c.Int) c.Int
+
+//go:linkname UCSIsIPAExtensions C.xmlUCSIsIPAExtensions
+func UCSIsIPAExtensions(code c.Int) c.Int
+
+//go:linkname UCSIsIdeographicDescriptionCharacters C.xmlUCSIsIdeographicDescriptionCharacters
+func UCSIsIdeographicDescriptionCharacters(code c.Int) c.Int
+
+//go:linkname UCSIsKanbun C.xmlUCSIsKanbun
+func UCSIsKanbun(code c.Int) c.Int
+
+//go:linkname UCSIsKangxiRadicals C.xmlUCSIsKangxiRadicals
+func UCSIsKangxiRadicals(code c.Int) c.Int
+
+//go:linkname UCSIsKannada C.xmlUCSIsKannada
+func UCSIsKannada(code c.Int) c.Int
+
+//go:linkname UCSIsKatakana C.xmlUCSIsKatakana
+func UCSIsKatakana(code c.Int) c.Int
+
+//go:linkname UCSIsKatakanaPhoneticExtensions C.xmlUCSIsKatakanaPhoneticExtensions
+func UCSIsKatakanaPhoneticExtensions(code c.Int) c.Int
+
+//go:linkname UCSIsKhmer C.xmlUCSIsKhmer
+func UCSIsKhmer(code c.Int) c.Int
+
+//go:linkname UCSIsKhmerSymbols C.xmlUCSIsKhmerSymbols
+func UCSIsKhmerSymbols(code c.Int) c.Int
+
+//go:linkname UCSIsLao C.xmlUCSIsLao
+func UCSIsLao(code c.Int) c.Int
+
+//go:linkname UCSIsLatin1Supplement C.xmlUCSIsLatin1Supplement
+func UCSIsLatin1Supplement(code c.Int) c.Int
+
+//go:linkname UCSIsLatinExtendedA C.xmlUCSIsLatinExtendedA
+func UCSIsLatinExtendedA(code c.Int) c.Int
+
+//go:linkname UCSIsLatinExtendedB C.xmlUCSIsLatinExtendedB
+func UCSIsLatinExtendedB(code c.Int) c.Int
+
+//go:linkname UCSIsLatinExtendedAdditional C.xmlUCSIsLatinExtendedAdditional
+func UCSIsLatinExtendedAdditional(code c.Int) c.Int
+
+//go:linkname UCSIsLetterlikeSymbols C.xmlUCSIsLetterlikeSymbols
+func UCSIsLetterlikeSymbols(code c.Int) c.Int
+
+//go:linkname UCSIsLimbu C.xmlUCSIsLimbu
+func UCSIsLimbu(code c.Int) c.Int
+
+//go:linkname UCSIsLinearBIdeograms C.xmlUCSIsLinearBIdeograms
+func UCSIsLinearBIdeograms(code c.Int) c.Int
+
+//go:linkname UCSIsLinearBSyllabary C.xmlUCSIsLinearBSyllabary
+func UCSIsLinearBSyllabary(code c.Int) c.Int
+
+//go:linkname UCSIsLowSurrogates C.xmlUCSIsLowSurrogates
+func UCSIsLowSurrogates(code c.Int) c.Int
+
+//go:linkname UCSIsMalayalam C.xmlUCSIsMalayalam
+func UCSIsMalayalam(code c.Int) c.Int
+
+//go:linkname UCSIsMathematicalAlphanumericSymbols C.xmlUCSIsMathematicalAlphanumericSymbols
+func UCSIsMathematicalAlphanumericSymbols(code c.Int) c.Int
+
+//go:linkname UCSIsMathematicalOperators C.xmlUCSIsMathematicalOperators
+func UCSIsMathematicalOperators(code c.Int) c.Int
+
+//go:linkname UCSIsMiscellaneousMathematicalSymbolsA C.xmlUCSIsMiscellaneousMathematicalSymbolsA
+func UCSIsMiscellaneousMathematicalSymbolsA(code c.Int) c.Int
+
+//go:linkname UCSIsMiscellaneousMathematicalSymbolsB C.xmlUCSIsMiscellaneousMathematicalSymbolsB
+func UCSIsMiscellaneousMathematicalSymbolsB(code c.Int) c.Int
+
+//go:linkname UCSIsMiscellaneousSymbols C.xmlUCSIsMiscellaneousSymbols
+func UCSIsMiscellaneousSymbols(code c.Int) c.Int
+
+//go:linkname UCSIsMiscellaneousSymbolsandArrows C.xmlUCSIsMiscellaneousSymbolsandArrows
+func UCSIsMiscellaneousSymbolsandArrows(code c.Int) c.Int
+
+//go:linkname UCSIsMiscellaneousTechnical C.xmlUCSIsMiscellaneousTechnical
+func UCSIsMiscellaneousTechnical(code c.Int) c.Int
+
+//go:linkname UCSIsMongolian C.xmlUCSIsMongolian
+func UCSIsMongolian(code c.Int) c.Int
+
+//go:linkname UCSIsMusicalSymbols C.xmlUCSIsMusicalSymbols
+func UCSIsMusicalSymbols(code c.Int) c.Int
+
+//go:linkname UCSIsMyanmar C.xmlUCSIsMyanmar
+func UCSIsMyanmar(code c.Int) c.Int
+
+//go:linkname UCSIsNumberForms C.xmlUCSIsNumberForms
+func UCSIsNumberForms(code c.Int) c.Int
+
+//go:linkname UCSIsOgham C.xmlUCSIsOgham
+func UCSIsOgham(code c.Int) c.Int
+
+//go:linkname UCSIsOldItalic C.xmlUCSIsOldItalic
+func UCSIsOldItalic(code c.Int) c.Int
+
+//go:linkname UCSIsOpticalCharacterRecognition C.xmlUCSIsOpticalCharacterRecognition
+func UCSIsOpticalCharacterRecognition(code c.Int) c.Int
+
+//go:linkname UCSIsOriya C.xmlUCSIsOriya
+func UCSIsOriya(code c.Int) c.Int
+
+//go:linkname UCSIsOsmanya C.xmlUCSIsOsmanya
+func UCSIsOsmanya(code c.Int) c.Int
+
+//go:linkname UCSIsPhoneticExtensions C.xmlUCSIsPhoneticExtensions
+func UCSIsPhoneticExtensions(code c.Int) c.Int
+
+//go:linkname UCSIsPrivateUse C.xmlUCSIsPrivateUse
+func UCSIsPrivateUse(code c.Int) c.Int
+
+//go:linkname UCSIsPrivateUseArea C.xmlUCSIsPrivateUseArea
+func UCSIsPrivateUseArea(code c.Int) c.Int
+
+//go:linkname UCSIsRunic C.xmlUCSIsRunic
+func UCSIsRunic(code c.Int) c.Int
+
+//go:linkname UCSIsShavian C.xmlUCSIsShavian
+func UCSIsShavian(code c.Int) c.Int
+
+//go:linkname UCSIsSinhala C.xmlUCSIsSinhala
+func UCSIsSinhala(code c.Int) c.Int
+
+//go:linkname UCSIsSmallFormVariants C.xmlUCSIsSmallFormVariants
+func UCSIsSmallFormVariants(code c.Int) c.Int
+
+//go:linkname UCSIsSpacingModifierLetters C.xmlUCSIsSpacingModifierLetters
+func UCSIsSpacingModifierLetters(code c.Int) c.Int
+
+//go:linkname UCSIsSpecials C.xmlUCSIsSpecials
+func UCSIsSpecials(code c.Int) c.Int
+
+//go:linkname UCSIsSuperscriptsandSubscripts C.xmlUCSIsSuperscriptsandSubscripts
+func UCSIsSuperscriptsandSubscripts(code c.Int) c.Int
+
+//go:linkname UCSIsSupplementalArrowsA C.xmlUCSIsSupplementalArrowsA
+func UCSIsSupplementalArrowsA(code c.Int) c.Int
+
+//go:linkname UCSIsSupplementalArrowsB C.xmlUCSIsSupplementalArrowsB
+func UCSIsSupplementalArrowsB(code c.Int) c.Int
+
+//go:linkname UCSIsSupplementalMathematicalOperators C.xmlUCSIsSupplementalMathematicalOperators
+func UCSIsSupplementalMathematicalOperators(code c.Int) c.Int
+
+//go:linkname UCSIsSupplementaryPrivateUseAreaA C.xmlUCSIsSupplementaryPrivateUseAreaA
+func UCSIsSupplementaryPrivateUseAreaA(code c.Int) c.Int
+
+//go:linkname UCSIsSupplementaryPrivateUseAreaB C.xmlUCSIsSupplementaryPrivateUseAreaB
+func UCSIsSupplementaryPrivateUseAreaB(code c.Int) c.Int
+
+//go:linkname UCSIsSyriac C.xmlUCSIsSyriac
+func UCSIsSyriac(code c.Int) c.Int
+
+//go:linkname UCSIsTagalog C.xmlUCSIsTagalog
+func UCSIsTagalog(code c.Int) c.Int
+
+//go:linkname UCSIsTagbanwa C.xmlUCSIsTagbanwa
+func UCSIsTagbanwa(code c.Int) c.Int
+
+//go:linkname UCSIsTags C.xmlUCSIsTags
+func UCSIsTags(code c.Int) c.Int
+
+//go:linkname UCSIsTaiLe C.xmlUCSIsTaiLe
+func UCSIsTaiLe(code c.Int) c.Int
+
+//go:linkname UCSIsTaiXuanJingSymbols C.xmlUCSIsTaiXuanJingSymbols
+func UCSIsTaiXuanJingSymbols(code c.Int) c.Int
+
+//go:linkname UCSIsTamil C.xmlUCSIsTamil
+func UCSIsTamil(code c.Int) c.Int
+
+//go:linkname UCSIsTelugu C.xmlUCSIsTelugu
+func UCSIsTelugu(code c.Int) c.Int
+
+//go:linkname UCSIsThaana C.xmlUCSIsThaana
+func UCSIsThaana(code c.Int) c.Int
+
+//go:linkname UCSIsThai C.xmlUCSIsThai
+func UCSIsThai(code c.Int) c.Int
+
+//go:linkname UCSIsTibetan C.xmlUCSIsTibetan
+func UCSIsTibetan(code c.Int) c.Int
+
+//go:linkname UCSIsUgaritic C.xmlUCSIsUgaritic
+func UCSIsUgaritic(code c.Int) c.Int
+
+//go:linkname UCSIsUnifiedCanadianAboriginalSyllabics C.xmlUCSIsUnifiedCanadianAboriginalSyllabics
+func UCSIsUnifiedCanadianAboriginalSyllabics(code c.Int) c.Int
+
+//go:linkname UCSIsVariationSelectors C.xmlUCSIsVariationSelectors
+func UCSIsVariationSelectors(code c.Int) c.Int
+
+//go:linkname UCSIsVariationSelectorsSupplement C.xmlUCSIsVariationSelectorsSupplement
+func UCSIsVariationSelectorsSupplement(code c.Int) c.Int
+
+//go:linkname UCSIsYiRadicals C.xmlUCSIsYiRadicals
+func UCSIsYiRadicals(code c.Int) c.Int
+
+//go:linkname UCSIsYiSyllables C.xmlUCSIsYiSyllables
+func UCSIsYiSyllables(code c.Int) c.Int
+
+//go:linkname UCSIsYijingHexagramSymbols C.xmlUCSIsYijingHexagramSymbols
+func UCSIsYijingHexagramSymbols(code c.Int) c.Int
+
+//go:linkname UCSIsBlock C.xmlUCSIsBlock
+func UCSIsBlock(code c.Int, block *c.Char) c.Int
+
+//go:linkname UCSIsCatC C.xmlUCSIsCatC
+func UCSIsCatC(code c.Int) c.Int
+
+//go:linkname UCSIsCatCc C.xmlUCSIsCatCc
+func UCSIsCatCc(code c.Int) c.Int
+
+//go:linkname UCSIsCatCf C.xmlUCSIsCatCf
+func UCSIsCatCf(code c.Int) c.Int
+
+//go:linkname UCSIsCatCo C.xmlUCSIsCatCo
+func UCSIsCatCo(code c.Int) c.Int
+
+//go:linkname UCSIsCatCs C.xmlUCSIsCatCs
+func UCSIsCatCs(code c.Int) c.Int
+
+//go:linkname UCSIsCatL C.xmlUCSIsCatL
+func UCSIsCatL(code c.Int) c.Int
+
+//go:linkname UCSIsCatLl C.xmlUCSIsCatLl
+func UCSIsCatLl(code c.Int) c.Int
+
+//go:linkname UCSIsCatLm C.xmlUCSIsCatLm
+func UCSIsCatLm(code c.Int) c.Int
+
+//go:linkname UCSIsCatLo C.xmlUCSIsCatLo
+func UCSIsCatLo(code c.Int) c.Int
+
+//go:linkname UCSIsCatLt C.xmlUCSIsCatLt
+func UCSIsCatLt(code c.Int) c.Int
+
+//go:linkname UCSIsCatLu C.xmlUCSIsCatLu
+func UCSIsCatLu(code c.Int) c.Int
+
+//go:linkname UCSIsCatM C.xmlUCSIsCatM
+func UCSIsCatM(code c.Int) c.Int
+
+//go:linkname UCSIsCatMc C.xmlUCSIsCatMc
+func UCSIsCatMc(code c.Int) c.Int
+
+//go:linkname UCSIsCatMe C.xmlUCSIsCatMe
+func UCSIsCatMe(code c.Int) c.Int
+
+//go:linkname UCSIsCatMn C.xmlUCSIsCatMn
+func UCSIsCatMn(code c.Int) c.Int
+
+//go:linkname UCSIsCatN C.xmlUCSIsCatN
+func UCSIsCatN(code c.Int) c.Int
+
+//go:linkname UCSIsCatNd C.xmlUCSIsCatNd
+func UCSIsCatNd(code c.Int) c.Int
+
+//go:linkname UCSIsCatNl C.xmlUCSIsCatNl
+func UCSIsCatNl(code c.Int) c.Int
+
+//go:linkname UCSIsCatNo C.xmlUCSIsCatNo
+func UCSIsCatNo(code c.Int) c.Int
+
+//go:linkname UCSIsCatP C.xmlUCSIsCatP
+func UCSIsCatP(code c.Int) c.Int
+
+//go:linkname UCSIsCatPc C.xmlUCSIsCatPc
+func UCSIsCatPc(code c.Int) c.Int
+
+//go:linkname UCSIsCatPd C.xmlUCSIsCatPd
+func UCSIsCatPd(code c.Int) c.Int
+
+//go:linkname UCSIsCatPe C.xmlUCSIsCatPe
+func UCSIsCatPe(code c.Int) c.Int
+
+//go:linkname UCSIsCatPf C.xmlUCSIsCatPf
+func UCSIsCatPf(code c.Int) c.Int
+
+//go:linkname UCSIsCatPi C.xmlUCSIsCatPi
+func UCSIsCatPi(code c.Int) c.Int
+
+//go:linkname UCSIsCatPo C.xmlUCSIsCatPo
+func UCSIsCatPo(code c.Int) c.Int
+
+//go:linkname UCSIsCatPs C.xmlUCSIsCatPs
+func UCSIsCatPs(code c.Int) c.Int
+
+//go:linkname UCSIsCatS C.xmlUCSIsCatS
+func UCSIsCatS(code c.Int) c.Int
+
+//go:linkname UCSIsCatSc C.xmlUCSIsCatSc
+func UCSIsCatSc(code c.Int) c.Int
+
+//go:linkname UCSIsCatSk C.xmlUCSIsCatSk
+func UCSIsCatSk(code c.Int) c.Int
+
+//go:linkname UCSIsCatSm C.xmlUCSIsCatSm
+func UCSIsCatSm(code c.Int) c.Int
+
+//go:linkname UCSIsCatSo C.xmlUCSIsCatSo
+func UCSIsCatSo(code c.Int) c.Int
+
+//go:linkname UCSIsCatZ C.xmlUCSIsCatZ
+func UCSIsCatZ(code c.Int) c.Int
+
+//go:linkname UCSIsCatZl C.xmlUCSIsCatZl
+func UCSIsCatZl(code c.Int) c.Int
+
+//go:linkname UCSIsCatZp C.xmlUCSIsCatZp
+func UCSIsCatZp(code c.Int) c.Int
+
+//go:linkname UCSIsCatZs C.xmlUCSIsCatZs
+func UCSIsCatZs(code c.Int) c.Int
+
+//go:linkname UCSIsCat C.xmlUCSIsCat
+func UCSIsCat(code c.Int, cat *c.Char) c.Int
diff --git a/libxml2/xmlversion.go b/libxml2/xmlversion.go
new file mode 100644
index 0000000..d2b4704
--- /dev/null
+++ b/libxml2/xmlversion.go
@@ -0,0 +1,9 @@
+package libxml2
+
+import _ "unsafe"
+
+const DOTTED_VERSION = "2.13.6"
+const VERSION = 21306
+const VERSION_STRING = "21306"
+const VERSION_EXTRA = ""
+const MODULE_EXTENSION = ".so"
diff --git a/libxml2/xmlwriter.go b/libxml2/xmlwriter.go
new file mode 100644
index 0000000..b9142c9
--- /dev/null
+++ b/libxml2/xmlwriter.go
@@ -0,0 +1,324 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+type X_xmlTextWriter struct {
+ Unused [8]uint8
+}
+type TextWriter X_xmlTextWriter
+type TextWriterPtr *TextWriter
+
+/*
+ * Constructors & Destructor
+ */
+//go:linkname NewTextWriter C.xmlNewTextWriter
+func NewTextWriter(out OutputBufferPtr) TextWriterPtr
+
+//go:linkname NewTextWriterFilename C.xmlNewTextWriterFilename
+func NewTextWriterFilename(uri *c.Char, compression c.Int) TextWriterPtr
+
+//go:linkname NewTextWriterMemory C.xmlNewTextWriterMemory
+func NewTextWriterMemory(buf BufferPtr, compression c.Int) TextWriterPtr
+
+//go:linkname NewTextWriterPushParser C.xmlNewTextWriterPushParser
+func NewTextWriterPushParser(ctxt ParserCtxtPtr, compression c.Int) TextWriterPtr
+
+//go:linkname NewTextWriterDoc C.xmlNewTextWriterDoc
+func NewTextWriterDoc(doc *DocPtr, compression c.Int) TextWriterPtr
+
+//go:linkname NewTextWriterTree C.xmlNewTextWriterTree
+func NewTextWriterTree(doc DocPtr, node NodePtr, compression c.Int) TextWriterPtr
+
+//go:linkname FreeTextWriter C.xmlFreeTextWriter
+func FreeTextWriter(writer TextWriterPtr)
+
+/*
+ * Document
+ */
+//go:linkname TextWriterStartDocument C.xmlTextWriterStartDocument
+func TextWriterStartDocument(writer TextWriterPtr, version *c.Char, encoding *c.Char, standalone *c.Char) c.Int
+
+//go:linkname TextWriterEndDocument C.xmlTextWriterEndDocument
+func TextWriterEndDocument(writer TextWriterPtr) c.Int
+
+/*
+ * Comments
+ */
+//go:linkname TextWriterStartComment C.xmlTextWriterStartComment
+func TextWriterStartComment(writer TextWriterPtr) c.Int
+
+//go:linkname TextWriterEndComment C.xmlTextWriterEndComment
+func TextWriterEndComment(writer TextWriterPtr) c.Int
+
+//go:linkname TextWriterWriteFormatComment C.xmlTextWriterWriteFormatComment
+func TextWriterWriteFormatComment(writer TextWriterPtr, format *c.Char, __llgo_va_list ...interface{}) c.Int
+
+//go:linkname TextWriterWriteVFormatComment C.xmlTextWriterWriteVFormatComment
+func TextWriterWriteVFormatComment(writer TextWriterPtr, format *c.Char, argptr c.VaList) c.Int
+
+//go:linkname TextWriterWriteComment C.xmlTextWriterWriteComment
+func TextWriterWriteComment(writer TextWriterPtr, content *Char) c.Int
+
+/*
+ * Elements
+ */
+//go:linkname TextWriterStartElement C.xmlTextWriterStartElement
+func TextWriterStartElement(writer TextWriterPtr, name *Char) c.Int
+
+//go:linkname TextWriterStartElementNS C.xmlTextWriterStartElementNS
+func TextWriterStartElementNS(writer TextWriterPtr, prefix *Char, name *Char, namespaceURI *Char) c.Int
+
+//go:linkname TextWriterEndElement C.xmlTextWriterEndElement
+func TextWriterEndElement(writer TextWriterPtr) c.Int
+
+//go:linkname TextWriterFullEndElement C.xmlTextWriterFullEndElement
+func TextWriterFullEndElement(writer TextWriterPtr) c.Int
+
+/*
+ * Elements conveniency functions
+ */
+//go:linkname TextWriterWriteFormatElement C.xmlTextWriterWriteFormatElement
+func TextWriterWriteFormatElement(writer TextWriterPtr, name *Char, format *c.Char, __llgo_va_list ...interface{}) c.Int
+
+//go:linkname TextWriterWriteVFormatElement C.xmlTextWriterWriteVFormatElement
+func TextWriterWriteVFormatElement(writer TextWriterPtr, name *Char, format *c.Char, argptr c.VaList) c.Int
+
+//go:linkname TextWriterWriteElement C.xmlTextWriterWriteElement
+func TextWriterWriteElement(writer TextWriterPtr, name *Char, content *Char) c.Int
+
+//go:linkname TextWriterWriteFormatElementNS C.xmlTextWriterWriteFormatElementNS
+func TextWriterWriteFormatElementNS(writer TextWriterPtr, prefix *Char, name *Char, namespaceURI *Char, format *c.Char, __llgo_va_list ...interface{}) c.Int
+
+//go:linkname TextWriterWriteVFormatElementNS C.xmlTextWriterWriteVFormatElementNS
+func TextWriterWriteVFormatElementNS(writer TextWriterPtr, prefix *Char, name *Char, namespaceURI *Char, format *c.Char, argptr c.VaList) c.Int
+
+//go:linkname TextWriterWriteElementNS C.xmlTextWriterWriteElementNS
+func TextWriterWriteElementNS(writer TextWriterPtr, prefix *Char, name *Char, namespaceURI *Char, content *Char) c.Int
+
+/*
+ * Text
+ */
+//go:linkname TextWriterWriteFormatRaw C.xmlTextWriterWriteFormatRaw
+func TextWriterWriteFormatRaw(writer TextWriterPtr, format *c.Char, __llgo_va_list ...interface{}) c.Int
+
+//go:linkname TextWriterWriteVFormatRaw C.xmlTextWriterWriteVFormatRaw
+func TextWriterWriteVFormatRaw(writer TextWriterPtr, format *c.Char, argptr c.VaList) c.Int
+
+//go:linkname TextWriterWriteRawLen C.xmlTextWriterWriteRawLen
+func TextWriterWriteRawLen(writer TextWriterPtr, content *Char, len c.Int) c.Int
+
+//go:linkname TextWriterWriteRaw C.xmlTextWriterWriteRaw
+func TextWriterWriteRaw(writer TextWriterPtr, content *Char) c.Int
+
+//go:linkname TextWriterWriteFormatString C.xmlTextWriterWriteFormatString
+func TextWriterWriteFormatString(writer TextWriterPtr, format *c.Char, __llgo_va_list ...interface{}) c.Int
+
+//go:linkname TextWriterWriteVFormatString C.xmlTextWriterWriteVFormatString
+func TextWriterWriteVFormatString(writer TextWriterPtr, format *c.Char, argptr c.VaList) c.Int
+
+//go:linkname TextWriterWriteString C.xmlTextWriterWriteString
+func TextWriterWriteString(writer TextWriterPtr, content *Char) c.Int
+
+//go:linkname TextWriterWriteBase64 C.xmlTextWriterWriteBase64
+func TextWriterWriteBase64(writer TextWriterPtr, data *c.Char, start c.Int, len c.Int) c.Int
+
+//go:linkname TextWriterWriteBinHex C.xmlTextWriterWriteBinHex
+func TextWriterWriteBinHex(writer TextWriterPtr, data *c.Char, start c.Int, len c.Int) c.Int
+
+/*
+ * Attributes
+ */
+//go:linkname TextWriterStartAttribute C.xmlTextWriterStartAttribute
+func TextWriterStartAttribute(writer TextWriterPtr, name *Char) c.Int
+
+//go:linkname TextWriterStartAttributeNS C.xmlTextWriterStartAttributeNS
+func TextWriterStartAttributeNS(writer TextWriterPtr, prefix *Char, name *Char, namespaceURI *Char) c.Int
+
+//go:linkname TextWriterEndAttribute C.xmlTextWriterEndAttribute
+func TextWriterEndAttribute(writer TextWriterPtr) c.Int
+
+/*
+ * Attributes conveniency functions
+ */
+//go:linkname TextWriterWriteFormatAttribute C.xmlTextWriterWriteFormatAttribute
+func TextWriterWriteFormatAttribute(writer TextWriterPtr, name *Char, format *c.Char, __llgo_va_list ...interface{}) c.Int
+
+//go:linkname TextWriterWriteVFormatAttribute C.xmlTextWriterWriteVFormatAttribute
+func TextWriterWriteVFormatAttribute(writer TextWriterPtr, name *Char, format *c.Char, argptr c.VaList) c.Int
+
+//go:linkname TextWriterWriteAttribute C.xmlTextWriterWriteAttribute
+func TextWriterWriteAttribute(writer TextWriterPtr, name *Char, content *Char) c.Int
+
+//go:linkname TextWriterWriteFormatAttributeNS C.xmlTextWriterWriteFormatAttributeNS
+func TextWriterWriteFormatAttributeNS(writer TextWriterPtr, prefix *Char, name *Char, namespaceURI *Char, format *c.Char, __llgo_va_list ...interface{}) c.Int
+
+//go:linkname TextWriterWriteVFormatAttributeNS C.xmlTextWriterWriteVFormatAttributeNS
+func TextWriterWriteVFormatAttributeNS(writer TextWriterPtr, prefix *Char, name *Char, namespaceURI *Char, format *c.Char, argptr c.VaList) c.Int
+
+//go:linkname TextWriterWriteAttributeNS C.xmlTextWriterWriteAttributeNS
+func TextWriterWriteAttributeNS(writer TextWriterPtr, prefix *Char, name *Char, namespaceURI *Char, content *Char) c.Int
+
+/*
+ * PI's
+ */
+//go:linkname TextWriterStartPI C.xmlTextWriterStartPI
+func TextWriterStartPI(writer TextWriterPtr, target *Char) c.Int
+
+//go:linkname TextWriterEndPI C.xmlTextWriterEndPI
+func TextWriterEndPI(writer TextWriterPtr) c.Int
+
+/*
+ * PI conveniency functions
+ */
+//go:linkname TextWriterWriteFormatPI C.xmlTextWriterWriteFormatPI
+func TextWriterWriteFormatPI(writer TextWriterPtr, target *Char, format *c.Char, __llgo_va_list ...interface{}) c.Int
+
+//go:linkname TextWriterWriteVFormatPI C.xmlTextWriterWriteVFormatPI
+func TextWriterWriteVFormatPI(writer TextWriterPtr, target *Char, format *c.Char, argptr c.VaList) c.Int
+
+//go:linkname TextWriterWritePI C.xmlTextWriterWritePI
+func TextWriterWritePI(writer TextWriterPtr, target *Char, content *Char) c.Int
+
+/*
+ * CDATA
+ */
+//go:linkname TextWriterStartCDATA C.xmlTextWriterStartCDATA
+func TextWriterStartCDATA(writer TextWriterPtr) c.Int
+
+//go:linkname TextWriterEndCDATA C.xmlTextWriterEndCDATA
+func TextWriterEndCDATA(writer TextWriterPtr) c.Int
+
+/*
+ * CDATA conveniency functions
+ */
+//go:linkname TextWriterWriteFormatCDATA C.xmlTextWriterWriteFormatCDATA
+func TextWriterWriteFormatCDATA(writer TextWriterPtr, format *c.Char, __llgo_va_list ...interface{}) c.Int
+
+//go:linkname TextWriterWriteVFormatCDATA C.xmlTextWriterWriteVFormatCDATA
+func TextWriterWriteVFormatCDATA(writer TextWriterPtr, format *c.Char, argptr c.VaList) c.Int
+
+//go:linkname TextWriterWriteCDATA C.xmlTextWriterWriteCDATA
+func TextWriterWriteCDATA(writer TextWriterPtr, content *Char) c.Int
+
+/*
+ * DTD
+ */
+//go:linkname TextWriterStartDTD C.xmlTextWriterStartDTD
+func TextWriterStartDTD(writer TextWriterPtr, name *Char, pubid *Char, sysid *Char) c.Int
+
+//go:linkname TextWriterEndDTD C.xmlTextWriterEndDTD
+func TextWriterEndDTD(writer TextWriterPtr) c.Int
+
+/*
+ * DTD conveniency functions
+ */
+//go:linkname TextWriterWriteFormatDTD C.xmlTextWriterWriteFormatDTD
+func TextWriterWriteFormatDTD(writer TextWriterPtr, name *Char, pubid *Char, sysid *Char, format *c.Char, __llgo_va_list ...interface{}) c.Int
+
+//go:linkname TextWriterWriteVFormatDTD C.xmlTextWriterWriteVFormatDTD
+func TextWriterWriteVFormatDTD(writer TextWriterPtr, name *Char, pubid *Char, sysid *Char, format *c.Char, argptr c.VaList) c.Int
+
+//go:linkname TextWriterWriteDTD C.xmlTextWriterWriteDTD
+func TextWriterWriteDTD(writer TextWriterPtr, name *Char, pubid *Char, sysid *Char, subset *Char) c.Int
+
+/*
+ * DTD element definition
+ */
+//go:linkname TextWriterStartDTDElement C.xmlTextWriterStartDTDElement
+func TextWriterStartDTDElement(writer TextWriterPtr, name *Char) c.Int
+
+//go:linkname TextWriterEndDTDElement C.xmlTextWriterEndDTDElement
+func TextWriterEndDTDElement(writer TextWriterPtr) c.Int
+
+/*
+ * DTD element definition conveniency functions
+ */
+//go:linkname TextWriterWriteFormatDTDElement C.xmlTextWriterWriteFormatDTDElement
+func TextWriterWriteFormatDTDElement(writer TextWriterPtr, name *Char, format *c.Char, __llgo_va_list ...interface{}) c.Int
+
+//go:linkname TextWriterWriteVFormatDTDElement C.xmlTextWriterWriteVFormatDTDElement
+func TextWriterWriteVFormatDTDElement(writer TextWriterPtr, name *Char, format *c.Char, argptr c.VaList) c.Int
+
+//go:linkname TextWriterWriteDTDElement C.xmlTextWriterWriteDTDElement
+func TextWriterWriteDTDElement(writer TextWriterPtr, name *Char, content *Char) c.Int
+
+/*
+ * DTD attribute list definition
+ */
+//go:linkname TextWriterStartDTDAttlist C.xmlTextWriterStartDTDAttlist
+func TextWriterStartDTDAttlist(writer TextWriterPtr, name *Char) c.Int
+
+//go:linkname TextWriterEndDTDAttlist C.xmlTextWriterEndDTDAttlist
+func TextWriterEndDTDAttlist(writer TextWriterPtr) c.Int
+
+/*
+ * DTD attribute list definition conveniency functions
+ */
+//go:linkname TextWriterWriteFormatDTDAttlist C.xmlTextWriterWriteFormatDTDAttlist
+func TextWriterWriteFormatDTDAttlist(writer TextWriterPtr, name *Char, format *c.Char, __llgo_va_list ...interface{}) c.Int
+
+//go:linkname TextWriterWriteVFormatDTDAttlist C.xmlTextWriterWriteVFormatDTDAttlist
+func TextWriterWriteVFormatDTDAttlist(writer TextWriterPtr, name *Char, format *c.Char, argptr c.VaList) c.Int
+
+//go:linkname TextWriterWriteDTDAttlist C.xmlTextWriterWriteDTDAttlist
+func TextWriterWriteDTDAttlist(writer TextWriterPtr, name *Char, content *Char) c.Int
+
+/*
+ * DTD entity definition
+ */
+//go:linkname TextWriterStartDTDEntity C.xmlTextWriterStartDTDEntity
+func TextWriterStartDTDEntity(writer TextWriterPtr, pe c.Int, name *Char) c.Int
+
+//go:linkname TextWriterEndDTDEntity C.xmlTextWriterEndDTDEntity
+func TextWriterEndDTDEntity(writer TextWriterPtr) c.Int
+
+/*
+ * DTD entity definition conveniency functions
+ */
+//go:linkname TextWriterWriteFormatDTDInternalEntity C.xmlTextWriterWriteFormatDTDInternalEntity
+func TextWriterWriteFormatDTDInternalEntity(writer TextWriterPtr, pe c.Int, name *Char, format *c.Char, __llgo_va_list ...interface{}) c.Int
+
+//go:linkname TextWriterWriteVFormatDTDInternalEntity C.xmlTextWriterWriteVFormatDTDInternalEntity
+func TextWriterWriteVFormatDTDInternalEntity(writer TextWriterPtr, pe c.Int, name *Char, format *c.Char, argptr c.VaList) c.Int
+
+//go:linkname TextWriterWriteDTDInternalEntity C.xmlTextWriterWriteDTDInternalEntity
+func TextWriterWriteDTDInternalEntity(writer TextWriterPtr, pe c.Int, name *Char, content *Char) c.Int
+
+//go:linkname TextWriterWriteDTDExternalEntity C.xmlTextWriterWriteDTDExternalEntity
+func TextWriterWriteDTDExternalEntity(writer TextWriterPtr, pe c.Int, name *Char, pubid *Char, sysid *Char, ndataid *Char) c.Int
+
+//go:linkname TextWriterWriteDTDExternalEntityContents C.xmlTextWriterWriteDTDExternalEntityContents
+func TextWriterWriteDTDExternalEntityContents(writer TextWriterPtr, pubid *Char, sysid *Char, ndataid *Char) c.Int
+
+//go:linkname TextWriterWriteDTDEntity C.xmlTextWriterWriteDTDEntity
+func TextWriterWriteDTDEntity(writer TextWriterPtr, pe c.Int, name *Char, pubid *Char, sysid *Char, ndataid *Char, content *Char) c.Int
+
+/*
+ * DTD notation definition
+ */
+//go:linkname TextWriterWriteDTDNotation C.xmlTextWriterWriteDTDNotation
+func TextWriterWriteDTDNotation(writer TextWriterPtr, name *Char, pubid *Char, sysid *Char) c.Int
+
+/*
+ * Indentation
+ */
+//go:linkname TextWriterSetIndent C.xmlTextWriterSetIndent
+func TextWriterSetIndent(writer TextWriterPtr, indent c.Int) c.Int
+
+//go:linkname TextWriterSetIndentString C.xmlTextWriterSetIndentString
+func TextWriterSetIndentString(writer TextWriterPtr, str *Char) c.Int
+
+//go:linkname TextWriterSetQuoteChar C.xmlTextWriterSetQuoteChar
+func TextWriterSetQuoteChar(writer TextWriterPtr, quotechar Char) c.Int
+
+/*
+ * misc
+ */
+//go:linkname TextWriterFlush C.xmlTextWriterFlush
+func TextWriterFlush(writer TextWriterPtr) c.Int
+
+//go:linkname TextWriterClose C.xmlTextWriterClose
+func TextWriterClose(writer TextWriterPtr) c.Int
diff --git a/libxml2/xpath.go b/libxml2/xpath.go
new file mode 100644
index 0000000..37430ff
--- /dev/null
+++ b/libxml2/xpath.go
@@ -0,0 +1,335 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+const XPATH_POINT = 5
+const XPATH_RANGE = 6
+const XPATH_LOCATIONSET = 7
+
+type X_xmlXPathContext struct {
+ Doc DocPtr
+ Node NodePtr
+ NbVariablesUnused c.Int
+ MaxVariablesUnused c.Int
+ VarHash HashTablePtr
+ NbTypes c.Int
+ MaxTypes c.Int
+ Types XPathTypePtr
+ NbFuncsUnused c.Int
+ MaxFuncsUnused c.Int
+ FuncHash HashTablePtr
+ NbAxis c.Int
+ MaxAxis c.Int
+ Axis XPathAxisPtr
+ Namespaces *NsPtr
+ NsNr c.Int
+ User c.Pointer
+ ContextSize c.Int
+ ProximityPosition c.Int
+ Xptr c.Int
+ Here NodePtr
+ Origin NodePtr
+ NsHash HashTablePtr
+ VarLookupFunc XPathVariableLookupFunc
+ VarLookupData c.Pointer
+ Extra c.Pointer
+ Function *Char
+ FunctionURI *Char
+ FuncLookupFunc XPathFuncLookupFunc
+ FuncLookupData c.Pointer
+ TmpNsList *NsPtr
+ TmpNsNr c.Int
+ UserData c.Pointer
+ Error StructuredErrorFunc
+ LastError Error
+ DebugNode NodePtr
+ Dict DictPtr
+ Flags c.Int
+ Cache c.Pointer
+ OpLimit c.Ulong
+ OpCount c.Ulong
+ Depth c.Int
+}
+type XPathContext X_xmlXPathContext
+type XPathContextPtr *XPathContext
+
+type X_xmlXPathParserContext struct {
+ Cur *Char
+ Base *Char
+ Error c.Int
+ Context XPathContextPtr
+ Value XPathObjectPtr
+ ValueNr c.Int
+ ValueMax c.Int
+ ValueTab *XPathObjectPtr
+ Comp XPathCompExprPtr
+ Xptr c.Int
+ Ancestor NodePtr
+ ValueFrame c.Int
+}
+type XPathParserContext X_xmlXPathParserContext
+type XPathParserContextPtr *XPathParserContext
+type XPathError c.Int
+
+const (
+ XPATH_EXPRESSION_OK__1 XPathError = 0
+ XPATH_NUMBER_ERROR__1 XPathError = 1
+ XPATH_UNFINISHED_LITERAL_ERROR__1 XPathError = 2
+ XPATH_START_LITERAL_ERROR__1 XPathError = 3
+ XPATH_VARIABLE_REF_ERROR__1 XPathError = 4
+ XPATH_UNDEF_VARIABLE_ERROR__1 XPathError = 5
+ XPATH_INVALID_PREDICATE_ERROR__1 XPathError = 6
+ XPATH_EXPR_ERROR__1 XPathError = 7
+ XPATH_UNCLOSED_ERROR__1 XPathError = 8
+ XPATH_UNKNOWN_FUNC_ERROR__1 XPathError = 9
+ XPATH_INVALID_OPERAND__1 XPathError = 10
+ XPATH_INVALID_TYPE__1 XPathError = 11
+ XPATH_INVALID_ARITY__1 XPathError = 12
+ XPATH_INVALID_CTXT_SIZE__1 XPathError = 13
+ XPATH_INVALID_CTXT_POSITION__1 XPathError = 14
+ XPATH_MEMORY_ERROR__1 XPathError = 15
+ XPTR_SYNTAX_ERROR__1 XPathError = 16
+ XPTR_RESOURCE_ERROR__1 XPathError = 17
+ XPTR_SUB_RESOURCE_ERROR__1 XPathError = 18
+ XPATH_UNDEF_PREFIX_ERROR__1 XPathError = 19
+ XPATH_ENCODING_ERROR__1 XPathError = 20
+ XPATH_INVALID_CHAR_ERROR__1 XPathError = 21
+ XPATH_INVALID_CTXT XPathError = 22
+ XPATH_STACK_ERROR XPathError = 23
+ XPATH_FORBID_VARIABLE_ERROR XPathError = 24
+ XPATH_OP_LIMIT_EXCEEDED XPathError = 25
+ XPATH_RECURSION_LIMIT_EXCEEDED XPathError = 26
+)
+
+type X_xmlNodeSet struct {
+ NodeNr c.Int
+ NodeMax c.Int
+ NodeTab *NodePtr
+}
+type NodeSet X_xmlNodeSet
+type NodeSetPtr *NodeSet
+type XPathObjectType c.Int
+
+const (
+ XPATH_UNDEFINED XPathObjectType = 0
+ XPATH_NODESET XPathObjectType = 1
+ XPATH_BOOLEAN XPathObjectType = 2
+ XPATH_NUMBER XPathObjectType = 3
+ XPATH_STRING XPathObjectType = 4
+ XPATH_USERS XPathObjectType = 8
+ XPATH_XSLT_TREE XPathObjectType = 9
+)
+
+type X_xmlXPathObject struct {
+ Type XPathObjectType
+ Nodesetval NodeSetPtr
+ Boolval c.Int
+ Floatval c.Double
+ Stringval *Char
+ User c.Pointer
+ Index c.Int
+ User2 c.Pointer
+ Index2 c.Int
+}
+type XPathObject X_xmlXPathObject
+type XPathObjectPtr *XPathObject
+
+// llgo:type C
+type XPathConvertFunc func(XPathObjectPtr, c.Int) c.Int
+
+type X_xmlXPathType struct {
+ Name *Char
+ Func XPathConvertFunc
+}
+type XPathType X_xmlXPathType
+type XPathTypePtr *XPathType
+
+type X_xmlXPathVariable struct {
+ Name *Char
+ Value XPathObjectPtr
+}
+type XPathVariable X_xmlXPathVariable
+type XPathVariablePtr *XPathVariable
+
+// llgo:type C
+type XPathEvalFunc func(XPathParserContextPtr, c.Int)
+
+type X_xmlXPathFunct struct {
+ Name *Char
+ Func XPathEvalFunc
+}
+type XPathFunct X_xmlXPathFunct
+type XPathFuncPtr *XPathFunct
+
+// llgo:type C
+type XPathAxisFunc func(XPathParserContextPtr, XPathObjectPtr) XPathObjectPtr
+
+type X_xmlXPathAxis struct {
+ Name *Char
+ Func XPathAxisFunc
+}
+type XPathAxis X_xmlXPathAxis
+type XPathAxisPtr *XPathAxis
+
+// llgo:type C
+type XPathFunction func(XPathParserContextPtr, c.Int)
+
+// llgo:type C
+type XPathVariableLookupFunc func(c.Pointer, *Char, *Char) XPathObjectPtr
+
+// llgo:type C
+type XPathFuncLookupFunc func(c.Pointer, *Char, *Char) XPathFunction
+
+type X_xmlXPathCompExpr struct {
+ Unused [8]uint8
+}
+type XPathCompExpr X_xmlXPathCompExpr
+type XPathCompExprPtr *XPathCompExpr
+
+//go:linkname XPathFreeObject C.xmlXPathFreeObject
+func XPathFreeObject(obj XPathObjectPtr)
+
+//go:linkname XPathNodeSetCreate C.xmlXPathNodeSetCreate
+func XPathNodeSetCreate(val NodePtr) NodeSetPtr
+
+//go:linkname XPathFreeNodeSetList C.xmlXPathFreeNodeSetList
+func XPathFreeNodeSetList(obj XPathObjectPtr)
+
+//go:linkname XPathFreeNodeSet C.xmlXPathFreeNodeSet
+func XPathFreeNodeSet(obj NodeSetPtr)
+
+//go:linkname XPathObjectCopy C.xmlXPathObjectCopy
+func XPathObjectCopy(val XPathObjectPtr) XPathObjectPtr
+
+//go:linkname XPathCmpNodes C.xmlXPathCmpNodes
+func XPathCmpNodes(node1 NodePtr, node2 NodePtr) c.Int
+
+/**
+ * Conversion functions to basic types.
+ */
+//go:linkname XPathCastNumberToBoolean C.xmlXPathCastNumberToBoolean
+func XPathCastNumberToBoolean(val c.Double) c.Int
+
+// llgo:link (*Char).XPathCastStringToBoolean C.xmlXPathCastStringToBoolean
+func (recv_ *Char) XPathCastStringToBoolean() c.Int {
+ return 0
+}
+
+//go:linkname XPathCastNodeSetToBoolean C.xmlXPathCastNodeSetToBoolean
+func XPathCastNodeSetToBoolean(ns NodeSetPtr) c.Int
+
+//go:linkname XPathCastToBoolean C.xmlXPathCastToBoolean
+func XPathCastToBoolean(val XPathObjectPtr) c.Int
+
+//go:linkname XPathCastBooleanToNumber C.xmlXPathCastBooleanToNumber
+func XPathCastBooleanToNumber(val c.Int) c.Double
+
+// llgo:link (*Char).XPathCastStringToNumber C.xmlXPathCastStringToNumber
+func (recv_ *Char) XPathCastStringToNumber() c.Double {
+ return 0
+}
+
+//go:linkname XPathCastNodeToNumber C.xmlXPathCastNodeToNumber
+func XPathCastNodeToNumber(node NodePtr) c.Double
+
+//go:linkname XPathCastNodeSetToNumber C.xmlXPathCastNodeSetToNumber
+func XPathCastNodeSetToNumber(ns NodeSetPtr) c.Double
+
+//go:linkname XPathCastToNumber C.xmlXPathCastToNumber
+func XPathCastToNumber(val XPathObjectPtr) c.Double
+
+//go:linkname XPathCastBooleanToString C.xmlXPathCastBooleanToString
+func XPathCastBooleanToString(val c.Int) *Char
+
+//go:linkname XPathCastNumberToString C.xmlXPathCastNumberToString
+func XPathCastNumberToString(val c.Double) *Char
+
+//go:linkname XPathCastNodeToString C.xmlXPathCastNodeToString
+func XPathCastNodeToString(node NodePtr) *Char
+
+//go:linkname XPathCastNodeSetToString C.xmlXPathCastNodeSetToString
+func XPathCastNodeSetToString(ns NodeSetPtr) *Char
+
+//go:linkname XPathCastToString C.xmlXPathCastToString
+func XPathCastToString(val XPathObjectPtr) *Char
+
+//go:linkname XPathConvertBoolean C.xmlXPathConvertBoolean
+func XPathConvertBoolean(val XPathObjectPtr) XPathObjectPtr
+
+//go:linkname XPathConvertNumber C.xmlXPathConvertNumber
+func XPathConvertNumber(val XPathObjectPtr) XPathObjectPtr
+
+//go:linkname XPathConvertString C.xmlXPathConvertString
+func XPathConvertString(val XPathObjectPtr) XPathObjectPtr
+
+/**
+ * Context handling.
+ */
+//go:linkname XPathNewContext C.xmlXPathNewContext
+func XPathNewContext(doc DocPtr) XPathContextPtr
+
+//go:linkname XPathFreeContext C.xmlXPathFreeContext
+func XPathFreeContext(ctxt XPathContextPtr)
+
+//go:linkname XPathSetErrorHandler C.xmlXPathSetErrorHandler
+func XPathSetErrorHandler(ctxt XPathContextPtr, handler StructuredErrorFunc, context c.Pointer)
+
+//go:linkname XPathContextSetCache C.xmlXPathContextSetCache
+func XPathContextSetCache(ctxt XPathContextPtr, active c.Int, value c.Int, options c.Int) c.Int
+
+/**
+ * Evaluation functions.
+ */
+//go:linkname XPathOrderDocElems C.xmlXPathOrderDocElems
+func XPathOrderDocElems(doc DocPtr) c.Long
+
+//go:linkname XPathSetContextNode C.xmlXPathSetContextNode
+func XPathSetContextNode(node NodePtr, ctx XPathContextPtr) c.Int
+
+//go:linkname XPathNodeEval C.xmlXPathNodeEval
+func XPathNodeEval(node NodePtr, str *Char, ctx XPathContextPtr) XPathObjectPtr
+
+// llgo:link (*Char).XPathEval C.xmlXPathEval
+func (recv_ *Char) XPathEval(ctx XPathContextPtr) XPathObjectPtr {
+ return nil
+}
+
+// llgo:link (*Char).XPathEvalExpression C.xmlXPathEvalExpression
+func (recv_ *Char) XPathEvalExpression(ctxt XPathContextPtr) XPathObjectPtr {
+ return nil
+}
+
+//go:linkname XPathEvalPredicate C.xmlXPathEvalPredicate
+func XPathEvalPredicate(ctxt XPathContextPtr, res XPathObjectPtr) c.Int
+
+/**
+ * Separate compilation/evaluation entry points.
+ */
+// llgo:link (*Char).XPathCompile C.xmlXPathCompile
+func (recv_ *Char) XPathCompile() XPathCompExprPtr {
+ return nil
+}
+
+//go:linkname XPathCtxtCompile C.xmlXPathCtxtCompile
+func XPathCtxtCompile(ctxt XPathContextPtr, str *Char) XPathCompExprPtr
+
+//go:linkname XPathCompiledEval C.xmlXPathCompiledEval
+func XPathCompiledEval(comp XPathCompExprPtr, ctx XPathContextPtr) XPathObjectPtr
+
+//go:linkname XPathCompiledEvalToBoolean C.xmlXPathCompiledEvalToBoolean
+func XPathCompiledEvalToBoolean(comp XPathCompExprPtr, ctxt XPathContextPtr) c.Int
+
+//go:linkname XPathFreeCompExpr C.xmlXPathFreeCompExpr
+func XPathFreeCompExpr(comp XPathCompExprPtr)
+
+//go:linkname XPathInit C.xmlXPathInit
+func XPathInit()
+
+//go:linkname XPathIsNaN C.xmlXPathIsNaN
+func XPathIsNaN(val c.Double) c.Int
+
+//go:linkname XPathIsInf C.xmlXPathIsInf
+func XPathIsInf(val c.Double) c.Int
diff --git a/libxml2/xpathInternals.go b/libxml2/xpathInternals.go
new file mode 100644
index 0000000..618a985
--- /dev/null
+++ b/libxml2/xpathInternals.go
@@ -0,0 +1,398 @@
+package libxml2
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+//go:linkname XPathPopBoolean C.xmlXPathPopBoolean
+func XPathPopBoolean(ctxt XPathParserContextPtr) c.Int
+
+//go:linkname XPathPopNumber C.xmlXPathPopNumber
+func XPathPopNumber(ctxt XPathParserContextPtr) c.Double
+
+//go:linkname XPathPopString C.xmlXPathPopString
+func XPathPopString(ctxt XPathParserContextPtr) *Char
+
+//go:linkname XPathPopNodeSet C.xmlXPathPopNodeSet
+func XPathPopNodeSet(ctxt XPathParserContextPtr) NodeSetPtr
+
+//go:linkname XPathPopExternal C.xmlXPathPopExternal
+func XPathPopExternal(ctxt XPathParserContextPtr) c.Pointer
+
+/*
+ * Variable Lookup forwarding.
+ */
+//go:linkname XPathRegisterVariableLookup C.xmlXPathRegisterVariableLookup
+func XPathRegisterVariableLookup(ctxt XPathContextPtr, f XPathVariableLookupFunc, data c.Pointer)
+
+/*
+ * Function Lookup forwarding.
+ */
+//go:linkname XPathRegisterFuncLookup C.xmlXPathRegisterFuncLookup
+func XPathRegisterFuncLookup(ctxt XPathContextPtr, f XPathFuncLookupFunc, funcCtxt c.Pointer)
+
+/*
+ * Error reporting.
+ */
+//go:linkname XPatherror C.xmlXPatherror
+func XPatherror(ctxt XPathParserContextPtr, file *c.Char, line c.Int, no c.Int)
+
+//go:linkname XPathErr C.xmlXPathErr
+func XPathErr(ctxt XPathParserContextPtr, error c.Int)
+
+//go:linkname XPathDebugDumpObject C.xmlXPathDebugDumpObject
+func XPathDebugDumpObject(output *c.FILE, cur XPathObjectPtr, depth c.Int)
+
+//go:linkname XPathDebugDumpCompExpr C.xmlXPathDebugDumpCompExpr
+func XPathDebugDumpCompExpr(output *c.FILE, comp XPathCompExprPtr, depth c.Int)
+
+/**
+ * NodeSet handling.
+ */
+//go:linkname XPathNodeSetContains C.xmlXPathNodeSetContains
+func XPathNodeSetContains(cur NodeSetPtr, val NodePtr) c.Int
+
+//go:linkname XPathDifference C.xmlXPathDifference
+func XPathDifference(nodes1 NodeSetPtr, nodes2 NodeSetPtr) NodeSetPtr
+
+//go:linkname XPathIntersection C.xmlXPathIntersection
+func XPathIntersection(nodes1 NodeSetPtr, nodes2 NodeSetPtr) NodeSetPtr
+
+//go:linkname XPathDistinctSorted C.xmlXPathDistinctSorted
+func XPathDistinctSorted(nodes NodeSetPtr) NodeSetPtr
+
+//go:linkname XPathDistinct C.xmlXPathDistinct
+func XPathDistinct(nodes NodeSetPtr) NodeSetPtr
+
+//go:linkname XPathHasSameNodes C.xmlXPathHasSameNodes
+func XPathHasSameNodes(nodes1 NodeSetPtr, nodes2 NodeSetPtr) c.Int
+
+//go:linkname XPathNodeLeadingSorted C.xmlXPathNodeLeadingSorted
+func XPathNodeLeadingSorted(nodes NodeSetPtr, node NodePtr) NodeSetPtr
+
+//go:linkname XPathLeadingSorted C.xmlXPathLeadingSorted
+func XPathLeadingSorted(nodes1 NodeSetPtr, nodes2 NodeSetPtr) NodeSetPtr
+
+//go:linkname XPathNodeLeading C.xmlXPathNodeLeading
+func XPathNodeLeading(nodes NodeSetPtr, node NodePtr) NodeSetPtr
+
+//go:linkname XPathLeading C.xmlXPathLeading
+func XPathLeading(nodes1 NodeSetPtr, nodes2 NodeSetPtr) NodeSetPtr
+
+//go:linkname XPathNodeTrailingSorted C.xmlXPathNodeTrailingSorted
+func XPathNodeTrailingSorted(nodes NodeSetPtr, node NodePtr) NodeSetPtr
+
+//go:linkname XPathTrailingSorted C.xmlXPathTrailingSorted
+func XPathTrailingSorted(nodes1 NodeSetPtr, nodes2 NodeSetPtr) NodeSetPtr
+
+//go:linkname XPathNodeTrailing C.xmlXPathNodeTrailing
+func XPathNodeTrailing(nodes NodeSetPtr, node NodePtr) NodeSetPtr
+
+//go:linkname XPathTrailing C.xmlXPathTrailing
+func XPathTrailing(nodes1 NodeSetPtr, nodes2 NodeSetPtr) NodeSetPtr
+
+/**
+ * Extending a context.
+ */
+//go:linkname XPathRegisterNs C.xmlXPathRegisterNs
+func XPathRegisterNs(ctxt XPathContextPtr, prefix *Char, ns_uri *Char) c.Int
+
+//go:linkname XPathNsLookup C.xmlXPathNsLookup
+func XPathNsLookup(ctxt XPathContextPtr, prefix *Char) *Char
+
+//go:linkname XPathRegisteredNsCleanup C.xmlXPathRegisteredNsCleanup
+func XPathRegisteredNsCleanup(ctxt XPathContextPtr)
+
+//go:linkname XPathRegisterFunc C.xmlXPathRegisterFunc
+func XPathRegisterFunc(ctxt XPathContextPtr, name *Char, f XPathFunction) c.Int
+
+//go:linkname XPathRegisterFuncNS C.xmlXPathRegisterFuncNS
+func XPathRegisterFuncNS(ctxt XPathContextPtr, name *Char, ns_uri *Char, f XPathFunction) c.Int
+
+//go:linkname XPathRegisterVariable C.xmlXPathRegisterVariable
+func XPathRegisterVariable(ctxt XPathContextPtr, name *Char, value XPathObjectPtr) c.Int
+
+//go:linkname XPathRegisterVariableNS C.xmlXPathRegisterVariableNS
+func XPathRegisterVariableNS(ctxt XPathContextPtr, name *Char, ns_uri *Char, value XPathObjectPtr) c.Int
+
+//go:linkname XPathFunctionLookup C.xmlXPathFunctionLookup
+func XPathFunctionLookup(ctxt XPathContextPtr, name *Char) XPathFunction
+
+//go:linkname XPathFunctionLookupNS C.xmlXPathFunctionLookupNS
+func XPathFunctionLookupNS(ctxt XPathContextPtr, name *Char, ns_uri *Char) XPathFunction
+
+//go:linkname XPathRegisteredFuncsCleanup C.xmlXPathRegisteredFuncsCleanup
+func XPathRegisteredFuncsCleanup(ctxt XPathContextPtr)
+
+//go:linkname XPathVariableLookup C.xmlXPathVariableLookup
+func XPathVariableLookup(ctxt XPathContextPtr, name *Char) XPathObjectPtr
+
+//go:linkname XPathVariableLookupNS C.xmlXPathVariableLookupNS
+func XPathVariableLookupNS(ctxt XPathContextPtr, name *Char, ns_uri *Char) XPathObjectPtr
+
+//go:linkname XPathRegisteredVariablesCleanup C.xmlXPathRegisteredVariablesCleanup
+func XPathRegisteredVariablesCleanup(ctxt XPathContextPtr)
+
+/**
+ * Utilities to extend XPath.
+ */
+// llgo:link (*Char).XPathNewParserContext C.xmlXPathNewParserContext
+func (recv_ *Char) XPathNewParserContext(ctxt XPathContextPtr) XPathParserContextPtr {
+ return nil
+}
+
+//go:linkname XPathFreeParserContext C.xmlXPathFreeParserContext
+func XPathFreeParserContext(ctxt XPathParserContextPtr)
+
+/* TODO: remap to xmlXPathValuePop and Push. */
+//go:linkname ValuePop C.valuePop
+func ValuePop(ctxt XPathParserContextPtr) XPathObjectPtr
+
+//go:linkname ValuePush C.valuePush
+func ValuePush(ctxt XPathParserContextPtr, value XPathObjectPtr) c.Int
+
+// llgo:link (*Char).XPathNewString C.xmlXPathNewString
+func (recv_ *Char) XPathNewString() XPathObjectPtr {
+ return nil
+}
+
+//go:linkname XPathNewCString C.xmlXPathNewCString
+func XPathNewCString(val *c.Char) XPathObjectPtr
+
+// llgo:link (*Char).XPathWrapString C.xmlXPathWrapString
+func (recv_ *Char) XPathWrapString() XPathObjectPtr {
+ return nil
+}
+
+//go:linkname XPathWrapCString C.xmlXPathWrapCString
+func XPathWrapCString(val *c.Char) XPathObjectPtr
+
+//go:linkname XPathNewFloat C.xmlXPathNewFloat
+func XPathNewFloat(val c.Double) XPathObjectPtr
+
+//go:linkname XPathNewBoolean C.xmlXPathNewBoolean
+func XPathNewBoolean(val c.Int) XPathObjectPtr
+
+//go:linkname XPathNewNodeSet C.xmlXPathNewNodeSet
+func XPathNewNodeSet(val NodePtr) XPathObjectPtr
+
+//go:linkname XPathNewValueTree C.xmlXPathNewValueTree
+func XPathNewValueTree(val NodePtr) XPathObjectPtr
+
+//go:linkname XPathNodeSetAdd C.xmlXPathNodeSetAdd
+func XPathNodeSetAdd(cur NodeSetPtr, val NodePtr) c.Int
+
+//go:linkname XPathNodeSetAddUnique C.xmlXPathNodeSetAddUnique
+func XPathNodeSetAddUnique(cur NodeSetPtr, val NodePtr) c.Int
+
+//go:linkname XPathNodeSetAddNs C.xmlXPathNodeSetAddNs
+func XPathNodeSetAddNs(cur NodeSetPtr, node NodePtr, ns NsPtr) c.Int
+
+//go:linkname XPathNodeSetSort C.xmlXPathNodeSetSort
+func XPathNodeSetSort(set NodeSetPtr)
+
+//go:linkname XPathRoot C.xmlXPathRoot
+func XPathRoot(ctxt XPathParserContextPtr)
+
+//go:linkname XPathEvalExpr C.xmlXPathEvalExpr
+func XPathEvalExpr(ctxt XPathParserContextPtr)
+
+//go:linkname XPathParseName C.xmlXPathParseName
+func XPathParseName(ctxt XPathParserContextPtr) *Char
+
+//go:linkname XPathParseNCName C.xmlXPathParseNCName
+func XPathParseNCName(ctxt XPathParserContextPtr) *Char
+
+/*
+ * Existing functions.
+ */
+// llgo:link (*Char).XPathStringEvalNumber C.xmlXPathStringEvalNumber
+func (recv_ *Char) XPathStringEvalNumber() c.Double {
+ return 0
+}
+
+//go:linkname XPathEvaluatePredicateResult C.xmlXPathEvaluatePredicateResult
+func XPathEvaluatePredicateResult(ctxt XPathParserContextPtr, res XPathObjectPtr) c.Int
+
+//go:linkname XPathRegisterAllFunctions C.xmlXPathRegisterAllFunctions
+func XPathRegisterAllFunctions(ctxt XPathContextPtr)
+
+//go:linkname XPathNodeSetMerge C.xmlXPathNodeSetMerge
+func XPathNodeSetMerge(val1 NodeSetPtr, val2 NodeSetPtr) NodeSetPtr
+
+//go:linkname XPathNodeSetDel C.xmlXPathNodeSetDel
+func XPathNodeSetDel(cur NodeSetPtr, val NodePtr)
+
+//go:linkname XPathNodeSetRemove C.xmlXPathNodeSetRemove
+func XPathNodeSetRemove(cur NodeSetPtr, val c.Int)
+
+//go:linkname XPathNewNodeSetList C.xmlXPathNewNodeSetList
+func XPathNewNodeSetList(val NodeSetPtr) XPathObjectPtr
+
+//go:linkname XPathWrapNodeSet C.xmlXPathWrapNodeSet
+func XPathWrapNodeSet(val NodeSetPtr) XPathObjectPtr
+
+//go:linkname XPathWrapExternal C.xmlXPathWrapExternal
+func XPathWrapExternal(val c.Pointer) XPathObjectPtr
+
+//go:linkname XPathEqualValues C.xmlXPathEqualValues
+func XPathEqualValues(ctxt XPathParserContextPtr) c.Int
+
+//go:linkname XPathNotEqualValues C.xmlXPathNotEqualValues
+func XPathNotEqualValues(ctxt XPathParserContextPtr) c.Int
+
+//go:linkname XPathCompareValues C.xmlXPathCompareValues
+func XPathCompareValues(ctxt XPathParserContextPtr, inf c.Int, strict c.Int) c.Int
+
+//go:linkname XPathValueFlipSign C.xmlXPathValueFlipSign
+func XPathValueFlipSign(ctxt XPathParserContextPtr)
+
+//go:linkname XPathAddValues C.xmlXPathAddValues
+func XPathAddValues(ctxt XPathParserContextPtr)
+
+//go:linkname XPathSubValues C.xmlXPathSubValues
+func XPathSubValues(ctxt XPathParserContextPtr)
+
+//go:linkname XPathMultValues C.xmlXPathMultValues
+func XPathMultValues(ctxt XPathParserContextPtr)
+
+//go:linkname XPathDivValues C.xmlXPathDivValues
+func XPathDivValues(ctxt XPathParserContextPtr)
+
+//go:linkname XPathModValues C.xmlXPathModValues
+func XPathModValues(ctxt XPathParserContextPtr)
+
+// llgo:link (*Char).XPathIsNodeType C.xmlXPathIsNodeType
+func (recv_ *Char) XPathIsNodeType() c.Int {
+ return 0
+}
+
+/*
+ * Some of the axis navigation routines.
+ */
+//go:linkname XPathNextSelf C.xmlXPathNextSelf
+func XPathNextSelf(ctxt XPathParserContextPtr, cur NodePtr) NodePtr
+
+//go:linkname XPathNextChild C.xmlXPathNextChild
+func XPathNextChild(ctxt XPathParserContextPtr, cur NodePtr) NodePtr
+
+//go:linkname XPathNextDescendant C.xmlXPathNextDescendant
+func XPathNextDescendant(ctxt XPathParserContextPtr, cur NodePtr) NodePtr
+
+//go:linkname XPathNextDescendantOrSelf C.xmlXPathNextDescendantOrSelf
+func XPathNextDescendantOrSelf(ctxt XPathParserContextPtr, cur NodePtr) NodePtr
+
+//go:linkname XPathNextParent C.xmlXPathNextParent
+func XPathNextParent(ctxt XPathParserContextPtr, cur NodePtr) NodePtr
+
+//go:linkname XPathNextAncestorOrSelf C.xmlXPathNextAncestorOrSelf
+func XPathNextAncestorOrSelf(ctxt XPathParserContextPtr, cur NodePtr) NodePtr
+
+//go:linkname XPathNextFollowingSibling C.xmlXPathNextFollowingSibling
+func XPathNextFollowingSibling(ctxt XPathParserContextPtr, cur NodePtr) NodePtr
+
+//go:linkname XPathNextFollowing C.xmlXPathNextFollowing
+func XPathNextFollowing(ctxt XPathParserContextPtr, cur NodePtr) NodePtr
+
+//go:linkname XPathNextNamespace C.xmlXPathNextNamespace
+func XPathNextNamespace(ctxt XPathParserContextPtr, cur NodePtr) NodePtr
+
+//go:linkname XPathNextAttribute C.xmlXPathNextAttribute
+func XPathNextAttribute(ctxt XPathParserContextPtr, cur NodePtr) NodePtr
+
+//go:linkname XPathNextPreceding C.xmlXPathNextPreceding
+func XPathNextPreceding(ctxt XPathParserContextPtr, cur NodePtr) NodePtr
+
+//go:linkname XPathNextAncestor C.xmlXPathNextAncestor
+func XPathNextAncestor(ctxt XPathParserContextPtr, cur NodePtr) NodePtr
+
+//go:linkname XPathNextPrecedingSibling C.xmlXPathNextPrecedingSibling
+func XPathNextPrecedingSibling(ctxt XPathParserContextPtr, cur NodePtr) NodePtr
+
+/*
+ * The official core of XPath functions.
+ */
+//go:linkname XPathLastFunction C.xmlXPathLastFunction
+func XPathLastFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathPositionFunction C.xmlXPathPositionFunction
+func XPathPositionFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathCountFunction C.xmlXPathCountFunction
+func XPathCountFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathIdFunction C.xmlXPathIdFunction
+func XPathIdFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathLocalNameFunction C.xmlXPathLocalNameFunction
+func XPathLocalNameFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathNamespaceURIFunction C.xmlXPathNamespaceURIFunction
+func XPathNamespaceURIFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathStringFunction C.xmlXPathStringFunction
+func XPathStringFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathStringLengthFunction C.xmlXPathStringLengthFunction
+func XPathStringLengthFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathConcatFunction C.xmlXPathConcatFunction
+func XPathConcatFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathContainsFunction C.xmlXPathContainsFunction
+func XPathContainsFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathStartsWithFunction C.xmlXPathStartsWithFunction
+func XPathStartsWithFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathSubstringFunction C.xmlXPathSubstringFunction
+func XPathSubstringFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathSubstringBeforeFunction C.xmlXPathSubstringBeforeFunction
+func XPathSubstringBeforeFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathSubstringAfterFunction C.xmlXPathSubstringAfterFunction
+func XPathSubstringAfterFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathNormalizeFunction C.xmlXPathNormalizeFunction
+func XPathNormalizeFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathTranslateFunction C.xmlXPathTranslateFunction
+func XPathTranslateFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathNotFunction C.xmlXPathNotFunction
+func XPathNotFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathTrueFunction C.xmlXPathTrueFunction
+func XPathTrueFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathFalseFunction C.xmlXPathFalseFunction
+func XPathFalseFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathLangFunction C.xmlXPathLangFunction
+func XPathLangFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathNumberFunction C.xmlXPathNumberFunction
+func XPathNumberFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathSumFunction C.xmlXPathSumFunction
+func XPathSumFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathFloorFunction C.xmlXPathFloorFunction
+func XPathFloorFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathCeilingFunction C.xmlXPathCeilingFunction
+func XPathCeilingFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathRoundFunction C.xmlXPathRoundFunction
+func XPathRoundFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+//go:linkname XPathBooleanFunction C.xmlXPathBooleanFunction
+func XPathBooleanFunction(ctxt XPathParserContextPtr, nargs c.Int)
+
+/**
+ * Really internal functions
+ */
+//go:linkname XPathNodeSetFreeNs C.xmlXPathNodeSetFreeNs
+func XPathNodeSetFreeNs(ns NsPtr)
diff --git a/libxml2/xpointer.go b/libxml2/xpointer.go
new file mode 100644
index 0000000..d58203e
--- /dev/null
+++ b/libxml2/xpointer.go
@@ -0,0 +1,14 @@
+package libxml2
+
+import _ "unsafe"
+
+/*
+ * Functions.
+ */
+//go:linkname XPtrNewContext C.xmlXPtrNewContext
+func XPtrNewContext(doc DocPtr, here NodePtr, origin NodePtr) XPathContextPtr
+
+// llgo:link (*Char).XPtrEval C.xmlXPtrEval
+func (recv_ *Char) XPtrEval(ctx XPathContextPtr) XPathObjectPtr {
+ return nil
+}
diff --git a/libxslt/_demo/withdeplibxml/demo.go b/libxslt/_demo/withdeplibxml/demo.go
new file mode 100644
index 0000000..fca0b3f
--- /dev/null
+++ b/libxslt/_demo/withdeplibxml/demo.go
@@ -0,0 +1,68 @@
+package main
+
+import (
+ "fmt"
+ "os"
+ "unsafe"
+
+ "github.com/goplus/llpkg/libxslt"
+
+ "github.com/goplus/lib/c"
+ "github.com/goplus/llpkg/libxml2"
+)
+
+func main() {
+ libxml2.InitParser()
+
+ xml :=
+ `
+
+
+ Alice
+ 25
+
+ `
+ xslt := `
+
+
+
+
+ 个人信息
+ 姓名:
+ 年龄:
+
+
+
+
+ `
+ xmlDoc := libxml2.ReadMemory((*int8)(unsafe.Pointer(unsafe.StringData(xml))), c.Int(len(xml)), nil, nil, 0)
+ xsltDoc := libxml2.ReadMemory((*int8)(unsafe.Pointer(unsafe.StringData(xslt))), c.Int(len(xslt)), nil, nil, 0)
+
+ if xmlDoc == nil || xsltDoc == nil {
+ panic("cant read xml or xslt")
+ }
+
+ stylesheet := libxslt.ParseStylesheetDoc(xsltDoc)
+ if stylesheet == nil {
+ panic("cant parse xslt")
+ }
+ result := libxslt.ApplyStylesheet(stylesheet, xmlDoc, (**int8)(unsafe.Pointer(uintptr(0))))
+ if result == nil {
+ panic("cant apply xslt")
+ }
+
+ libxslt.SaveResultToFilename(c.Str("output.html"), result, stylesheet, 0)
+
+ libxml2.FreeDoc(xmlDoc)
+ libxml2.FreeDoc(result)
+ libxslt.FreeStylesheet(stylesheet)
+
+ libxslt.CleanupGlobals()
+ libxml2.CleanupParser()
+
+ buf, err := os.ReadFile("./output.html")
+ if err != nil {
+ panic(err)
+ }
+ fmt.Println(string(buf))
+}
diff --git a/libxslt/attributes.go b/libxslt/attributes.go
new file mode 100644
index 0000000..6e7b744
--- /dev/null
+++ b/libxslt/attributes.go
@@ -0,0 +1,18 @@
+package libxslt
+
+import (
+ "github.com/goplus/llpkg/libxml2"
+ _ "unsafe"
+)
+
+//go:linkname ParseStylesheetAttributeSet C.xsltParseStylesheetAttributeSet
+func ParseStylesheetAttributeSet(style StylesheetPtr, cur libxml2.NodePtr)
+
+//go:linkname FreeAttributeSetsHashes C.xsltFreeAttributeSetsHashes
+func FreeAttributeSetsHashes(style StylesheetPtr)
+
+//go:linkname ApplyAttributeSet C.xsltApplyAttributeSet
+func ApplyAttributeSet(ctxt TransformContextPtr, node libxml2.NodePtr, inst libxml2.NodePtr, attributes *libxml2.Char)
+
+//go:linkname ResolveStylesheetAttributeSet C.xsltResolveStylesheetAttributeSet
+func ResolveStylesheetAttributeSet(style StylesheetPtr)
diff --git a/libxslt/documents.go b/libxslt/documents.go
new file mode 100644
index 0000000..0134212
--- /dev/null
+++ b/libxslt/documents.go
@@ -0,0 +1,42 @@
+package libxslt
+
+import (
+ "github.com/goplus/lib/c"
+ "github.com/goplus/llpkg/libxml2"
+ _ "unsafe"
+)
+
+//go:linkname NewDocument C.xsltNewDocument
+func NewDocument(ctxt TransformContextPtr, doc libxml2.DocPtr) DocumentPtr
+
+//go:linkname LoadDocument C.xsltLoadDocument
+func LoadDocument(ctxt TransformContextPtr, URI *libxml2.Char) DocumentPtr
+
+//go:linkname FindDocument C.xsltFindDocument
+func FindDocument(ctxt TransformContextPtr, doc libxml2.DocPtr) DocumentPtr
+
+//go:linkname FreeDocuments C.xsltFreeDocuments
+func FreeDocuments(ctxt TransformContextPtr)
+
+//go:linkname LoadStyleDocument C.xsltLoadStyleDocument
+func LoadStyleDocument(style StylesheetPtr, URI *libxml2.Char) DocumentPtr
+
+//go:linkname NewStyleDocument C.xsltNewStyleDocument
+func NewStyleDocument(style StylesheetPtr, doc libxml2.DocPtr) DocumentPtr
+
+//go:linkname FreeStyleDocuments C.xsltFreeStyleDocuments
+func FreeStyleDocuments(style StylesheetPtr)
+
+type LoadType c.Int
+
+const (
+ LOAD_START LoadType = 0
+ LOAD_STYLESHEET LoadType = 1
+ LOAD_DOCUMENT LoadType = 2
+)
+
+// llgo:type C
+type DocLoaderFunc func(*libxml2.Char, libxml2.DictPtr, c.Int, c.Pointer, LoadType) libxml2.DocPtr
+
+//go:linkname SetLoaderFunc C.xsltSetLoaderFunc
+func SetLoaderFunc(f DocLoaderFunc)
diff --git a/libxslt/exslt.go b/libxslt/exslt.go
new file mode 100644
index 0000000..f830fa5
--- /dev/null
+++ b/libxslt/exslt.go
@@ -0,0 +1,3 @@
+package libxslt
+
+import _ "unsafe"
diff --git a/libxslt/exsltconfig.go b/libxslt/exsltconfig.go
new file mode 100644
index 0000000..d5718dd
--- /dev/null
+++ b/libxslt/exsltconfig.go
@@ -0,0 +1,8 @@
+package libxslt
+
+import _ "unsafe"
+
+const LIBEXSLT_DOTTED_VERSION = "0.8.23"
+const LIBEXSLT_VERSION = 823
+const LIBEXSLT_VERSION_STRING = "823"
+const LIBEXSLT_VERSION_EXTRA = ""
diff --git a/libxslt/exsltexports.go b/libxslt/exsltexports.go
new file mode 100644
index 0000000..f830fa5
--- /dev/null
+++ b/libxslt/exsltexports.go
@@ -0,0 +1,3 @@
+package libxslt
+
+import _ "unsafe"
diff --git a/libxslt/extensions.go b/libxslt/extensions.go
new file mode 100644
index 0000000..2fc5d01
--- /dev/null
+++ b/libxslt/extensions.go
@@ -0,0 +1,148 @@
+package libxslt
+
+import (
+ "github.com/goplus/lib/c"
+ "github.com/goplus/llpkg/libxml2"
+ _ "unsafe"
+)
+
+/**
+ * xsltInitGlobals:
+ *
+ * Initialize the global variables for extensions
+ *
+ */
+//go:linkname InitGlobals C.xsltInitGlobals
+func InitGlobals()
+
+// llgo:type C
+type StyleExtInitFunction func(StylesheetPtr, *libxml2.Char) c.Pointer
+
+// llgo:type C
+type StyleExtShutdownFunction func(StylesheetPtr, *libxml2.Char, c.Pointer)
+
+// llgo:type C
+type ExtInitFunction func(TransformContextPtr, *libxml2.Char) c.Pointer
+
+// llgo:type C
+type ExtShutdownFunction func(TransformContextPtr, *libxml2.Char, c.Pointer)
+
+//go:linkname RegisterExtModule C.xsltRegisterExtModule
+func RegisterExtModule(URI *libxml2.Char, initFunc ExtInitFunction, shutdownFunc ExtShutdownFunction) c.Int
+
+//go:linkname RegisterExtModuleFull C.xsltRegisterExtModuleFull
+func RegisterExtModuleFull(URI *libxml2.Char, initFunc ExtInitFunction, shutdownFunc ExtShutdownFunction, styleInitFunc StyleExtInitFunction, styleShutdownFunc StyleExtShutdownFunction) c.Int
+
+//go:linkname UnregisterExtModule C.xsltUnregisterExtModule
+func UnregisterExtModule(URI *libxml2.Char) c.Int
+
+//go:linkname GetExtData C.xsltGetExtData
+func GetExtData(ctxt TransformContextPtr, URI *libxml2.Char) c.Pointer
+
+//go:linkname StyleGetExtData C.xsltStyleGetExtData
+func StyleGetExtData(style StylesheetPtr, URI *libxml2.Char) c.Pointer
+
+//go:linkname ShutdownCtxtExts C.xsltShutdownCtxtExts
+func ShutdownCtxtExts(ctxt TransformContextPtr)
+
+//go:linkname ShutdownExts C.xsltShutdownExts
+func ShutdownExts(style StylesheetPtr)
+
+//go:linkname XPathGetTransformContext C.xsltXPathGetTransformContext
+func XPathGetTransformContext(ctxt libxml2.XPathParserContextPtr) TransformContextPtr
+
+/*
+ * extension functions
+ */
+//go:linkname RegisterExtModuleFunction C.xsltRegisterExtModuleFunction
+func RegisterExtModuleFunction(name *libxml2.Char, URI *libxml2.Char, function libxml2.XPathFunction) c.Int
+
+//go:linkname ExtModuleFunctionLookup C.xsltExtModuleFunctionLookup
+func ExtModuleFunctionLookup(name *libxml2.Char, URI *libxml2.Char) libxml2.XPathFunction
+
+//go:linkname UnregisterExtModuleFunction C.xsltUnregisterExtModuleFunction
+func UnregisterExtModuleFunction(name *libxml2.Char, URI *libxml2.Char) c.Int
+
+// llgo:type C
+type PreComputeFunction func(StylesheetPtr, libxml2.NodePtr, TransformFunction) ElemPreCompPtr
+
+//go:linkname NewElemPreComp C.xsltNewElemPreComp
+func NewElemPreComp(style StylesheetPtr, inst libxml2.NodePtr, function TransformFunction) ElemPreCompPtr
+
+//go:linkname InitElemPreComp C.xsltInitElemPreComp
+func InitElemPreComp(comp ElemPreCompPtr, style StylesheetPtr, inst libxml2.NodePtr, function TransformFunction, freeFunc ElemPreCompDeallocator)
+
+//go:linkname RegisterExtModuleElement C.xsltRegisterExtModuleElement
+func RegisterExtModuleElement(name *libxml2.Char, URI *libxml2.Char, precomp PreComputeFunction, transform TransformFunction) c.Int
+
+//go:linkname ExtElementLookup C.xsltExtElementLookup
+func ExtElementLookup(ctxt TransformContextPtr, name *libxml2.Char, URI *libxml2.Char) TransformFunction
+
+//go:linkname ExtModuleElementLookup C.xsltExtModuleElementLookup
+func ExtModuleElementLookup(name *libxml2.Char, URI *libxml2.Char) TransformFunction
+
+//go:linkname ExtModuleElementPreComputeLookup C.xsltExtModuleElementPreComputeLookup
+func ExtModuleElementPreComputeLookup(name *libxml2.Char, URI *libxml2.Char) PreComputeFunction
+
+//go:linkname UnregisterExtModuleElement C.xsltUnregisterExtModuleElement
+func UnregisterExtModuleElement(name *libxml2.Char, URI *libxml2.Char) c.Int
+
+// llgo:type C
+type TopLevelFunction func(StylesheetPtr, libxml2.NodePtr)
+
+//go:linkname RegisterExtModuleTopLevel C.xsltRegisterExtModuleTopLevel
+func RegisterExtModuleTopLevel(name *libxml2.Char, URI *libxml2.Char, function TopLevelFunction) c.Int
+
+//go:linkname ExtModuleTopLevelLookup C.xsltExtModuleTopLevelLookup
+func ExtModuleTopLevelLookup(name *libxml2.Char, URI *libxml2.Char) TopLevelFunction
+
+//go:linkname UnregisterExtModuleTopLevel C.xsltUnregisterExtModuleTopLevel
+func UnregisterExtModuleTopLevel(name *libxml2.Char, URI *libxml2.Char) c.Int
+
+/* These 2 functions are deprecated for use within modules. */
+//go:linkname RegisterExtFunction C.xsltRegisterExtFunction
+func RegisterExtFunction(ctxt TransformContextPtr, name *libxml2.Char, URI *libxml2.Char, function libxml2.XPathFunction) c.Int
+
+//go:linkname RegisterExtElement C.xsltRegisterExtElement
+func RegisterExtElement(ctxt TransformContextPtr, name *libxml2.Char, URI *libxml2.Char, function TransformFunction) c.Int
+
+/*
+ * Extension Prefix handling API.
+ * Those are used by the XSLT (pre)processor.
+ */
+//go:linkname RegisterExtPrefix C.xsltRegisterExtPrefix
+func RegisterExtPrefix(style StylesheetPtr, prefix *libxml2.Char, URI *libxml2.Char) c.Int
+
+//go:linkname CheckExtPrefix C.xsltCheckExtPrefix
+func CheckExtPrefix(style StylesheetPtr, URI *libxml2.Char) c.Int
+
+//go:linkname CheckExtURI C.xsltCheckExtURI
+func CheckExtURI(style StylesheetPtr, URI *libxml2.Char) c.Int
+
+//go:linkname InitCtxtExts C.xsltInitCtxtExts
+func InitCtxtExts(ctxt TransformContextPtr) c.Int
+
+//go:linkname FreeCtxtExts C.xsltFreeCtxtExts
+func FreeCtxtExts(ctxt TransformContextPtr)
+
+//go:linkname FreeExts C.xsltFreeExts
+func FreeExts(style StylesheetPtr)
+
+//go:linkname PreComputeExtModuleElement C.xsltPreComputeExtModuleElement
+func PreComputeExtModuleElement(style StylesheetPtr, inst libxml2.NodePtr) ElemPreCompPtr
+
+/*
+ * Extension Infos access.
+ * Used by exslt initialisation
+ */
+//go:linkname GetExtInfo C.xsltGetExtInfo
+func GetExtInfo(style StylesheetPtr, URI *libxml2.Char) libxml2.HashTablePtr
+
+/**
+ * Test of the extension module API
+ */
+//go:linkname RegisterTestModule C.xsltRegisterTestModule
+func RegisterTestModule()
+
+//go:linkname DebugDumpExtensions C.xsltDebugDumpExtensions
+func DebugDumpExtensions(output *c.FILE)
diff --git a/libxslt/extra.go b/libxslt/extra.go
new file mode 100644
index 0000000..8ee85ac
--- /dev/null
+++ b/libxslt/extra.go
@@ -0,0 +1,19 @@
+package libxslt
+
+import (
+ "github.com/goplus/lib/c"
+ "github.com/goplus/llpkg/libxml2"
+ _ "unsafe"
+)
+
+//go:linkname FunctionNodeSet C.xsltFunctionNodeSet
+func FunctionNodeSet(ctxt libxml2.XPathParserContextPtr, nargs c.Int)
+
+//go:linkname Debug C.xsltDebug
+func Debug(ctxt TransformContextPtr, node libxml2.NodePtr, inst libxml2.NodePtr, comp ElemPreCompPtr)
+
+//go:linkname RegisterExtras C.xsltRegisterExtras
+func RegisterExtras(ctxt TransformContextPtr)
+
+//go:linkname RegisterAllExtras C.xsltRegisterAllExtras
+func RegisterAllExtras()
diff --git a/libxslt/functions.go b/libxslt/functions.go
new file mode 100644
index 0000000..a3addd1
--- /dev/null
+++ b/libxslt/functions.go
@@ -0,0 +1,43 @@
+package libxslt
+
+import (
+ "github.com/goplus/lib/c"
+ "github.com/goplus/llpkg/libxml2"
+ _ "unsafe"
+)
+
+//go:linkname XPathFunctionLookup C.xsltXPathFunctionLookup
+func XPathFunctionLookup(vctxt c.Pointer, name *libxml2.Char, ns_uri *libxml2.Char) libxml2.XPathFunction
+
+/*
+ * Interfaces for the functions implementations.
+ */
+//go:linkname DocumentFunction C.xsltDocumentFunction
+func DocumentFunction(ctxt libxml2.XPathParserContextPtr, nargs c.Int)
+
+//go:linkname KeyFunction C.xsltKeyFunction
+func KeyFunction(ctxt libxml2.XPathParserContextPtr, nargs c.Int)
+
+//go:linkname UnparsedEntityURIFunction C.xsltUnparsedEntityURIFunction
+func UnparsedEntityURIFunction(ctxt libxml2.XPathParserContextPtr, nargs c.Int)
+
+//go:linkname FormatNumberFunction C.xsltFormatNumberFunction
+func FormatNumberFunction(ctxt libxml2.XPathParserContextPtr, nargs c.Int)
+
+//go:linkname GenerateIdFunction C.xsltGenerateIdFunction
+func GenerateIdFunction(ctxt libxml2.XPathParserContextPtr, nargs c.Int)
+
+//go:linkname SystemPropertyFunction C.xsltSystemPropertyFunction
+func SystemPropertyFunction(ctxt libxml2.XPathParserContextPtr, nargs c.Int)
+
+//go:linkname ElementAvailableFunction C.xsltElementAvailableFunction
+func ElementAvailableFunction(ctxt libxml2.XPathParserContextPtr, nargs c.Int)
+
+//go:linkname FunctionAvailableFunction C.xsltFunctionAvailableFunction
+func FunctionAvailableFunction(ctxt libxml2.XPathParserContextPtr, nargs c.Int)
+
+/*
+ * And the registration
+ */
+//go:linkname RegisterAllFunctions C.xsltRegisterAllFunctions
+func RegisterAllFunctions(ctxt libxml2.XPathContextPtr)
diff --git a/libxslt/go.mod b/libxslt/go.mod
new file mode 100644
index 0000000..fc1541c
--- /dev/null
+++ b/libxslt/go.mod
@@ -0,0 +1,8 @@
+module github.com/goplus/llpkg/libxslt
+
+go 1.20
+
+require (
+ github.com/goplus/lib v0.2.0
+ github.com/goplus/llpkg/libxml2 v1.0.3
+)
diff --git a/libxslt/go.sum b/libxslt/go.sum
new file mode 100644
index 0000000..812b4bd
--- /dev/null
+++ b/libxslt/go.sum
@@ -0,0 +1,4 @@
+github.com/goplus/lib v0.2.0 h1:AjqkN1XK5H23wZMMlpaUYAMCDAdSBQ2NMFrLtSh7W4g=
+github.com/goplus/lib v0.2.0/go.mod h1:SgJv3oPqLLHCu0gcL46ejOP3x7/2ry2Jtxu7ta32kp0=
+github.com/goplus/llpkg/libxml2 v1.0.3 h1:yl9wAONIH9OFXaCFcr7y0AGX9OgR5R4tCglnvhcT8bw=
+github.com/goplus/llpkg/libxml2 v1.0.3/go.mod h1:5YXQ8OhzQeH+udVb1NPEryxH7hAiJ75p6+f5QBy7BpM=
diff --git a/libxslt/imports.go b/libxslt/imports.go
new file mode 100644
index 0000000..87552c2
--- /dev/null
+++ b/libxslt/imports.go
@@ -0,0 +1,28 @@
+package libxslt
+
+import (
+ "github.com/goplus/lib/c"
+ "github.com/goplus/llpkg/libxml2"
+ _ "unsafe"
+)
+
+/*
+ * Module interfaces
+ */
+//go:linkname ParseStylesheetImport C.xsltParseStylesheetImport
+func ParseStylesheetImport(style StylesheetPtr, cur libxml2.NodePtr) c.Int
+
+//go:linkname ParseStylesheetInclude C.xsltParseStylesheetInclude
+func ParseStylesheetInclude(style StylesheetPtr, cur libxml2.NodePtr) c.Int
+
+//go:linkname NextImport C.xsltNextImport
+func NextImport(style StylesheetPtr) StylesheetPtr
+
+//go:linkname NeedElemSpaceHandling C.xsltNeedElemSpaceHandling
+func NeedElemSpaceHandling(ctxt TransformContextPtr) c.Int
+
+//go:linkname FindElemSpaceHandling C.xsltFindElemSpaceHandling
+func FindElemSpaceHandling(ctxt TransformContextPtr, node libxml2.NodePtr) c.Int
+
+//go:linkname FindTemplate C.xsltFindTemplate
+func FindTemplate(ctxt TransformContextPtr, name *libxml2.Char, nameURI *libxml2.Char) TemplatePtr
diff --git a/libxslt/keys.go b/libxslt/keys.go
new file mode 100644
index 0000000..9767652
--- /dev/null
+++ b/libxslt/keys.go
@@ -0,0 +1,22 @@
+package libxslt
+
+import (
+ "github.com/goplus/lib/c"
+ "github.com/goplus/llpkg/libxml2"
+ _ "unsafe"
+)
+
+//go:linkname AddKey C.xsltAddKey
+func AddKey(style StylesheetPtr, name *libxml2.Char, nameURI *libxml2.Char, match *libxml2.Char, use *libxml2.Char, inst libxml2.NodePtr) c.Int
+
+//go:linkname GetKey C.xsltGetKey
+func GetKey(ctxt TransformContextPtr, name *libxml2.Char, nameURI *libxml2.Char, value *libxml2.Char) libxml2.NodeSetPtr
+
+//go:linkname InitCtxtKeys C.xsltInitCtxtKeys
+func InitCtxtKeys(ctxt TransformContextPtr, doc DocumentPtr)
+
+//go:linkname FreeKeys C.xsltFreeKeys
+func FreeKeys(style StylesheetPtr)
+
+//go:linkname FreeDocumentKeys C.xsltFreeDocumentKeys
+func FreeDocumentKeys(doc DocumentPtr)
diff --git a/libxslt/libxslt_autogen_link.go b/libxslt/libxslt_autogen_link.go
new file mode 100644
index 0000000..ebca1c9
--- /dev/null
+++ b/libxslt/libxslt_autogen_link.go
@@ -0,0 +1,9 @@
+package libxslt
+
+import (
+ _ "github.com/goplus/lib/c"
+ _ "github.com/goplus/lib/c/os"
+ _ "github.com/goplus/llpkg/libxml2"
+)
+
+const LLGoPackage string = "link: $(pkg-config --libs libxslt);"
diff --git a/libxslt/llcppg.cfg b/libxslt/llcppg.cfg
new file mode 100644
index 0000000..f77bc55
--- /dev/null
+++ b/libxslt/llcppg.cfg
@@ -0,0 +1,37 @@
+{
+ "name": "libxslt",
+ "cflags": "$(pkg-config --cflags libxslt)",
+ "libs": "$(pkg-config --libs libxslt)",
+ "include": [
+ "libxslt/variables.h",
+ "libxslt/functions.h",
+ "libxslt/xsltutils.h",
+ "libxslt/templates.h",
+ "libxslt/pattern.h",
+ "libxslt/preproc.h",
+ "libxslt/extra.h",
+ "libxslt/documents.h",
+ "libxslt/imports.h",
+ "libxslt/keys.h",
+ "libxslt/transform.h",
+ "libxslt/attributes.h",
+ "libxslt/security.h",
+ "libxslt/extensions.h",
+ "libxslt/xsltInternals.h",
+ "libexslt/exslt.h",
+ "libxslt/numbersInternals.h",
+ "libxslt/namespaces.h",
+ "libxslt/xslt.h",
+ "libxslt/xsltlocale.h",
+ "libexslt/exsltexports.h",
+ "libxslt/xsltconfig.h",
+ "libxslt/xsltexports.h",
+ "libexslt/exsltconfig.h"
+ ],
+ "trimPrefixes": ["XSLT_","xslt"],
+ "cplusplus": false,
+ "deps": ["c/os","github.com/goplus/llpkg/libxml2@v1.0.3"],
+ "symMap":{
+ "xsltSetCtxtLocaleHandlers":"-"
+ }
+}
diff --git a/libxslt/llcppg.pub b/libxslt/llcppg.pub
new file mode 100644
index 0000000..4dbe180
--- /dev/null
+++ b/libxslt/llcppg.pub
@@ -0,0 +1,58 @@
+xsltAddCallCallback AddCallCallback
+xsltCompMatch CompMatch
+xsltCompMatchPtr CompMatchPtr
+xsltDebugStatusCodes DebugStatusCodes
+xsltDebugTraceCodes DebugTraceCodes
+xsltDecimalFormat DecimalFormat
+xsltDecimalFormatPtr DecimalFormatPtr
+xsltDocLoaderFunc DocLoaderFunc
+xsltDocument Document
+xsltDocumentPtr DocumentPtr
+xsltDropCallCallback DropCallCallback
+xsltElemPreComp ElemPreComp
+xsltElemPreCompDeallocator ElemPreCompDeallocator
+xsltElemPreCompPtr ElemPreCompPtr
+xsltExtInitFunction ExtInitFunction
+xsltExtShutdownFunction ExtShutdownFunction
+xsltFormatNumberInfo FormatNumberInfo
+xsltFormatNumberInfoPtr FormatNumberInfoPtr
+xsltFreeLocaleFunc FreeLocaleFunc
+xsltGenSortKeyFunc GenSortKeyFunc
+xsltHandleDebuggerCallback HandleDebuggerCallback
+xsltKeyDef KeyDef
+xsltKeyDefPtr KeyDefPtr
+xsltKeyTable KeyTable
+xsltKeyTablePtr KeyTablePtr
+xsltLoadType LoadType
+xsltLocale Locale
+xsltLocaleChar LocaleChar
+xsltNewLocaleFunc NewLocaleFunc
+xsltNumberData NumberData
+xsltNumberDataPtr NumberDataPtr
+xsltOutputType OutputType
+xsltPreComputeFunction PreComputeFunction
+xsltRuntimeExtra RuntimeExtra
+xsltRuntimeExtraPtr RuntimeExtraPtr
+xsltSecurityCheck SecurityCheck
+xsltSecurityOption SecurityOption
+xsltSecurityPrefs SecurityPrefs
+xsltSecurityPrefsPtr SecurityPrefsPtr
+xsltSortFunc SortFunc
+xsltStackElem StackElem
+xsltStackElemPtr StackElemPtr
+xsltStyleExtInitFunction StyleExtInitFunction
+xsltStyleExtShutdownFunction StyleExtShutdownFunction
+xsltStylePreComp StylePreComp
+xsltStylePreCompPtr StylePreCompPtr
+xsltStyleType StyleType
+xsltStylesheet Stylesheet
+xsltStylesheetPtr StylesheetPtr
+xsltTemplate Template
+xsltTemplatePtr TemplatePtr
+xsltTopLevelFunction TopLevelFunction
+xsltTransformCache TransformCache
+xsltTransformCachePtr TransformCachePtr
+xsltTransformContext TransformContext
+xsltTransformContextPtr TransformContextPtr
+xsltTransformFunction TransformFunction
+xsltTransformState TransformState
\ No newline at end of file
diff --git a/libxslt/llpkg.cfg b/libxslt/llpkg.cfg
new file mode 100644
index 0000000..a47b88a
--- /dev/null
+++ b/libxslt/llpkg.cfg
@@ -0,0 +1,15 @@
+
+{
+ "upstream": {
+ "package": {
+ "name": "libxslt",
+ "version": "1.1.42"
+ },
+ "installer":{
+ "name": "conan",
+ "config" : {
+ "options": "libxml2/*:iconv=False"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/libxslt/namespaces.go b/libxslt/namespaces.go
new file mode 100644
index 0000000..a8fc991
--- /dev/null
+++ b/libxslt/namespaces.go
@@ -0,0 +1,27 @@
+package libxslt
+
+import (
+ "github.com/goplus/llpkg/libxml2"
+ _ "unsafe"
+)
+
+//go:linkname NamespaceAlias C.xsltNamespaceAlias
+func NamespaceAlias(style StylesheetPtr, node libxml2.NodePtr)
+
+//go:linkname GetNamespace C.xsltGetNamespace
+func GetNamespace(ctxt TransformContextPtr, cur libxml2.NodePtr, ns libxml2.NsPtr, out libxml2.NodePtr) libxml2.NsPtr
+
+//go:linkname GetPlainNamespace C.xsltGetPlainNamespace
+func GetPlainNamespace(ctxt TransformContextPtr, cur libxml2.NodePtr, ns libxml2.NsPtr, out libxml2.NodePtr) libxml2.NsPtr
+
+//go:linkname GetSpecialNamespace C.xsltGetSpecialNamespace
+func GetSpecialNamespace(ctxt TransformContextPtr, cur libxml2.NodePtr, URI *libxml2.Char, prefix *libxml2.Char, out libxml2.NodePtr) libxml2.NsPtr
+
+//go:linkname CopyNamespace C.xsltCopyNamespace
+func CopyNamespace(ctxt TransformContextPtr, elem libxml2.NodePtr, ns libxml2.NsPtr) libxml2.NsPtr
+
+//go:linkname CopyNamespaceList C.xsltCopyNamespaceList
+func CopyNamespaceList(ctxt TransformContextPtr, node libxml2.NodePtr, cur libxml2.NsPtr) libxml2.NsPtr
+
+//go:linkname FreeNamespaceAliasHashes C.xsltFreeNamespaceAliasHashes
+func FreeNamespaceAliasHashes(style StylesheetPtr)
diff --git a/libxslt/numbersInternals.go b/libxslt/numbersInternals.go
new file mode 100644
index 0000000..228287c
--- /dev/null
+++ b/libxslt/numbersInternals.go
@@ -0,0 +1,43 @@
+package libxslt
+
+import (
+ "github.com/goplus/lib/c"
+ "github.com/goplus/llpkg/libxml2"
+ _ "unsafe"
+)
+
+type X_xsltCompMatch struct {
+ Unused [8]uint8
+}
+
+type X_xsltNumberData struct {
+ Level *libxml2.Char
+ Count *libxml2.Char
+ From *libxml2.Char
+ Value *libxml2.Char
+ Format *libxml2.Char
+ HasFormat c.Int
+ DigitsPerGroup c.Int
+ GroupingCharacter c.Int
+ GroupingCharacterLen c.Int
+ Doc libxml2.DocPtr
+ Node libxml2.NodePtr
+ CountPat *X_xsltCompMatch
+ FromPat *X_xsltCompMatch
+}
+type NumberData X_xsltNumberData
+type NumberDataPtr *NumberData
+
+type X_xsltFormatNumberInfo struct {
+ IntegerHash c.Int
+ IntegerDigits c.Int
+ FracDigits c.Int
+ FracHash c.Int
+ Group c.Int
+ Multiplier c.Int
+ AddDecimal c.Char
+ IsMultiplierSet c.Char
+ IsNegativePattern c.Char
+}
+type FormatNumberInfo X_xsltFormatNumberInfo
+type FormatNumberInfoPtr *FormatNumberInfo
diff --git a/libxslt/pattern.go b/libxslt/pattern.go
new file mode 100644
index 0000000..0c6e925
--- /dev/null
+++ b/libxslt/pattern.go
@@ -0,0 +1,43 @@
+package libxslt
+
+import (
+ "github.com/goplus/lib/c"
+ "github.com/goplus/llpkg/libxml2"
+ _ "unsafe"
+)
+
+type CompMatch X_xsltCompMatch
+type CompMatchPtr *CompMatch
+
+/*
+ * Pattern related interfaces.
+ */
+//go:linkname CompilePattern C.xsltCompilePattern
+func CompilePattern(pattern *libxml2.Char, doc libxml2.DocPtr, node libxml2.NodePtr, style StylesheetPtr, runtime TransformContextPtr) CompMatchPtr
+
+//go:linkname FreeCompMatchList C.xsltFreeCompMatchList
+func FreeCompMatchList(comp CompMatchPtr)
+
+//go:linkname TestCompMatchList C.xsltTestCompMatchList
+func TestCompMatchList(ctxt TransformContextPtr, node libxml2.NodePtr, comp CompMatchPtr) c.Int
+
+//go:linkname CompMatchClearCache C.xsltCompMatchClearCache
+func CompMatchClearCache(ctxt TransformContextPtr, comp CompMatchPtr)
+
+//go:linkname NormalizeCompSteps C.xsltNormalizeCompSteps
+func NormalizeCompSteps(payload c.Pointer, data c.Pointer, name *libxml2.Char)
+
+/*
+ * Template related interfaces.
+ */
+//go:linkname AddTemplate C.xsltAddTemplate
+func AddTemplate(style StylesheetPtr, cur TemplatePtr, mode *libxml2.Char, modeURI *libxml2.Char) c.Int
+
+//go:linkname GetTemplate C.xsltGetTemplate
+func GetTemplate(ctxt TransformContextPtr, node libxml2.NodePtr, style StylesheetPtr) TemplatePtr
+
+//go:linkname FreeTemplateHashes C.xsltFreeTemplateHashes
+func FreeTemplateHashes(style StylesheetPtr)
+
+//go:linkname CleanupTemplates C.xsltCleanupTemplates
+func CleanupTemplates(style StylesheetPtr)
diff --git a/libxslt/preproc.go b/libxslt/preproc.go
new file mode 100644
index 0000000..6c3ceb0
--- /dev/null
+++ b/libxslt/preproc.go
@@ -0,0 +1,15 @@
+package libxslt
+
+import (
+ "github.com/goplus/llpkg/libxml2"
+ _ "unsafe"
+)
+
+//go:linkname DocumentComp C.xsltDocumentComp
+func DocumentComp(style StylesheetPtr, inst libxml2.NodePtr, function TransformFunction) ElemPreCompPtr
+
+//go:linkname StylePreCompute C.xsltStylePreCompute
+func StylePreCompute(style StylesheetPtr, inst libxml2.NodePtr)
+
+//go:linkname FreeStylePreComps C.xsltFreeStylePreComps
+func FreeStylePreComps(style StylesheetPtr)
diff --git a/libxslt/security.go b/libxslt/security.go
new file mode 100644
index 0000000..bd1c15e
--- /dev/null
+++ b/libxslt/security.go
@@ -0,0 +1,64 @@
+package libxslt
+
+import (
+ "github.com/goplus/lib/c"
+ "github.com/goplus/llpkg/libxml2"
+ _ "unsafe"
+)
+
+type X_xsltSecurityPrefs struct {
+ Unused [8]uint8
+}
+type SecurityPrefs X_xsltSecurityPrefs
+type SecurityPrefsPtr *SecurityPrefs
+type SecurityOption c.Int
+
+const (
+ SECPREF_READ_FILE SecurityOption = 1
+ SECPREF_WRITE_FILE SecurityOption = 2
+ SECPREF_CREATE_DIRECTORY SecurityOption = 3
+ SECPREF_READ_NETWORK SecurityOption = 4
+ SECPREF_WRITE_NETWORK SecurityOption = 5
+)
+
+// llgo:type C
+type SecurityCheck func(SecurityPrefsPtr, TransformContextPtr, *c.Char) c.Int
+
+/*
+ * Module interfaces
+ */
+//go:linkname NewSecurityPrefs C.xsltNewSecurityPrefs
+func NewSecurityPrefs() SecurityPrefsPtr
+
+//go:linkname FreeSecurityPrefs C.xsltFreeSecurityPrefs
+func FreeSecurityPrefs(sec SecurityPrefsPtr)
+
+//go:linkname SetSecurityPrefs C.xsltSetSecurityPrefs
+func SetSecurityPrefs(sec SecurityPrefsPtr, option SecurityOption, func_ SecurityCheck) c.Int
+
+//go:linkname GetSecurityPrefs C.xsltGetSecurityPrefs
+func GetSecurityPrefs(sec SecurityPrefsPtr, option SecurityOption) SecurityCheck
+
+//go:linkname SetDefaultSecurityPrefs C.xsltSetDefaultSecurityPrefs
+func SetDefaultSecurityPrefs(sec SecurityPrefsPtr)
+
+//go:linkname GetDefaultSecurityPrefs C.xsltGetDefaultSecurityPrefs
+func GetDefaultSecurityPrefs() SecurityPrefsPtr
+
+//go:linkname SetCtxtSecurityPrefs C.xsltSetCtxtSecurityPrefs
+func SetCtxtSecurityPrefs(sec SecurityPrefsPtr, ctxt TransformContextPtr) c.Int
+
+//go:linkname SecurityAllow C.xsltSecurityAllow
+func SecurityAllow(sec SecurityPrefsPtr, ctxt TransformContextPtr, value *c.Char) c.Int
+
+//go:linkname SecurityForbid C.xsltSecurityForbid
+func SecurityForbid(sec SecurityPrefsPtr, ctxt TransformContextPtr, value *c.Char) c.Int
+
+/*
+ * internal interfaces
+ */
+//go:linkname CheckWrite C.xsltCheckWrite
+func CheckWrite(sec SecurityPrefsPtr, ctxt TransformContextPtr, URL *libxml2.Char) c.Int
+
+//go:linkname CheckRead C.xsltCheckRead
+func CheckRead(sec SecurityPrefsPtr, ctxt TransformContextPtr, URL *libxml2.Char) c.Int
diff --git a/libxslt/templates.go b/libxslt/templates.go
new file mode 100644
index 0000000..7f2e3d4
--- /dev/null
+++ b/libxslt/templates.go
@@ -0,0 +1,41 @@
+package libxslt
+
+import (
+ "github.com/goplus/lib/c"
+ "github.com/goplus/llpkg/libxml2"
+ _ "unsafe"
+)
+
+//go:linkname EvalXPathPredicate C.xsltEvalXPathPredicate
+func EvalXPathPredicate(ctxt TransformContextPtr, comp libxml2.XPathCompExprPtr, nsList *libxml2.NsPtr, nsNr c.Int) c.Int
+
+//go:linkname EvalTemplateString C.xsltEvalTemplateString
+func EvalTemplateString(ctxt TransformContextPtr, contextNode libxml2.NodePtr, inst libxml2.NodePtr) *libxml2.Char
+
+//go:linkname EvalAttrValueTemplate C.xsltEvalAttrValueTemplate
+func EvalAttrValueTemplate(ctxt TransformContextPtr, node libxml2.NodePtr, name *libxml2.Char, ns *libxml2.Char) *libxml2.Char
+
+//go:linkname EvalStaticAttrValueTemplate C.xsltEvalStaticAttrValueTemplate
+func EvalStaticAttrValueTemplate(style StylesheetPtr, node libxml2.NodePtr, name *libxml2.Char, ns *libxml2.Char, found *c.Int) *libxml2.Char
+
+/* TODO: this is obviously broken ... the namespaces should be passed too ! */
+//go:linkname EvalXPathString C.xsltEvalXPathString
+func EvalXPathString(ctxt TransformContextPtr, comp libxml2.XPathCompExprPtr) *libxml2.Char
+
+//go:linkname EvalXPathStringNs C.xsltEvalXPathStringNs
+func EvalXPathStringNs(ctxt TransformContextPtr, comp libxml2.XPathCompExprPtr, nsNr c.Int, nsList *libxml2.NsPtr) *libxml2.Char
+
+//go:linkname TemplateProcess C.xsltTemplateProcess
+func TemplateProcess(ctxt TransformContextPtr, node libxml2.NodePtr) *libxml2.NodePtr
+
+//go:linkname AttrListTemplateProcess C.xsltAttrListTemplateProcess
+func AttrListTemplateProcess(ctxt TransformContextPtr, target libxml2.NodePtr, cur libxml2.AttrPtr) libxml2.AttrPtr
+
+//go:linkname AttrTemplateProcess C.xsltAttrTemplateProcess
+func AttrTemplateProcess(ctxt TransformContextPtr, target libxml2.NodePtr, attr libxml2.AttrPtr) libxml2.AttrPtr
+
+//go:linkname AttrTemplateValueProcess C.xsltAttrTemplateValueProcess
+func AttrTemplateValueProcess(ctxt TransformContextPtr, attr *libxml2.Char) *libxml2.Char
+
+//go:linkname AttrTemplateValueProcessNode C.xsltAttrTemplateValueProcessNode
+func AttrTemplateValueProcessNode(ctxt TransformContextPtr, str *libxml2.Char, node libxml2.NodePtr) *libxml2.Char
diff --git a/libxslt/transform.go b/libxslt/transform.go
new file mode 100644
index 0000000..5153806
--- /dev/null
+++ b/libxslt/transform.go
@@ -0,0 +1,116 @@
+package libxslt
+
+import (
+ "github.com/goplus/lib/c"
+ "github.com/goplus/llpkg/libxml2"
+ _ "unsafe"
+)
+
+/**
+ * XInclude default processing.
+ */
+//go:linkname SetXIncludeDefault C.xsltSetXIncludeDefault
+func SetXIncludeDefault(xinclude c.Int)
+
+//go:linkname GetXIncludeDefault C.xsltGetXIncludeDefault
+func GetXIncludeDefault() c.Int
+
+/**
+ * Export context to users.
+ */
+//go:linkname NewTransformContext C.xsltNewTransformContext
+func NewTransformContext(style StylesheetPtr, doc libxml2.DocPtr) TransformContextPtr
+
+//go:linkname FreeTransformContext C.xsltFreeTransformContext
+func FreeTransformContext(ctxt TransformContextPtr)
+
+//go:linkname ApplyStylesheetUser C.xsltApplyStylesheetUser
+func ApplyStylesheetUser(style StylesheetPtr, doc libxml2.DocPtr, params **c.Char, output *c.Char, profile *c.FILE, userCtxt TransformContextPtr) libxml2.DocPtr
+
+//go:linkname ProcessOneNode C.xsltProcessOneNode
+func ProcessOneNode(ctxt TransformContextPtr, node libxml2.NodePtr, params StackElemPtr)
+
+/**
+ * Private Interfaces.
+ */
+//go:linkname ApplyStripSpaces C.xsltApplyStripSpaces
+func ApplyStripSpaces(ctxt TransformContextPtr, node libxml2.NodePtr)
+
+//go:linkname ApplyStylesheet C.xsltApplyStylesheet
+func ApplyStylesheet(style StylesheetPtr, doc libxml2.DocPtr, params **c.Char) libxml2.DocPtr
+
+//go:linkname ProfileStylesheet C.xsltProfileStylesheet
+func ProfileStylesheet(style StylesheetPtr, doc libxml2.DocPtr, params **c.Char, output *c.FILE) libxml2.DocPtr
+
+//go:linkname RunStylesheet C.xsltRunStylesheet
+func RunStylesheet(style StylesheetPtr, doc libxml2.DocPtr, params **c.Char, output *c.Char, SAX libxml2.SAXHandlerPtr, IObuf libxml2.OutputBufferPtr) c.Int
+
+//go:linkname RunStylesheetUser C.xsltRunStylesheetUser
+func RunStylesheetUser(style StylesheetPtr, doc libxml2.DocPtr, params **c.Char, output *c.Char, SAX libxml2.SAXHandlerPtr, IObuf libxml2.OutputBufferPtr, profile *c.FILE, userCtxt TransformContextPtr) c.Int
+
+//go:linkname ApplyOneTemplate C.xsltApplyOneTemplate
+func ApplyOneTemplate(ctxt TransformContextPtr, node libxml2.NodePtr, list libxml2.NodePtr, templ TemplatePtr, params StackElemPtr)
+
+//go:linkname DocumentElem C.xsltDocumentElem
+func DocumentElem(ctxt TransformContextPtr, node libxml2.NodePtr, inst libxml2.NodePtr, comp ElemPreCompPtr)
+
+//go:linkname Sort C.xsltSort
+func Sort(ctxt TransformContextPtr, node libxml2.NodePtr, inst libxml2.NodePtr, comp ElemPreCompPtr)
+
+//go:linkname Copy C.xsltCopy
+func Copy(ctxt TransformContextPtr, node libxml2.NodePtr, inst libxml2.NodePtr, comp ElemPreCompPtr)
+
+//go:linkname Text C.xsltText
+func Text(ctxt TransformContextPtr, node libxml2.NodePtr, inst libxml2.NodePtr, comp ElemPreCompPtr)
+
+//go:linkname Element C.xsltElement
+func Element(ctxt TransformContextPtr, node libxml2.NodePtr, inst libxml2.NodePtr, comp ElemPreCompPtr)
+
+//go:linkname Comment C.xsltComment
+func Comment(ctxt TransformContextPtr, node libxml2.NodePtr, inst libxml2.NodePtr, comp ElemPreCompPtr)
+
+//go:linkname Attribute C.xsltAttribute
+func Attribute(ctxt TransformContextPtr, node libxml2.NodePtr, inst libxml2.NodePtr, comp ElemPreCompPtr)
+
+//go:linkname ProcessingInstruction C.xsltProcessingInstruction
+func ProcessingInstruction(ctxt TransformContextPtr, node libxml2.NodePtr, inst libxml2.NodePtr, comp ElemPreCompPtr)
+
+//go:linkname CopyOf C.xsltCopyOf
+func CopyOf(ctxt TransformContextPtr, node libxml2.NodePtr, inst libxml2.NodePtr, comp ElemPreCompPtr)
+
+//go:linkname ValueOf C.xsltValueOf
+func ValueOf(ctxt TransformContextPtr, node libxml2.NodePtr, inst libxml2.NodePtr, comp ElemPreCompPtr)
+
+//go:linkname Number C.xsltNumber
+func Number(ctxt TransformContextPtr, node libxml2.NodePtr, inst libxml2.NodePtr, comp ElemPreCompPtr)
+
+//go:linkname ApplyImports C.xsltApplyImports
+func ApplyImports(ctxt TransformContextPtr, node libxml2.NodePtr, inst libxml2.NodePtr, comp ElemPreCompPtr)
+
+//go:linkname CallTemplate C.xsltCallTemplate
+func CallTemplate(ctxt TransformContextPtr, node libxml2.NodePtr, inst libxml2.NodePtr, comp ElemPreCompPtr)
+
+//go:linkname ApplyTemplates C.xsltApplyTemplates
+func ApplyTemplates(ctxt TransformContextPtr, node libxml2.NodePtr, inst libxml2.NodePtr, comp ElemPreCompPtr)
+
+//go:linkname Choose C.xsltChoose
+func Choose(ctxt TransformContextPtr, node libxml2.NodePtr, inst libxml2.NodePtr, comp ElemPreCompPtr)
+
+//go:linkname If C.xsltIf
+func If(ctxt TransformContextPtr, node libxml2.NodePtr, inst libxml2.NodePtr, comp ElemPreCompPtr)
+
+//go:linkname ForEach C.xsltForEach
+func ForEach(ctxt TransformContextPtr, node libxml2.NodePtr, inst libxml2.NodePtr, comp ElemPreCompPtr)
+
+//go:linkname RegisterAllElement C.xsltRegisterAllElement
+func RegisterAllElement(ctxt TransformContextPtr)
+
+//go:linkname CopyTextString C.xsltCopyTextString
+func CopyTextString(ctxt TransformContextPtr, target libxml2.NodePtr, string *libxml2.Char, noescape c.Int) libxml2.NodePtr
+
+/* Following 2 functions needed for libexslt/functions.c */
+//go:linkname LocalVariablePop C.xsltLocalVariablePop
+func LocalVariablePop(ctxt TransformContextPtr, limitNr c.Int, level c.Int)
+
+//go:linkname LocalVariablePush C.xsltLocalVariablePush
+func LocalVariablePush(ctxt TransformContextPtr, variable StackElemPtr, level c.Int) c.Int
diff --git a/libxslt/variables.go b/libxslt/variables.go
new file mode 100644
index 0000000..1008de2
--- /dev/null
+++ b/libxslt/variables.go
@@ -0,0 +1,56 @@
+package libxslt
+
+import (
+ "github.com/goplus/lib/c"
+ "github.com/goplus/llpkg/libxml2"
+ _ "unsafe"
+)
+
+const RVT_LOCAL = 1
+const RVT_FUNC_RESULT = 2
+const RVT_GLOBAL = 3
+
+/*
+ * Interfaces for the variable module.
+ */
+//go:linkname EvalGlobalVariables C.xsltEvalGlobalVariables
+func EvalGlobalVariables(ctxt TransformContextPtr) c.Int
+
+//go:linkname EvalUserParams C.xsltEvalUserParams
+func EvalUserParams(ctxt TransformContextPtr, params **c.Char) c.Int
+
+//go:linkname QuoteUserParams C.xsltQuoteUserParams
+func QuoteUserParams(ctxt TransformContextPtr, params **c.Char) c.Int
+
+//go:linkname EvalOneUserParam C.xsltEvalOneUserParam
+func EvalOneUserParam(ctxt TransformContextPtr, name *libxml2.Char, value *libxml2.Char) c.Int
+
+//go:linkname QuoteOneUserParam C.xsltQuoteOneUserParam
+func QuoteOneUserParam(ctxt TransformContextPtr, name *libxml2.Char, value *libxml2.Char) c.Int
+
+//go:linkname ParseGlobalVariable C.xsltParseGlobalVariable
+func ParseGlobalVariable(style StylesheetPtr, cur libxml2.NodePtr)
+
+//go:linkname ParseGlobalParam C.xsltParseGlobalParam
+func ParseGlobalParam(style StylesheetPtr, cur libxml2.NodePtr)
+
+//go:linkname ParseStylesheetVariable C.xsltParseStylesheetVariable
+func ParseStylesheetVariable(ctxt TransformContextPtr, cur libxml2.NodePtr)
+
+//go:linkname ParseStylesheetParam C.xsltParseStylesheetParam
+func ParseStylesheetParam(ctxt TransformContextPtr, cur libxml2.NodePtr)
+
+//go:linkname ParseStylesheetCallerParam C.xsltParseStylesheetCallerParam
+func ParseStylesheetCallerParam(ctxt TransformContextPtr, cur libxml2.NodePtr) StackElemPtr
+
+//go:linkname AddStackElemList C.xsltAddStackElemList
+func AddStackElemList(ctxt TransformContextPtr, elems StackElemPtr) c.Int
+
+//go:linkname FreeGlobalVariables C.xsltFreeGlobalVariables
+func FreeGlobalVariables(ctxt TransformContextPtr)
+
+//go:linkname VariableLookup C.xsltVariableLookup
+func VariableLookup(ctxt TransformContextPtr, name *libxml2.Char, ns_uri *libxml2.Char) libxml2.XPathObjectPtr
+
+//go:linkname XPathVariableLookup C.xsltXPathVariableLookup
+func XPathVariableLookup(ctxt c.Pointer, name *libxml2.Char, ns_uri *libxml2.Char) libxml2.XPathObjectPtr
diff --git a/libxslt/xslt.go b/libxslt/xslt.go
new file mode 100644
index 0000000..b2ca88c
--- /dev/null
+++ b/libxslt/xslt.go
@@ -0,0 +1,19 @@
+package libxslt
+
+import _ "unsafe"
+
+const DEFAULT_VERSION = "1.0"
+const DEFAULT_VENDOR = "libxslt"
+const DEFAULT_URL = "http://xmlsoft.org/XSLT/"
+
+/*
+ * Global initialization function.
+ */
+//go:linkname Init C.xsltInit
+func Init()
+
+/*
+ * Global cleanup function.
+ */
+//go:linkname CleanupGlobals C.xsltCleanupGlobals
+func CleanupGlobals()
diff --git a/libxslt/xsltInternals.go b/libxslt/xsltInternals.go
new file mode 100644
index 0000000..6c9236b
--- /dev/null
+++ b/libxslt/xsltInternals.go
@@ -0,0 +1,490 @@
+package libxslt
+
+import (
+ "github.com/goplus/lib/c"
+ "github.com/goplus/llpkg/libxml2"
+ _ "unsafe"
+)
+
+const MAX_SORT = 15
+
+type X_xsltRuntimeExtra struct {
+ Info c.Pointer
+ Deallocate libxml2.FreeFunc
+ Val struct {
+ Ptr c.Pointer
+ }
+}
+type RuntimeExtra X_xsltRuntimeExtra
+type RuntimeExtraPtr *RuntimeExtra
+
+type X_xsltTemplate struct {
+ Next *X_xsltTemplate
+ Style *X_xsltStylesheet
+ Match *libxml2.Char
+ Priority c.Float
+ Name *libxml2.Char
+ NameURI *libxml2.Char
+ Mode *libxml2.Char
+ ModeURI *libxml2.Char
+ Content libxml2.NodePtr
+ Elem libxml2.NodePtr
+ InheritedNsNr c.Int
+ InheritedNs *libxml2.NsPtr
+ NbCalls c.Int
+ Time c.Ulong
+ Params c.Pointer
+ TemplNr c.Int
+ TemplMax c.Int
+ TemplCalledTab *TemplatePtr
+ TemplCountTab *c.Int
+ Position c.Int
+}
+type Template X_xsltTemplate
+type TemplatePtr *Template
+
+type X_xsltStylesheet struct {
+ Parent *X_xsltStylesheet
+ Next *X_xsltStylesheet
+ Imports *X_xsltStylesheet
+ DocList DocumentPtr
+ Doc libxml2.DocPtr
+ StripSpaces libxml2.HashTablePtr
+ StripAll c.Int
+ CdataSection libxml2.HashTablePtr
+ Variables StackElemPtr
+ Templates TemplatePtr
+ TemplatesHash libxml2.HashTablePtr
+ RootMatch *X_xsltCompMatch
+ KeyMatch *X_xsltCompMatch
+ ElemMatch *X_xsltCompMatch
+ AttrMatch *X_xsltCompMatch
+ ParentMatch *X_xsltCompMatch
+ TextMatch *X_xsltCompMatch
+ PiMatch *X_xsltCompMatch
+ CommentMatch *X_xsltCompMatch
+ NsAliases libxml2.HashTablePtr
+ AttributeSets libxml2.HashTablePtr
+ NsHash libxml2.HashTablePtr
+ NsDefs c.Pointer
+ Keys c.Pointer
+ Method *libxml2.Char
+ MethodURI *libxml2.Char
+ Version *libxml2.Char
+ Encoding *libxml2.Char
+ OmitXmlDeclaration c.Int
+ DecimalFormat DecimalFormatPtr
+ Standalone c.Int
+ DoctypePublic *libxml2.Char
+ DoctypeSystem *libxml2.Char
+ Indent c.Int
+ MediaType *libxml2.Char
+ PreComps ElemPreCompPtr
+ Warnings c.Int
+ Errors c.Int
+ ExclPrefix *libxml2.Char
+ ExclPrefixTab **libxml2.Char
+ ExclPrefixNr c.Int
+ ExclPrefixMax c.Int
+ X_private c.Pointer
+ ExtInfos libxml2.HashTablePtr
+ ExtrasNr c.Int
+ Includes DocumentPtr
+ Dict libxml2.DictPtr
+ AttVTs c.Pointer
+ DefaultAlias *libxml2.Char
+ Nopreproc c.Int
+ Internalized c.Int
+ LiteralResult c.Int
+ Principal StylesheetPtr
+ ForwardsCompatible c.Int
+ NamedTemplates libxml2.HashTablePtr
+ XpathCtxt libxml2.XPathContextPtr
+ OpLimit c.Ulong
+ OpCount c.Ulong
+}
+
+type X_xsltDecimalFormat struct {
+ Next *X_xsltDecimalFormat
+ Name *libxml2.Char
+ Digit *libxml2.Char
+ PatternSeparator *libxml2.Char
+ MinusSign *libxml2.Char
+ Infinity *libxml2.Char
+ NoNumber *libxml2.Char
+ DecimalPoint *libxml2.Char
+ Grouping *libxml2.Char
+ Percent *libxml2.Char
+ Permille *libxml2.Char
+ ZeroDigit *libxml2.Char
+ NsUri *libxml2.Char
+}
+type DecimalFormat X_xsltDecimalFormat
+type DecimalFormatPtr *DecimalFormat
+
+type X_xsltDocument struct {
+ Next *X_xsltDocument
+ Main c.Int
+ Doc libxml2.DocPtr
+ Keys c.Pointer
+ Includes *X_xsltDocument
+ Preproc c.Int
+ NbKeysComputed c.Int
+}
+type Document X_xsltDocument
+type DocumentPtr *Document
+
+type X_xsltKeyDef struct {
+ Next *X_xsltKeyDef
+ Inst libxml2.NodePtr
+ Name *libxml2.Char
+ NameURI *libxml2.Char
+ Match *libxml2.Char
+ Use *libxml2.Char
+ Comp libxml2.XPathCompExprPtr
+ Usecomp libxml2.XPathCompExprPtr
+ NsList *libxml2.NsPtr
+ NsNr c.Int
+}
+type KeyDef X_xsltKeyDef
+type KeyDefPtr *KeyDef
+
+type X_xsltKeyTable struct {
+ Next *X_xsltKeyTable
+ Name *libxml2.Char
+ NameURI *libxml2.Char
+ Keys libxml2.HashTablePtr
+}
+type KeyTable X_xsltKeyTable
+type KeyTablePtr *KeyTable
+type Stylesheet X_xsltStylesheet
+type StylesheetPtr *Stylesheet
+
+type X_xsltTransformContext struct {
+ Style StylesheetPtr
+ Type OutputType
+ Templ TemplatePtr
+ TemplNr c.Int
+ TemplMax c.Int
+ TemplTab *TemplatePtr
+ Vars StackElemPtr
+ VarsNr c.Int
+ VarsMax c.Int
+ VarsTab *StackElemPtr
+ VarsBase c.Int
+ ExtFunctions libxml2.HashTablePtr
+ ExtElements libxml2.HashTablePtr
+ ExtInfos libxml2.HashTablePtr
+ Mode *libxml2.Char
+ ModeURI *libxml2.Char
+ DocList DocumentPtr
+ Document DocumentPtr
+ Node libxml2.NodePtr
+ NodeList libxml2.NodeSetPtr
+ Output libxml2.DocPtr
+ Insert libxml2.NodePtr
+ XpathCtxt libxml2.XPathContextPtr
+ State TransformState
+ GlobalVars libxml2.HashTablePtr
+ Inst libxml2.NodePtr
+ Xinclude c.Int
+ OutputFile *c.Char
+ Profile c.Int
+ Prof c.Long
+ ProfNr c.Int
+ ProfMax c.Int
+ ProfTab *c.Long
+ X_private c.Pointer
+ ExtrasNr c.Int
+ ExtrasMax c.Int
+ Extras RuntimeExtraPtr
+ StyleList DocumentPtr
+ Sec c.Pointer
+ Error libxml2.GenericErrorFunc
+ Errctx c.Pointer
+ Sortfunc SortFunc
+ TmpRVT libxml2.DocPtr
+ PersistRVT libxml2.DocPtr
+ Ctxtflags c.Int
+ Lasttext *libxml2.Char
+ Lasttsize c.Int
+ Lasttuse c.Int
+ DebugStatus c.Int
+ TraceCode *c.Ulong
+ ParserOptions c.Int
+ Dict libxml2.DictPtr
+ TmpDoc libxml2.DocPtr
+ Internalized c.Int
+ NbKeys c.Int
+ HasTemplKeyPatterns c.Int
+ CurrentTemplateRule TemplatePtr
+ InitialContextNode libxml2.NodePtr
+ InitialContextDoc libxml2.DocPtr
+ Cache TransformCachePtr
+ ContextVariable c.Pointer
+ LocalRVT libxml2.DocPtr
+ LocalRVTBase libxml2.DocPtr
+ KeyInitLevel c.Int
+ Depth c.Int
+ MaxTemplateDepth c.Int
+ MaxTemplateVars c.Int
+ OpLimit c.Ulong
+ OpCount c.Ulong
+ SourceDocDirty c.Int
+ CurrentId c.Ulong
+ NewLocale NewLocaleFunc
+ FreeLocale FreeLocaleFunc
+ GenSortKey GenSortKeyFunc
+}
+type TransformContext X_xsltTransformContext
+type TransformContextPtr *TransformContext
+
+type X_xsltElemPreComp struct {
+ Next ElemPreCompPtr
+ Type StyleType
+ Func TransformFunction
+ Inst libxml2.NodePtr
+ Free ElemPreCompDeallocator
+}
+type ElemPreComp X_xsltElemPreComp
+type ElemPreCompPtr *ElemPreComp
+
+// llgo:type C
+type TransformFunction func(TransformContextPtr, libxml2.NodePtr, libxml2.NodePtr, ElemPreCompPtr)
+
+// llgo:type C
+type SortFunc func(TransformContextPtr, *libxml2.NodePtr, c.Int)
+type StyleType c.Int
+
+const (
+ FUNC_COPY StyleType = 1
+ FUNC_SORT StyleType = 2
+ FUNC_TEXT StyleType = 3
+ FUNC_ELEMENT StyleType = 4
+ FUNC_ATTRIBUTE StyleType = 5
+ FUNC_COMMENT StyleType = 6
+ FUNC_PI StyleType = 7
+ FUNC_COPYOF StyleType = 8
+ FUNC_VALUEOF StyleType = 9
+ FUNC_NUMBER StyleType = 10
+ FUNC_APPLYIMPORTS StyleType = 11
+ FUNC_CALLTEMPLATE StyleType = 12
+ FUNC_APPLYTEMPLATES StyleType = 13
+ FUNC_CHOOSE StyleType = 14
+ FUNC_IF StyleType = 15
+ FUNC_FOREACH StyleType = 16
+ FUNC_DOCUMENT StyleType = 17
+ FUNC_WITHPARAM StyleType = 18
+ FUNC_PARAM StyleType = 19
+ FUNC_VARIABLE StyleType = 20
+ FUNC_WHEN StyleType = 21
+ FUNC_EXTENSION StyleType = 22
+)
+
+// llgo:type C
+type ElemPreCompDeallocator func(ElemPreCompPtr)
+
+type X_xsltStylePreComp struct {
+ Next ElemPreCompPtr
+ Type StyleType
+ Func TransformFunction
+ Inst libxml2.NodePtr
+ Stype *libxml2.Char
+ HasStype c.Int
+ Number c.Int
+ Order *libxml2.Char
+ HasOrder c.Int
+ Descending c.Int
+ Lang *libxml2.Char
+ HasLang c.Int
+ CaseOrder *libxml2.Char
+ LowerFirst c.Int
+ Use *libxml2.Char
+ HasUse c.Int
+ Noescape c.Int
+ Name *libxml2.Char
+ HasName c.Int
+ Ns *libxml2.Char
+ HasNs c.Int
+ Mode *libxml2.Char
+ ModeURI *libxml2.Char
+ Test *libxml2.Char
+ Templ TemplatePtr
+ Select *libxml2.Char
+ Ver11 c.Int
+ Filename *libxml2.Char
+ HasFilename c.Int
+ Numdata NumberData
+ Comp libxml2.XPathCompExprPtr
+ NsList *libxml2.NsPtr
+ NsNr c.Int
+}
+type StylePreComp X_xsltStylePreComp
+type StylePreCompPtr *StylePreComp
+
+type X_xsltStackElem struct {
+ Next *X_xsltStackElem
+ Comp StylePreCompPtr
+ Computed c.Int
+ Name *libxml2.Char
+ NameURI *libxml2.Char
+ Select *libxml2.Char
+ Tree libxml2.NodePtr
+ Value libxml2.XPathObjectPtr
+ Fragment libxml2.DocPtr
+ Level c.Int
+ Context TransformContextPtr
+ Flags c.Int
+}
+type StackElem X_xsltStackElem
+type StackElemPtr *StackElem
+
+type X_xsltTransformCache struct {
+ RVT libxml2.DocPtr
+ NbRVT c.Int
+ StackItems StackElemPtr
+ NbStackItems c.Int
+}
+type TransformCache X_xsltTransformCache
+type TransformCachePtr *TransformCache
+type OutputType c.Int
+
+const (
+ OUTPUT_XML OutputType = 0
+ OUTPUT_HTML OutputType = 1
+ OUTPUT_TEXT OutputType = 2
+)
+
+// llgo:type C
+type NewLocaleFunc func(*libxml2.Char, c.Int) c.Pointer
+
+// llgo:type C
+type FreeLocaleFunc func(c.Pointer)
+
+// llgo:type C
+type GenSortKeyFunc func(c.Pointer, *libxml2.Char) *libxml2.Char
+type TransformState c.Int
+
+const (
+ STATE_OK TransformState = 0
+ STATE_ERROR TransformState = 1
+ STATE_STOPPED TransformState = 2
+)
+
+/*
+ * Functions associated to the internal types
+xsltDecimalFormatPtr xsltDecimalFormatGetByName(xsltStylesheetPtr sheet,
+ xmlChar *name);
+*/
+//go:linkname NewStylesheet C.xsltNewStylesheet
+func NewStylesheet() StylesheetPtr
+
+//go:linkname ParseStylesheetFile C.xsltParseStylesheetFile
+func ParseStylesheetFile(filename *libxml2.Char) StylesheetPtr
+
+//go:linkname FreeStylesheet C.xsltFreeStylesheet
+func FreeStylesheet(style StylesheetPtr)
+
+//go:linkname IsBlank C.xsltIsBlank
+func IsBlank(str *libxml2.Char) c.Int
+
+//go:linkname FreeStackElemList C.xsltFreeStackElemList
+func FreeStackElemList(elem StackElemPtr)
+
+//go:linkname DecimalFormatGetByName C.xsltDecimalFormatGetByName
+func DecimalFormatGetByName(style StylesheetPtr, name *libxml2.Char) DecimalFormatPtr
+
+//go:linkname DecimalFormatGetByQName C.xsltDecimalFormatGetByQName
+func DecimalFormatGetByQName(style StylesheetPtr, nsUri *libxml2.Char, name *libxml2.Char) DecimalFormatPtr
+
+//go:linkname ParseStylesheetProcess C.xsltParseStylesheetProcess
+func ParseStylesheetProcess(ret StylesheetPtr, doc libxml2.DocPtr) StylesheetPtr
+
+//go:linkname ParseStylesheetOutput C.xsltParseStylesheetOutput
+func ParseStylesheetOutput(style StylesheetPtr, cur libxml2.NodePtr)
+
+//go:linkname ParseStylesheetDoc C.xsltParseStylesheetDoc
+func ParseStylesheetDoc(doc libxml2.DocPtr) StylesheetPtr
+
+//go:linkname ParseStylesheetImportedDoc C.xsltParseStylesheetImportedDoc
+func ParseStylesheetImportedDoc(doc libxml2.DocPtr, style StylesheetPtr) StylesheetPtr
+
+//go:linkname ParseStylesheetUser C.xsltParseStylesheetUser
+func ParseStylesheetUser(style StylesheetPtr, doc libxml2.DocPtr) c.Int
+
+//go:linkname LoadStylesheetPI C.xsltLoadStylesheetPI
+func LoadStylesheetPI(doc libxml2.DocPtr) StylesheetPtr
+
+//go:linkname NumberFormat C.xsltNumberFormat
+func NumberFormat(ctxt TransformContextPtr, data NumberDataPtr, node libxml2.NodePtr)
+
+//go:linkname FormatNumberConversion C.xsltFormatNumberConversion
+func FormatNumberConversion(self DecimalFormatPtr, format *libxml2.Char, number c.Double, result **libxml2.Char) libxml2.XPathError
+
+//go:linkname ParseTemplateContent C.xsltParseTemplateContent
+func ParseTemplateContent(style StylesheetPtr, templ libxml2.NodePtr)
+
+//go:linkname AllocateExtra C.xsltAllocateExtra
+func AllocateExtra(style StylesheetPtr) c.Int
+
+//go:linkname AllocateExtraCtxt C.xsltAllocateExtraCtxt
+func AllocateExtraCtxt(ctxt TransformContextPtr) c.Int
+
+/*
+ * Extra functions for Result Value Trees
+ */
+//go:linkname CreateRVT C.xsltCreateRVT
+func CreateRVT(ctxt TransformContextPtr) libxml2.DocPtr
+
+//go:linkname RegisterTmpRVT C.xsltRegisterTmpRVT
+func RegisterTmpRVT(ctxt TransformContextPtr, RVT libxml2.DocPtr) c.Int
+
+//go:linkname RegisterLocalRVT C.xsltRegisterLocalRVT
+func RegisterLocalRVT(ctxt TransformContextPtr, RVT libxml2.DocPtr) c.Int
+
+//go:linkname RegisterPersistRVT C.xsltRegisterPersistRVT
+func RegisterPersistRVT(ctxt TransformContextPtr, RVT libxml2.DocPtr) c.Int
+
+//go:linkname ExtensionInstructionResultRegister C.xsltExtensionInstructionResultRegister
+func ExtensionInstructionResultRegister(ctxt TransformContextPtr, obj libxml2.XPathObjectPtr) c.Int
+
+//go:linkname ExtensionInstructionResultFinalize C.xsltExtensionInstructionResultFinalize
+func ExtensionInstructionResultFinalize(ctxt TransformContextPtr) c.Int
+
+//go:linkname FlagRVTs C.xsltFlagRVTs
+func FlagRVTs(ctxt TransformContextPtr, obj libxml2.XPathObjectPtr, val c.Int) c.Int
+
+//go:linkname FreeRVTs C.xsltFreeRVTs
+func FreeRVTs(ctxt TransformContextPtr)
+
+//go:linkname ReleaseRVT C.xsltReleaseRVT
+func ReleaseRVT(ctxt TransformContextPtr, RVT libxml2.DocPtr)
+
+/*
+ * Extra functions for Attribute Value Templates
+ */
+//go:linkname CompileAttr C.xsltCompileAttr
+func CompileAttr(style StylesheetPtr, attr libxml2.AttrPtr)
+
+//go:linkname EvalAVT C.xsltEvalAVT
+func EvalAVT(ctxt TransformContextPtr, avt c.Pointer, node libxml2.NodePtr) *libxml2.Char
+
+//go:linkname FreeAVTList C.xsltFreeAVTList
+func FreeAVTList(avt c.Pointer)
+
+/*
+ * Extra function for successful xsltCleanupGlobals / xsltInit sequence.
+ */
+//go:linkname Uninit C.xsltUninit
+func Uninit()
+
+/************************************************************************
+ * *
+ * Transformation-time functions for *internal* use only *
+ * *
+ ************************************************************************/
+//go:linkname InitCtxtKey C.xsltInitCtxtKey
+func InitCtxtKey(ctxt TransformContextPtr, doc DocumentPtr, keyd KeyDefPtr) c.Int
+
+//go:linkname InitAllDocKeys C.xsltInitAllDocKeys
+func InitAllDocKeys(ctxt TransformContextPtr) c.Int
diff --git a/libxslt/xsltconfig.go b/libxslt/xsltconfig.go
new file mode 100644
index 0000000..c617d02
--- /dev/null
+++ b/libxslt/xsltconfig.go
@@ -0,0 +1,8 @@
+package libxslt
+
+import _ "unsafe"
+
+const LIBXSLT_DOTTED_VERSION = "1.1.42"
+const LIBXSLT_VERSION = 10142
+const LIBXSLT_VERSION_STRING = "10142"
+const LIBXSLT_VERSION_EXTRA = ""
diff --git a/libxslt/xsltexports.go b/libxslt/xsltexports.go
new file mode 100644
index 0000000..f830fa5
--- /dev/null
+++ b/libxslt/xsltexports.go
@@ -0,0 +1,3 @@
+package libxslt
+
+import _ "unsafe"
diff --git a/libxslt/xsltlocale.go b/libxslt/xsltlocale.go
new file mode 100644
index 0000000..2218620
--- /dev/null
+++ b/libxslt/xsltlocale.go
@@ -0,0 +1,25 @@
+package libxslt
+
+import (
+ "github.com/goplus/lib/c"
+ "github.com/goplus/llpkg/libxml2"
+ _ "unsafe"
+)
+
+//go:linkname NewLocale C.xsltNewLocale
+func NewLocale(langName *libxml2.Char, lowerFirst c.Int) c.Pointer
+
+//go:linkname FreeLocale C.xsltFreeLocale
+func FreeLocale(locale c.Pointer)
+
+//go:linkname Strxfrm C.xsltStrxfrm
+func Strxfrm(locale c.Pointer, string *libxml2.Char) *libxml2.Char
+
+//go:linkname FreeLocales C.xsltFreeLocales
+func FreeLocales()
+
+type Locale c.Pointer
+type LocaleChar libxml2.Char
+
+//go:linkname LocaleStrcmp C.xsltLocaleStrcmp
+func LocaleStrcmp(locale c.Pointer, str1 *libxml2.Char, str2 *libxml2.Char) c.Int
diff --git a/libxslt/xsltutils.go b/libxslt/xsltutils.go
new file mode 100644
index 0000000..b51f152
--- /dev/null
+++ b/libxslt/xsltutils.go
@@ -0,0 +1,158 @@
+package libxslt
+
+import (
+ "github.com/goplus/lib/c"
+ "github.com/goplus/llpkg/libxml2"
+ _ "unsafe"
+)
+
+/*
+ * Our own version of namespaced attributes lookup.
+ */
+//go:linkname GetNsProp C.xsltGetNsProp
+func GetNsProp(node libxml2.NodePtr, name *libxml2.Char, nameSpace *libxml2.Char) *libxml2.Char
+
+//go:linkname GetCNsProp C.xsltGetCNsProp
+func GetCNsProp(style StylesheetPtr, node libxml2.NodePtr, name *libxml2.Char, nameSpace *libxml2.Char) *libxml2.Char
+
+//go:linkname GetUTF8Char C.xsltGetUTF8Char
+func GetUTF8Char(utf *c.Char, len *c.Int) c.Int
+
+type DebugTraceCodes c.Int
+
+const (
+ TRACE_ALL DebugTraceCodes = -1
+ TRACE_NONE DebugTraceCodes = 0
+ TRACE_COPY_TEXT DebugTraceCodes = 1
+ TRACE_PROCESS_NODE DebugTraceCodes = 2
+ TRACE_APPLY_TEMPLATE DebugTraceCodes = 4
+ TRACE_COPY DebugTraceCodes = 8
+ TRACE_COMMENT DebugTraceCodes = 16
+ TRACE_PI DebugTraceCodes = 32
+ TRACE_COPY_OF DebugTraceCodes = 64
+ TRACE_VALUE_OF DebugTraceCodes = 128
+ TRACE_CALL_TEMPLATE DebugTraceCodes = 256
+ TRACE_APPLY_TEMPLATES DebugTraceCodes = 512
+ TRACE_CHOOSE DebugTraceCodes = 1024
+ TRACE_IF DebugTraceCodes = 2048
+ TRACE_FOR_EACH DebugTraceCodes = 4096
+ TRACE_STRIP_SPACES DebugTraceCodes = 8192
+ TRACE_TEMPLATES DebugTraceCodes = 16384
+ TRACE_KEYS DebugTraceCodes = 32768
+ TRACE_VARIABLES DebugTraceCodes = 65536
+)
+
+// llgo:link DebugTraceCodes.DebugSetDefaultTrace C.xsltDebugSetDefaultTrace
+func (recv_ DebugTraceCodes) DebugSetDefaultTrace() {
+}
+
+//go:linkname DebugGetDefaultTrace C.xsltDebugGetDefaultTrace
+func DebugGetDefaultTrace() DebugTraceCodes
+
+//go:linkname PrintErrorContext C.xsltPrintErrorContext
+func PrintErrorContext(ctxt TransformContextPtr, style StylesheetPtr, node libxml2.NodePtr)
+
+//go:linkname Message C.xsltMessage
+func Message(ctxt TransformContextPtr, node libxml2.NodePtr, inst libxml2.NodePtr)
+
+//go:linkname SetGenericErrorFunc C.xsltSetGenericErrorFunc
+func SetGenericErrorFunc(ctx c.Pointer, handler libxml2.GenericErrorFunc)
+
+//go:linkname SetGenericDebugFunc C.xsltSetGenericDebugFunc
+func SetGenericDebugFunc(ctx c.Pointer, handler libxml2.GenericErrorFunc)
+
+//go:linkname SetTransformErrorFunc C.xsltSetTransformErrorFunc
+func SetTransformErrorFunc(ctxt TransformContextPtr, ctx c.Pointer, handler libxml2.GenericErrorFunc)
+
+//go:linkname TransformError C.xsltTransformError
+func TransformError(ctxt TransformContextPtr, style StylesheetPtr, node libxml2.NodePtr, msg *c.Char, __llgo_va_list ...interface{})
+
+//go:linkname SetCtxtParseOptions C.xsltSetCtxtParseOptions
+func SetCtxtParseOptions(ctxt TransformContextPtr, options c.Int) c.Int
+
+/*
+ * Sorting.
+ */
+//go:linkname DocumentSortFunction C.xsltDocumentSortFunction
+func DocumentSortFunction(list libxml2.NodeSetPtr)
+
+//go:linkname SetSortFunc C.xsltSetSortFunc
+func SetSortFunc(handler SortFunc)
+
+//go:linkname SetCtxtSortFunc C.xsltSetCtxtSortFunc
+func SetCtxtSortFunc(ctxt TransformContextPtr, handler SortFunc)
+
+//go:linkname DefaultSortFunction C.xsltDefaultSortFunction
+func DefaultSortFunction(ctxt TransformContextPtr, sorts *libxml2.NodePtr, nbsorts c.Int)
+
+//go:linkname DoSortFunction C.xsltDoSortFunction
+func DoSortFunction(ctxt TransformContextPtr, sorts *libxml2.NodePtr, nbsorts c.Int)
+
+//go:linkname ComputeSortResult C.xsltComputeSortResult
+func ComputeSortResult(ctxt TransformContextPtr, sort libxml2.NodePtr) *libxml2.XPathObjectPtr
+
+/*
+ * QNames handling.
+ */
+//go:linkname SplitQName C.xsltSplitQName
+func SplitQName(dict libxml2.DictPtr, name *libxml2.Char, prefix **libxml2.Char) *libxml2.Char
+
+//go:linkname GetQNameURI C.xsltGetQNameURI
+func GetQNameURI(node libxml2.NodePtr, name **libxml2.Char) *libxml2.Char
+
+//go:linkname GetQNameURI2 C.xsltGetQNameURI2
+func GetQNameURI2(style StylesheetPtr, node libxml2.NodePtr, name **libxml2.Char) *libxml2.Char
+
+/*
+ * Output, reuse libxml I/O buffers.
+ */
+//go:linkname SaveResultTo C.xsltSaveResultTo
+func SaveResultTo(buf libxml2.OutputBufferPtr, result libxml2.DocPtr, style StylesheetPtr) c.Int
+
+//go:linkname SaveResultToFilename C.xsltSaveResultToFilename
+func SaveResultToFilename(URI *c.Char, result libxml2.DocPtr, style StylesheetPtr, compression c.Int) c.Int
+
+//go:linkname SaveResultToFile C.xsltSaveResultToFile
+func SaveResultToFile(file *c.FILE, result libxml2.DocPtr, style StylesheetPtr) c.Int
+
+//go:linkname SaveResultToFd C.xsltSaveResultToFd
+func SaveResultToFd(fd c.Int, result libxml2.DocPtr, style StylesheetPtr) c.Int
+
+//go:linkname SaveResultToString C.xsltSaveResultToString
+func SaveResultToString(doc_txt_ptr **libxml2.Char, doc_txt_len *c.Int, result libxml2.DocPtr, style StylesheetPtr) c.Int
+
+/*
+ * XPath interface
+ */
+//go:linkname XPathCompile C.xsltXPathCompile
+func XPathCompile(style StylesheetPtr, str *libxml2.Char) libxml2.XPathCompExprPtr
+
+//go:linkname XPathCompileFlags C.xsltXPathCompileFlags
+func XPathCompileFlags(style StylesheetPtr, str *libxml2.Char, flags c.Int) libxml2.XPathCompExprPtr
+
+type DebugStatusCodes c.Int
+
+const (
+ DEBUG_NONE DebugStatusCodes = 0
+ DEBUG_INIT DebugStatusCodes = 1
+ DEBUG_STEP DebugStatusCodes = 2
+ DEBUG_STEPOUT DebugStatusCodes = 3
+ DEBUG_NEXT DebugStatusCodes = 4
+ DEBUG_STOP DebugStatusCodes = 5
+ DEBUG_CONT DebugStatusCodes = 6
+ DEBUG_RUN DebugStatusCodes = 7
+ DEBUG_RUN_RESTART DebugStatusCodes = 8
+ DEBUG_QUIT DebugStatusCodes = 9
+)
+
+// llgo:type C
+type HandleDebuggerCallback func(libxml2.NodePtr, libxml2.NodePtr, TemplatePtr, TransformContextPtr)
+
+// llgo:type C
+type AddCallCallback func(TemplatePtr, libxml2.NodePtr) c.Int
+
+// llgo:type C
+type DropCallCallback func()
+
+//go:linkname GetDebuggerStatus C.xsltGetDebuggerStatus
+func GetDebuggerStatus() c.Int
diff --git a/libyaml/llpkg.cfg b/libyaml/llpkg.cfg
new file mode 100644
index 0000000..ceade8a
--- /dev/null
+++ b/libyaml/llpkg.cfg
@@ -0,0 +1,8 @@
+{
+ "upstream": {
+ "package": {
+ "name": "libyaml",
+ "version": "0.2.5"
+ }
+ }
+}
\ No newline at end of file
diff --git a/miniz/llcppg.cfg b/miniz/llcppg.cfg
new file mode 100644
index 0000000..2539905
--- /dev/null
+++ b/miniz/llcppg.cfg
@@ -0,0 +1,13 @@
+{
+ "name": "miniz",
+ "cflags": "$(pkg-config --cflags miniz)",
+ "libs": "$(pkg-config --libs miniz)",
+ "include": [
+ "miniz/miniz.h",
+ "miniz/miniz_tdef.h",
+ "miniz/miniz_tinfl.h",
+ "miniz/miniz_zip.h",
+ "miniz/miniz_common.h",
+ "miniz/miniz_export.h"
+ ]
+}
diff --git a/miniz/llcppg.symb.json b/miniz/llcppg.symb.json
new file mode 100755
index 0000000..f6a034e
--- /dev/null
+++ b/miniz/llcppg.symb.json
@@ -0,0 +1,577 @@
+[
+ {
+ "mangle": "miniz_def_alloc_func",
+ "c++": "miniz_def_alloc_func(void *, size_t, size_t)",
+ "go": "MinizDefAllocFunc"
+ },
+ {
+ "mangle": "miniz_def_free_func",
+ "c++": "miniz_def_free_func(void *, void *)",
+ "go": "MinizDefFreeFunc"
+ },
+ {
+ "mangle": "miniz_def_realloc_func",
+ "c++": "miniz_def_realloc_func(void *, void *, size_t, size_t)",
+ "go": "MinizDefReallocFunc"
+ },
+ {
+ "mangle": "mz_adler32",
+ "c++": "mz_adler32(mz_ulong, const unsigned char *, size_t)",
+ "go": "MzUlong.MzAdler32"
+ },
+ {
+ "mangle": "mz_compress",
+ "c++": "mz_compress(unsigned char *, mz_ulong *, const unsigned char *, mz_ulong)",
+ "go": "MzCompress"
+ },
+ {
+ "mangle": "mz_compress2",
+ "c++": "mz_compress2(unsigned char *, mz_ulong *, const unsigned char *, mz_ulong, int)",
+ "go": "MzCompress2"
+ },
+ {
+ "mangle": "mz_compressBound",
+ "c++": "mz_compressBound(mz_ulong)",
+ "go": "MzUlong.MzCompressBound"
+ },
+ {
+ "mangle": "mz_crc32",
+ "c++": "mz_crc32(mz_ulong, const unsigned char *, size_t)",
+ "go": "MzUlong.MzCrc32"
+ },
+ {
+ "mangle": "mz_deflate",
+ "c++": "mz_deflate(mz_streamp, int)",
+ "go": "MzDeflate"
+ },
+ {
+ "mangle": "mz_deflateBound",
+ "c++": "mz_deflateBound(mz_streamp, mz_ulong)",
+ "go": "MzDeflateBound"
+ },
+ {
+ "mangle": "mz_deflateEnd",
+ "c++": "mz_deflateEnd(mz_streamp)",
+ "go": "MzDeflateEnd"
+ },
+ {
+ "mangle": "mz_deflateInit",
+ "c++": "mz_deflateInit(mz_streamp, int)",
+ "go": "MzDeflateInit"
+ },
+ {
+ "mangle": "mz_deflateInit2",
+ "c++": "mz_deflateInit2(mz_streamp, int, int, int, int, int)",
+ "go": "MzDeflateInit2"
+ },
+ {
+ "mangle": "mz_deflateReset",
+ "c++": "mz_deflateReset(mz_streamp)",
+ "go": "MzDeflateReset"
+ },
+ {
+ "mangle": "mz_error",
+ "c++": "mz_error(int)",
+ "go": "MzError"
+ },
+ {
+ "mangle": "mz_free",
+ "c++": "mz_free(void *)",
+ "go": "MzFree"
+ },
+ {
+ "mangle": "mz_inflate",
+ "c++": "mz_inflate(mz_streamp, int)",
+ "go": "MzInflate"
+ },
+ {
+ "mangle": "mz_inflateEnd",
+ "c++": "mz_inflateEnd(mz_streamp)",
+ "go": "MzInflateEnd"
+ },
+ {
+ "mangle": "mz_inflateInit",
+ "c++": "mz_inflateInit(mz_streamp)",
+ "go": "MzInflateInit"
+ },
+ {
+ "mangle": "mz_inflateInit2",
+ "c++": "mz_inflateInit2(mz_streamp, int)",
+ "go": "MzInflateInit2"
+ },
+ {
+ "mangle": "mz_inflateReset",
+ "c++": "mz_inflateReset(mz_streamp)",
+ "go": "MzInflateReset"
+ },
+ {
+ "mangle": "mz_uncompress",
+ "c++": "mz_uncompress(unsigned char *, mz_ulong *, const unsigned char *, mz_ulong)",
+ "go": "MzUncompress"
+ },
+ {
+ "mangle": "mz_uncompress2",
+ "c++": "mz_uncompress2(unsigned char *, mz_ulong *, const unsigned char *, mz_ulong *)",
+ "go": "MzUncompress2"
+ },
+ {
+ "mangle": "mz_version",
+ "c++": "mz_version()",
+ "go": "MzVersion"
+ },
+ {
+ "mangle": "mz_zip_add_mem_to_archive_file_in_place",
+ "c++": "mz_zip_add_mem_to_archive_file_in_place(const char *, const char *, const void *, size_t, const void *, mz_uint16, mz_uint)",
+ "go": "MzZipAddMemToArchiveFileInPlace"
+ },
+ {
+ "mangle": "mz_zip_add_mem_to_archive_file_in_place_v2",
+ "c++": "mz_zip_add_mem_to_archive_file_in_place_v2(const char *, const char *, const void *, size_t, const void *, mz_uint16, mz_uint, mz_zip_error *)",
+ "go": "MzZipAddMemToArchiveFileInPlaceV2"
+ },
+ {
+ "mangle": "mz_zip_clear_last_error",
+ "c++": "mz_zip_clear_last_error(mz_zip_archive *)",
+ "go": "(*MzZipArchive).MzZipClearLastError"
+ },
+ {
+ "mangle": "mz_zip_end",
+ "c++": "mz_zip_end(mz_zip_archive *)",
+ "go": "(*MzZipArchive).MzZipEnd"
+ },
+ {
+ "mangle": "mz_zip_extract_archive_file_to_heap",
+ "c++": "mz_zip_extract_archive_file_to_heap(const char *, const char *, size_t *, mz_uint)",
+ "go": "MzZipExtractArchiveFileToHeap"
+ },
+ {
+ "mangle": "mz_zip_extract_archive_file_to_heap_v2",
+ "c++": "mz_zip_extract_archive_file_to_heap_v2(const char *, const char *, const char *, size_t *, mz_uint, mz_zip_error *)",
+ "go": "MzZipExtractArchiveFileToHeapV2"
+ },
+ {
+ "mangle": "mz_zip_get_archive_file_start_offset",
+ "c++": "mz_zip_get_archive_file_start_offset(mz_zip_archive *)",
+ "go": "(*MzZipArchive).MzZipGetArchiveFileStartOffset"
+ },
+ {
+ "mangle": "mz_zip_get_archive_size",
+ "c++": "mz_zip_get_archive_size(mz_zip_archive *)",
+ "go": "(*MzZipArchive).MzZipGetArchiveSize"
+ },
+ {
+ "mangle": "mz_zip_get_central_dir_size",
+ "c++": "mz_zip_get_central_dir_size(mz_zip_archive *)",
+ "go": "(*MzZipArchive).MzZipGetCentralDirSize"
+ },
+ {
+ "mangle": "mz_zip_get_cfile",
+ "c++": "mz_zip_get_cfile(mz_zip_archive *)",
+ "go": "(*MzZipArchive).MzZipGetCfile"
+ },
+ {
+ "mangle": "mz_zip_get_error_string",
+ "c++": "mz_zip_get_error_string(mz_zip_error)",
+ "go": "MzZipError.MzZipGetErrorString"
+ },
+ {
+ "mangle": "mz_zip_get_last_error",
+ "c++": "mz_zip_get_last_error(mz_zip_archive *)",
+ "go": "(*MzZipArchive).MzZipGetLastError"
+ },
+ {
+ "mangle": "mz_zip_get_mode",
+ "c++": "mz_zip_get_mode(mz_zip_archive *)",
+ "go": "(*MzZipArchive).MzZipGetMode"
+ },
+ {
+ "mangle": "mz_zip_get_type",
+ "c++": "mz_zip_get_type(mz_zip_archive *)",
+ "go": "(*MzZipArchive).MzZipGetType"
+ },
+ {
+ "mangle": "mz_zip_is_zip64",
+ "c++": "mz_zip_is_zip64(mz_zip_archive *)",
+ "go": "(*MzZipArchive).MzZipIsZip64"
+ },
+ {
+ "mangle": "mz_zip_peek_last_error",
+ "c++": "mz_zip_peek_last_error(mz_zip_archive *)",
+ "go": "(*MzZipArchive).MzZipPeekLastError"
+ },
+ {
+ "mangle": "mz_zip_read_archive_data",
+ "c++": "mz_zip_read_archive_data(mz_zip_archive *, mz_uint64, void *, size_t)",
+ "go": "(*MzZipArchive).MzZipReadArchiveData"
+ },
+ {
+ "mangle": "mz_zip_reader_end",
+ "c++": "mz_zip_reader_end(mz_zip_archive *)",
+ "go": "(*MzZipArchive).MzZipReaderEnd"
+ },
+ {
+ "mangle": "mz_zip_reader_extract_file_iter_new",
+ "c++": "mz_zip_reader_extract_file_iter_new(mz_zip_archive *, const char *, mz_uint)",
+ "go": "(*MzZipArchive).MzZipReaderExtractFileIterNew"
+ },
+ {
+ "mangle": "mz_zip_reader_extract_file_to_callback",
+ "c++": "mz_zip_reader_extract_file_to_callback(mz_zip_archive *, const char *, mz_file_write_func, void *, mz_uint)",
+ "go": "(*MzZipArchive).MzZipReaderExtractFileToCallback"
+ },
+ {
+ "mangle": "mz_zip_reader_extract_file_to_cfile",
+ "c++": "mz_zip_reader_extract_file_to_cfile(mz_zip_archive *, const char *, FILE *, mz_uint)",
+ "go": "(*MzZipArchive).MzZipReaderExtractFileToCfile"
+ },
+ {
+ "mangle": "mz_zip_reader_extract_file_to_file",
+ "c++": "mz_zip_reader_extract_file_to_file(mz_zip_archive *, const char *, const char *, mz_uint)",
+ "go": "(*MzZipArchive).MzZipReaderExtractFileToFile"
+ },
+ {
+ "mangle": "mz_zip_reader_extract_file_to_heap",
+ "c++": "mz_zip_reader_extract_file_to_heap(mz_zip_archive *, const char *, size_t *, mz_uint)",
+ "go": "(*MzZipArchive).MzZipReaderExtractFileToHeap"
+ },
+ {
+ "mangle": "mz_zip_reader_extract_file_to_mem",
+ "c++": "mz_zip_reader_extract_file_to_mem(mz_zip_archive *, const char *, void *, size_t, mz_uint)",
+ "go": "(*MzZipArchive).MzZipReaderExtractFileToMem"
+ },
+ {
+ "mangle": "mz_zip_reader_extract_file_to_mem_no_alloc",
+ "c++": "mz_zip_reader_extract_file_to_mem_no_alloc(mz_zip_archive *, const char *, void *, size_t, mz_uint, void *, size_t)",
+ "go": "(*MzZipArchive).MzZipReaderExtractFileToMemNoAlloc"
+ },
+ {
+ "mangle": "mz_zip_reader_extract_iter_free",
+ "c++": "mz_zip_reader_extract_iter_free(mz_zip_reader_extract_iter_state *)",
+ "go": "(*MzZipReaderExtractIterState).MzZipReaderExtractIterFree"
+ },
+ {
+ "mangle": "mz_zip_reader_extract_iter_new",
+ "c++": "mz_zip_reader_extract_iter_new(mz_zip_archive *, mz_uint, mz_uint)",
+ "go": "(*MzZipArchive).MzZipReaderExtractIterNew"
+ },
+ {
+ "mangle": "mz_zip_reader_extract_iter_read",
+ "c++": "mz_zip_reader_extract_iter_read(mz_zip_reader_extract_iter_state *, void *, size_t)",
+ "go": "(*MzZipReaderExtractIterState).MzZipReaderExtractIterRead"
+ },
+ {
+ "mangle": "mz_zip_reader_extract_to_callback",
+ "c++": "mz_zip_reader_extract_to_callback(mz_zip_archive *, mz_uint, mz_file_write_func, void *, mz_uint)",
+ "go": "(*MzZipArchive).MzZipReaderExtractToCallback"
+ },
+ {
+ "mangle": "mz_zip_reader_extract_to_cfile",
+ "c++": "mz_zip_reader_extract_to_cfile(mz_zip_archive *, mz_uint, FILE *, mz_uint)",
+ "go": "(*MzZipArchive).MzZipReaderExtractToCfile"
+ },
+ {
+ "mangle": "mz_zip_reader_extract_to_file",
+ "c++": "mz_zip_reader_extract_to_file(mz_zip_archive *, mz_uint, const char *, mz_uint)",
+ "go": "(*MzZipArchive).MzZipReaderExtractToFile"
+ },
+ {
+ "mangle": "mz_zip_reader_extract_to_heap",
+ "c++": "mz_zip_reader_extract_to_heap(mz_zip_archive *, mz_uint, size_t *, mz_uint)",
+ "go": "(*MzZipArchive).MzZipReaderExtractToHeap"
+ },
+ {
+ "mangle": "mz_zip_reader_extract_to_mem",
+ "c++": "mz_zip_reader_extract_to_mem(mz_zip_archive *, mz_uint, void *, size_t, mz_uint)",
+ "go": "(*MzZipArchive).MzZipReaderExtractToMem"
+ },
+ {
+ "mangle": "mz_zip_reader_extract_to_mem_no_alloc",
+ "c++": "mz_zip_reader_extract_to_mem_no_alloc(mz_zip_archive *, mz_uint, void *, size_t, mz_uint, void *, size_t)",
+ "go": "(*MzZipArchive).MzZipReaderExtractToMemNoAlloc"
+ },
+ {
+ "mangle": "mz_zip_reader_file_stat",
+ "c++": "mz_zip_reader_file_stat(mz_zip_archive *, mz_uint, mz_zip_archive_file_stat *)",
+ "go": "(*MzZipArchive).MzZipReaderFileStat"
+ },
+ {
+ "mangle": "mz_zip_reader_get_filename",
+ "c++": "mz_zip_reader_get_filename(mz_zip_archive *, mz_uint, char *, mz_uint)",
+ "go": "(*MzZipArchive).MzZipReaderGetFilename"
+ },
+ {
+ "mangle": "mz_zip_reader_get_num_files",
+ "c++": "mz_zip_reader_get_num_files(mz_zip_archive *)",
+ "go": "(*MzZipArchive).MzZipReaderGetNumFiles"
+ },
+ {
+ "mangle": "mz_zip_reader_init",
+ "c++": "mz_zip_reader_init(mz_zip_archive *, mz_uint64, mz_uint)",
+ "go": "(*MzZipArchive).MzZipReaderInit"
+ },
+ {
+ "mangle": "mz_zip_reader_init_cfile",
+ "c++": "mz_zip_reader_init_cfile(mz_zip_archive *, FILE *, mz_uint64, mz_uint)",
+ "go": "(*MzZipArchive).MzZipReaderInitCfile"
+ },
+ {
+ "mangle": "mz_zip_reader_init_file",
+ "c++": "mz_zip_reader_init_file(mz_zip_archive *, const char *, mz_uint32)",
+ "go": "(*MzZipArchive).MzZipReaderInitFile"
+ },
+ {
+ "mangle": "mz_zip_reader_init_file_v2",
+ "c++": "mz_zip_reader_init_file_v2(mz_zip_archive *, const char *, mz_uint, mz_uint64, mz_uint64)",
+ "go": "(*MzZipArchive).MzZipReaderInitFileV2"
+ },
+ {
+ "mangle": "mz_zip_reader_init_mem",
+ "c++": "mz_zip_reader_init_mem(mz_zip_archive *, const void *, size_t, mz_uint)",
+ "go": "(*MzZipArchive).MzZipReaderInitMem"
+ },
+ {
+ "mangle": "mz_zip_reader_is_file_a_directory",
+ "c++": "mz_zip_reader_is_file_a_directory(mz_zip_archive *, mz_uint)",
+ "go": "(*MzZipArchive).MzZipReaderIsFileADirectory"
+ },
+ {
+ "mangle": "mz_zip_reader_is_file_encrypted",
+ "c++": "mz_zip_reader_is_file_encrypted(mz_zip_archive *, mz_uint)",
+ "go": "(*MzZipArchive).MzZipReaderIsFileEncrypted"
+ },
+ {
+ "mangle": "mz_zip_reader_is_file_supported",
+ "c++": "mz_zip_reader_is_file_supported(mz_zip_archive *, mz_uint)",
+ "go": "(*MzZipArchive).MzZipReaderIsFileSupported"
+ },
+ {
+ "mangle": "mz_zip_reader_locate_file",
+ "c++": "mz_zip_reader_locate_file(mz_zip_archive *, const char *, const char *, mz_uint)",
+ "go": "(*MzZipArchive).MzZipReaderLocateFile"
+ },
+ {
+ "mangle": "mz_zip_reader_locate_file_v2",
+ "c++": "mz_zip_reader_locate_file_v2(mz_zip_archive *, const char *, const char *, mz_uint, mz_uint32 *)",
+ "go": "(*MzZipArchive).MzZipReaderLocateFileV2"
+ },
+ {
+ "mangle": "mz_zip_set_last_error",
+ "c++": "mz_zip_set_last_error(mz_zip_archive *, mz_zip_error)",
+ "go": "(*MzZipArchive).MzZipSetLastError"
+ },
+ {
+ "mangle": "mz_zip_validate_archive",
+ "c++": "mz_zip_validate_archive(mz_zip_archive *, mz_uint)",
+ "go": "(*MzZipArchive).MzZipValidateArchive"
+ },
+ {
+ "mangle": "mz_zip_validate_file",
+ "c++": "mz_zip_validate_file(mz_zip_archive *, mz_uint, mz_uint)",
+ "go": "(*MzZipArchive).MzZipValidateFile"
+ },
+ {
+ "mangle": "mz_zip_validate_file_archive",
+ "c++": "mz_zip_validate_file_archive(const char *, mz_uint, mz_zip_error *)",
+ "go": "MzZipValidateFileArchive"
+ },
+ {
+ "mangle": "mz_zip_validate_mem_archive",
+ "c++": "mz_zip_validate_mem_archive(const void *, size_t, mz_uint, mz_zip_error *)",
+ "go": "MzZipValidateMemArchive"
+ },
+ {
+ "mangle": "mz_zip_writer_add_cfile",
+ "c++": "mz_zip_writer_add_cfile(mz_zip_archive *, const char *, FILE *, mz_uint64, const time_t *, const void *, mz_uint16, mz_uint, const char *, mz_uint, const char *, mz_uint)",
+ "go": "(*MzZipArchive).MzZipWriterAddCfile"
+ },
+ {
+ "mangle": "mz_zip_writer_add_file",
+ "c++": "mz_zip_writer_add_file(mz_zip_archive *, const char *, const char *, const void *, mz_uint16, mz_uint)",
+ "go": "(*MzZipArchive).MzZipWriterAddFile"
+ },
+ {
+ "mangle": "mz_zip_writer_add_from_zip_reader",
+ "c++": "mz_zip_writer_add_from_zip_reader(mz_zip_archive *, mz_zip_archive *, mz_uint)",
+ "go": "(*MzZipArchive).MzZipWriterAddFromZipReader"
+ },
+ {
+ "mangle": "mz_zip_writer_add_mem",
+ "c++": "mz_zip_writer_add_mem(mz_zip_archive *, const char *, const void *, size_t, mz_uint)",
+ "go": "(*MzZipArchive).MzZipWriterAddMem"
+ },
+ {
+ "mangle": "mz_zip_writer_add_mem_ex",
+ "c++": "mz_zip_writer_add_mem_ex(mz_zip_archive *, const char *, const void *, size_t, const void *, mz_uint16, mz_uint, mz_uint64, mz_uint32)",
+ "go": "(*MzZipArchive).MzZipWriterAddMemEx"
+ },
+ {
+ "mangle": "mz_zip_writer_add_mem_ex_v2",
+ "c++": "mz_zip_writer_add_mem_ex_v2(mz_zip_archive *, const char *, const void *, size_t, const void *, mz_uint16, mz_uint, mz_uint64, mz_uint32, time_t *, const char *, mz_uint, const char *, mz_uint)",
+ "go": "(*MzZipArchive).MzZipWriterAddMemExV2"
+ },
+ {
+ "mangle": "mz_zip_writer_add_read_buf_callback",
+ "c++": "mz_zip_writer_add_read_buf_callback(mz_zip_archive *, const char *, mz_file_read_func, void *, mz_uint64, const time_t *, const void *, mz_uint16, mz_uint, const char *, mz_uint, const char *, mz_uint)",
+ "go": "(*MzZipArchive).MzZipWriterAddReadBufCallback"
+ },
+ {
+ "mangle": "mz_zip_writer_end",
+ "c++": "mz_zip_writer_end(mz_zip_archive *)",
+ "go": "(*MzZipArchive).MzZipWriterEnd"
+ },
+ {
+ "mangle": "mz_zip_writer_finalize_archive",
+ "c++": "mz_zip_writer_finalize_archive(mz_zip_archive *)",
+ "go": "(*MzZipArchive).MzZipWriterFinalizeArchive"
+ },
+ {
+ "mangle": "mz_zip_writer_finalize_heap_archive",
+ "c++": "mz_zip_writer_finalize_heap_archive(mz_zip_archive *, void **, size_t *)",
+ "go": "(*MzZipArchive).MzZipWriterFinalizeHeapArchive"
+ },
+ {
+ "mangle": "mz_zip_writer_init",
+ "c++": "mz_zip_writer_init(mz_zip_archive *, mz_uint64)",
+ "go": "(*MzZipArchive).MzZipWriterInit"
+ },
+ {
+ "mangle": "mz_zip_writer_init_cfile",
+ "c++": "mz_zip_writer_init_cfile(mz_zip_archive *, FILE *, mz_uint)",
+ "go": "(*MzZipArchive).MzZipWriterInitCfile"
+ },
+ {
+ "mangle": "mz_zip_writer_init_file",
+ "c++": "mz_zip_writer_init_file(mz_zip_archive *, const char *, mz_uint64)",
+ "go": "(*MzZipArchive).MzZipWriterInitFile"
+ },
+ {
+ "mangle": "mz_zip_writer_init_file_v2",
+ "c++": "mz_zip_writer_init_file_v2(mz_zip_archive *, const char *, mz_uint64, mz_uint)",
+ "go": "(*MzZipArchive).MzZipWriterInitFileV2"
+ },
+ {
+ "mangle": "mz_zip_writer_init_from_reader",
+ "c++": "mz_zip_writer_init_from_reader(mz_zip_archive *, const char *)",
+ "go": "(*MzZipArchive).MzZipWriterInitFromReader"
+ },
+ {
+ "mangle": "mz_zip_writer_init_from_reader_v2",
+ "c++": "mz_zip_writer_init_from_reader_v2(mz_zip_archive *, const char *, mz_uint)",
+ "go": "(*MzZipArchive).MzZipWriterInitFromReaderV2"
+ },
+ {
+ "mangle": "mz_zip_writer_init_heap",
+ "c++": "mz_zip_writer_init_heap(mz_zip_archive *, size_t, size_t)",
+ "go": "(*MzZipArchive).MzZipWriterInitHeap"
+ },
+ {
+ "mangle": "mz_zip_writer_init_heap_v2",
+ "c++": "mz_zip_writer_init_heap_v2(mz_zip_archive *, size_t, size_t, mz_uint)",
+ "go": "(*MzZipArchive).MzZipWriterInitHeapV2"
+ },
+ {
+ "mangle": "mz_zip_writer_init_v2",
+ "c++": "mz_zip_writer_init_v2(mz_zip_archive *, mz_uint64, mz_uint)",
+ "go": "(*MzZipArchive).MzZipWriterInitV2"
+ },
+ {
+ "mangle": "mz_zip_zero_struct",
+ "c++": "mz_zip_zero_struct(mz_zip_archive *)",
+ "go": "(*MzZipArchive).MzZipZeroStruct"
+ },
+ {
+ "mangle": "tdefl_compress",
+ "c++": "tdefl_compress(tdefl_compressor *, const void *, size_t *, void *, size_t *, tdefl_flush)",
+ "go": "(*TdeflCompressor).TdeflCompress"
+ },
+ {
+ "mangle": "tdefl_compress_buffer",
+ "c++": "tdefl_compress_buffer(tdefl_compressor *, const void *, size_t, tdefl_flush)",
+ "go": "(*TdeflCompressor).TdeflCompressBuffer"
+ },
+ {
+ "mangle": "tdefl_compress_mem_to_heap",
+ "c++": "tdefl_compress_mem_to_heap(const void *, size_t, size_t *, int)",
+ "go": "TdeflCompressMemToHeap"
+ },
+ {
+ "mangle": "tdefl_compress_mem_to_mem",
+ "c++": "tdefl_compress_mem_to_mem(void *, size_t, const void *, size_t, int)",
+ "go": "TdeflCompressMemToMem"
+ },
+ {
+ "mangle": "tdefl_compress_mem_to_output",
+ "c++": "tdefl_compress_mem_to_output(const void *, size_t, tdefl_put_buf_func_ptr, void *, int)",
+ "go": "TdeflCompressMemToOutput"
+ },
+ {
+ "mangle": "tdefl_compressor_alloc",
+ "c++": "tdefl_compressor_alloc()",
+ "go": "TdeflCompressorAlloc"
+ },
+ {
+ "mangle": "tdefl_compressor_free",
+ "c++": "tdefl_compressor_free(tdefl_compressor *)",
+ "go": "(*TdeflCompressor).TdeflCompressorFree"
+ },
+ {
+ "mangle": "tdefl_create_comp_flags_from_zip_params",
+ "c++": "tdefl_create_comp_flags_from_zip_params(int, int, int)",
+ "go": "TdeflCreateCompFlagsFromZipParams"
+ },
+ {
+ "mangle": "tdefl_get_adler32",
+ "c++": "tdefl_get_adler32(tdefl_compressor *)",
+ "go": "(*TdeflCompressor).TdeflGetAdler32"
+ },
+ {
+ "mangle": "tdefl_get_prev_return_status",
+ "c++": "tdefl_get_prev_return_status(tdefl_compressor *)",
+ "go": "(*TdeflCompressor).TdeflGetPrevReturnStatus"
+ },
+ {
+ "mangle": "tdefl_init",
+ "c++": "tdefl_init(tdefl_compressor *, tdefl_put_buf_func_ptr, void *, int)",
+ "go": "(*TdeflCompressor).TdeflInit"
+ },
+ {
+ "mangle": "tdefl_write_image_to_png_file_in_memory",
+ "c++": "tdefl_write_image_to_png_file_in_memory(const void *, int, int, int, size_t *)",
+ "go": "TdeflWriteImageToPngFileInMemory"
+ },
+ {
+ "mangle": "tdefl_write_image_to_png_file_in_memory_ex",
+ "c++": "tdefl_write_image_to_png_file_in_memory_ex(const void *, int, int, int, size_t *, mz_uint, mz_bool)",
+ "go": "TdeflWriteImageToPngFileInMemoryEx"
+ },
+ {
+ "mangle": "tinfl_decompress",
+ "c++": "tinfl_decompress(tinfl_decompressor *, const mz_uint8 *, size_t *, mz_uint8 *, mz_uint8 *, size_t *, const mz_uint32)",
+ "go": "(*TinflDecompressor).TinflDecompress"
+ },
+ {
+ "mangle": "tinfl_decompress_mem_to_callback",
+ "c++": "tinfl_decompress_mem_to_callback(const void *, size_t *, tinfl_put_buf_func_ptr, void *, int)",
+ "go": "TinflDecompressMemToCallback"
+ },
+ {
+ "mangle": "tinfl_decompress_mem_to_heap",
+ "c++": "tinfl_decompress_mem_to_heap(const void *, size_t, size_t *, int)",
+ "go": "TinflDecompressMemToHeap"
+ },
+ {
+ "mangle": "tinfl_decompress_mem_to_mem",
+ "c++": "tinfl_decompress_mem_to_mem(void *, size_t, const void *, size_t, int)",
+ "go": "TinflDecompressMemToMem"
+ },
+ {
+ "mangle": "tinfl_decompressor_alloc",
+ "c++": "tinfl_decompressor_alloc()",
+ "go": "TinflDecompressorAlloc"
+ },
+ {
+ "mangle": "tinfl_decompressor_free",
+ "c++": "tinfl_decompressor_free(tinfl_decompressor *)",
+ "go": "(*TinflDecompressor).TinflDecompressorFree"
+ }
+]
\ No newline at end of file
diff --git a/miniz/llpkg.cfg b/miniz/llpkg.cfg
new file mode 100644
index 0000000..84a2291
--- /dev/null
+++ b/miniz/llpkg.cfg
@@ -0,0 +1,8 @@
+{
+ "upstream": {
+ "package": {
+ "name": "miniz",
+ "version": "3.0.2"
+ }
+ }
+}
\ No newline at end of file
diff --git a/miniz/miniz.pc b/miniz/miniz.pc
new file mode 100644
index 0000000..99c83c5
--- /dev/null
+++ b/miniz/miniz.pc
@@ -0,0 +1,11 @@
+prefix=/Users/admin/.conan2/p/b/miniz95c3c0244a10a/p
+libdir=${prefix}/lib
+includedir=${prefix}/include
+includedir1=${prefix}/include/miniz
+bindir=${prefix}/bin
+
+Name: miniz
+Description: Conan package: miniz
+Version: 3.0.2
+Libs: -L"${libdir}" -lminiz
+Cflags: -I"${includedir}" -I"${includedir1}"
diff --git a/numpy/llpkg.cfg b/numpy/llpkg.cfg
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/numpy/llpkg.cfg
@@ -0,0 +1 @@
+
diff --git a/sqlite3/_demo/hello/hello.go b/sqlite3/_demo/hello/hello.go
new file mode 100644
index 0000000..ce551a6
--- /dev/null
+++ b/sqlite3/_demo/hello/hello.go
@@ -0,0 +1,67 @@
+package main
+
+import (
+ "github.com/goplus/llpkg/sqlite3"
+
+ "github.com/goplus/lib/c"
+ "github.com/goplus/lib/c/os"
+)
+
+func main() {
+ os.Remove(c.Str("test.db"))
+
+ var db *sqlite3.Sqlite3
+ err := sqlite3.DoOpen(c.Str("test.db"), &db)
+ check(err, db, "sqlite: Open")
+
+ err = db.Exec(c.Str("CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)"), nil, nil, nil)
+ check(err, db, "sqlite: Exec CREATE TABLE")
+
+ var stmt *sqlite3.Stmt
+ sql := "INSERT INTO users (id, name) VALUES (?, ?)"
+ err = db.DoPrepareV3(c.GoStringData(sql), c.Int(len(sql)), 0, &stmt, nil)
+ check(err, db, "sqlite: PrepareV3 INSERT")
+
+ stmt.BindInt(1, 100)
+ stmt.BindText(2, c.Str("Hello World"), -1, nil)
+
+ err = stmt.Step()
+ checkDone(err, db, "sqlite: Step INSERT 1")
+
+ stmt.Reset()
+ stmt.BindInt(1, 200)
+ stmt.BindText(2, c.Str("This is llgo"), -1, nil)
+
+ err = stmt.Step()
+ checkDone(err, db, "sqlite: Step INSERT 2")
+
+ stmt.Close()
+
+ sql = "SELECT * FROM users"
+ err = db.DoPrepareV3(c.GoStringData(sql), c.Int(len(sql)), 0, &stmt, nil)
+ check(err, db, "sqlite: PrepareV3 SELECT")
+
+ for {
+ if err = stmt.Step(); err != sqlite3.ROW {
+ break
+ }
+ c.Printf(c.Str("==> id=%d, name=%s\n"), stmt.ColumnInt(0), stmt.ColumnText(1))
+ }
+ checkDone(err, db, "sqlite: Step done")
+
+ stmt.Close()
+ db.Close()
+}
+
+func check(err c.Int, db *sqlite3.Sqlite3, at string) {
+ if err != sqlite3.OK {
+ c.Printf(c.Str("==> %s Error: (%d) %s\n"), c.AllocaCStr(at), err, db.Errmsg())
+ c.Exit(1)
+ }
+}
+
+func checkDone(err c.Int, db *sqlite3.Sqlite3, at string) {
+ if err != sqlite3.DONE {
+ check(err, db, at)
+ }
+}
diff --git a/sqlite3/go.mod b/sqlite3/go.mod
new file mode 100644
index 0000000..0e3cdfa
--- /dev/null
+++ b/sqlite3/go.mod
@@ -0,0 +1,5 @@
+module github.com/goplus/llpkg/sqlite3
+
+go 1.20
+
+require github.com/goplus/lib v0.2.0
diff --git a/sqlite3/go.sum b/sqlite3/go.sum
new file mode 100644
index 0000000..512980a
--- /dev/null
+++ b/sqlite3/go.sum
@@ -0,0 +1,2 @@
+github.com/goplus/lib v0.2.0 h1:AjqkN1XK5H23wZMMlpaUYAMCDAdSBQ2NMFrLtSh7W4g=
+github.com/goplus/lib v0.2.0/go.mod h1:SgJv3oPqLLHCu0gcL46ejOP3x7/2ry2Jtxu7ta32kp0=
diff --git a/sqlite3/llcppg.cfg b/sqlite3/llcppg.cfg
new file mode 100644
index 0000000..1bc7beb
--- /dev/null
+++ b/sqlite3/llcppg.cfg
@@ -0,0 +1,23 @@
+{
+ "name": "sqlite3",
+ "cflags": "$(pkg-config --cflags sqlite3)",
+ "libs": "$(pkg-config --libs sqlite3)",
+ "include": [
+ "sqlite3ext.h",
+ "sqlite3.h"
+ ],
+ "trimPrefixes": ["sqlite3_","SQLITE_"],
+ "cplusplus": false,
+ "symMap":{
+ "sqlite3_finalize":".Close",
+ "sqlite3_open":"DoOpen",
+ "sqlite3_open16":"DoOpen16",
+ "sqlite3_open_v2":"DoOpenV2",
+ "sqlite3_prepare":".DoPrepare",
+ "sqlite3_prepare16":".DoPrepare16",
+ "sqlite3_prepare16_v3":".DoPrepare16V3",
+ "sqlite3_prepare_v2":".DoPrepareV2",
+ "sqlite3_prepare_v3":".DoPrepareV3",
+ "sqlite3_prepare16_v2":".DoPrepare16V2"
+ }
+}
\ No newline at end of file
diff --git a/sqlite3/llcppg.pub b/sqlite3/llcppg.pub
new file mode 100644
index 0000000..b34755e
--- /dev/null
+++ b/sqlite3/llcppg.pub
@@ -0,0 +1,46 @@
+Fts5Context
+Fts5ExtensionApi
+Fts5PhraseIter
+Fts5Tokenizer
+fts5_api Fts5Api
+fts5_extension_function Fts5ExtensionFunction
+fts5_tokenizer Fts5Tokenizer__1
+fts5_tokenizer_v2 Fts5TokenizerV2
+sqlite3 Sqlite3
+sqlite3_api_routines ApiRoutines
+sqlite3_backup Backup
+sqlite3_blob Blob
+sqlite3_callback Callback
+sqlite3_context Context
+sqlite3_destructor_type DestructorType
+sqlite3_file File
+sqlite3_filename Filename
+sqlite3_index_constraint IndexConstraint
+sqlite3_index_constraint_usage IndexConstraintUsage
+sqlite3_index_info IndexInfo
+sqlite3_index_orderby IndexOrderby
+sqlite3_int64 Int64
+sqlite3_io_methods IoMethods
+sqlite3_loadext_entry LoadextEntry
+sqlite3_mem_methods MemMethods
+sqlite3_module Module
+sqlite3_mutex Mutex
+sqlite3_mutex_methods MutexMethods
+sqlite3_pcache Pcache
+sqlite3_pcache_methods PcacheMethods
+sqlite3_pcache_methods2 PcacheMethods2
+sqlite3_pcache_page PcachePage
+sqlite3_rtree_dbl RtreeDbl
+sqlite3_rtree_geometry RtreeGeometry
+sqlite3_rtree_query_info RtreeQueryInfo
+sqlite3_snapshot Snapshot
+sqlite3_stmt Stmt
+sqlite3_str Str
+sqlite3_syscall_ptr SyscallPtr
+sqlite3_uint64 Uint64
+sqlite3_value Value
+sqlite3_vfs Vfs
+sqlite3_vtab Vtab
+sqlite3_vtab_cursor VtabCursor
+sqlite_int64 SqliteInt64
+sqlite_uint64 SqliteUint64
\ No newline at end of file
diff --git a/sqlite3/llpkg.cfg b/sqlite3/llpkg.cfg
new file mode 100644
index 0000000..2c86d7f
--- /dev/null
+++ b/sqlite3/llpkg.cfg
@@ -0,0 +1,8 @@
+{
+ "upstream": {
+ "package": {
+ "name": "sqlite3",
+ "version": "3.49.1"
+ }
+ }
+}
\ No newline at end of file
diff --git a/sqlite3/sqlite3.go b/sqlite3/sqlite3.go
new file mode 100644
index 0000000..59c9717
--- /dev/null
+++ b/sqlite3/sqlite3.go
@@ -0,0 +1,7935 @@
+package sqlite3
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+const VERSION = "3.49.1"
+const VERSION_NUMBER = 3049001
+const SOURCE_ID = "2025-02-18 13:38:58 873d4e274b4988d260ba8354a9718324a1c26187a4ab4c1cc0227c03d0f10e70"
+const OK = 0
+const ERROR = 1
+const INTERNAL = 2
+const PERM = 3
+const ABORT = 4
+const BUSY = 5
+const LOCKED = 6
+const NOMEM = 7
+const READONLY = 8
+const INTERRUPT = 9
+const IOERR = 10
+const CORRUPT = 11
+const NOTFOUND = 12
+const FULL = 13
+const CANTOPEN = 14
+const PROTOCOL = 15
+const EMPTY = 16
+const SCHEMA = 17
+const TOOBIG = 18
+const CONSTRAINT = 19
+const MISMATCH = 20
+const MISUSE = 21
+const NOLFS = 22
+const AUTH = 23
+const FORMAT = 24
+const RANGE = 25
+const NOTADB = 26
+const NOTICE = 27
+const WARNING = 28
+const ROW = 100
+const DONE = 101
+const OPEN_READONLY = 0x00000001
+const OPEN_READWRITE = 0x00000002
+const OPEN_CREATE = 0x00000004
+const OPEN_DELETEONCLOSE = 0x00000008
+const OPEN_EXCLUSIVE = 0x00000010
+const OPEN_AUTOPROXY = 0x00000020
+const OPEN_URI = 0x00000040
+const OPEN_MEMORY = 0x00000080
+const OPEN_MAIN_DB = 0x00000100
+const OPEN_TEMP_DB = 0x00000200
+const OPEN_TRANSIENT_DB = 0x00000400
+const OPEN_MAIN_JOURNAL = 0x00000800
+const OPEN_TEMP_JOURNAL = 0x00001000
+const OPEN_SUBJOURNAL = 0x00002000
+const OPEN_SUPER_JOURNAL = 0x00004000
+const OPEN_NOMUTEX = 0x00008000
+const OPEN_FULLMUTEX = 0x00010000
+const OPEN_SHAREDCACHE = 0x00020000
+const OPEN_PRIVATECACHE = 0x00040000
+const OPEN_WAL = 0x00080000
+const OPEN_NOFOLLOW = 0x01000000
+const OPEN_EXRESCODE = 0x02000000
+const OPEN_MASTER_JOURNAL = 0x00004000
+const IOCAP_ATOMIC = 0x00000001
+const IOCAP_ATOMIC512 = 0x00000002
+const IOCAP_ATOMIC1K = 0x00000004
+const IOCAP_ATOMIC2K = 0x00000008
+const IOCAP_ATOMIC4K = 0x00000010
+const IOCAP_ATOMIC8K = 0x00000020
+const IOCAP_ATOMIC16K = 0x00000040
+const IOCAP_ATOMIC32K = 0x00000080
+const IOCAP_ATOMIC64K = 0x00000100
+const IOCAP_SAFE_APPEND = 0x00000200
+const IOCAP_SEQUENTIAL = 0x00000400
+const IOCAP_UNDELETABLE_WHEN_OPEN = 0x00000800
+const IOCAP_POWERSAFE_OVERWRITE = 0x00001000
+const IOCAP_IMMUTABLE = 0x00002000
+const IOCAP_BATCH_ATOMIC = 0x00004000
+const IOCAP_SUBPAGE_READ = 0x00008000
+const LOCK_NONE = 0
+const LOCK_SHARED = 1
+const LOCK_RESERVED = 2
+const LOCK_PENDING = 3
+const LOCK_EXCLUSIVE = 4
+const SYNC_NORMAL = 0x00002
+const SYNC_FULL = 0x00003
+const SYNC_DATAONLY = 0x00010
+const FCNTL_LOCKSTATE = 1
+const FCNTL_GET_LOCKPROXYFILE = 2
+const FCNTL_SET_LOCKPROXYFILE = 3
+const FCNTL_LAST_ERRNO = 4
+const FCNTL_SIZE_HINT = 5
+const FCNTL_CHUNK_SIZE = 6
+const FCNTL_FILE_POINTER = 7
+const FCNTL_SYNC_OMITTED = 8
+const FCNTL_WIN32_AV_RETRY = 9
+const FCNTL_PERSIST_WAL = 10
+const FCNTL_OVERWRITE = 11
+const FCNTL_VFSNAME = 12
+const FCNTL_POWERSAFE_OVERWRITE = 13
+const FCNTL_PRAGMA = 14
+const FCNTL_BUSYHANDLER = 15
+const FCNTL_TEMPFILENAME = 16
+const FCNTL_MMAP_SIZE = 18
+const FCNTL_TRACE = 19
+const FCNTL_HAS_MOVED = 20
+const FCNTL_SYNC = 21
+const FCNTL_COMMIT_PHASETWO = 22
+const FCNTL_WIN32_SET_HANDLE = 23
+const FCNTL_WAL_BLOCK = 24
+const FCNTL_ZIPVFS = 25
+const FCNTL_RBU = 26
+const FCNTL_VFS_POINTER = 27
+const FCNTL_JOURNAL_POINTER = 28
+const FCNTL_WIN32_GET_HANDLE = 29
+const FCNTL_PDB = 30
+const FCNTL_BEGIN_ATOMIC_WRITE = 31
+const FCNTL_COMMIT_ATOMIC_WRITE = 32
+const FCNTL_ROLLBACK_ATOMIC_WRITE = 33
+const FCNTL_LOCK_TIMEOUT = 34
+const FCNTL_DATA_VERSION = 35
+const FCNTL_SIZE_LIMIT = 36
+const FCNTL_CKPT_DONE = 37
+const FCNTL_RESERVE_BYTES = 38
+const FCNTL_CKPT_START = 39
+const FCNTL_EXTERNAL_READER = 40
+const FCNTL_CKSM_FILE = 41
+const FCNTL_RESET_CACHE = 42
+const FCNTL_NULL_IO = 43
+const ACCESS_EXISTS = 0
+const ACCESS_READWRITE = 1
+const ACCESS_READ = 2
+const SHM_UNLOCK = 1
+const SHM_LOCK = 2
+const SHM_SHARED = 4
+const SHM_EXCLUSIVE = 8
+const SHM_NLOCK = 8
+const CONFIG_SINGLETHREAD = 1
+const CONFIG_MULTITHREAD = 2
+const CONFIG_SERIALIZED = 3
+const CONFIG_MALLOC = 4
+const CONFIG_GETMALLOC = 5
+const CONFIG_SCRATCH = 6
+const CONFIG_PAGECACHE = 7
+const CONFIG_HEAP = 8
+const CONFIG_MEMSTATUS = 9
+const CONFIG_MUTEX = 10
+const CONFIG_GETMUTEX = 11
+const CONFIG_LOOKASIDE = 13
+const CONFIG_PCACHE = 14
+const CONFIG_GETPCACHE = 15
+const CONFIG_LOG = 16
+const CONFIG_URI = 17
+const CONFIG_PCACHE2 = 18
+const CONFIG_GETPCACHE2 = 19
+const CONFIG_COVERING_INDEX_SCAN = 20
+const CONFIG_SQLLOG = 21
+const CONFIG_MMAP_SIZE = 22
+const CONFIG_WIN32_HEAPSIZE = 23
+const CONFIG_PCACHE_HDRSZ = 24
+const CONFIG_PMASZ = 25
+const CONFIG_STMTJRNL_SPILL = 26
+const CONFIG_SMALL_MALLOC = 27
+const CONFIG_SORTERREF_SIZE = 28
+const CONFIG_MEMDB_MAXSIZE = 29
+const CONFIG_ROWID_IN_VIEW = 30
+const DBCONFIG_MAINDBNAME = 1000
+const DBCONFIG_LOOKASIDE = 1001
+const DBCONFIG_ENABLE_FKEY = 1002
+const DBCONFIG_ENABLE_TRIGGER = 1003
+const DBCONFIG_ENABLE_FTS3_TOKENIZER = 1004
+const DBCONFIG_ENABLE_LOAD_EXTENSION = 1005
+const DBCONFIG_NO_CKPT_ON_CLOSE = 1006
+const DBCONFIG_ENABLE_QPSG = 1007
+const DBCONFIG_TRIGGER_EQP = 1008
+const DBCONFIG_RESET_DATABASE = 1009
+const DBCONFIG_DEFENSIVE = 1010
+const DBCONFIG_WRITABLE_SCHEMA = 1011
+const DBCONFIG_LEGACY_ALTER_TABLE = 1012
+const DBCONFIG_DQS_DML = 1013
+const DBCONFIG_DQS_DDL = 1014
+const DBCONFIG_ENABLE_VIEW = 1015
+const DBCONFIG_LEGACY_FILE_FORMAT = 1016
+const DBCONFIG_TRUSTED_SCHEMA = 1017
+const DBCONFIG_STMT_SCANSTATUS = 1018
+const DBCONFIG_REVERSE_SCANORDER = 1019
+const DBCONFIG_ENABLE_ATTACH_CREATE = 1020
+const DBCONFIG_ENABLE_ATTACH_WRITE = 1021
+const DBCONFIG_ENABLE_COMMENTS = 1022
+const DBCONFIG_MAX = 1022
+const DENY = 1
+const IGNORE = 2
+const CREATE_INDEX = 1
+const CREATE_TABLE = 2
+const CREATE_TEMP_INDEX = 3
+const CREATE_TEMP_TABLE = 4
+const CREATE_TEMP_TRIGGER = 5
+const CREATE_TEMP_VIEW = 6
+const CREATE_TRIGGER = 7
+const CREATE_VIEW = 8
+const DELETE = 9
+const DROP_INDEX = 10
+const DROP_TABLE = 11
+const DROP_TEMP_INDEX = 12
+const DROP_TEMP_TABLE = 13
+const DROP_TEMP_TRIGGER = 14
+const DROP_TEMP_VIEW = 15
+const DROP_TRIGGER = 16
+const DROP_VIEW = 17
+const INSERT = 18
+const PRAGMA = 19
+const READ = 20
+const SELECT = 21
+const TRANSACTION = 22
+const UPDATE = 23
+const ATTACH = 24
+const DETACH = 25
+const ALTER_TABLE = 26
+const REINDEX = 27
+const ANALYZE = 28
+const CREATE_VTABLE = 29
+const DROP_VTABLE = 30
+const FUNCTION = 31
+const SAVEPOINT = 32
+const COPY = 0
+const RECURSIVE = 33
+const TRACE_STMT = 0x01
+const TRACE_PROFILE = 0x02
+const TRACE_ROW = 0x04
+const TRACE_CLOSE = 0x08
+const LIMIT_LENGTH = 0
+const LIMIT_SQL_LENGTH = 1
+const LIMIT_COLUMN = 2
+const LIMIT_EXPR_DEPTH = 3
+const LIMIT_COMPOUND_SELECT = 4
+const LIMIT_VDBE_OP = 5
+const LIMIT_FUNCTION_ARG = 6
+const LIMIT_ATTACHED = 7
+const LIMIT_LIKE_PATTERN_LENGTH = 8
+const LIMIT_VARIABLE_NUMBER = 9
+const LIMIT_TRIGGER_DEPTH = 10
+const LIMIT_WORKER_THREADS = 11
+const PREPARE_PERSISTENT = 0x01
+const PREPARE_NORMALIZE = 0x02
+const PREPARE_NO_VTAB = 0x04
+const PREPARE_DONT_LOG = 0x10
+const INTEGER = 1
+const FLOAT = 2
+const BLOB = 4
+const NULL = 5
+const TEXT = 3
+const SQLITE3_TEXT = 3
+const UTF8 = 1
+const UTF16LE = 2
+const UTF16BE = 3
+const UTF16 = 4
+const ANY = 5
+const UTF16_ALIGNED = 8
+const DETERMINISTIC = 0x000000800
+const DIRECTONLY = 0x000080000
+const SUBTYPE = 0x000100000
+const INNOCUOUS = 0x000200000
+const RESULT_SUBTYPE = 0x001000000
+const SELFORDER1 = 0x002000000
+const WIN32_DATA_DIRECTORY_TYPE = 1
+const WIN32_TEMP_DIRECTORY_TYPE = 2
+const TXN_NONE = 0
+const TXN_READ = 1
+const TXN_WRITE = 2
+const INDEX_SCAN_UNIQUE = 0x00000001
+const INDEX_SCAN_HEX = 0x00000002
+const INDEX_CONSTRAINT_EQ = 2
+const INDEX_CONSTRAINT_GT = 4
+const INDEX_CONSTRAINT_LE = 8
+const INDEX_CONSTRAINT_LT = 16
+const INDEX_CONSTRAINT_GE = 32
+const INDEX_CONSTRAINT_MATCH = 64
+const INDEX_CONSTRAINT_LIKE = 65
+const INDEX_CONSTRAINT_GLOB = 66
+const INDEX_CONSTRAINT_REGEXP = 67
+const INDEX_CONSTRAINT_NE = 68
+const INDEX_CONSTRAINT_ISNOT = 69
+const INDEX_CONSTRAINT_ISNOTNULL = 70
+const INDEX_CONSTRAINT_ISNULL = 71
+const INDEX_CONSTRAINT_IS = 72
+const INDEX_CONSTRAINT_LIMIT = 73
+const INDEX_CONSTRAINT_OFFSET = 74
+const INDEX_CONSTRAINT_FUNCTION = 150
+const MUTEX_FAST = 0
+const MUTEX_RECURSIVE = 1
+const MUTEX_STATIC_MAIN = 2
+const MUTEX_STATIC_MEM = 3
+const MUTEX_STATIC_MEM2 = 4
+const MUTEX_STATIC_OPEN = 4
+const MUTEX_STATIC_PRNG = 5
+const MUTEX_STATIC_LRU = 6
+const MUTEX_STATIC_LRU2 = 7
+const MUTEX_STATIC_PMEM = 7
+const MUTEX_STATIC_APP1 = 8
+const MUTEX_STATIC_APP2 = 9
+const MUTEX_STATIC_APP3 = 10
+const MUTEX_STATIC_VFS1 = 11
+const MUTEX_STATIC_VFS2 = 12
+const MUTEX_STATIC_VFS3 = 13
+const MUTEX_STATIC_MASTER = 2
+const TESTCTRL_FIRST = 5
+const TESTCTRL_PRNG_SAVE = 5
+const TESTCTRL_PRNG_RESTORE = 6
+const TESTCTRL_PRNG_RESET = 7
+const TESTCTRL_FK_NO_ACTION = 7
+const TESTCTRL_BITVEC_TEST = 8
+const TESTCTRL_FAULT_INSTALL = 9
+const TESTCTRL_BENIGN_MALLOC_HOOKS = 10
+const TESTCTRL_PENDING_BYTE = 11
+const TESTCTRL_ASSERT = 12
+const TESTCTRL_ALWAYS = 13
+const TESTCTRL_RESERVE = 14
+const TESTCTRL_JSON_SELFCHECK = 14
+const TESTCTRL_OPTIMIZATIONS = 15
+const TESTCTRL_ISKEYWORD = 16
+const TESTCTRL_GETOPT = 16
+const TESTCTRL_SCRATCHMALLOC = 17
+const TESTCTRL_INTERNAL_FUNCTIONS = 17
+const TESTCTRL_LOCALTIME_FAULT = 18
+const TESTCTRL_EXPLAIN_STMT = 19
+const TESTCTRL_ONCE_RESET_THRESHOLD = 19
+const TESTCTRL_NEVER_CORRUPT = 20
+const TESTCTRL_VDBE_COVERAGE = 21
+const TESTCTRL_BYTEORDER = 22
+const TESTCTRL_ISINIT = 23
+const TESTCTRL_SORTER_MMAP = 24
+const TESTCTRL_IMPOSTER = 25
+const TESTCTRL_PARSER_COVERAGE = 26
+const TESTCTRL_RESULT_INTREAL = 27
+const TESTCTRL_PRNG_SEED = 28
+const TESTCTRL_EXTRA_SCHEMA_CHECKS = 29
+const TESTCTRL_SEEK_COUNT = 30
+const TESTCTRL_TRACEFLAGS = 31
+const TESTCTRL_TUNE = 32
+const TESTCTRL_LOGEST = 33
+const TESTCTRL_USELONGDOUBLE = 34
+const TESTCTRL_LAST = 34
+const STATUS_MEMORY_USED = 0
+const STATUS_PAGECACHE_USED = 1
+const STATUS_PAGECACHE_OVERFLOW = 2
+const STATUS_SCRATCH_USED = 3
+const STATUS_SCRATCH_OVERFLOW = 4
+const STATUS_MALLOC_SIZE = 5
+const STATUS_PARSER_STACK = 6
+const STATUS_PAGECACHE_SIZE = 7
+const STATUS_SCRATCH_SIZE = 8
+const STATUS_MALLOC_COUNT = 9
+const DBSTATUS_LOOKASIDE_USED = 0
+const DBSTATUS_CACHE_USED = 1
+const DBSTATUS_SCHEMA_USED = 2
+const DBSTATUS_STMT_USED = 3
+const DBSTATUS_LOOKASIDE_HIT = 4
+const DBSTATUS_LOOKASIDE_MISS_SIZE = 5
+const DBSTATUS_LOOKASIDE_MISS_FULL = 6
+const DBSTATUS_CACHE_HIT = 7
+const DBSTATUS_CACHE_MISS = 8
+const DBSTATUS_CACHE_WRITE = 9
+const DBSTATUS_DEFERRED_FKS = 10
+const DBSTATUS_CACHE_USED_SHARED = 11
+const DBSTATUS_CACHE_SPILL = 12
+const DBSTATUS_MAX = 12
+const STMTSTATUS_FULLSCAN_STEP = 1
+const STMTSTATUS_SORT = 2
+const STMTSTATUS_AUTOINDEX = 3
+const STMTSTATUS_VM_STEP = 4
+const STMTSTATUS_REPREPARE = 5
+const STMTSTATUS_RUN = 6
+const STMTSTATUS_FILTER_MISS = 7
+const STMTSTATUS_FILTER_HIT = 8
+const STMTSTATUS_MEMUSED = 99
+const CHECKPOINT_PASSIVE = 0
+const CHECKPOINT_FULL = 1
+const CHECKPOINT_RESTART = 2
+const CHECKPOINT_TRUNCATE = 3
+const VTAB_CONSTRAINT_SUPPORT = 1
+const VTAB_INNOCUOUS = 2
+const VTAB_DIRECTONLY = 3
+const VTAB_USES_ALL_SCHEMAS = 4
+const ROLLBACK = 1
+const FAIL = 3
+const REPLACE = 5
+const SCANSTAT_NLOOP = 0
+const SCANSTAT_NVISIT = 1
+const SCANSTAT_EST = 2
+const SCANSTAT_NAME = 3
+const SCANSTAT_EXPLAIN = 4
+const SCANSTAT_SELECTID = 5
+const SCANSTAT_PARENTID = 6
+const SCANSTAT_NCYCLE = 7
+const SCANSTAT_COMPLEX = 0x0001
+const SERIALIZE_NOCOPY = 0x001
+const DESERIALIZE_FREEONCLOSE = 1
+const DESERIALIZE_RESIZEABLE = 2
+const DESERIALIZE_READONLY = 4
+const NOT_WITHIN = 0
+const PARTLY_WITHIN = 1
+const FULLY_WITHIN = 2
+const FTS5_TOKENIZE_QUERY = 0x0001
+const FTS5_TOKENIZE_PREFIX = 0x0002
+const FTS5_TOKENIZE_DOCUMENT = 0x0004
+const FTS5_TOKENIZE_AUX = 0x0008
+const FTS5_TOKEN_COLOCATED = 0x0001
+
+//go:linkname Libversion C.sqlite3_libversion
+func Libversion() *c.Char
+
+//go:linkname Sourceid C.sqlite3_sourceid
+func Sourceid() *c.Char
+
+//go:linkname LibversionNumber C.sqlite3_libversion_number
+func LibversionNumber() c.Int
+
+/*
+** CAPI3REF: Run-Time Library Compilation Options Diagnostics
+**
+** ^The sqlite3_compileoption_used() function returns 0 or 1
+** indicating whether the specified option was defined at
+** compile time. ^The SQLITE_ prefix may be omitted from the
+** option name passed to sqlite3_compileoption_used().
+**
+** ^The sqlite3_compileoption_get() function allows iterating
+** over the list of options that were defined at compile time by
+** returning the N-th compile time option string. ^If N is out of range,
+** sqlite3_compileoption_get() returns a NULL pointer. ^The SQLITE_
+** prefix is omitted from any strings returned by
+** sqlite3_compileoption_get().
+**
+** ^Support for the diagnostic functions sqlite3_compileoption_used()
+** and sqlite3_compileoption_get() may be omitted by specifying the
+** [SQLITE_OMIT_COMPILEOPTION_DIAGS] option at compile time.
+**
+** See also: SQL functions [sqlite_compileoption_used()] and
+** [sqlite_compileoption_get()] and the [compile_options pragma].
+ */
+//go:linkname CompileoptionUsed C.sqlite3_compileoption_used
+func CompileoptionUsed(zOptName *c.Char) c.Int
+
+//go:linkname CompileoptionGet C.sqlite3_compileoption_get
+func CompileoptionGet(N c.Int) *c.Char
+
+/*
+** CAPI3REF: Test To See If The Library Is Threadsafe
+**
+** ^The sqlite3_threadsafe() function returns zero if and only if
+** SQLite was compiled with mutexing code omitted due to the
+** [SQLITE_THREADSAFE] compile-time option being set to 0.
+**
+** SQLite can be compiled with or without mutexes. When
+** the [SQLITE_THREADSAFE] C preprocessor macro is 1 or 2, mutexes
+** are enabled and SQLite is threadsafe. When the
+** [SQLITE_THREADSAFE] macro is 0,
+** the mutexes are omitted. Without the mutexes, it is not safe
+** to use SQLite concurrently from more than one thread.
+**
+** Enabling mutexes incurs a measurable performance penalty.
+** So if speed is of utmost importance, it makes sense to disable
+** the mutexes. But for maximum safety, mutexes should be enabled.
+** ^The default behavior is for mutexes to be enabled.
+**
+** This interface can be used by an application to make sure that the
+** version of SQLite that it is linking against was compiled with
+** the desired setting of the [SQLITE_THREADSAFE] macro.
+**
+** This interface only reports on the compile-time mutex setting
+** of the [SQLITE_THREADSAFE] flag. If SQLite is compiled with
+** SQLITE_THREADSAFE=1 or =2 then mutexes are enabled by default but
+** can be fully or partially disabled using a call to [sqlite3_config()]
+** with the verbs [SQLITE_CONFIG_SINGLETHREAD], [SQLITE_CONFIG_MULTITHREAD],
+** or [SQLITE_CONFIG_SERIALIZED]. ^(The return value of the
+** sqlite3_threadsafe() function shows only the compile-time setting of
+** thread safety, not any run-time changes to that setting made by
+** sqlite3_config(). In other words, the return value from sqlite3_threadsafe()
+** is unchanged by calls to sqlite3_config().)^
+**
+** See the [threading mode] documentation for additional information.
+ */
+//go:linkname Threadsafe C.sqlite3_threadsafe
+func Threadsafe() c.Int
+
+type Sqlite3 struct {
+ Unused [8]uint8
+}
+type SqliteInt64 c.LongLong
+type SqliteUint64 c.UlongLong
+type Int64 SqliteInt64
+type Uint64 SqliteUint64
+
+/*
+** CAPI3REF: Closing A Database Connection
+** DESTRUCTOR: sqlite3
+**
+** ^The sqlite3_close() and sqlite3_close_v2() routines are destructors
+** for the [sqlite3] object.
+** ^Calls to sqlite3_close() and sqlite3_close_v2() return [SQLITE_OK] if
+** the [sqlite3] object is successfully destroyed and all associated
+** resources are deallocated.
+**
+** Ideally, applications should [sqlite3_finalize | finalize] all
+** [prepared statements], [sqlite3_blob_close | close] all [BLOB handles], and
+** [sqlite3_backup_finish | finish] all [sqlite3_backup] objects associated
+** with the [sqlite3] object prior to attempting to close the object.
+** ^If the database connection is associated with unfinalized prepared
+** statements, BLOB handlers, and/or unfinished sqlite3_backup objects then
+** sqlite3_close() will leave the database connection open and return
+** [SQLITE_BUSY]. ^If sqlite3_close_v2() is called with unfinalized prepared
+** statements, unclosed BLOB handlers, and/or unfinished sqlite3_backups,
+** it returns [SQLITE_OK] regardless, but instead of deallocating the database
+** connection immediately, it marks the database connection as an unusable
+** "zombie" and makes arrangements to automatically deallocate the database
+** connection after all prepared statements are finalized, all BLOB handles
+** are closed, and all backups have finished. The sqlite3_close_v2() interface
+** is intended for use with host languages that are garbage collected, and
+** where the order in which destructors are called is arbitrary.
+**
+** ^If an [sqlite3] object is destroyed while a transaction is open,
+** the transaction is automatically rolled back.
+**
+** The C parameter to [sqlite3_close(C)] and [sqlite3_close_v2(C)]
+** must be either a NULL
+** pointer or an [sqlite3] object pointer obtained
+** from [sqlite3_open()], [sqlite3_open16()], or
+** [sqlite3_open_v2()], and not previously closed.
+** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer
+** argument is a harmless no-op.
+ */
+// llgo:link (*Sqlite3).Close C.sqlite3_close
+func (recv_ *Sqlite3) Close() c.Int {
+ return 0
+}
+
+// llgo:link (*Sqlite3).CloseV2 C.sqlite3_close_v2
+func (recv_ *Sqlite3) CloseV2() c.Int {
+ return 0
+}
+
+// llgo:type C
+type Callback func(c.Pointer, c.Int, **c.Char, **c.Char) c.Int
+
+/*
+** CAPI3REF: One-Step Query Execution Interface
+** METHOD: sqlite3
+**
+** The sqlite3_exec() interface is a convenience wrapper around
+** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()],
+** that allows an application to run multiple statements of SQL
+** without having to use a lot of C code.
+**
+** ^The sqlite3_exec() interface runs zero or more UTF-8 encoded,
+** semicolon-separate SQL statements passed into its 2nd argument,
+** in the context of the [database connection] passed in as its 1st
+** argument. ^If the callback function of the 3rd argument to
+** sqlite3_exec() is not NULL, then it is invoked for each result row
+** coming out of the evaluated SQL statements. ^The 4th argument to
+** sqlite3_exec() is relayed through to the 1st argument of each
+** callback invocation. ^If the callback pointer to sqlite3_exec()
+** is NULL, then no callback is ever invoked and result rows are
+** ignored.
+**
+** ^If an error occurs while evaluating the SQL statements passed into
+** sqlite3_exec(), then execution of the current statement stops and
+** subsequent statements are skipped. ^If the 5th parameter to sqlite3_exec()
+** is not NULL then any error message is written into memory obtained
+** from [sqlite3_malloc()] and passed back through the 5th parameter.
+** To avoid memory leaks, the application should invoke [sqlite3_free()]
+** on error message strings returned through the 5th parameter of
+** sqlite3_exec() after the error message string is no longer needed.
+** ^If the 5th parameter to sqlite3_exec() is not NULL and no errors
+** occur, then sqlite3_exec() sets the pointer in its 5th parameter to
+** NULL before returning.
+**
+** ^If an sqlite3_exec() callback returns non-zero, the sqlite3_exec()
+** routine returns SQLITE_ABORT without invoking the callback again and
+** without running any subsequent SQL statements.
+**
+** ^The 2nd argument to the sqlite3_exec() callback function is the
+** number of columns in the result. ^The 3rd argument to the sqlite3_exec()
+** callback is an array of pointers to strings obtained as if from
+** [sqlite3_column_text()], one for each column. ^If an element of a
+** result row is NULL then the corresponding string pointer for the
+** sqlite3_exec() callback is a NULL pointer. ^The 4th argument to the
+** sqlite3_exec() callback is an array of pointers to strings where each
+** entry represents the name of corresponding result column as obtained
+** from [sqlite3_column_name()].
+**
+** ^If the 2nd parameter to sqlite3_exec() is a NULL pointer, a pointer
+** to an empty string, or a pointer that contains only whitespace and/or
+** SQL comments, then no SQL statements are evaluated and the database
+** is not changed.
+**
+** Restrictions:
+**
+**
+** - The application must ensure that the 1st parameter to sqlite3_exec()
+** is a valid and open [database connection].
+**
- The application must not close the [database connection] specified by
+** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.
+**
- The application must not modify the SQL statement text passed into
+** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
+**
- The application must not dereference the arrays or string pointers
+** passed as the 3rd and 4th callback parameters after it returns.
+**
+ */
+// llgo:link (*Sqlite3).Exec C.sqlite3_exec
+func (recv_ *Sqlite3) Exec(sql *c.Char, callback func(c.Pointer, c.Int, **c.Char, **c.Char) c.Int, __llgo_arg_2 c.Pointer, errmsg **c.Char) c.Int {
+ return 0
+}
+
+type File struct {
+ PMethods *IoMethods
+}
+
+type IoMethods struct {
+ IVersion c.Int
+ XClose c.Pointer
+ XRead c.Pointer
+ XWrite c.Pointer
+ XTruncate c.Pointer
+ XSync c.Pointer
+ XFileSize c.Pointer
+ XLock c.Pointer
+ XUnlock c.Pointer
+ XCheckReservedLock c.Pointer
+ XFileControl c.Pointer
+ XSectorSize c.Pointer
+ XDeviceCharacteristics c.Pointer
+ XShmMap c.Pointer
+ XShmLock c.Pointer
+ XShmBarrier c.Pointer
+ XShmUnmap c.Pointer
+ XFetch c.Pointer
+ XUnfetch c.Pointer
+}
+
+type Mutex struct {
+ Unused [8]uint8
+}
+
+type ApiRoutines struct {
+ AggregateContext c.Pointer
+ AggregateCount c.Pointer
+ BindBlob c.Pointer
+ BindDouble c.Pointer
+ BindInt c.Pointer
+ BindInt64 c.Pointer
+ BindNull c.Pointer
+ BindParameterCount c.Pointer
+ BindParameterIndex c.Pointer
+ BindParameterName c.Pointer
+ BindText c.Pointer
+ BindText16 c.Pointer
+ BindValue c.Pointer
+ BusyHandler c.Pointer
+ BusyTimeout c.Pointer
+ Changes c.Pointer
+ Close c.Pointer
+ CollationNeeded c.Pointer
+ CollationNeeded16 c.Pointer
+ ColumnBlob c.Pointer
+ ColumnBytes c.Pointer
+ ColumnBytes16 c.Pointer
+ ColumnCount c.Pointer
+ ColumnDatabaseName c.Pointer
+ ColumnDatabaseName16 c.Pointer
+ ColumnDecltype c.Pointer
+ ColumnDecltype16 c.Pointer
+ ColumnDouble c.Pointer
+ ColumnInt c.Pointer
+ ColumnInt64 c.Pointer
+ ColumnName c.Pointer
+ ColumnName16 c.Pointer
+ ColumnOriginName c.Pointer
+ ColumnOriginName16 c.Pointer
+ ColumnTableName c.Pointer
+ ColumnTableName16 c.Pointer
+ ColumnText c.Pointer
+ ColumnText16 c.Pointer
+ ColumnType c.Pointer
+ ColumnValue c.Pointer
+ CommitHook c.Pointer
+ Complete c.Pointer
+ Complete16 c.Pointer
+ CreateCollation c.Pointer
+ CreateCollation16 c.Pointer
+ CreateFunction c.Pointer
+ CreateFunction16 c.Pointer
+ CreateModule c.Pointer
+ DataCount c.Pointer
+ DbHandle c.Pointer
+ DeclareVtab c.Pointer
+ EnableSharedCache c.Pointer
+ Errcode c.Pointer
+ Errmsg c.Pointer
+ Errmsg16 c.Pointer
+ Exec c.Pointer
+ Expired c.Pointer
+ Finalize c.Pointer
+ Free c.Pointer
+ FreeTable c.Pointer
+ GetAutocommit c.Pointer
+ GetAuxdata c.Pointer
+ GetTable c.Pointer
+ GlobalRecover c.Pointer
+ Interruptx c.Pointer
+ LastInsertRowid c.Pointer
+ Libversion c.Pointer
+ LibversionNumber c.Pointer
+ Malloc c.Pointer
+ Mprintf c.Pointer
+ Open c.Pointer
+ Open16 c.Pointer
+ Prepare c.Pointer
+ Prepare16 c.Pointer
+ Profile c.Pointer
+ ProgressHandler c.Pointer
+ Realloc c.Pointer
+ Reset c.Pointer
+ ResultBlob c.Pointer
+ ResultDouble c.Pointer
+ ResultError c.Pointer
+ ResultError16 c.Pointer
+ ResultInt c.Pointer
+ ResultInt64 c.Pointer
+ ResultNull c.Pointer
+ ResultText c.Pointer
+ ResultText16 c.Pointer
+ ResultText16be c.Pointer
+ ResultText16le c.Pointer
+ ResultValue c.Pointer
+ RollbackHook c.Pointer
+ SetAuthorizer c.Pointer
+ SetAuxdata c.Pointer
+ Xsnprintf c.Pointer
+ Step c.Pointer
+ TableColumnMetadata c.Pointer
+ ThreadCleanup c.Pointer
+ TotalChanges c.Pointer
+ Trace c.Pointer
+ TransferBindings c.Pointer
+ UpdateHook c.Pointer
+ UserData c.Pointer
+ ValueBlob c.Pointer
+ ValueBytes c.Pointer
+ ValueBytes16 c.Pointer
+ ValueDouble c.Pointer
+ ValueInt c.Pointer
+ ValueInt64 c.Pointer
+ ValueNumericType c.Pointer
+ ValueText c.Pointer
+ ValueText16 c.Pointer
+ ValueText16be c.Pointer
+ ValueText16le c.Pointer
+ ValueType c.Pointer
+ Vmprintf c.Pointer
+ OverloadFunction c.Pointer
+ PrepareV2 c.Pointer
+ Prepare16V2 c.Pointer
+ ClearBindings c.Pointer
+ CreateModuleV2 c.Pointer
+ BindZeroblob c.Pointer
+ BlobBytes c.Pointer
+ BlobClose c.Pointer
+ BlobOpen c.Pointer
+ BlobRead c.Pointer
+ BlobWrite c.Pointer
+ CreateCollationV2 c.Pointer
+ FileControl c.Pointer
+ MemoryHighwater c.Pointer
+ MemoryUsed c.Pointer
+ MutexAlloc c.Pointer
+ MutexEnter c.Pointer
+ MutexFree c.Pointer
+ MutexLeave c.Pointer
+ MutexTry c.Pointer
+ OpenV2 c.Pointer
+ ReleaseMemory c.Pointer
+ ResultErrorNomem c.Pointer
+ ResultErrorToobig c.Pointer
+ Sleep c.Pointer
+ SoftHeapLimit c.Pointer
+ VfsFind c.Pointer
+ VfsRegister c.Pointer
+ VfsUnregister c.Pointer
+ Xthreadsafe c.Pointer
+ ResultZeroblob c.Pointer
+ ResultErrorCode c.Pointer
+ TestControl c.Pointer
+ Randomness c.Pointer
+ ContextDbHandle c.Pointer
+ ExtendedResultCodes c.Pointer
+ Limit c.Pointer
+ NextStmt c.Pointer
+ Sql c.Pointer
+ Status c.Pointer
+ BackupFinish c.Pointer
+ BackupInit c.Pointer
+ BackupPagecount c.Pointer
+ BackupRemaining c.Pointer
+ BackupStep c.Pointer
+ CompileoptionGet c.Pointer
+ CompileoptionUsed c.Pointer
+ CreateFunctionV2 c.Pointer
+ DbConfig c.Pointer
+ DbMutex c.Pointer
+ DbStatus c.Pointer
+ ExtendedErrcode c.Pointer
+ Log c.Pointer
+ SoftHeapLimit64 c.Pointer
+ Sourceid c.Pointer
+ StmtStatus c.Pointer
+ Strnicmp c.Pointer
+ UnlockNotify c.Pointer
+ WalAutocheckpoint c.Pointer
+ WalCheckpoint c.Pointer
+ WalHook c.Pointer
+ BlobReopen c.Pointer
+ VtabConfig c.Pointer
+ VtabOnConflict c.Pointer
+ CloseV2 c.Pointer
+ DbFilename c.Pointer
+ DbReadonly c.Pointer
+ DbReleaseMemory c.Pointer
+ Errstr c.Pointer
+ StmtBusy c.Pointer
+ StmtReadonly c.Pointer
+ Stricmp c.Pointer
+ UriBoolean c.Pointer
+ UriInt64 c.Pointer
+ UriParameter c.Pointer
+ Xvsnprintf c.Pointer
+ WalCheckpointV2 c.Pointer
+ AutoExtension c.Pointer
+ BindBlob64 c.Pointer
+ BindText64 c.Pointer
+ CancelAutoExtension c.Pointer
+ LoadExtension c.Pointer
+ Malloc64 c.Pointer
+ Msize c.Pointer
+ Realloc64 c.Pointer
+ ResetAutoExtension c.Pointer
+ ResultBlob64 c.Pointer
+ ResultText64 c.Pointer
+ Strglob c.Pointer
+ ValueDup c.Pointer
+ ValueFree c.Pointer
+ ResultZeroblob64 c.Pointer
+ BindZeroblob64 c.Pointer
+ ValueSubtype c.Pointer
+ ResultSubtype c.Pointer
+ Status64 c.Pointer
+ Strlike c.Pointer
+ DbCacheflush c.Pointer
+ SystemErrno c.Pointer
+ TraceV2 c.Pointer
+ ExpandedSql c.Pointer
+ SetLastInsertRowid c.Pointer
+ PrepareV3 c.Pointer
+ Prepare16V3 c.Pointer
+ BindPointer c.Pointer
+ ResultPointer c.Pointer
+ ValuePointer c.Pointer
+ VtabNochange c.Pointer
+ ValueNochange c.Pointer
+ VtabCollation c.Pointer
+ KeywordCount c.Pointer
+ KeywordName c.Pointer
+ KeywordCheck c.Pointer
+ StrNew c.Pointer
+ StrFinish c.Pointer
+ StrAppendf c.Pointer
+ StrVappendf c.Pointer
+ StrAppend c.Pointer
+ StrAppendall c.Pointer
+ StrAppendchar c.Pointer
+ StrReset c.Pointer
+ StrErrcode c.Pointer
+ StrLength c.Pointer
+ StrValue c.Pointer
+ CreateWindowFunction c.Pointer
+ NormalizedSql c.Pointer
+ StmtIsexplain c.Pointer
+ ValueFrombind c.Pointer
+ DropModules c.Pointer
+ HardHeapLimit64 c.Pointer
+ UriKey c.Pointer
+ FilenameDatabase c.Pointer
+ FilenameJournal c.Pointer
+ FilenameWal c.Pointer
+ CreateFilename c.Pointer
+ FreeFilename c.Pointer
+ DatabaseFileObject c.Pointer
+ TxnState c.Pointer
+ Changes64 c.Pointer
+ TotalChanges64 c.Pointer
+ AutovacuumPages c.Pointer
+ ErrorOffset c.Pointer
+ VtabRhsValue c.Pointer
+ VtabDistinct c.Pointer
+ VtabIn c.Pointer
+ VtabInFirst c.Pointer
+ VtabInNext c.Pointer
+ Deserialize c.Pointer
+ Serialize c.Pointer
+ DbName c.Pointer
+ ValueEncoding c.Pointer
+ IsInterrupted c.Pointer
+ StmtExplain c.Pointer
+ GetClientdata c.Pointer
+ SetClientdata c.Pointer
+}
+type Filename *c.Char
+
+type Vfs struct {
+ IVersion c.Int
+ SzOsFile c.Int
+ MxPathname c.Int
+ PNext *Vfs
+ ZName *c.Char
+ PAppData c.Pointer
+ XOpen c.Pointer
+ XDelete c.Pointer
+ XAccess c.Pointer
+ XFullPathname c.Pointer
+ XDlOpen c.Pointer
+ XDlError c.Pointer
+ XDlSym c.Pointer
+ XDlClose c.Pointer
+ XRandomness c.Pointer
+ XSleep c.Pointer
+ XCurrentTime c.Pointer
+ XGetLastError c.Pointer
+ XCurrentTimeInt64 c.Pointer
+ XSetSystemCall c.Pointer
+ XGetSystemCall c.Pointer
+ XNextSystemCall c.Pointer
+}
+
+// llgo:type C
+type SyscallPtr func()
+
+/*
+** CAPI3REF: Initialize The SQLite Library
+**
+** ^The sqlite3_initialize() routine initializes the
+** SQLite library. ^The sqlite3_shutdown() routine
+** deallocates any resources that were allocated by sqlite3_initialize().
+** These routines are designed to aid in process initialization and
+** shutdown on embedded systems. Workstation applications using
+** SQLite normally do not need to invoke either of these routines.
+**
+** A call to sqlite3_initialize() is an "effective" call if it is
+** the first time sqlite3_initialize() is invoked during the lifetime of
+** the process, or if it is the first time sqlite3_initialize() is invoked
+** following a call to sqlite3_shutdown(). ^(Only an effective call
+** of sqlite3_initialize() does any initialization. All other calls
+** are harmless no-ops.)^
+**
+** A call to sqlite3_shutdown() is an "effective" call if it is the first
+** call to sqlite3_shutdown() since the last sqlite3_initialize(). ^(Only
+** an effective call to sqlite3_shutdown() does any deinitialization.
+** All other valid calls to sqlite3_shutdown() are harmless no-ops.)^
+**
+** The sqlite3_initialize() interface is threadsafe, but sqlite3_shutdown()
+** is not. The sqlite3_shutdown() interface must only be called from a
+** single thread. All open [database connections] must be closed and all
+** other SQLite resources must be deallocated prior to invoking
+** sqlite3_shutdown().
+**
+** Among other things, ^sqlite3_initialize() will invoke
+** sqlite3_os_init(). Similarly, ^sqlite3_shutdown()
+** will invoke sqlite3_os_end().
+**
+** ^The sqlite3_initialize() routine returns [SQLITE_OK] on success.
+** ^If for some reason, sqlite3_initialize() is unable to initialize
+** the library (perhaps it is unable to allocate a needed resource such
+** as a mutex) it returns an [error code] other than [SQLITE_OK].
+**
+** ^The sqlite3_initialize() routine is called internally by many other
+** SQLite interfaces so that an application usually does not need to
+** invoke sqlite3_initialize() directly. For example, [sqlite3_open()]
+** calls sqlite3_initialize() so the SQLite library will be automatically
+** initialized when [sqlite3_open()] is called if it has not be initialized
+** already. ^However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT]
+** compile-time option, then the automatic calls to sqlite3_initialize()
+** are omitted and the application must call sqlite3_initialize() directly
+** prior to using any other SQLite interface. For maximum portability,
+** it is recommended that applications always invoke sqlite3_initialize()
+** directly prior to using any other SQLite interface. Future releases
+** of SQLite may require this. In other words, the behavior exhibited
+** when SQLite is compiled with [SQLITE_OMIT_AUTOINIT] might become the
+** default behavior in some future release of SQLite.
+**
+** The sqlite3_os_init() routine does operating-system specific
+** initialization of the SQLite library. The sqlite3_os_end()
+** routine undoes the effect of sqlite3_os_init(). Typical tasks
+** performed by these routines include allocation or deallocation
+** of static resources, initialization of global variables,
+** setting up a default [sqlite3_vfs] module, or setting up
+** a default configuration using [sqlite3_config()].
+**
+** The application should never invoke either sqlite3_os_init()
+** or sqlite3_os_end() directly. The application should only invoke
+** sqlite3_initialize() and sqlite3_shutdown(). The sqlite3_os_init()
+** interface is called automatically by sqlite3_initialize() and
+** sqlite3_os_end() is called by sqlite3_shutdown(). Appropriate
+** implementations for sqlite3_os_init() and sqlite3_os_end()
+** are built into SQLite when it is compiled for Unix, Windows, or OS/2.
+** When [custom builds | built for other platforms]
+** (using the [SQLITE_OS_OTHER=1] compile-time
+** option) the application must supply a suitable implementation for
+** sqlite3_os_init() and sqlite3_os_end(). An application-supplied
+** implementation of sqlite3_os_init() or sqlite3_os_end()
+** must return [SQLITE_OK] on success and some other [error code] upon
+** failure.
+ */
+//go:linkname Initialize C.sqlite3_initialize
+func Initialize() c.Int
+
+//go:linkname Shutdown C.sqlite3_shutdown
+func Shutdown() c.Int
+
+//go:linkname OsInit C.sqlite3_os_init
+func OsInit() c.Int
+
+//go:linkname OsEnd C.sqlite3_os_end
+func OsEnd() c.Int
+
+/*
+** CAPI3REF: Configuring The SQLite Library
+**
+** The sqlite3_config() interface is used to make global configuration
+** changes to SQLite in order to tune SQLite to the specific needs of
+** the application. The default configuration is recommended for most
+** applications and so this routine is usually not necessary. It is
+** provided to support rare applications with unusual needs.
+**
+** The sqlite3_config() interface is not threadsafe. The application
+** must ensure that no other SQLite interfaces are invoked by other
+** threads while sqlite3_config() is running.
+**
+** The first argument to sqlite3_config() is an integer
+** [configuration option] that determines
+** what property of SQLite is to be configured. Subsequent arguments
+** vary depending on the [configuration option]
+** in the first argument.
+**
+** For most configuration options, the sqlite3_config() interface
+** may only be invoked prior to library initialization using
+** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()].
+** The exceptional configuration options that may be invoked at any time
+** are called "anytime configuration options".
+** ^If sqlite3_config() is called after [sqlite3_initialize()] and before
+** [sqlite3_shutdown()] with a first argument that is not an anytime
+** configuration option, then the sqlite3_config() call will return SQLITE_MISUSE.
+** Note, however, that ^sqlite3_config() can be called as part of the
+** implementation of an application-defined [sqlite3_os_init()].
+**
+** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK].
+** ^If the option is unknown or SQLite is unable to set the option
+** then this routine returns a non-zero [error code].
+ */
+//go:linkname Config C.sqlite3_config
+func Config(__llgo_arg_0 c.Int, __llgo_va_list ...interface{}) c.Int
+
+/*
+** CAPI3REF: Configure database connections
+** METHOD: sqlite3
+**
+** The sqlite3_db_config() interface is used to make configuration
+** changes to a [database connection]. The interface is similar to
+** [sqlite3_config()] except that the changes apply to a single
+** [database connection] (specified in the first argument).
+**
+** The second argument to sqlite3_db_config(D,V,...) is the
+** [SQLITE_DBCONFIG_LOOKASIDE | configuration verb] - an integer code
+** that indicates what aspect of the [database connection] is being configured.
+** Subsequent arguments vary depending on the configuration verb.
+**
+** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if
+** the call is considered successful.
+ */
+//go:linkname DbConfig C.sqlite3_db_config
+func DbConfig(__llgo_arg_0 *Sqlite3, op c.Int, __llgo_va_list ...interface{}) c.Int
+
+type MemMethods struct {
+ XMalloc c.Pointer
+ XFree c.Pointer
+ XRealloc c.Pointer
+ XSize c.Pointer
+ XRoundup c.Pointer
+ XInit c.Pointer
+ XShutdown c.Pointer
+ PAppData c.Pointer
+}
+
+/*
+** CAPI3REF: Enable Or Disable Extended Result Codes
+** METHOD: sqlite3
+**
+** ^The sqlite3_extended_result_codes() routine enables or disables the
+** [extended result codes] feature of SQLite. ^The extended result
+** codes are disabled by default for historical compatibility.
+ */
+// llgo:link (*Sqlite3).ExtendedResultCodes C.sqlite3_extended_result_codes
+func (recv_ *Sqlite3) ExtendedResultCodes(onoff c.Int) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Last Insert Rowid
+** METHOD: sqlite3
+**
+** ^Each entry in most SQLite tables (except for [WITHOUT ROWID] tables)
+** has a unique 64-bit signed
+** integer key called the [ROWID | "rowid"]. ^The rowid is always available
+** as an undeclared column named ROWID, OID, or _ROWID_ as long as those
+** names are not also used by explicitly declared columns. ^If
+** the table has a column of type [INTEGER PRIMARY KEY] then that column
+** is another alias for the rowid.
+**
+** ^The sqlite3_last_insert_rowid(D) interface usually returns the [rowid] of
+** the most recent successful [INSERT] into a rowid table or [virtual table]
+** on database connection D. ^Inserts into [WITHOUT ROWID] tables are not
+** recorded. ^If no successful [INSERT]s into rowid tables have ever occurred
+** on the database connection D, then sqlite3_last_insert_rowid(D) returns
+** zero.
+**
+** As well as being set automatically as rows are inserted into database
+** tables, the value returned by this function may be set explicitly by
+** [sqlite3_set_last_insert_rowid()]
+**
+** Some virtual table implementations may INSERT rows into rowid tables as
+** part of committing a transaction (e.g. to flush data accumulated in memory
+** to disk). In this case subsequent calls to this function return the rowid
+** associated with these internal INSERT operations, which leads to
+** unintuitive results. Virtual table implementations that do write to rowid
+** tables in this way can avoid this problem by restoring the original
+** rowid value using [sqlite3_set_last_insert_rowid()] before returning
+** control to the user.
+**
+** ^(If an [INSERT] occurs within a trigger then this routine will
+** return the [rowid] of the inserted row as long as the trigger is
+** running. Once the trigger program ends, the value returned
+** by this routine reverts to what it was before the trigger was fired.)^
+**
+** ^An [INSERT] that fails due to a constraint violation is not a
+** successful [INSERT] and does not change the value returned by this
+** routine. ^Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK,
+** and INSERT OR ABORT make no changes to the return value of this
+** routine when their insertion fails. ^(When INSERT OR REPLACE
+** encounters a constraint violation, it does not fail. The
+** INSERT continues to completion after deleting rows that caused
+** the constraint problem so INSERT OR REPLACE will always change
+** the return value of this interface.)^
+**
+** ^For the purposes of this routine, an [INSERT] is considered to
+** be successful even if it is subsequently rolled back.
+**
+** This function is accessible to SQL statements via the
+** [last_insert_rowid() SQL function].
+**
+** If a separate thread performs a new [INSERT] on the same
+** database connection while the [sqlite3_last_insert_rowid()]
+** function is running and thus changes the last insert [rowid],
+** then the value returned by [sqlite3_last_insert_rowid()] is
+** unpredictable and might not equal either the old or the new
+** last insert [rowid].
+ */
+// llgo:link (*Sqlite3).LastInsertRowid C.sqlite3_last_insert_rowid
+func (recv_ *Sqlite3) LastInsertRowid() Int64 {
+ return 0
+}
+
+/*
+** CAPI3REF: Set the Last Insert Rowid value.
+** METHOD: sqlite3
+**
+** The sqlite3_set_last_insert_rowid(D, R) method allows the application to
+** set the value returned by calling sqlite3_last_insert_rowid(D) to R
+** without inserting a row into the database.
+ */
+// llgo:link (*Sqlite3).SetLastInsertRowid C.sqlite3_set_last_insert_rowid
+func (recv_ *Sqlite3) SetLastInsertRowid(Int64) {
+}
+
+/*
+** CAPI3REF: Count The Number Of Rows Modified
+** METHOD: sqlite3
+**
+** ^These functions return the number of rows modified, inserted or
+** deleted by the most recently completed INSERT, UPDATE or DELETE
+** statement on the database connection specified by the only parameter.
+** The two functions are identical except for the type of the return value
+** and that if the number of rows modified by the most recent INSERT, UPDATE,
+** or DELETE is greater than the maximum value supported by type "int", then
+** the return value of sqlite3_changes() is undefined. ^Executing any other
+** type of SQL statement does not modify the value returned by these functions.
+** For the purposes of this interface, a CREATE TABLE AS SELECT statement
+** does not count as an INSERT, UPDATE or DELETE statement and hence the rows
+** added to the new table by the CREATE TABLE AS SELECT statement are not
+** counted.
+**
+** ^Only changes made directly by the INSERT, UPDATE or DELETE statement are
+** considered - auxiliary changes caused by [CREATE TRIGGER | triggers],
+** [foreign key actions] or [REPLACE] constraint resolution are not counted.
+**
+** Changes to a view that are intercepted by
+** [INSTEAD OF trigger | INSTEAD OF triggers] are not counted. ^The value
+** returned by sqlite3_changes() immediately after an INSERT, UPDATE or
+** DELETE statement run on a view is always zero. Only changes made to real
+** tables are counted.
+**
+** Things are more complicated if the sqlite3_changes() function is
+** executed while a trigger program is running. This may happen if the
+** program uses the [changes() SQL function], or if some other callback
+** function invokes sqlite3_changes() directly. Essentially:
+**
+**
+** - ^(Before entering a trigger program the value returned by
+** sqlite3_changes() function is saved. After the trigger program
+** has finished, the original value is restored.)^
+**
+**
- ^(Within a trigger program each INSERT, UPDATE and DELETE
+** statement sets the value returned by sqlite3_changes()
+** upon completion as normal. Of course, this value will not include
+** any changes performed by sub-triggers, as the sqlite3_changes()
+** value will be saved and restored after each sub-trigger has run.)^
+**
+**
+** ^This means that if the changes() SQL function (or similar) is used
+** by the first INSERT, UPDATE or DELETE statement within a trigger, it
+** returns the value as set when the calling statement began executing.
+** ^If it is used by the second or subsequent such statement within a trigger
+** program, the value returned reflects the number of rows modified by the
+** previous INSERT, UPDATE or DELETE statement within the same trigger.
+**
+** If a separate thread makes changes on the same database connection
+** while [sqlite3_changes()] is running then the value returned
+** is unpredictable and not meaningful.
+**
+** See also:
+**
+** - the [sqlite3_total_changes()] interface
+**
- the [count_changes pragma]
+**
- the [changes() SQL function]
+**
- the [data_version pragma]
+**
+ */
+// llgo:link (*Sqlite3).Changes C.sqlite3_changes
+func (recv_ *Sqlite3) Changes() c.Int {
+ return 0
+}
+
+// llgo:link (*Sqlite3).Changes64 C.sqlite3_changes64
+func (recv_ *Sqlite3) Changes64() Int64 {
+ return 0
+}
+
+/*
+** CAPI3REF: Total Number Of Rows Modified
+** METHOD: sqlite3
+**
+** ^These functions return the total number of rows inserted, modified or
+** deleted by all [INSERT], [UPDATE] or [DELETE] statements completed
+** since the database connection was opened, including those executed as
+** part of trigger programs. The two functions are identical except for the
+** type of the return value and that if the number of rows modified by the
+** connection exceeds the maximum value supported by type "int", then
+** the return value of sqlite3_total_changes() is undefined. ^Executing
+** any other type of SQL statement does not affect the value returned by
+** sqlite3_total_changes().
+**
+** ^Changes made as part of [foreign key actions] are included in the
+** count, but those made as part of REPLACE constraint resolution are
+** not. ^Changes to a view that are intercepted by INSTEAD OF triggers
+** are not counted.
+**
+** The [sqlite3_total_changes(D)] interface only reports the number
+** of rows that changed due to SQL statement run against database
+** connection D. Any changes by other database connections are ignored.
+** To detect changes against a database file from other database
+** connections use the [PRAGMA data_version] command or the
+** [SQLITE_FCNTL_DATA_VERSION] [file control].
+**
+** If a separate thread makes changes on the same database connection
+** while [sqlite3_total_changes()] is running then the value
+** returned is unpredictable and not meaningful.
+**
+** See also:
+**
+** - the [sqlite3_changes()] interface
+**
- the [count_changes pragma]
+**
- the [changes() SQL function]
+**
- the [data_version pragma]
+**
- the [SQLITE_FCNTL_DATA_VERSION] [file control]
+**
+ */
+// llgo:link (*Sqlite3).TotalChanges C.sqlite3_total_changes
+func (recv_ *Sqlite3) TotalChanges() c.Int {
+ return 0
+}
+
+// llgo:link (*Sqlite3).TotalChanges64 C.sqlite3_total_changes64
+func (recv_ *Sqlite3) TotalChanges64() Int64 {
+ return 0
+}
+
+/*
+** CAPI3REF: Interrupt A Long-Running Query
+** METHOD: sqlite3
+**
+** ^This function causes any pending database operation to abort and
+** return at its earliest opportunity. This routine is typically
+** called in response to a user action such as pressing "Cancel"
+** or Ctrl-C where the user wants a long query operation to halt
+** immediately.
+**
+** ^It is safe to call this routine from a thread different from the
+** thread that is currently running the database operation. But it
+** is not safe to call this routine with a [database connection] that
+** is closed or might close before sqlite3_interrupt() returns.
+**
+** ^If an SQL operation is very nearly finished at the time when
+** sqlite3_interrupt() is called, then it might not have an opportunity
+** to be interrupted and might continue to completion.
+**
+** ^An SQL operation that is interrupted will return [SQLITE_INTERRUPT].
+** ^If the interrupted SQL operation is an INSERT, UPDATE, or DELETE
+** that is inside an explicit transaction, then the entire transaction
+** will be rolled back automatically.
+**
+** ^The sqlite3_interrupt(D) call is in effect until all currently running
+** SQL statements on [database connection] D complete. ^Any new SQL statements
+** that are started after the sqlite3_interrupt() call and before the
+** running statement count reaches zero are interrupted as if they had been
+** running prior to the sqlite3_interrupt() call. ^New SQL statements
+** that are started after the running statement count reaches zero are
+** not effected by the sqlite3_interrupt().
+** ^A call to sqlite3_interrupt(D) that occurs when there are no running
+** SQL statements is a no-op and has no effect on SQL statements
+** that are started after the sqlite3_interrupt() call returns.
+**
+** ^The [sqlite3_is_interrupted(D)] interface can be used to determine whether
+** or not an interrupt is currently in effect for [database connection] D.
+** It returns 1 if an interrupt is currently in effect, or 0 otherwise.
+ */
+// llgo:link (*Sqlite3).Interrupt C.sqlite3_interrupt
+func (recv_ *Sqlite3) Interrupt() {
+}
+
+// llgo:link (*Sqlite3).IsInterrupted C.sqlite3_is_interrupted
+func (recv_ *Sqlite3) IsInterrupted() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Determine If An SQL Statement Is Complete
+**
+** These routines are useful during command-line input to determine if the
+** currently entered text seems to form a complete SQL statement or
+** if additional input is needed before sending the text into
+** SQLite for parsing. ^These routines return 1 if the input string
+** appears to be a complete SQL statement. ^A statement is judged to be
+** complete if it ends with a semicolon token and is not a prefix of a
+** well-formed CREATE TRIGGER statement. ^Semicolons that are embedded within
+** string literals or quoted identifier names or comments are not
+** independent tokens (they are part of the token in which they are
+** embedded) and thus do not count as a statement terminator. ^Whitespace
+** and comments that follow the final semicolon are ignored.
+**
+** ^These routines return 0 if the statement is incomplete. ^If a
+** memory allocation fails, then SQLITE_NOMEM is returned.
+**
+** ^These routines do not parse the SQL statements thus
+** will not detect syntactically incorrect SQL.
+**
+** ^(If SQLite has not been initialized using [sqlite3_initialize()] prior
+** to invoking sqlite3_complete16() then sqlite3_initialize() is invoked
+** automatically by sqlite3_complete16(). If that initialization fails,
+** then the return value from sqlite3_complete16() will be non-zero
+** regardless of whether or not the input SQL is complete.)^
+**
+** The input to [sqlite3_complete()] must be a zero-terminated
+** UTF-8 string.
+**
+** The input to [sqlite3_complete16()] must be a zero-terminated
+** UTF-16 string in native byte order.
+ */
+//go:linkname Complete C.sqlite3_complete
+func Complete(sql *c.Char) c.Int
+
+//go:linkname Complete16 C.sqlite3_complete16
+func Complete16(sql c.Pointer) c.Int
+
+/*
+** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
+** KEYWORDS: {busy-handler callback} {busy handler}
+** METHOD: sqlite3
+**
+** ^The sqlite3_busy_handler(D,X,P) routine sets a callback function X
+** that might be invoked with argument P whenever
+** an attempt is made to access a database table associated with
+** [database connection] D when another thread
+** or process has the table locked.
+** The sqlite3_busy_handler() interface is used to implement
+** [sqlite3_busy_timeout()] and [PRAGMA busy_timeout].
+**
+** ^If the busy callback is NULL, then [SQLITE_BUSY]
+** is returned immediately upon encountering the lock. ^If the busy callback
+** is not NULL, then the callback might be invoked with two arguments.
+**
+** ^The first argument to the busy handler is a copy of the void* pointer which
+** is the third argument to sqlite3_busy_handler(). ^The second argument to
+** the busy handler callback is the number of times that the busy handler has
+** been invoked previously for the same locking event. ^If the
+** busy callback returns 0, then no additional attempts are made to
+** access the database and [SQLITE_BUSY] is returned
+** to the application.
+** ^If the callback returns non-zero, then another attempt
+** is made to access the database and the cycle repeats.
+**
+** The presence of a busy handler does not guarantee that it will be invoked
+** when there is lock contention. ^If SQLite determines that invoking the busy
+** handler could result in a deadlock, it will go ahead and return [SQLITE_BUSY]
+** to the application instead of invoking the
+** busy handler.
+** Consider a scenario where one process is holding a read lock that
+** it is trying to promote to a reserved lock and
+** a second process is holding a reserved lock that it is trying
+** to promote to an exclusive lock. The first process cannot proceed
+** because it is blocked by the second and the second process cannot
+** proceed because it is blocked by the first. If both processes
+** invoke the busy handlers, neither will make any progress. Therefore,
+** SQLite returns [SQLITE_BUSY] for the first process, hoping that this
+** will induce the first process to release its read lock and allow
+** the second process to proceed.
+**
+** ^The default busy callback is NULL.
+**
+** ^(There can only be a single busy handler defined for each
+** [database connection]. Setting a new busy handler clears any
+** previously set handler.)^ ^Note that calling [sqlite3_busy_timeout()]
+** or evaluating [PRAGMA busy_timeout=N] will change the
+** busy handler and thus clear any previously set busy handler.
+**
+** The busy callback should not take any actions which modify the
+** database connection that invoked the busy handler. In other words,
+** the busy handler is not reentrant. Any such actions
+** result in undefined behavior.
+**
+** A busy handler must not close the database connection
+** or [prepared statement] that invoked the busy handler.
+ */
+// llgo:link (*Sqlite3).BusyHandler C.sqlite3_busy_handler
+func (recv_ *Sqlite3) BusyHandler(func(c.Pointer, c.Int) c.Int, c.Pointer) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Set A Busy Timeout
+** METHOD: sqlite3
+**
+** ^This routine sets a [sqlite3_busy_handler | busy handler] that sleeps
+** for a specified amount of time when a table is locked. ^The handler
+** will sleep multiple times until at least "ms" milliseconds of sleeping
+** have accumulated. ^After at least "ms" milliseconds of sleeping,
+** the handler returns 0 which causes [sqlite3_step()] to return
+** [SQLITE_BUSY].
+**
+** ^Calling this routine with an argument less than or equal to zero
+** turns off all busy handlers.
+**
+** ^(There can only be a single busy handler for a particular
+** [database connection] at any given moment. If another busy handler
+** was defined (using [sqlite3_busy_handler()]) prior to calling
+** this routine, that other busy handler is cleared.)^
+**
+** See also: [PRAGMA busy_timeout]
+ */
+// llgo:link (*Sqlite3).BusyTimeout C.sqlite3_busy_timeout
+func (recv_ *Sqlite3) BusyTimeout(ms c.Int) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Convenience Routines For Running Queries
+** METHOD: sqlite3
+**
+** This is a legacy interface that is preserved for backwards compatibility.
+** Use of this interface is not recommended.
+**
+** Definition: A result table is memory data structure created by the
+** [sqlite3_get_table()] interface. A result table records the
+** complete query results from one or more queries.
+**
+** The table conceptually has a number of rows and columns. But
+** these numbers are not part of the result table itself. These
+** numbers are obtained separately. Let N be the number of rows
+** and M be the number of columns.
+**
+** A result table is an array of pointers to zero-terminated UTF-8 strings.
+** There are (N+1)*M elements in the array. The first M pointers point
+** to zero-terminated strings that contain the names of the columns.
+** The remaining entries all point to query results. NULL values result
+** in NULL pointers. All other values are in their UTF-8 zero-terminated
+** string representation as returned by [sqlite3_column_text()].
+**
+** A result table might consist of one or more memory allocations.
+** It is not safe to pass a result table directly to [sqlite3_free()].
+** A result table should be deallocated using [sqlite3_free_table()].
+**
+** ^(As an example of the result table format, suppose a query result
+** is as follows:
+**
+**
+** Name | Age
+** -----------------------
+** Alice | 43
+** Bob | 28
+** Cindy | 21
+**
+**
+** There are two columns (M==2) and three rows (N==3). Thus the
+** result table has 8 entries. Suppose the result table is stored
+** in an array named azResult. Then azResult holds this content:
+**
+**
+** azResult[0] = "Name";
+** azResult[1] = "Age";
+** azResult[2] = "Alice";
+** azResult[3] = "43";
+** azResult[4] = "Bob";
+** azResult[5] = "28";
+** azResult[6] = "Cindy";
+** azResult[7] = "21";
+**
)^
+**
+** ^The sqlite3_get_table() function evaluates one or more
+** semicolon-separated SQL statements in the zero-terminated UTF-8
+** string of its 2nd parameter and returns a result table to the
+** pointer given in its 3rd parameter.
+**
+** After the application has finished with the result from sqlite3_get_table(),
+** it must pass the result table pointer to sqlite3_free_table() in order to
+** release the memory that was malloced. Because of the way the
+** [sqlite3_malloc()] happens within sqlite3_get_table(), the calling
+** function must not try to call [sqlite3_free()] directly. Only
+** [sqlite3_free_table()] is able to release the memory properly and safely.
+**
+** The sqlite3_get_table() interface is implemented as a wrapper around
+** [sqlite3_exec()]. The sqlite3_get_table() routine does not have access
+** to any internal data structures of SQLite. It uses only the public
+** interface defined here. As a consequence, errors that occur in the
+** wrapper layer outside of the internal [sqlite3_exec()] call are not
+** reflected in subsequent calls to [sqlite3_errcode()] or
+** [sqlite3_errmsg()].
+ */
+// llgo:link (*Sqlite3).GetTable C.sqlite3_get_table
+func (recv_ *Sqlite3) GetTable(zSql *c.Char, pazResult ***c.Char, pnRow *c.Int, pnColumn *c.Int, pzErrmsg **c.Char) c.Int {
+ return 0
+}
+
+//go:linkname FreeTable C.sqlite3_free_table
+func FreeTable(result **c.Char)
+
+/*
+** CAPI3REF: Formatted String Printing Functions
+**
+** These routines are work-alikes of the "printf()" family of functions
+** from the standard C library.
+** These routines understand most of the common formatting options from
+** the standard library printf()
+** plus some additional non-standard formats ([%q], [%Q], [%w], and [%z]).
+** See the [built-in printf()] documentation for details.
+**
+** ^The sqlite3_mprintf() and sqlite3_vmprintf() routines write their
+** results into memory obtained from [sqlite3_malloc64()].
+** The strings returned by these two routines should be
+** released by [sqlite3_free()]. ^Both routines return a
+** NULL pointer if [sqlite3_malloc64()] is unable to allocate enough
+** memory to hold the resulting string.
+**
+** ^(The sqlite3_snprintf() routine is similar to "snprintf()" from
+** the standard C library. The result is written into the
+** buffer supplied as the second parameter whose size is given by
+** the first parameter. Note that the order of the
+** first two parameters is reversed from snprintf().)^ This is an
+** historical accident that cannot be fixed without breaking
+** backwards compatibility. ^(Note also that sqlite3_snprintf()
+** returns a pointer to its buffer instead of the number of
+** characters actually written into the buffer.)^ We admit that
+** the number of characters written would be a more useful return
+** value but we cannot change the implementation of sqlite3_snprintf()
+** now without breaking compatibility.
+**
+** ^As long as the buffer size is greater than zero, sqlite3_snprintf()
+** guarantees that the buffer is always zero-terminated. ^The first
+** parameter "n" is the total size of the buffer, including space for
+** the zero terminator. So the longest string that can be completely
+** written will be n-1 characters.
+**
+** ^The sqlite3_vsnprintf() routine is a varargs version of sqlite3_snprintf().
+**
+** See also: [built-in printf()], [printf() SQL function]
+ */
+//go:linkname Mprintf C.sqlite3_mprintf
+func Mprintf(__llgo_arg_0 *c.Char, __llgo_va_list ...interface{}) *c.Char
+
+//go:linkname Vmprintf C.sqlite3_vmprintf
+func Vmprintf(*c.Char, c.VaList) *c.Char
+
+//go:linkname Snprintf C.sqlite3_snprintf
+func Snprintf(__llgo_arg_0 c.Int, __llgo_arg_1 *c.Char, __llgo_arg_2 *c.Char, __llgo_va_list ...interface{}) *c.Char
+
+//go:linkname Vsnprintf C.sqlite3_vsnprintf
+func Vsnprintf(c.Int, *c.Char, *c.Char, c.VaList) *c.Char
+
+/*
+** CAPI3REF: Memory Allocation Subsystem
+**
+** The SQLite core uses these three routines for all of its own
+** internal memory allocation needs. "Core" in the previous sentence
+** does not include operating-system specific [VFS] implementation. The
+** Windows VFS uses native malloc() and free() for some operations.
+**
+** ^The sqlite3_malloc() routine returns a pointer to a block
+** of memory at least N bytes in length, where N is the parameter.
+** ^If sqlite3_malloc() is unable to obtain sufficient free
+** memory, it returns a NULL pointer. ^If the parameter N to
+** sqlite3_malloc() is zero or negative then sqlite3_malloc() returns
+** a NULL pointer.
+**
+** ^The sqlite3_malloc64(N) routine works just like
+** sqlite3_malloc(N) except that N is an unsigned 64-bit integer instead
+** of a signed 32-bit integer.
+**
+** ^Calling sqlite3_free() with a pointer previously returned
+** by sqlite3_malloc() or sqlite3_realloc() releases that memory so
+** that it might be reused. ^The sqlite3_free() routine is
+** a no-op if is called with a NULL pointer. Passing a NULL pointer
+** to sqlite3_free() is harmless. After being freed, memory
+** should neither be read nor written. Even reading previously freed
+** memory might result in a segmentation fault or other severe error.
+** Memory corruption, a segmentation fault, or other severe error
+** might result if sqlite3_free() is called with a non-NULL pointer that
+** was not obtained from sqlite3_malloc() or sqlite3_realloc().
+**
+** ^The sqlite3_realloc(X,N) interface attempts to resize a
+** prior memory allocation X to be at least N bytes.
+** ^If the X parameter to sqlite3_realloc(X,N)
+** is a NULL pointer then its behavior is identical to calling
+** sqlite3_malloc(N).
+** ^If the N parameter to sqlite3_realloc(X,N) is zero or
+** negative then the behavior is exactly the same as calling
+** sqlite3_free(X).
+** ^sqlite3_realloc(X,N) returns a pointer to a memory allocation
+** of at least N bytes in size or NULL if insufficient memory is available.
+** ^If M is the size of the prior allocation, then min(N,M) bytes
+** of the prior allocation are copied into the beginning of buffer returned
+** by sqlite3_realloc(X,N) and the prior allocation is freed.
+** ^If sqlite3_realloc(X,N) returns NULL and N is positive, then the
+** prior allocation is not freed.
+**
+** ^The sqlite3_realloc64(X,N) interfaces works the same as
+** sqlite3_realloc(X,N) except that N is a 64-bit unsigned integer instead
+** of a 32-bit signed integer.
+**
+** ^If X is a memory allocation previously obtained from sqlite3_malloc(),
+** sqlite3_malloc64(), sqlite3_realloc(), or sqlite3_realloc64(), then
+** sqlite3_msize(X) returns the size of that memory allocation in bytes.
+** ^The value returned by sqlite3_msize(X) might be larger than the number
+** of bytes requested when X was allocated. ^If X is a NULL pointer then
+** sqlite3_msize(X) returns zero. If X points to something that is not
+** the beginning of memory allocation, or if it points to a formerly
+** valid memory allocation that has now been freed, then the behavior
+** of sqlite3_msize(X) is undefined and possibly harmful.
+**
+** ^The memory returned by sqlite3_malloc(), sqlite3_realloc(),
+** sqlite3_malloc64(), and sqlite3_realloc64()
+** is always aligned to at least an 8 byte boundary, or to a
+** 4 byte boundary if the [SQLITE_4_BYTE_ALIGNED_MALLOC] compile-time
+** option is used.
+**
+** The pointer arguments to [sqlite3_free()] and [sqlite3_realloc()]
+** must be either NULL or else pointers obtained from a prior
+** invocation of [sqlite3_malloc()] or [sqlite3_realloc()] that have
+** not yet been released.
+**
+** The application must not read or write any part of
+** a block of memory after it has been released using
+** [sqlite3_free()] or [sqlite3_realloc()].
+ */
+//go:linkname Malloc C.sqlite3_malloc
+func Malloc(c.Int) c.Pointer
+
+// llgo:link Uint64.Malloc64 C.sqlite3_malloc64
+func (recv_ Uint64) Malloc64() c.Pointer {
+ return nil
+}
+
+//go:linkname Realloc C.sqlite3_realloc
+func Realloc(c.Pointer, c.Int) c.Pointer
+
+//go:linkname Realloc64 C.sqlite3_realloc64
+func Realloc64(c.Pointer, Uint64) c.Pointer
+
+//go:linkname Free C.sqlite3_free
+func Free(c.Pointer)
+
+//go:linkname Msize C.sqlite3_msize
+func Msize(c.Pointer) Uint64
+
+/*
+** CAPI3REF: Memory Allocator Statistics
+**
+** SQLite provides these two interfaces for reporting on the status
+** of the [sqlite3_malloc()], [sqlite3_free()], and [sqlite3_realloc()]
+** routines, which form the built-in memory allocation subsystem.
+**
+** ^The [sqlite3_memory_used()] routine returns the number of bytes
+** of memory currently outstanding (malloced but not freed).
+** ^The [sqlite3_memory_highwater()] routine returns the maximum
+** value of [sqlite3_memory_used()] since the high-water mark
+** was last reset. ^The values returned by [sqlite3_memory_used()] and
+** [sqlite3_memory_highwater()] include any overhead
+** added by SQLite in its implementation of [sqlite3_malloc()],
+** but not overhead added by the any underlying system library
+** routines that [sqlite3_malloc()] may call.
+**
+** ^The memory high-water mark is reset to the current value of
+** [sqlite3_memory_used()] if and only if the parameter to
+** [sqlite3_memory_highwater()] is true. ^The value returned
+** by [sqlite3_memory_highwater(1)] is the high-water mark
+** prior to the reset.
+ */
+//go:linkname MemoryUsed C.sqlite3_memory_used
+func MemoryUsed() Int64
+
+//go:linkname MemoryHighwater C.sqlite3_memory_highwater
+func MemoryHighwater(resetFlag c.Int) Int64
+
+/*
+** CAPI3REF: Pseudo-Random Number Generator
+**
+** SQLite contains a high-quality pseudo-random number generator (PRNG) used to
+** select random [ROWID | ROWIDs] when inserting new records into a table that
+** already uses the largest possible [ROWID]. The PRNG is also used for
+** the built-in random() and randomblob() SQL functions. This interface allows
+** applications to access the same PRNG for other purposes.
+**
+** ^A call to this routine stores N bytes of randomness into buffer P.
+** ^The P parameter can be a NULL pointer.
+**
+** ^If this routine has not been previously called or if the previous
+** call had N less than one or a NULL pointer for P, then the PRNG is
+** seeded using randomness obtained from the xRandomness method of
+** the default [sqlite3_vfs] object.
+** ^If the previous call to this routine had an N of 1 or more and a
+** non-NULL P then the pseudo-randomness is generated
+** internally and without recourse to the [sqlite3_vfs] xRandomness
+** method.
+ */
+//go:linkname Randomness C.sqlite3_randomness
+func Randomness(N c.Int, P c.Pointer)
+
+/*
+** CAPI3REF: Compile-Time Authorization Callbacks
+** METHOD: sqlite3
+** KEYWORDS: {authorizer callback}
+**
+** ^This routine registers an authorizer callback with a particular
+** [database connection], supplied in the first argument.
+** ^The authorizer callback is invoked as SQL statements are being compiled
+** by [sqlite3_prepare()] or its variants [sqlite3_prepare_v2()],
+** [sqlite3_prepare_v3()], [sqlite3_prepare16()], [sqlite3_prepare16_v2()],
+** and [sqlite3_prepare16_v3()]. ^At various
+** points during the compilation process, as logic is being created
+** to perform various actions, the authorizer callback is invoked to
+** see if those actions are allowed. ^The authorizer callback should
+** return [SQLITE_OK] to allow the action, [SQLITE_IGNORE] to disallow the
+** specific action but allow the SQL statement to continue to be
+** compiled, or [SQLITE_DENY] to cause the entire SQL statement to be
+** rejected with an error. ^If the authorizer callback returns
+** any value other than [SQLITE_IGNORE], [SQLITE_OK], or [SQLITE_DENY]
+** then the [sqlite3_prepare_v2()] or equivalent call that triggered
+** the authorizer will fail with an error message.
+**
+** When the callback returns [SQLITE_OK], that means the operation
+** requested is ok. ^When the callback returns [SQLITE_DENY], the
+** [sqlite3_prepare_v2()] or equivalent call that triggered the
+** authorizer will fail with an error message explaining that
+** access is denied.
+**
+** ^The first parameter to the authorizer callback is a copy of the third
+** parameter to the sqlite3_set_authorizer() interface. ^The second parameter
+** to the callback is an integer [SQLITE_COPY | action code] that specifies
+** the particular action to be authorized. ^The third through sixth parameters
+** to the callback are either NULL pointers or zero-terminated strings
+** that contain additional details about the action to be authorized.
+** Applications must always be prepared to encounter a NULL pointer in any
+** of the third through the sixth parameters of the authorization callback.
+**
+** ^If the action code is [SQLITE_READ]
+** and the callback returns [SQLITE_IGNORE] then the
+** [prepared statement] statement is constructed to substitute
+** a NULL value in place of the table column that would have
+** been read if [SQLITE_OK] had been returned. The [SQLITE_IGNORE]
+** return can be used to deny an untrusted user access to individual
+** columns of a table.
+** ^When a table is referenced by a [SELECT] but no column values are
+** extracted from that table (for example in a query like
+** "SELECT count(*) FROM tab") then the [SQLITE_READ] authorizer callback
+** is invoked once for that table with a column name that is an empty string.
+** ^If the action code is [SQLITE_DELETE] and the callback returns
+** [SQLITE_IGNORE] then the [DELETE] operation proceeds but the
+** [truncate optimization] is disabled and all rows are deleted individually.
+**
+** An authorizer is used when [sqlite3_prepare | preparing]
+** SQL statements from an untrusted source, to ensure that the SQL statements
+** do not try to access data they are not allowed to see, or that they do not
+** try to execute malicious statements that damage the database. For
+** example, an application may allow a user to enter arbitrary
+** SQL queries for evaluation by a database. But the application does
+** not want the user to be able to make arbitrary changes to the
+** database. An authorizer could then be put in place while the
+** user-entered SQL is being [sqlite3_prepare | prepared] that
+** disallows everything except [SELECT] statements.
+**
+** Applications that need to process SQL from untrusted sources
+** might also consider lowering resource limits using [sqlite3_limit()]
+** and limiting database size using the [max_page_count] [PRAGMA]
+** in addition to using an authorizer.
+**
+** ^(Only a single authorizer can be in place on a database connection
+** at a time. Each call to sqlite3_set_authorizer overrides the
+** previous call.)^ ^Disable the authorizer by installing a NULL callback.
+** The authorizer is disabled by default.
+**
+** The authorizer callback must not do anything that will modify
+** the database connection that invoked the authorizer callback.
+** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
+** database connections for the meaning of "modify" in this paragraph.
+**
+** ^When [sqlite3_prepare_v2()] is used to prepare a statement, the
+** statement might be re-prepared during [sqlite3_step()] due to a
+** schema change. Hence, the application should ensure that the
+** correct authorizer callback remains in place during the [sqlite3_step()].
+**
+** ^Note that the authorizer callback is invoked only during
+** [sqlite3_prepare()] or its variants. Authorization is not
+** performed during statement evaluation in [sqlite3_step()], unless
+** as stated in the previous paragraph, sqlite3_step() invokes
+** sqlite3_prepare_v2() to reprepare a statement after a schema change.
+ */
+// llgo:link (*Sqlite3).SetAuthorizer C.sqlite3_set_authorizer
+func (recv_ *Sqlite3) SetAuthorizer(xAuth func(c.Pointer, c.Int, *c.Char, *c.Char, *c.Char, *c.Char) c.Int, pUserData c.Pointer) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Deprecated Tracing And Profiling Functions
+** DEPRECATED
+**
+** These routines are deprecated. Use the [sqlite3_trace_v2()] interface
+** instead of the routines described here.
+**
+** These routines register callback functions that can be used for
+** tracing and profiling the execution of SQL statements.
+**
+** ^The callback function registered by sqlite3_trace() is invoked at
+** various times when an SQL statement is being run by [sqlite3_step()].
+** ^The sqlite3_trace() callback is invoked with a UTF-8 rendering of the
+** SQL statement text as the statement first begins executing.
+** ^(Additional sqlite3_trace() callbacks might occur
+** as each triggered subprogram is entered. The callbacks for triggers
+** contain a UTF-8 SQL comment that identifies the trigger.)^
+**
+** The [SQLITE_TRACE_SIZE_LIMIT] compile-time option can be used to limit
+** the length of [bound parameter] expansion in the output of sqlite3_trace().
+**
+** ^The callback function registered by sqlite3_profile() is invoked
+** as each SQL statement finishes. ^The profile callback contains
+** the original statement text and an estimate of wall-clock time
+** of how long that statement took to run. ^The profile callback
+** time is in units of nanoseconds, however the current implementation
+** is only capable of millisecond resolution so the six least significant
+** digits in the time are meaningless. Future versions of SQLite
+** might provide greater resolution on the profiler callback. Invoking
+** either [sqlite3_trace()] or [sqlite3_trace_v2()] will cancel the
+** profile callback.
+ */
+// llgo:link (*Sqlite3).Trace C.sqlite3_trace
+func (recv_ *Sqlite3) Trace(xTrace func(c.Pointer, *c.Char), __llgo_arg_1 c.Pointer) c.Pointer {
+ return nil
+}
+
+// llgo:link (*Sqlite3).Profile C.sqlite3_profile
+func (recv_ *Sqlite3) Profile(xProfile func(c.Pointer, *c.Char, Uint64), __llgo_arg_1 c.Pointer) c.Pointer {
+ return nil
+}
+
+/*
+** CAPI3REF: SQL Trace Hook
+** METHOD: sqlite3
+**
+** ^The sqlite3_trace_v2(D,M,X,P) interface registers a trace callback
+** function X against [database connection] D, using property mask M
+** and context pointer P. ^If the X callback is
+** NULL or if the M mask is zero, then tracing is disabled. The
+** M argument should be the bitwise OR-ed combination of
+** zero or more [SQLITE_TRACE] constants.
+**
+** ^Each call to either sqlite3_trace(D,X,P) or sqlite3_trace_v2(D,M,X,P)
+** overrides (cancels) all prior calls to sqlite3_trace(D,X,P) or
+** sqlite3_trace_v2(D,M,X,P) for the [database connection] D. Each
+** database connection may have at most one trace callback.
+**
+** ^The X callback is invoked whenever any of the events identified by
+** mask M occur. ^The integer return value from the callback is currently
+** ignored, though this may change in future releases. Callback
+** implementations should return zero to ensure future compatibility.
+**
+** ^A trace callback is invoked with four arguments: callback(T,C,P,X).
+** ^The T argument is one of the [SQLITE_TRACE]
+** constants to indicate why the callback was invoked.
+** ^The C argument is a copy of the context pointer.
+** The P and X arguments are pointers whose meanings depend on T.
+**
+** The sqlite3_trace_v2() interface is intended to replace the legacy
+** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which
+** are deprecated.
+ */
+// llgo:link (*Sqlite3).TraceV2 C.sqlite3_trace_v2
+func (recv_ *Sqlite3) TraceV2(uMask c.Uint, xCallback func(c.Uint, c.Pointer, c.Pointer, c.Pointer) c.Int, pCtx c.Pointer) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Query Progress Callbacks
+** METHOD: sqlite3
+**
+** ^The sqlite3_progress_handler(D,N,X,P) interface causes the callback
+** function X to be invoked periodically during long running calls to
+** [sqlite3_step()] and [sqlite3_prepare()] and similar for
+** database connection D. An example use for this
+** interface is to keep a GUI updated during a large query.
+**
+** ^The parameter P is passed through as the only parameter to the
+** callback function X. ^The parameter N is the approximate number of
+** [virtual machine instructions] that are evaluated between successive
+** invocations of the callback X. ^If N is less than one then the progress
+** handler is disabled.
+**
+** ^Only a single progress handler may be defined at one time per
+** [database connection]; setting a new progress handler cancels the
+** old one. ^Setting parameter X to NULL disables the progress handler.
+** ^The progress handler is also disabled by setting N to a value less
+** than 1.
+**
+** ^If the progress callback returns non-zero, the operation is
+** interrupted. This feature can be used to implement a
+** "Cancel" button on a GUI progress dialog box.
+**
+** The progress handler callback must not do anything that will modify
+** the database connection that invoked the progress handler.
+** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
+** database connections for the meaning of "modify" in this paragraph.
+**
+** The progress handler callback would originally only be invoked from the
+** bytecode engine. It still might be invoked during [sqlite3_prepare()]
+** and similar because those routines might force a reparse of the schema
+** which involves running the bytecode engine. However, beginning with
+** SQLite version 3.41.0, the progress handler callback might also be
+** invoked directly from [sqlite3_prepare()] while analyzing and generating
+** code for complex queries.
+ */
+// llgo:link (*Sqlite3).ProgressHandler C.sqlite3_progress_handler
+func (recv_ *Sqlite3) ProgressHandler(c.Int, func(c.Pointer) c.Int, c.Pointer) {
+}
+
+/*
+** CAPI3REF: Opening A New Database Connection
+** CONSTRUCTOR: sqlite3
+**
+** ^These routines open an SQLite database file as specified by the
+** filename argument. ^The filename argument is interpreted as UTF-8 for
+** sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte
+** order for sqlite3_open16(). ^(A [database connection] handle is usually
+** returned in *ppDb, even if an error occurs. The only exception is that
+** if SQLite is unable to allocate memory to hold the [sqlite3] object,
+** a NULL will be written into *ppDb instead of a pointer to the [sqlite3]
+** object.)^ ^(If the database is opened (and/or created) successfully, then
+** [SQLITE_OK] is returned. Otherwise an [error code] is returned.)^ ^The
+** [sqlite3_errmsg()] or [sqlite3_errmsg16()] routines can be used to obtain
+** an English language description of the error following a failure of any
+** of the sqlite3_open() routines.
+**
+** ^The default encoding will be UTF-8 for databases created using
+** sqlite3_open() or sqlite3_open_v2(). ^The default encoding for databases
+** created using sqlite3_open16() will be UTF-16 in the native byte order.
+**
+** Whether or not an error occurs when it is opened, resources
+** associated with the [database connection] handle should be released by
+** passing it to [sqlite3_close()] when it is no longer required.
+**
+** The sqlite3_open_v2() interface works like sqlite3_open()
+** except that it accepts two additional parameters for additional control
+** over the new database connection. ^(The flags parameter to
+** sqlite3_open_v2() must include, at a minimum, one of the following
+** three flag combinations:)^
+**
+**
+** ^(- [SQLITE_OPEN_READONLY]
+** - The database is opened in read-only mode. If the database does
+** not already exist, an error is returned.
)^
+**
+** ^(- [SQLITE_OPEN_READWRITE]
+** - The database is opened for reading and writing if possible, or
+** reading only if the file is write protected by the operating
+** system. In either case the database must already exist, otherwise
+** an error is returned. For historical reasons, if opening in
+** read-write mode fails due to OS-level permissions, an attempt is
+** made to open it in read-only mode. [sqlite3_db_readonly()] can be
+** used to determine whether the database is actually
+** read-write.
)^
+**
+** ^(- [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]
+** - The database is opened for reading and writing, and is created if
+** it does not already exist. This is the behavior that is always used for
+** sqlite3_open() and sqlite3_open16().
)^
+**
+**
+** In addition to the required flags, the following optional flags are
+** also supported:
+**
+**
+** ^(- [SQLITE_OPEN_URI]
+** - The filename can be interpreted as a URI if this flag is set.
)^
+**
+** ^(- [SQLITE_OPEN_MEMORY]
+** - The database will be opened as an in-memory database. The database
+** is named by the "filename" argument for the purposes of cache-sharing,
+** if shared cache mode is enabled, but the "filename" is otherwise ignored.
+**
)^
+**
+** ^(- [SQLITE_OPEN_NOMUTEX]
+** - The new database connection will use the "multi-thread"
+** [threading mode].)^ This means that separate threads are allowed
+** to use SQLite at the same time, as long as each thread is using
+** a different [database connection].
+**
+** ^(
- [SQLITE_OPEN_FULLMUTEX]
+** - The new database connection will use the "serialized"
+** [threading mode].)^ This means the multiple threads can safely
+** attempt to use the same database connection at the same time.
+** (Mutexes will block any actual concurrency, but in this mode
+** there is no harm in trying.)
+**
+** ^(
- [SQLITE_OPEN_SHAREDCACHE]
+** - The database is opened [shared cache] enabled, overriding
+** the default shared cache setting provided by
+** [sqlite3_enable_shared_cache()].)^
+** The [use of shared cache mode is discouraged] and hence shared cache
+** capabilities may be omitted from many builds of SQLite. In such cases,
+** this option is a no-op.
+**
+** ^(
- [SQLITE_OPEN_PRIVATECACHE]
+** - The database is opened [shared cache] disabled, overriding
+** the default shared cache setting provided by
+** [sqlite3_enable_shared_cache()].)^
+**
+** [[OPEN_EXRESCODE]] ^(
- [SQLITE_OPEN_EXRESCODE]
+** - The database connection comes up in "extended result code mode".
+** In other words, the database behaves as if
+** [sqlite3_extended_result_codes(db,1)] were called on the database
+** connection as soon as the connection is created. In addition to setting
+** the extended result code mode, this flag also causes [sqlite3_open_v2()]
+** to return an extended result code.
+**
+** [[OPEN_NOFOLLOW]] ^(- [SQLITE_OPEN_NOFOLLOW]
+** - The database filename is not allowed to contain a symbolic link
+**
)^
+**
+** If the 3rd parameter to sqlite3_open_v2() is not one of the
+** required combinations shown above optionally combined with other
+** [SQLITE_OPEN_READONLY | SQLITE_OPEN_* bits]
+** then the behavior is undefined. Historic versions of SQLite
+** have silently ignored surplus bits in the flags parameter to
+** sqlite3_open_v2(), however that behavior might not be carried through
+** into future versions of SQLite and so applications should not rely
+** upon it. Note in particular that the SQLITE_OPEN_EXCLUSIVE flag is a no-op
+** for sqlite3_open_v2(). The SQLITE_OPEN_EXCLUSIVE does *not* cause
+** the open to fail if the database already exists. The SQLITE_OPEN_EXCLUSIVE
+** flag is intended for use by the [sqlite3_vfs|VFS interface] only, and not
+** by sqlite3_open_v2().
+**
+** ^The fourth parameter to sqlite3_open_v2() is the name of the
+** [sqlite3_vfs] object that defines the operating system interface that
+** the new database connection should use. ^If the fourth parameter is
+** a NULL pointer then the default [sqlite3_vfs] object is used.
+**
+** ^If the filename is ":memory:", then a private, temporary in-memory database
+** is created for the connection. ^This in-memory database will vanish when
+** the database connection is closed. Future versions of SQLite might
+** make use of additional special filenames that begin with the ":" character.
+** It is recommended that when a database filename actually does begin with
+** a ":" character you should prefix the filename with a pathname such as
+** "./" to avoid ambiguity.
+**
+** ^If the filename is an empty string, then a private, temporary
+** on-disk database will be created. ^This private database will be
+** automatically deleted as soon as the database connection is closed.
+**
+** [[URI filenames in sqlite3_open()]] URI Filenames
+**
+** ^If [URI filename] interpretation is enabled, and the filename argument
+** begins with "file:", then the filename is interpreted as a URI. ^URI
+** filename interpretation is enabled if the [SQLITE_OPEN_URI] flag is
+** set in the third argument to sqlite3_open_v2(), or if it has
+** been enabled globally using the [SQLITE_CONFIG_URI] option with the
+** [sqlite3_config()] method or by the [SQLITE_USE_URI] compile-time option.
+** URI filename interpretation is turned off
+** by default, but future releases of SQLite might enable URI filename
+** interpretation by default. See "[URI filenames]" for additional
+** information.
+**
+** URI filenames are parsed according to RFC 3986. ^If the URI contains an
+** authority, then it must be either an empty string or the string
+** "localhost". ^If the authority is not an empty string or "localhost", an
+** error is returned to the caller. ^The fragment component of a URI, if
+** present, is ignored.
+**
+** ^SQLite uses the path component of the URI as the name of the disk file
+** which contains the database. ^If the path begins with a '/' character,
+** then it is interpreted as an absolute path. ^If the path does not begin
+** with a '/' (meaning that the authority section is omitted from the URI)
+** then the path is interpreted as a relative path.
+** ^(On windows, the first component of an absolute path
+** is a drive specification (e.g. "C:").)^
+**
+** [[core URI query parameters]]
+** The query component of a URI may contain parameters that are interpreted
+** either by SQLite itself, or by a [VFS | custom VFS implementation].
+** SQLite and its built-in [VFSes] interpret the
+** following query parameters:
+**
+**
+** - vfs: ^The "vfs" parameter may be used to specify the name of
+** a VFS object that provides the operating system interface that should
+** be used to access the database file on disk. ^If this option is set to
+** an empty string the default VFS object is used. ^Specifying an unknown
+** VFS is an error. ^If sqlite3_open_v2() is used and the vfs option is
+** present, then the VFS specified by the option takes precedence over
+** the value passed as the fourth parameter to sqlite3_open_v2().
+**
+**
- mode: ^(The mode parameter may be set to either "ro", "rw",
+** "rwc", or "memory". Attempting to set it to any other value is
+** an error)^.
+** ^If "ro" is specified, then the database is opened for read-only
+** access, just as if the [SQLITE_OPEN_READONLY] flag had been set in the
+** third argument to sqlite3_open_v2(). ^If the mode option is set to
+** "rw", then the database is opened for read-write (but not create)
+** access, as if SQLITE_OPEN_READWRITE (but not SQLITE_OPEN_CREATE) had
+** been set. ^Value "rwc" is equivalent to setting both
+** SQLITE_OPEN_READWRITE and SQLITE_OPEN_CREATE. ^If the mode option is
+** set to "memory" then a pure [in-memory database] that never reads
+** or writes from disk is used. ^It is an error to specify a value for
+** the mode parameter that is less restrictive than that specified by
+** the flags passed in the third parameter to sqlite3_open_v2().
+**
+**
- cache: ^The cache parameter may be set to either "shared" or
+** "private". ^Setting it to "shared" is equivalent to setting the
+** SQLITE_OPEN_SHAREDCACHE bit in the flags argument passed to
+** sqlite3_open_v2(). ^Setting the cache parameter to "private" is
+** equivalent to setting the SQLITE_OPEN_PRIVATECACHE bit.
+** ^If sqlite3_open_v2() is used and the "cache" parameter is present in
+** a URI filename, its value overrides any behavior requested by setting
+** SQLITE_OPEN_PRIVATECACHE or SQLITE_OPEN_SHAREDCACHE flag.
+**
+**
- psow: ^The psow parameter indicates whether or not the
+** [powersafe overwrite] property does or does not apply to the
+** storage media on which the database file resides.
+**
+**
- nolock: ^The nolock parameter is a boolean query parameter
+** which if set disables file locking in rollback journal modes. This
+** is useful for accessing a database on a filesystem that does not
+** support locking. Caution: Database corruption might result if two
+** or more processes write to the same database and any one of those
+** processes uses nolock=1.
+**
+**
- immutable: ^The immutable parameter is a boolean query
+** parameter that indicates that the database file is stored on
+** read-only media. ^When immutable is set, SQLite assumes that the
+** database file cannot be changed, even by a process with higher
+** privilege, and so the database is opened read-only and all locking
+** and change detection is disabled. Caution: Setting the immutable
+** property on a database file that does in fact change can result
+** in incorrect query results and/or [SQLITE_CORRUPT] errors.
+** See also: [SQLITE_IOCAP_IMMUTABLE].
+**
+**
+**
+** ^Specifying an unknown parameter in the query component of a URI is not an
+** error. Future versions of SQLite might understand additional query
+** parameters. See "[query parameters with special meaning to SQLite]" for
+** additional information.
+**
+** [[URI filename examples]] URI filename examples
+**
+**
+** | URI filenames | Results
+** |
|---|
| file:data.db |
+** Open the file "data.db" in the current directory.
+** |
file:/home/fred/data.db
+** file:///home/fred/data.db
+** file://localhost/home/fred/data.db |
+** Open the database file "/home/fred/data.db".
+** |
| file://darkstar/home/fred/data.db |
+** An error. "darkstar" is not a recognized authority.
+** |
|
+** file:///C:/Documents%20and%20Settings/fred/Desktop/data.db
+** | Windows only: Open the file "data.db" on fred's desktop on drive
+** C:. Note that the %20 escaping in this example is not strictly
+** necessary - space characters can be used literally
+** in URI filenames.
+** |
| file:data.db?mode=ro&cache=private |
+** Open file "data.db" in the current directory for read-only access.
+** Regardless of whether or not shared-cache mode is enabled by
+** default, use a private cache.
+** |
| file:/home/fred/data.db?vfs=unix-dotfile |
+** Open file "/home/fred/data.db". Use the special VFS "unix-dotfile"
+** that uses dot-files in place of posix advisory locking.
+** |
| file:data.db?mode=readonly |
+** An error. "readonly" is not a valid option for the "mode" parameter.
+** Use "ro" instead: "file:data.db?mode=ro".
+** |
+**
+** ^URI hexadecimal escape sequences (%HH) are supported within the path and
+** query components of a URI. A hexadecimal escape sequence consists of a
+** percent sign - "%" - followed by exactly two hexadecimal digits
+** specifying an octet value. ^Before the path or query components of a
+** URI filename are interpreted, they are encoded using UTF-8 and all
+** hexadecimal escape sequences replaced by a single byte containing the
+** corresponding octet. If this process generates an invalid UTF-8 encoding,
+** the results are undefined.
+**
+** Note to Windows users: The encoding used for the filename argument
+** of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever
+** codepage is currently defined. Filenames containing international
+** characters must be converted to UTF-8 prior to passing them into
+** sqlite3_open() or sqlite3_open_v2().
+**
+** Note to Windows Runtime users: The temporary directory must be set
+** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various
+** features that require the use of temporary files may fail.
+**
+** See also: [sqlite3_temp_directory]
+ */
+//go:linkname DoOpen C.sqlite3_open
+func DoOpen(filename *c.Char, ppDb **Sqlite3) c.Int
+
+//go:linkname DoOpen16 C.sqlite3_open16
+func DoOpen16(filename c.Pointer, ppDb **Sqlite3) c.Int
+
+//go:linkname DoOpenV2 C.sqlite3_open_v2
+func DoOpenV2(filename *c.Char, ppDb **Sqlite3, flags c.Int, zVfs *c.Char) c.Int
+
+/*
+** CAPI3REF: Obtain Values For URI Parameters
+**
+** These are utility routines, useful to [VFS|custom VFS implementations],
+** that check if a database file was a URI that contained a specific query
+** parameter, and if so obtains the value of that query parameter.
+**
+** The first parameter to these interfaces (hereafter referred to
+** as F) must be one of:
+**
+** - A database filename pointer created by the SQLite core and
+** passed into the xOpen() method of a VFS implementation, or
+**
- A filename obtained from [sqlite3_db_filename()], or
+**
- A new filename constructed using [sqlite3_create_filename()].
+**
+** If the F parameter is not one of the above, then the behavior is
+** undefined and probably undesirable. Older versions of SQLite were
+** more tolerant of invalid F parameters than newer versions.
+**
+** If F is a suitable filename (as described in the previous paragraph)
+** and if P is the name of the query parameter, then
+** sqlite3_uri_parameter(F,P) returns the value of the P
+** parameter if it exists or a NULL pointer if P does not appear as a
+** query parameter on F. If P is a query parameter of F and it
+** has no explicit value, then sqlite3_uri_parameter(F,P) returns
+** a pointer to an empty string.
+**
+** The sqlite3_uri_boolean(F,P,B) routine assumes that P is a boolean
+** parameter and returns true (1) or false (0) according to the value
+** of P. The sqlite3_uri_boolean(F,P,B) routine returns true (1) if the
+** value of query parameter P is one of "yes", "true", or "on" in any
+** case or if the value begins with a non-zero number. The
+** sqlite3_uri_boolean(F,P,B) routines returns false (0) if the value of
+** query parameter P is one of "no", "false", or "off" in any case or
+** if the value begins with a numeric zero. If P is not a query
+** parameter on F or if the value of P does not match any of the
+** above, then sqlite3_uri_boolean(F,P,B) returns (B!=0).
+**
+** The sqlite3_uri_int64(F,P,D) routine converts the value of P into a
+** 64-bit signed integer and returns that integer, or D if P does not
+** exist. If the value of P is something other than an integer, then
+** zero is returned.
+**
+** The sqlite3_uri_key(F,N) returns a pointer to the name (not
+** the value) of the N-th query parameter for filename F, or a NULL
+** pointer if N is less than zero or greater than the number of query
+** parameters minus 1. The N value is zero-based so N should be 0 to obtain
+** the name of the first query parameter, 1 for the second parameter, and
+** so forth.
+**
+** If F is a NULL pointer, then sqlite3_uri_parameter(F,P) returns NULL and
+** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and
+** is not a database file pathname pointer that the SQLite core passed
+** into the xOpen VFS method, then the behavior of this routine is undefined
+** and probably undesirable.
+**
+** Beginning with SQLite [version 3.31.0] ([dateof:3.31.0]) the input F
+** parameter can also be the name of a rollback journal file or WAL file
+** in addition to the main database file. Prior to version 3.31.0, these
+** routines would only work if F was the name of the main database file.
+** When the F parameter is the name of the rollback journal or WAL file,
+** it has access to all the same query parameters as were found on the
+** main database file.
+**
+** See the [URI filename] documentation for additional information.
+ */
+//go:linkname UriParameter C.sqlite3_uri_parameter
+func UriParameter(z Filename, zParam *c.Char) *c.Char
+
+//go:linkname UriBoolean C.sqlite3_uri_boolean
+func UriBoolean(z Filename, zParam *c.Char, bDefault c.Int) c.Int
+
+//go:linkname UriInt64 C.sqlite3_uri_int64
+func UriInt64(Filename, *c.Char, Int64) Int64
+
+//go:linkname UriKey C.sqlite3_uri_key
+func UriKey(z Filename, N c.Int) *c.Char
+
+/*
+** CAPI3REF: Translate filenames
+**
+** These routines are available to [VFS|custom VFS implementations] for
+** translating filenames between the main database file, the journal file,
+** and the WAL file.
+**
+** If F is the name of an sqlite database file, journal file, or WAL file
+** passed by the SQLite core into the VFS, then sqlite3_filename_database(F)
+** returns the name of the corresponding database file.
+**
+** If F is the name of an sqlite database file, journal file, or WAL file
+** passed by the SQLite core into the VFS, or if F is a database filename
+** obtained from [sqlite3_db_filename()], then sqlite3_filename_journal(F)
+** returns the name of the corresponding rollback journal file.
+**
+** If F is the name of an sqlite database file, journal file, or WAL file
+** that was passed by the SQLite core into the VFS, or if F is a database
+** filename obtained from [sqlite3_db_filename()], then
+** sqlite3_filename_wal(F) returns the name of the corresponding
+** WAL file.
+**
+** In all of the above, if F is not the name of a database, journal or WAL
+** filename passed into the VFS from the SQLite core and F is not the
+** return value from [sqlite3_db_filename()], then the result is
+** undefined and is likely a memory access violation.
+ */
+//go:linkname FilenameDatabase C.sqlite3_filename_database
+func FilenameDatabase(Filename) *c.Char
+
+//go:linkname FilenameJournal C.sqlite3_filename_journal
+func FilenameJournal(Filename) *c.Char
+
+//go:linkname FilenameWal C.sqlite3_filename_wal
+func FilenameWal(Filename) *c.Char
+
+/*
+** CAPI3REF: Database File Corresponding To A Journal
+**
+** ^If X is the name of a rollback or WAL-mode journal file that is
+** passed into the xOpen method of [sqlite3_vfs], then
+** sqlite3_database_file_object(X) returns a pointer to the [sqlite3_file]
+** object that represents the main database file.
+**
+** This routine is intended for use in custom [VFS] implementations
+** only. It is not a general-purpose interface.
+** The argument sqlite3_file_object(X) must be a filename pointer that
+** has been passed into [sqlite3_vfs].xOpen method where the
+** flags parameter to xOpen contains one of the bits
+** [SQLITE_OPEN_MAIN_JOURNAL] or [SQLITE_OPEN_WAL]. Any other use
+** of this routine results in undefined and probably undesirable
+** behavior.
+ */
+//go:linkname DatabaseFileObject C.sqlite3_database_file_object
+func DatabaseFileObject(*c.Char) *File
+
+/*
+** CAPI3REF: Create and Destroy VFS Filenames
+**
+** These interfaces are provided for use by [VFS shim] implementations and
+** are not useful outside of that context.
+**
+** The sqlite3_create_filename(D,J,W,N,P) allocates memory to hold a version of
+** database filename D with corresponding journal file J and WAL file W and
+** with N URI parameters key/values pairs in the array P. The result from
+** sqlite3_create_filename(D,J,W,N,P) is a pointer to a database filename that
+** is safe to pass to routines like:
+**
+** - [sqlite3_uri_parameter()],
+**
- [sqlite3_uri_boolean()],
+**
- [sqlite3_uri_int64()],
+**
- [sqlite3_uri_key()],
+**
- [sqlite3_filename_database()],
+**
- [sqlite3_filename_journal()], or
+**
- [sqlite3_filename_wal()].
+**
+** If a memory allocation error occurs, sqlite3_create_filename() might
+** return a NULL pointer. The memory obtained from sqlite3_create_filename(X)
+** must be released by a corresponding call to sqlite3_free_filename(Y).
+**
+** The P parameter in sqlite3_create_filename(D,J,W,N,P) should be an array
+** of 2*N pointers to strings. Each pair of pointers in this array corresponds
+** to a key and value for a query parameter. The P parameter may be a NULL
+** pointer if N is zero. None of the 2*N pointers in the P array may be
+** NULL pointers and key pointers should not be empty strings.
+** None of the D, J, or W parameters to sqlite3_create_filename(D,J,W,N,P) may
+** be NULL pointers, though they can be empty strings.
+**
+** The sqlite3_free_filename(Y) routine releases a memory allocation
+** previously obtained from sqlite3_create_filename(). Invoking
+** sqlite3_free_filename(Y) where Y is a NULL pointer is a harmless no-op.
+**
+** If the Y parameter to sqlite3_free_filename(Y) is anything other
+** than a NULL pointer or a pointer previously acquired from
+** sqlite3_create_filename(), then bad things such as heap
+** corruption or segfaults may occur. The value Y should not be
+** used again after sqlite3_free_filename(Y) has been called. This means
+** that if the [sqlite3_vfs.xOpen()] method of a VFS has been called using Y,
+** then the corresponding [sqlite3_module.xClose() method should also be
+** invoked prior to calling sqlite3_free_filename(Y).
+ */
+//go:linkname CreateFilename C.sqlite3_create_filename
+func CreateFilename(zDatabase *c.Char, zJournal *c.Char, zWal *c.Char, nParam c.Int, azParam **c.Char) Filename
+
+//go:linkname FreeFilename C.sqlite3_free_filename
+func FreeFilename(Filename)
+
+/*
+** CAPI3REF: Error Codes And Messages
+** METHOD: sqlite3
+**
+** ^If the most recent sqlite3_* API call associated with
+** [database connection] D failed, then the sqlite3_errcode(D) interface
+** returns the numeric [result code] or [extended result code] for that
+** API call.
+** ^The sqlite3_extended_errcode()
+** interface is the same except that it always returns the
+** [extended result code] even when extended result codes are
+** disabled.
+**
+** The values returned by sqlite3_errcode() and/or
+** sqlite3_extended_errcode() might change with each API call.
+** Except, there are some interfaces that are guaranteed to never
+** change the value of the error code. The error-code preserving
+** interfaces include the following:
+**
+**
+** - sqlite3_errcode()
+**
- sqlite3_extended_errcode()
+**
- sqlite3_errmsg()
+**
- sqlite3_errmsg16()
+**
- sqlite3_error_offset()
+**
+**
+** ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language
+** text that describes the error, as either UTF-8 or UTF-16 respectively,
+** or NULL if no error message is available.
+** (See how SQLite handles [invalid UTF] for exceptions to this rule.)
+** ^(Memory to hold the error message string is managed internally.
+** The application does not need to worry about freeing the result.
+** However, the error string might be overwritten or deallocated by
+** subsequent calls to other SQLite interface functions.)^
+**
+** ^The sqlite3_errstr(E) interface returns the English-language text
+** that describes the [result code] E, as UTF-8, or NULL if E is not an
+** result code for which a text error message is available.
+** ^(Memory to hold the error message string is managed internally
+** and must not be freed by the application)^.
+**
+** ^If the most recent error references a specific token in the input
+** SQL, the sqlite3_error_offset() interface returns the byte offset
+** of the start of that token. ^The byte offset returned by
+** sqlite3_error_offset() assumes that the input SQL is UTF8.
+** ^If the most recent error does not reference a specific token in the input
+** SQL, then the sqlite3_error_offset() function returns -1.
+**
+** When the serialized [threading mode] is in use, it might be the
+** case that a second error occurs on a separate thread in between
+** the time of the first error and the call to these interfaces.
+** When that happens, the second error will be reported since these
+** interfaces always report the most recent result. To avoid
+** this, each thread can obtain exclusive use of the [database connection] D
+** by invoking [sqlite3_mutex_enter]([sqlite3_db_mutex](D)) before beginning
+** to use D and invoking [sqlite3_mutex_leave]([sqlite3_db_mutex](D)) after
+** all calls to the interfaces listed here are completed.
+**
+** If an interface fails with SQLITE_MISUSE, that means the interface
+** was invoked incorrectly by the application. In that case, the
+** error code and message may or may not be set.
+ */
+// llgo:link (*Sqlite3).Errcode C.sqlite3_errcode
+func (recv_ *Sqlite3) Errcode() c.Int {
+ return 0
+}
+
+// llgo:link (*Sqlite3).ExtendedErrcode C.sqlite3_extended_errcode
+func (recv_ *Sqlite3) ExtendedErrcode() c.Int {
+ return 0
+}
+
+// llgo:link (*Sqlite3).Errmsg C.sqlite3_errmsg
+func (recv_ *Sqlite3) Errmsg() *c.Char {
+ return nil
+}
+
+// llgo:link (*Sqlite3).Errmsg16 C.sqlite3_errmsg16
+func (recv_ *Sqlite3) Errmsg16() c.Pointer {
+ return nil
+}
+
+//go:linkname Errstr C.sqlite3_errstr
+func Errstr(c.Int) *c.Char
+
+// llgo:link (*Sqlite3).ErrorOffset C.sqlite3_error_offset
+func (recv_ *Sqlite3) ErrorOffset() c.Int {
+ return 0
+}
+
+type Stmt struct {
+ Unused [8]uint8
+}
+
+/*
+** CAPI3REF: Run-time Limits
+** METHOD: sqlite3
+**
+** ^(This interface allows the size of various constructs to be limited
+** on a connection by connection basis. The first parameter is the
+** [database connection] whose limit is to be set or queried. The
+** second parameter is one of the [limit categories] that define a
+** class of constructs to be size limited. The third parameter is the
+** new limit for that construct.)^
+**
+** ^If the new limit is a negative number, the limit is unchanged.
+** ^(For each limit category SQLITE_LIMIT_NAME there is a
+** [limits | hard upper bound]
+** set at compile-time by a C preprocessor macro called
+** [limits | SQLITE_MAX_NAME].
+** (The "_LIMIT_" in the name is changed to "_MAX_".))^
+** ^Attempts to increase a limit above its hard upper bound are
+** silently truncated to the hard upper bound.
+**
+** ^Regardless of whether or not the limit was changed, the
+** [sqlite3_limit()] interface returns the prior value of the limit.
+** ^Hence, to find the current value of a limit without changing it,
+** simply invoke this interface with the third parameter set to -1.
+**
+** Run-time limits are intended for use in applications that manage
+** both their own internal database and also databases that are controlled
+** by untrusted external sources. An example application might be a
+** web browser that has its own databases for storing history and
+** separate databases controlled by JavaScript applications downloaded
+** off the Internet. The internal databases can be given the
+** large, default limits. Databases managed by external sources can
+** be given much smaller limits designed to prevent a denial of service
+** attack. Developers might also want to use the [sqlite3_set_authorizer()]
+** interface to further control untrusted SQL. The size of the database
+** created by an untrusted script can be contained using the
+** [max_page_count] [PRAGMA].
+**
+** New run-time limit categories may be added in future releases.
+ */
+// llgo:link (*Sqlite3).Limit C.sqlite3_limit
+func (recv_ *Sqlite3) Limit(id c.Int, newVal c.Int) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Compiling An SQL Statement
+** KEYWORDS: {SQL statement compiler}
+** METHOD: sqlite3
+** CONSTRUCTOR: sqlite3_stmt
+**
+** To execute an SQL statement, it must first be compiled into a byte-code
+** program using one of these routines. Or, in other words, these routines
+** are constructors for the [prepared statement] object.
+**
+** The preferred routine to use is [sqlite3_prepare_v2()]. The
+** [sqlite3_prepare()] interface is legacy and should be avoided.
+** [sqlite3_prepare_v3()] has an extra "prepFlags" option that is used
+** for special purposes.
+**
+** The use of the UTF-8 interfaces is preferred, as SQLite currently
+** does all parsing using UTF-8. The UTF-16 interfaces are provided
+** as a convenience. The UTF-16 interfaces work by converting the
+** input text into UTF-8, then invoking the corresponding UTF-8 interface.
+**
+** The first argument, "db", is a [database connection] obtained from a
+** prior successful call to [sqlite3_open()], [sqlite3_open_v2()] or
+** [sqlite3_open16()]. The database connection must not have been closed.
+**
+** The second argument, "zSql", is the statement to be compiled, encoded
+** as either UTF-8 or UTF-16. The sqlite3_prepare(), sqlite3_prepare_v2(),
+** and sqlite3_prepare_v3()
+** interfaces use UTF-8, and sqlite3_prepare16(), sqlite3_prepare16_v2(),
+** and sqlite3_prepare16_v3() use UTF-16.
+**
+** ^If the nByte argument is negative, then zSql is read up to the
+** first zero terminator. ^If nByte is positive, then it is the maximum
+** number of bytes read from zSql. When nByte is positive, zSql is read
+** up to the first zero terminator or until the nByte bytes have been read,
+** whichever comes first. ^If nByte is zero, then no prepared
+** statement is generated.
+** If the caller knows that the supplied string is nul-terminated, then
+** there is a small performance advantage to passing an nByte parameter that
+** is the number of bytes in the input string including
+** the nul-terminator.
+** Note that nByte measure the length of the input in bytes, not
+** characters, even for the UTF-16 interfaces.
+**
+** ^If pzTail is not NULL then *pzTail is made to point to the first byte
+** past the end of the first SQL statement in zSql. These routines only
+** compile the first statement in zSql, so *pzTail is left pointing to
+** what remains uncompiled.
+**
+** ^*ppStmt is left pointing to a compiled [prepared statement] that can be
+** executed using [sqlite3_step()]. ^If there is an error, *ppStmt is set
+** to NULL. ^If the input text contains no SQL (if the input is an empty
+** string or a comment) then *ppStmt is set to NULL.
+** The calling procedure is responsible for deleting the compiled
+** SQL statement using [sqlite3_finalize()] after it has finished with it.
+** ppStmt may not be NULL.
+**
+** ^On success, the sqlite3_prepare() family of routines return [SQLITE_OK];
+** otherwise an [error code] is returned.
+**
+** The sqlite3_prepare_v2(), sqlite3_prepare_v3(), sqlite3_prepare16_v2(),
+** and sqlite3_prepare16_v3() interfaces are recommended for all new programs.
+** The older interfaces (sqlite3_prepare() and sqlite3_prepare16())
+** are retained for backwards compatibility, but their use is discouraged.
+** ^In the "vX" interfaces, the prepared statement
+** that is returned (the [sqlite3_stmt] object) contains a copy of the
+** original SQL text. This causes the [sqlite3_step()] interface to
+** behave differently in three ways:
+**
+**
+** -
+** ^If the database schema changes, instead of returning [SQLITE_SCHEMA] as it
+** always used to do, [sqlite3_step()] will automatically recompile the SQL
+** statement and try to run it again. As many as [SQLITE_MAX_SCHEMA_RETRY]
+** retries will occur before sqlite3_step() gives up and returns an error.
+**
+**
+** -
+** ^When an error occurs, [sqlite3_step()] will return one of the detailed
+** [error codes] or [extended error codes]. ^The legacy behavior was that
+** [sqlite3_step()] would only return a generic [SQLITE_ERROR] result code
+** and the application would have to make a second call to [sqlite3_reset()]
+** in order to find the underlying cause of the problem. With the "v2" prepare
+** interfaces, the underlying reason for the error is returned immediately.
+**
+**
+** -
+** ^If the specific value bound to a [parameter | host parameter] in the
+** WHERE clause might influence the choice of query plan for a statement,
+** then the statement will be automatically recompiled, as if there had been
+** a schema change, on the first [sqlite3_step()] call following any change
+** to the [sqlite3_bind_text | bindings] of that [parameter].
+** ^The specific value of a WHERE-clause [parameter] might influence the
+** choice of query plan if the parameter is the left-hand side of a [LIKE]
+** or [GLOB] operator or if the parameter is compared to an indexed column
+** and the [SQLITE_ENABLE_STAT4] compile-time option is enabled.
+**
+**
+**
+** ^sqlite3_prepare_v3() differs from sqlite3_prepare_v2() only in having
+** the extra prepFlags parameter, which is a bit array consisting of zero or
+** more of the [SQLITE_PREPARE_PERSISTENT|SQLITE_PREPARE_*] flags. ^The
+** sqlite3_prepare_v2() interface works exactly the same as
+** sqlite3_prepare_v3() with a zero prepFlags parameter.
+ */
+// llgo:link (*Sqlite3).DoPrepare C.sqlite3_prepare
+func (recv_ *Sqlite3) DoPrepare(zSql *c.Char, nByte c.Int, ppStmt **Stmt, pzTail **c.Char) c.Int {
+ return 0
+}
+
+// llgo:link (*Sqlite3).DoPrepareV2 C.sqlite3_prepare_v2
+func (recv_ *Sqlite3) DoPrepareV2(zSql *c.Char, nByte c.Int, ppStmt **Stmt, pzTail **c.Char) c.Int {
+ return 0
+}
+
+// llgo:link (*Sqlite3).DoPrepareV3 C.sqlite3_prepare_v3
+func (recv_ *Sqlite3) DoPrepareV3(zSql *c.Char, nByte c.Int, prepFlags c.Uint, ppStmt **Stmt, pzTail **c.Char) c.Int {
+ return 0
+}
+
+// llgo:link (*Sqlite3).DoPrepare16 C.sqlite3_prepare16
+func (recv_ *Sqlite3) DoPrepare16(zSql c.Pointer, nByte c.Int, ppStmt **Stmt, pzTail *c.Pointer) c.Int {
+ return 0
+}
+
+// llgo:link (*Sqlite3).DoPrepare16V2 C.sqlite3_prepare16_v2
+func (recv_ *Sqlite3) DoPrepare16V2(zSql c.Pointer, nByte c.Int, ppStmt **Stmt, pzTail *c.Pointer) c.Int {
+ return 0
+}
+
+// llgo:link (*Sqlite3).DoPrepare16V3 C.sqlite3_prepare16_v3
+func (recv_ *Sqlite3) DoPrepare16V3(zSql c.Pointer, nByte c.Int, prepFlags c.Uint, ppStmt **Stmt, pzTail *c.Pointer) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Retrieving Statement SQL
+** METHOD: sqlite3_stmt
+**
+** ^The sqlite3_sql(P) interface returns a pointer to a copy of the UTF-8
+** SQL text used to create [prepared statement] P if P was
+** created by [sqlite3_prepare_v2()], [sqlite3_prepare_v3()],
+** [sqlite3_prepare16_v2()], or [sqlite3_prepare16_v3()].
+** ^The sqlite3_expanded_sql(P) interface returns a pointer to a UTF-8
+** string containing the SQL text of prepared statement P with
+** [bound parameters] expanded.
+** ^The sqlite3_normalized_sql(P) interface returns a pointer to a UTF-8
+** string containing the normalized SQL text of prepared statement P. The
+** semantics used to normalize a SQL statement are unspecified and subject
+** to change. At a minimum, literal values will be replaced with suitable
+** placeholders.
+**
+** ^(For example, if a prepared statement is created using the SQL
+** text "SELECT $abc,:xyz" and if parameter $abc is bound to integer 2345
+** and parameter :xyz is unbound, then sqlite3_sql() will return
+** the original string, "SELECT $abc,:xyz" but sqlite3_expanded_sql()
+** will return "SELECT 2345,NULL".)^
+**
+** ^The sqlite3_expanded_sql() interface returns NULL if insufficient memory
+** is available to hold the result, or if the result would exceed the
+** the maximum string length determined by the [SQLITE_LIMIT_LENGTH].
+**
+** ^The [SQLITE_TRACE_SIZE_LIMIT] compile-time option limits the size of
+** bound parameter expansions. ^The [SQLITE_OMIT_TRACE] compile-time
+** option causes sqlite3_expanded_sql() to always return NULL.
+**
+** ^The strings returned by sqlite3_sql(P) and sqlite3_normalized_sql(P)
+** are managed by SQLite and are automatically freed when the prepared
+** statement is finalized.
+** ^The string returned by sqlite3_expanded_sql(P), on the other hand,
+** is obtained from [sqlite3_malloc()] and must be freed by the application
+** by passing it to [sqlite3_free()].
+**
+** ^The sqlite3_normalized_sql() interface is only available if
+** the [SQLITE_ENABLE_NORMALIZE] compile-time option is defined.
+ */
+// llgo:link (*Stmt).Sql C.sqlite3_sql
+func (recv_ *Stmt) Sql() *c.Char {
+ return nil
+}
+
+// llgo:link (*Stmt).ExpandedSql C.sqlite3_expanded_sql
+func (recv_ *Stmt) ExpandedSql() *c.Char {
+ return nil
+}
+
+/*
+** CAPI3REF: Determine If An SQL Statement Writes The Database
+** METHOD: sqlite3_stmt
+**
+** ^The sqlite3_stmt_readonly(X) interface returns true (non-zero) if
+** and only if the [prepared statement] X makes no direct changes to
+** the content of the database file.
+**
+** Note that [application-defined SQL functions] or
+** [virtual tables] might change the database indirectly as a side effect.
+** ^(For example, if an application defines a function "eval()" that
+** calls [sqlite3_exec()], then the following SQL statement would
+** change the database file through side-effects:
+**
+**
+** SELECT eval('DELETE FROM t1') FROM t2;
+**
+**
+** But because the [SELECT] statement does not change the database file
+** directly, sqlite3_stmt_readonly() would still return true.)^
+**
+** ^Transaction control statements such as [BEGIN], [COMMIT], [ROLLBACK],
+** [SAVEPOINT], and [RELEASE] cause sqlite3_stmt_readonly() to return true,
+** since the statements themselves do not actually modify the database but
+** rather they control the timing of when other statements modify the
+** database. ^The [ATTACH] and [DETACH] statements also cause
+** sqlite3_stmt_readonly() to return true since, while those statements
+** change the configuration of a database connection, they do not make
+** changes to the content of the database files on disk.
+** ^The sqlite3_stmt_readonly() interface returns true for [BEGIN] since
+** [BEGIN] merely sets internal flags, but the [BEGIN|BEGIN IMMEDIATE] and
+** [BEGIN|BEGIN EXCLUSIVE] commands do touch the database and so
+** sqlite3_stmt_readonly() returns false for those commands.
+**
+** ^This routine returns false if there is any possibility that the
+** statement might change the database file. ^A false return does
+** not guarantee that the statement will change the database file.
+** ^For example, an UPDATE statement might have a WHERE clause that
+** makes it a no-op, but the sqlite3_stmt_readonly() result would still
+** be false. ^Similarly, a CREATE TABLE IF NOT EXISTS statement is a
+** read-only no-op if the table already exists, but
+** sqlite3_stmt_readonly() still returns false for such a statement.
+**
+** ^If prepared statement X is an [EXPLAIN] or [EXPLAIN QUERY PLAN]
+** statement, then sqlite3_stmt_readonly(X) returns the same value as
+** if the EXPLAIN or EXPLAIN QUERY PLAN prefix were omitted.
+ */
+// llgo:link (*Stmt).StmtReadonly C.sqlite3_stmt_readonly
+func (recv_ *Stmt) StmtReadonly() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Query The EXPLAIN Setting For A Prepared Statement
+** METHOD: sqlite3_stmt
+**
+** ^The sqlite3_stmt_isexplain(S) interface returns 1 if the
+** prepared statement S is an EXPLAIN statement, or 2 if the
+** statement S is an EXPLAIN QUERY PLAN.
+** ^The sqlite3_stmt_isexplain(S) interface returns 0 if S is
+** an ordinary statement or a NULL pointer.
+ */
+// llgo:link (*Stmt).StmtIsexplain C.sqlite3_stmt_isexplain
+func (recv_ *Stmt) StmtIsexplain() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Change The EXPLAIN Setting For A Prepared Statement
+** METHOD: sqlite3_stmt
+**
+** The sqlite3_stmt_explain(S,E) interface changes the EXPLAIN
+** setting for [prepared statement] S. If E is zero, then S becomes
+** a normal prepared statement. If E is 1, then S behaves as if
+** its SQL text began with "[EXPLAIN]". If E is 2, then S behaves as if
+** its SQL text began with "[EXPLAIN QUERY PLAN]".
+**
+** Calling sqlite3_stmt_explain(S,E) might cause S to be reprepared.
+** SQLite tries to avoid a reprepare, but a reprepare might be necessary
+** on the first transition into EXPLAIN or EXPLAIN QUERY PLAN mode.
+**
+** Because of the potential need to reprepare, a call to
+** sqlite3_stmt_explain(S,E) will fail with SQLITE_ERROR if S cannot be
+** reprepared because it was created using [sqlite3_prepare()] instead of
+** the newer [sqlite3_prepare_v2()] or [sqlite3_prepare_v3()] interfaces and
+** hence has no saved SQL text with which to reprepare.
+**
+** Changing the explain setting for a prepared statement does not change
+** the original SQL text for the statement. Hence, if the SQL text originally
+** began with EXPLAIN or EXPLAIN QUERY PLAN, but sqlite3_stmt_explain(S,0)
+** is called to convert the statement into an ordinary statement, the EXPLAIN
+** or EXPLAIN QUERY PLAN keywords will still appear in the sqlite3_sql(S)
+** output, even though the statement now acts like a normal SQL statement.
+**
+** This routine returns SQLITE_OK if the explain mode is successfully
+** changed, or an error code if the explain mode could not be changed.
+** The explain mode cannot be changed while a statement is active.
+** Hence, it is good practice to call [sqlite3_reset(S)]
+** immediately prior to calling sqlite3_stmt_explain(S,E).
+ */
+// llgo:link (*Stmt).StmtExplain C.sqlite3_stmt_explain
+func (recv_ *Stmt) StmtExplain(eMode c.Int) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Determine If A Prepared Statement Has Been Reset
+** METHOD: sqlite3_stmt
+**
+** ^The sqlite3_stmt_busy(S) interface returns true (non-zero) if the
+** [prepared statement] S has been stepped at least once using
+** [sqlite3_step(S)] but has neither run to completion (returned
+** [SQLITE_DONE] from [sqlite3_step(S)]) nor
+** been reset using [sqlite3_reset(S)]. ^The sqlite3_stmt_busy(S)
+** interface returns false if S is a NULL pointer. If S is not a
+** NULL pointer and is not a pointer to a valid [prepared statement]
+** object, then the behavior is undefined and probably undesirable.
+**
+** This interface can be used in combination [sqlite3_next_stmt()]
+** to locate all prepared statements associated with a database
+** connection that are in need of being reset. This can be used,
+** for example, in diagnostic routines to search for prepared
+** statements that are holding a transaction open.
+ */
+// llgo:link (*Stmt).StmtBusy C.sqlite3_stmt_busy
+func (recv_ *Stmt) StmtBusy() c.Int {
+ return 0
+}
+
+type Value struct {
+ Unused [8]uint8
+}
+
+type Context struct {
+ Unused [8]uint8
+}
+
+/*
+** CAPI3REF: Binding Values To Prepared Statements
+** KEYWORDS: {host parameter} {host parameters} {host parameter name}
+** KEYWORDS: {SQL parameter} {SQL parameters} {parameter binding}
+** METHOD: sqlite3_stmt
+**
+** ^(In the SQL statement text input to [sqlite3_prepare_v2()] and its variants,
+** literals may be replaced by a [parameter] that matches one of following
+** templates:
+**
+**
+** - ?
+**
- ?NNN
+**
- :VVV
+**
- @VVV
+**
- $VVV
+**
+**
+** In the templates above, NNN represents an integer literal,
+** and VVV represents an alphanumeric identifier.)^ ^The values of these
+** parameters (also called "host parameter names" or "SQL parameters")
+** can be set using the sqlite3_bind_*() routines defined here.
+**
+** ^The first argument to the sqlite3_bind_*() routines is always
+** a pointer to the [sqlite3_stmt] object returned from
+** [sqlite3_prepare_v2()] or its variants.
+**
+** ^The second argument is the index of the SQL parameter to be set.
+** ^The leftmost SQL parameter has an index of 1. ^When the same named
+** SQL parameter is used more than once, second and subsequent
+** occurrences have the same index as the first occurrence.
+** ^The index for named parameters can be looked up using the
+** [sqlite3_bind_parameter_index()] API if desired. ^The index
+** for "?NNN" parameters is the value of NNN.
+** ^The NNN value must be between 1 and the [sqlite3_limit()]
+** parameter [SQLITE_LIMIT_VARIABLE_NUMBER] (default value: 32766).
+**
+** ^The third argument is the value to bind to the parameter.
+** ^If the third parameter to sqlite3_bind_text() or sqlite3_bind_text16()
+** or sqlite3_bind_blob() is a NULL pointer then the fourth parameter
+** is ignored and the end result is the same as sqlite3_bind_null().
+** ^If the third parameter to sqlite3_bind_text() is not NULL, then
+** it should be a pointer to well-formed UTF8 text.
+** ^If the third parameter to sqlite3_bind_text16() is not NULL, then
+** it should be a pointer to well-formed UTF16 text.
+** ^If the third parameter to sqlite3_bind_text64() is not NULL, then
+** it should be a pointer to a well-formed unicode string that is
+** either UTF8 if the sixth parameter is SQLITE_UTF8, or UTF16
+** otherwise.
+**
+** [[byte-order determination rules]] ^The byte-order of
+** UTF16 input text is determined by the byte-order mark (BOM, U+FEFF)
+** found in first character, which is removed, or in the absence of a BOM
+** the byte order is the native byte order of the host
+** machine for sqlite3_bind_text16() or the byte order specified in
+** the 6th parameter for sqlite3_bind_text64().)^
+** ^If UTF16 input text contains invalid unicode
+** characters, then SQLite might change those invalid characters
+** into the unicode replacement character: U+FFFD.
+**
+** ^(In those routines that have a fourth argument, its value is the
+** number of bytes in the parameter. To be clear: the value is the
+** number of bytes in the value, not the number of characters.)^
+** ^If the fourth parameter to sqlite3_bind_text() or sqlite3_bind_text16()
+** is negative, then the length of the string is
+** the number of bytes up to the first zero terminator.
+** If the fourth parameter to sqlite3_bind_blob() is negative, then
+** the behavior is undefined.
+** If a non-negative fourth parameter is provided to sqlite3_bind_text()
+** or sqlite3_bind_text16() or sqlite3_bind_text64() then
+** that parameter must be the byte offset
+** where the NUL terminator would occur assuming the string were NUL
+** terminated. If any NUL characters occurs at byte offsets less than
+** the value of the fourth parameter then the resulting string value will
+** contain embedded NULs. The result of expressions involving strings
+** with embedded NULs is undefined.
+**
+** ^The fifth argument to the BLOB and string binding interfaces controls
+** or indicates the lifetime of the object referenced by the third parameter.
+** These three options exist:
+** ^ (1) A destructor to dispose of the BLOB or string after SQLite has finished
+** with it may be passed. ^It is called to dispose of the BLOB or string even
+** if the call to the bind API fails, except the destructor is not called if
+** the third parameter is a NULL pointer or the fourth parameter is negative.
+** ^ (2) The special constant, [SQLITE_STATIC], may be passed to indicate that
+** the application remains responsible for disposing of the object. ^In this
+** case, the object and the provided pointer to it must remain valid until
+** either the prepared statement is finalized or the same SQL parameter is
+** bound to something else, whichever occurs sooner.
+** ^ (3) The constant, [SQLITE_TRANSIENT], may be passed to indicate that the
+** object is to be copied prior to the return from sqlite3_bind_*(). ^The
+** object and pointer to it must remain valid until then. ^SQLite will then
+** manage the lifetime of its private copy.
+**
+** ^The sixth argument to sqlite3_bind_text64() must be one of
+** [SQLITE_UTF8], [SQLITE_UTF16], [SQLITE_UTF16BE], or [SQLITE_UTF16LE]
+** to specify the encoding of the text in the third parameter. If
+** the sixth argument to sqlite3_bind_text64() is not one of the
+** allowed values shown above, or if the text encoding is different
+** from the encoding specified by the sixth parameter, then the behavior
+** is undefined.
+**
+** ^The sqlite3_bind_zeroblob() routine binds a BLOB of length N that
+** is filled with zeroes. ^A zeroblob uses a fixed amount of memory
+** (just an integer to hold its size) while it is being processed.
+** Zeroblobs are intended to serve as placeholders for BLOBs whose
+** content is later written using
+** [sqlite3_blob_open | incremental BLOB I/O] routines.
+** ^A negative value for the zeroblob results in a zero-length BLOB.
+**
+** ^The sqlite3_bind_pointer(S,I,P,T,D) routine causes the I-th parameter in
+** [prepared statement] S to have an SQL value of NULL, but to also be
+** associated with the pointer P of type T. ^D is either a NULL pointer or
+** a pointer to a destructor function for P. ^SQLite will invoke the
+** destructor D with a single argument of P when it is finished using
+** P. The T parameter should be a static string, preferably a string
+** literal. The sqlite3_bind_pointer() routine is part of the
+** [pointer passing interface] added for SQLite 3.20.0.
+**
+** ^If any of the sqlite3_bind_*() routines are called with a NULL pointer
+** for the [prepared statement] or with a prepared statement for which
+** [sqlite3_step()] has been called more recently than [sqlite3_reset()],
+** then the call will return [SQLITE_MISUSE]. If any sqlite3_bind_()
+** routine is passed a [prepared statement] that has been finalized, the
+** result is undefined and probably harmful.
+**
+** ^Bindings are not cleared by the [sqlite3_reset()] routine.
+** ^Unbound parameters are interpreted as NULL.
+**
+** ^The sqlite3_bind_* routines return [SQLITE_OK] on success or an
+** [error code] if anything goes wrong.
+** ^[SQLITE_TOOBIG] might be returned if the size of a string or BLOB
+** exceeds limits imposed by [sqlite3_limit]([SQLITE_LIMIT_LENGTH]) or
+** [SQLITE_MAX_LENGTH].
+** ^[SQLITE_RANGE] is returned if the parameter
+** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails.
+**
+** See also: [sqlite3_bind_parameter_count()],
+** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
+ */
+// llgo:link (*Stmt).BindBlob C.sqlite3_bind_blob
+func (recv_ *Stmt) BindBlob(__llgo_arg_0 c.Int, __llgo_arg_1 c.Pointer, n c.Int, __llgo_arg_3 func(c.Pointer)) c.Int {
+ return 0
+}
+
+// llgo:link (*Stmt).BindBlob64 C.sqlite3_bind_blob64
+func (recv_ *Stmt) BindBlob64(c.Int, c.Pointer, Uint64, func(c.Pointer)) c.Int {
+ return 0
+}
+
+// llgo:link (*Stmt).BindDouble C.sqlite3_bind_double
+func (recv_ *Stmt) BindDouble(c.Int, c.Double) c.Int {
+ return 0
+}
+
+// llgo:link (*Stmt).BindInt C.sqlite3_bind_int
+func (recv_ *Stmt) BindInt(c.Int, c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*Stmt).BindInt64 C.sqlite3_bind_int64
+func (recv_ *Stmt) BindInt64(c.Int, Int64) c.Int {
+ return 0
+}
+
+// llgo:link (*Stmt).BindNull C.sqlite3_bind_null
+func (recv_ *Stmt) BindNull(c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*Stmt).BindText C.sqlite3_bind_text
+func (recv_ *Stmt) BindText(c.Int, *c.Char, c.Int, func(c.Pointer)) c.Int {
+ return 0
+}
+
+// llgo:link (*Stmt).BindText16 C.sqlite3_bind_text16
+func (recv_ *Stmt) BindText16(c.Int, c.Pointer, c.Int, func(c.Pointer)) c.Int {
+ return 0
+}
+
+// llgo:link (*Stmt).BindText64 C.sqlite3_bind_text64
+func (recv_ *Stmt) BindText64(__llgo_arg_0 c.Int, __llgo_arg_1 *c.Char, __llgo_arg_2 Uint64, __llgo_arg_3 func(c.Pointer), encoding c.Char) c.Int {
+ return 0
+}
+
+// llgo:link (*Stmt).BindValue C.sqlite3_bind_value
+func (recv_ *Stmt) BindValue(c.Int, *Value) c.Int {
+ return 0
+}
+
+// llgo:link (*Stmt).BindPointer C.sqlite3_bind_pointer
+func (recv_ *Stmt) BindPointer(c.Int, c.Pointer, *c.Char, func(c.Pointer)) c.Int {
+ return 0
+}
+
+// llgo:link (*Stmt).BindZeroblob C.sqlite3_bind_zeroblob
+func (recv_ *Stmt) BindZeroblob(__llgo_arg_0 c.Int, n c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*Stmt).BindZeroblob64 C.sqlite3_bind_zeroblob64
+func (recv_ *Stmt) BindZeroblob64(c.Int, Uint64) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Number Of SQL Parameters
+** METHOD: sqlite3_stmt
+**
+** ^This routine can be used to find the number of [SQL parameters]
+** in a [prepared statement]. SQL parameters are tokens of the
+** form "?", "?NNN", ":AAA", "$AAA", or "@AAA" that serve as
+** placeholders for values that are [sqlite3_bind_blob | bound]
+** to the parameters at a later time.
+**
+** ^(This routine actually returns the index of the largest (rightmost)
+** parameter. For all forms except ?NNN, this will correspond to the
+** number of unique parameters. If parameters of the ?NNN form are used,
+** there may be gaps in the list.)^
+**
+** See also: [sqlite3_bind_blob|sqlite3_bind()],
+** [sqlite3_bind_parameter_name()], and
+** [sqlite3_bind_parameter_index()].
+ */
+// llgo:link (*Stmt).BindParameterCount C.sqlite3_bind_parameter_count
+func (recv_ *Stmt) BindParameterCount() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Name Of A Host Parameter
+** METHOD: sqlite3_stmt
+**
+** ^The sqlite3_bind_parameter_name(P,N) interface returns
+** the name of the N-th [SQL parameter] in the [prepared statement] P.
+** ^(SQL parameters of the form "?NNN" or ":AAA" or "@AAA" or "$AAA"
+** have a name which is the string "?NNN" or ":AAA" or "@AAA" or "$AAA"
+** respectively.
+** In other words, the initial ":" or "$" or "@" or "?"
+** is included as part of the name.)^
+** ^Parameters of the form "?" without a following integer have no name
+** and are referred to as "nameless" or "anonymous parameters".
+**
+** ^The first host parameter has an index of 1, not 0.
+**
+** ^If the value N is out of range or if the N-th parameter is
+** nameless, then NULL is returned. ^The returned string is
+** always in UTF-8 encoding even if the named parameter was
+** originally specified as UTF-16 in [sqlite3_prepare16()],
+** [sqlite3_prepare16_v2()], or [sqlite3_prepare16_v3()].
+**
+** See also: [sqlite3_bind_blob|sqlite3_bind()],
+** [sqlite3_bind_parameter_count()], and
+** [sqlite3_bind_parameter_index()].
+ */
+// llgo:link (*Stmt).BindParameterName C.sqlite3_bind_parameter_name
+func (recv_ *Stmt) BindParameterName(c.Int) *c.Char {
+ return nil
+}
+
+/*
+** CAPI3REF: Index Of A Parameter With A Given Name
+** METHOD: sqlite3_stmt
+**
+** ^Return the index of an SQL parameter given its name. ^The
+** index value returned is suitable for use as the second
+** parameter to [sqlite3_bind_blob|sqlite3_bind()]. ^A zero
+** is returned if no matching parameter is found. ^The parameter
+** name must be given in UTF-8 even if the original statement
+** was prepared from UTF-16 text using [sqlite3_prepare16_v2()] or
+** [sqlite3_prepare16_v3()].
+**
+** See also: [sqlite3_bind_blob|sqlite3_bind()],
+** [sqlite3_bind_parameter_count()], and
+** [sqlite3_bind_parameter_name()].
+ */
+// llgo:link (*Stmt).BindParameterIndex C.sqlite3_bind_parameter_index
+func (recv_ *Stmt) BindParameterIndex(zName *c.Char) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Reset All Bindings On A Prepared Statement
+** METHOD: sqlite3_stmt
+**
+** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset
+** the [sqlite3_bind_blob | bindings] on a [prepared statement].
+** ^Use this routine to reset all host parameters to NULL.
+ */
+// llgo:link (*Stmt).ClearBindings C.sqlite3_clear_bindings
+func (recv_ *Stmt) ClearBindings() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Number Of Columns In A Result Set
+** METHOD: sqlite3_stmt
+**
+** ^Return the number of columns in the result set returned by the
+** [prepared statement]. ^If this routine returns 0, that means the
+** [prepared statement] returns no data (for example an [UPDATE]).
+** ^However, just because this routine returns a positive number does not
+** mean that one or more rows of data will be returned. ^A SELECT statement
+** will always have a positive sqlite3_column_count() but depending on the
+** WHERE clause constraints and the table content, it might return no rows.
+**
+** See also: [sqlite3_data_count()]
+ */
+// llgo:link (*Stmt).ColumnCount C.sqlite3_column_count
+func (recv_ *Stmt) ColumnCount() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Column Names In A Result Set
+** METHOD: sqlite3_stmt
+**
+** ^These routines return the name assigned to a particular column
+** in the result set of a [SELECT] statement. ^The sqlite3_column_name()
+** interface returns a pointer to a zero-terminated UTF-8 string
+** and sqlite3_column_name16() returns a pointer to a zero-terminated
+** UTF-16 string. ^The first parameter is the [prepared statement]
+** that implements the [SELECT] statement. ^The second parameter is the
+** column number. ^The leftmost column is number 0.
+**
+** ^The returned string pointer is valid until either the [prepared statement]
+** is destroyed by [sqlite3_finalize()] or until the statement is automatically
+** reprepared by the first call to [sqlite3_step()] for a particular run
+** or until the next call to
+** sqlite3_column_name() or sqlite3_column_name16() on the same column.
+**
+** ^If sqlite3_malloc() fails during the processing of either routine
+** (for example during a conversion from UTF-8 to UTF-16) then a
+** NULL pointer is returned.
+**
+** ^The name of a result column is the value of the "AS" clause for
+** that column, if there is an AS clause. If there is no AS clause
+** then the name of the column is unspecified and may change from
+** one release of SQLite to the next.
+ */
+// llgo:link (*Stmt).ColumnName C.sqlite3_column_name
+func (recv_ *Stmt) ColumnName(N c.Int) *c.Char {
+ return nil
+}
+
+// llgo:link (*Stmt).ColumnName16 C.sqlite3_column_name16
+func (recv_ *Stmt) ColumnName16(N c.Int) c.Pointer {
+ return nil
+}
+
+/*
+** CAPI3REF: Source Of Data In A Query Result
+** METHOD: sqlite3_stmt
+**
+** ^These routines provide a means to determine the database, table, and
+** table column that is the origin of a particular result column in
+** [SELECT] statement.
+** ^The name of the database or table or column can be returned as
+** either a UTF-8 or UTF-16 string. ^The _database_ routines return
+** the database name, the _table_ routines return the table name, and
+** the origin_ routines return the column name.
+** ^The returned string is valid until the [prepared statement] is destroyed
+** using [sqlite3_finalize()] or until the statement is automatically
+** reprepared by the first call to [sqlite3_step()] for a particular run
+** or until the same information is requested
+** again in a different encoding.
+**
+** ^The names returned are the original un-aliased names of the
+** database, table, and column.
+**
+** ^The first argument to these interfaces is a [prepared statement].
+** ^These functions return information about the Nth result column returned by
+** the statement, where N is the second function argument.
+** ^The left-most column is column 0 for these routines.
+**
+** ^If the Nth column returned by the statement is an expression or
+** subquery and is not a column value, then all of these functions return
+** NULL. ^These routines might also return NULL if a memory allocation error
+** occurs. ^Otherwise, they return the name of the attached database, table,
+** or column that query result column was extracted from.
+**
+** ^As with all other SQLite APIs, those whose names end with "16" return
+** UTF-16 encoded strings and the other functions return UTF-8.
+**
+** ^These APIs are only available if the library was compiled with the
+** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol.
+**
+** If two or more threads call one or more
+** [sqlite3_column_database_name | column metadata interfaces]
+** for the same [prepared statement] and result column
+** at the same time then the results are undefined.
+ */
+// llgo:link (*Stmt).ColumnDatabaseName C.sqlite3_column_database_name
+func (recv_ *Stmt) ColumnDatabaseName(c.Int) *c.Char {
+ return nil
+}
+
+// llgo:link (*Stmt).ColumnDatabaseName16 C.sqlite3_column_database_name16
+func (recv_ *Stmt) ColumnDatabaseName16(c.Int) c.Pointer {
+ return nil
+}
+
+// llgo:link (*Stmt).ColumnTableName C.sqlite3_column_table_name
+func (recv_ *Stmt) ColumnTableName(c.Int) *c.Char {
+ return nil
+}
+
+// llgo:link (*Stmt).ColumnTableName16 C.sqlite3_column_table_name16
+func (recv_ *Stmt) ColumnTableName16(c.Int) c.Pointer {
+ return nil
+}
+
+// llgo:link (*Stmt).ColumnOriginName C.sqlite3_column_origin_name
+func (recv_ *Stmt) ColumnOriginName(c.Int) *c.Char {
+ return nil
+}
+
+// llgo:link (*Stmt).ColumnOriginName16 C.sqlite3_column_origin_name16
+func (recv_ *Stmt) ColumnOriginName16(c.Int) c.Pointer {
+ return nil
+}
+
+/*
+** CAPI3REF: Declared Datatype Of A Query Result
+** METHOD: sqlite3_stmt
+**
+** ^(The first parameter is a [prepared statement].
+** If this statement is a [SELECT] statement and the Nth column of the
+** returned result set of that [SELECT] is a table column (not an
+** expression or subquery) then the declared type of the table
+** column is returned.)^ ^If the Nth column of the result set is an
+** expression or subquery, then a NULL pointer is returned.
+** ^The returned string is always UTF-8 encoded.
+**
+** ^(For example, given the database schema:
+**
+** CREATE TABLE t1(c1 VARIANT);
+**
+** and the following statement to be compiled:
+**
+** SELECT c1 + 1, c1 FROM t1;
+**
+** this routine would return the string "VARIANT" for the second result
+** column (i==1), and a NULL pointer for the first result column (i==0).)^
+**
+** ^SQLite uses dynamic run-time typing. ^So just because a column
+** is declared to contain a particular type does not mean that the
+** data stored in that column is of the declared type. SQLite is
+** strongly typed, but the typing is dynamic not static. ^Type
+** is associated with individual values, not with the containers
+** used to hold those values.
+ */
+// llgo:link (*Stmt).ColumnDecltype C.sqlite3_column_decltype
+func (recv_ *Stmt) ColumnDecltype(c.Int) *c.Char {
+ return nil
+}
+
+// llgo:link (*Stmt).ColumnDecltype16 C.sqlite3_column_decltype16
+func (recv_ *Stmt) ColumnDecltype16(c.Int) c.Pointer {
+ return nil
+}
+
+/*
+** CAPI3REF: Evaluate An SQL Statement
+** METHOD: sqlite3_stmt
+**
+** After a [prepared statement] has been prepared using any of
+** [sqlite3_prepare_v2()], [sqlite3_prepare_v3()], [sqlite3_prepare16_v2()],
+** or [sqlite3_prepare16_v3()] or one of the legacy
+** interfaces [sqlite3_prepare()] or [sqlite3_prepare16()], this function
+** must be called one or more times to evaluate the statement.
+**
+** The details of the behavior of the sqlite3_step() interface depend
+** on whether the statement was prepared using the newer "vX" interfaces
+** [sqlite3_prepare_v3()], [sqlite3_prepare_v2()], [sqlite3_prepare16_v3()],
+** [sqlite3_prepare16_v2()] or the older legacy
+** interfaces [sqlite3_prepare()] and [sqlite3_prepare16()]. The use of the
+** new "vX" interface is recommended for new applications but the legacy
+** interface will continue to be supported.
+**
+** ^In the legacy interface, the return value will be either [SQLITE_BUSY],
+** [SQLITE_DONE], [SQLITE_ROW], [SQLITE_ERROR], or [SQLITE_MISUSE].
+** ^With the "v2" interface, any of the other [result codes] or
+** [extended result codes] might be returned as well.
+**
+** ^[SQLITE_BUSY] means that the database engine was unable to acquire the
+** database locks it needs to do its job. ^If the statement is a [COMMIT]
+** or occurs outside of an explicit transaction, then you can retry the
+** statement. If the statement is not a [COMMIT] and occurs within an
+** explicit transaction then you should rollback the transaction before
+** continuing.
+**
+** ^[SQLITE_DONE] means that the statement has finished executing
+** successfully. sqlite3_step() should not be called again on this virtual
+** machine without first calling [sqlite3_reset()] to reset the virtual
+** machine back to its initial state.
+**
+** ^If the SQL statement being executed returns any data, then [SQLITE_ROW]
+** is returned each time a new row of data is ready for processing by the
+** caller. The values may be accessed using the [column access functions].
+** sqlite3_step() is called again to retrieve the next row of data.
+**
+** ^[SQLITE_ERROR] means that a run-time error (such as a constraint
+** violation) has occurred. sqlite3_step() should not be called again on
+** the VM. More information may be found by calling [sqlite3_errmsg()].
+** ^With the legacy interface, a more specific error code (for example,
+** [SQLITE_INTERRUPT], [SQLITE_SCHEMA], [SQLITE_CORRUPT], and so forth)
+** can be obtained by calling [sqlite3_reset()] on the
+** [prepared statement]. ^In the "v2" interface,
+** the more specific error code is returned directly by sqlite3_step().
+**
+** [SQLITE_MISUSE] means that the this routine was called inappropriately.
+** Perhaps it was called on a [prepared statement] that has
+** already been [sqlite3_finalize | finalized] or on one that had
+** previously returned [SQLITE_ERROR] or [SQLITE_DONE]. Or it could
+** be the case that the same database connection is being used by two or
+** more threads at the same moment in time.
+**
+** For all versions of SQLite up to and including 3.6.23.1, a call to
+** [sqlite3_reset()] was required after sqlite3_step() returned anything
+** other than [SQLITE_ROW] before any subsequent invocation of
+** sqlite3_step(). Failure to reset the prepared statement using
+** [sqlite3_reset()] would result in an [SQLITE_MISUSE] return from
+** sqlite3_step(). But after [version 3.6.23.1] ([dateof:3.6.23.1],
+** sqlite3_step() began
+** calling [sqlite3_reset()] automatically in this circumstance rather
+** than returning [SQLITE_MISUSE]. This is not considered a compatibility
+** break because any application that ever receives an SQLITE_MISUSE error
+** is broken by definition. The [SQLITE_OMIT_AUTORESET] compile-time option
+** can be used to restore the legacy behavior.
+**
+** Goofy Interface Alert: In the legacy interface, the sqlite3_step()
+** API always returns a generic error code, [SQLITE_ERROR], following any
+** error other than [SQLITE_BUSY] and [SQLITE_MISUSE]. You must call
+** [sqlite3_reset()] or [sqlite3_finalize()] in order to find one of the
+** specific [error codes] that better describes the error.
+** We admit that this is a goofy design. The problem has been fixed
+** with the "v2" interface. If you prepare all of your SQL statements
+** using [sqlite3_prepare_v3()] or [sqlite3_prepare_v2()]
+** or [sqlite3_prepare16_v2()] or [sqlite3_prepare16_v3()] instead
+** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,
+** then the more specific [error codes] are returned directly
+** by sqlite3_step(). The use of the "vX" interfaces is recommended.
+ */
+// llgo:link (*Stmt).Step C.sqlite3_step
+func (recv_ *Stmt) Step() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Number of columns in a result set
+** METHOD: sqlite3_stmt
+**
+** ^The sqlite3_data_count(P) interface returns the number of columns in the
+** current row of the result set of [prepared statement] P.
+** ^If prepared statement P does not have results ready to return
+** (via calls to the [sqlite3_column_int | sqlite3_column()] family of
+** interfaces) then sqlite3_data_count(P) returns 0.
+** ^The sqlite3_data_count(P) routine also returns 0 if P is a NULL pointer.
+** ^The sqlite3_data_count(P) routine returns 0 if the previous call to
+** [sqlite3_step](P) returned [SQLITE_DONE]. ^The sqlite3_data_count(P)
+** will return non-zero if previous call to [sqlite3_step](P) returned
+** [SQLITE_ROW], except in the case of the [PRAGMA incremental_vacuum]
+** where it always returns zero since each step of that multi-step
+** pragma returns 0 columns of data.
+**
+** See also: [sqlite3_column_count()]
+ */
+// llgo:link (*Stmt).DataCount C.sqlite3_data_count
+func (recv_ *Stmt) DataCount() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Result Values From A Query
+** KEYWORDS: {column access functions}
+** METHOD: sqlite3_stmt
+**
+** Summary:
+**
+** | sqlite3_column_blob | → | BLOB result
+** |
| sqlite3_column_double | → | REAL result
+** |
| sqlite3_column_int | → | 32-bit INTEGER result
+** |
| sqlite3_column_int64 | → | 64-bit INTEGER result
+** |
| sqlite3_column_text | → | UTF-8 TEXT result
+** |
| sqlite3_column_text16 | → | UTF-16 TEXT result
+** |
| sqlite3_column_value | → | The result as an
+** [sqlite3_value|unprotected sqlite3_value] object.
+** |
| | |
+** |
| sqlite3_column_bytes | → | Size of a BLOB
+** or a UTF-8 TEXT result in bytes
+** |
| sqlite3_column_bytes16
+** | → | Size of UTF-16
+** TEXT in bytes
+** |
| sqlite3_column_type | → | Default
+** datatype of the result
+** |
+**
+** Details:
+**
+** ^These routines return information about a single column of the current
+** result row of a query. ^In every case the first argument is a pointer
+** to the [prepared statement] that is being evaluated (the [sqlite3_stmt*]
+** that was returned from [sqlite3_prepare_v2()] or one of its variants)
+** and the second argument is the index of the column for which information
+** should be returned. ^The leftmost column of the result set has the index 0.
+** ^The number of columns in the result can be determined using
+** [sqlite3_column_count()].
+**
+** If the SQL statement does not currently point to a valid row, or if the
+** column index is out of range, the result is undefined.
+** These routines may only be called when the most recent call to
+** [sqlite3_step()] has returned [SQLITE_ROW] and neither
+** [sqlite3_reset()] nor [sqlite3_finalize()] have been called subsequently.
+** If any of these routines are called after [sqlite3_reset()] or
+** [sqlite3_finalize()] or after [sqlite3_step()] has returned
+** something other than [SQLITE_ROW], the results are undefined.
+** If [sqlite3_step()] or [sqlite3_reset()] or [sqlite3_finalize()]
+** are called from a different thread while any of these routines
+** are pending, then the results are undefined.
+**
+** The first six interfaces (_blob, _double, _int, _int64, _text, and _text16)
+** each return the value of a result column in a specific data format. If
+** the result column is not initially in the requested format (for example,
+** if the query returns an integer but the sqlite3_column_text() interface
+** is used to extract the value) then an automatic type conversion is performed.
+**
+** ^The sqlite3_column_type() routine returns the
+** [SQLITE_INTEGER | datatype code] for the initial data type
+** of the result column. ^The returned value is one of [SQLITE_INTEGER],
+** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL].
+** The return value of sqlite3_column_type() can be used to decide which
+** of the first six interface should be used to extract the column value.
+** The value returned by sqlite3_column_type() is only meaningful if no
+** automatic type conversions have occurred for the value in question.
+** After a type conversion, the result of calling sqlite3_column_type()
+** is undefined, though harmless. Future
+** versions of SQLite may change the behavior of sqlite3_column_type()
+** following a type conversion.
+**
+** If the result is a BLOB or a TEXT string, then the sqlite3_column_bytes()
+** or sqlite3_column_bytes16() interfaces can be used to determine the size
+** of that BLOB or string.
+**
+** ^If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes()
+** routine returns the number of bytes in that BLOB or string.
+** ^If the result is a UTF-16 string, then sqlite3_column_bytes() converts
+** the string to UTF-8 and then returns the number of bytes.
+** ^If the result is a numeric value then sqlite3_column_bytes() uses
+** [sqlite3_snprintf()] to convert that value to a UTF-8 string and returns
+** the number of bytes in that string.
+** ^If the result is NULL, then sqlite3_column_bytes() returns zero.
+**
+** ^If the result is a BLOB or UTF-16 string then the sqlite3_column_bytes16()
+** routine returns the number of bytes in that BLOB or string.
+** ^If the result is a UTF-8 string, then sqlite3_column_bytes16() converts
+** the string to UTF-16 and then returns the number of bytes.
+** ^If the result is a numeric value then sqlite3_column_bytes16() uses
+** [sqlite3_snprintf()] to convert that value to a UTF-16 string and returns
+** the number of bytes in that string.
+** ^If the result is NULL, then sqlite3_column_bytes16() returns zero.
+**
+** ^The values returned by [sqlite3_column_bytes()] and
+** [sqlite3_column_bytes16()] do not include the zero terminators at the end
+** of the string. ^For clarity: the values returned by
+** [sqlite3_column_bytes()] and [sqlite3_column_bytes16()] are the number of
+** bytes in the string, not the number of characters.
+**
+** ^Strings returned by sqlite3_column_text() and sqlite3_column_text16(),
+** even empty strings, are always zero-terminated. ^The return
+** value from sqlite3_column_blob() for a zero-length BLOB is a NULL pointer.
+**
+** ^Strings returned by sqlite3_column_text16() always have the endianness
+** which is native to the platform, regardless of the text encoding set
+** for the database.
+**
+** Warning: ^The object returned by [sqlite3_column_value()] is an
+** [unprotected sqlite3_value] object. In a multithreaded environment,
+** an unprotected sqlite3_value object may only be used safely with
+** [sqlite3_bind_value()] and [sqlite3_result_value()].
+** If the [unprotected sqlite3_value] object returned by
+** [sqlite3_column_value()] is used in any other way, including calls
+** to routines like [sqlite3_value_int()], [sqlite3_value_text()],
+** or [sqlite3_value_bytes()], the behavior is not threadsafe.
+** Hence, the sqlite3_column_value() interface
+** is normally only useful within the implementation of
+** [application-defined SQL functions] or [virtual tables], not within
+** top-level application code.
+**
+** These routines may attempt to convert the datatype of the result.
+** ^For example, if the internal representation is FLOAT and a text result
+** is requested, [sqlite3_snprintf()] is used internally to perform the
+** conversion automatically. ^(The following table details the conversions
+** that are applied:
+**
+**
+**
+** Internal Type | Requested Type | Conversion
+**
+** |
|---|
| NULL | INTEGER | Result is 0
+** |
| NULL | FLOAT | Result is 0.0
+** |
| NULL | TEXT | Result is a NULL pointer
+** |
| NULL | BLOB | Result is a NULL pointer
+** |
| INTEGER | FLOAT | Convert from integer to float
+** |
| INTEGER | TEXT | ASCII rendering of the integer
+** |
| INTEGER | BLOB | Same as INTEGER->TEXT
+** |
| FLOAT | INTEGER | [CAST] to INTEGER
+** |
| FLOAT | TEXT | ASCII rendering of the float
+** |
| FLOAT | BLOB | [CAST] to BLOB
+** |
| TEXT | INTEGER | [CAST] to INTEGER
+** |
| TEXT | FLOAT | [CAST] to REAL
+** |
| TEXT | BLOB | No change
+** |
| BLOB | INTEGER | [CAST] to INTEGER
+** |
| BLOB | FLOAT | [CAST] to REAL
+** |
| BLOB | TEXT | [CAST] to TEXT, ensure zero terminator
+** |
+**
)^
+**
+** Note that when type conversions occur, pointers returned by prior
+** calls to sqlite3_column_blob(), sqlite3_column_text(), and/or
+** sqlite3_column_text16() may be invalidated.
+** Type conversions and pointer invalidations might occur
+** in the following cases:
+**
+**
+** - The initial content is a BLOB and sqlite3_column_text() or
+** sqlite3_column_text16() is called. A zero-terminator might
+** need to be added to the string.
+** - The initial content is UTF-8 text and sqlite3_column_bytes16() or
+** sqlite3_column_text16() is called. The content must be converted
+** to UTF-16.
+** - The initial content is UTF-16 text and sqlite3_column_bytes() or
+** sqlite3_column_text() is called. The content must be converted
+** to UTF-8.
+**
+**
+** ^Conversions between UTF-16be and UTF-16le are always done in place and do
+** not invalidate a prior pointer, though of course the content of the buffer
+** that the prior pointer references will have been modified. Other kinds
+** of conversion are done in place when it is possible, but sometimes they
+** are not possible and in those cases prior pointers are invalidated.
+**
+** The safest policy is to invoke these routines
+** in one of the following ways:
+**
+**
+** - sqlite3_column_text() followed by sqlite3_column_bytes()
+** - sqlite3_column_blob() followed by sqlite3_column_bytes()
+** - sqlite3_column_text16() followed by sqlite3_column_bytes16()
+**
+**
+** In other words, you should call sqlite3_column_text(),
+** sqlite3_column_blob(), or sqlite3_column_text16() first to force the result
+** into the desired format, then invoke sqlite3_column_bytes() or
+** sqlite3_column_bytes16() to find the size of the result. Do not mix calls
+** to sqlite3_column_text() or sqlite3_column_blob() with calls to
+** sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16()
+** with calls to sqlite3_column_bytes().
+**
+** ^The pointers returned are valid until a type conversion occurs as
+** described above, or until [sqlite3_step()] or [sqlite3_reset()] or
+** [sqlite3_finalize()] is called. ^The memory space used to hold strings
+** and BLOBs is freed automatically. Do not pass the pointers returned
+** from [sqlite3_column_blob()], [sqlite3_column_text()], etc. into
+** [sqlite3_free()].
+**
+** As long as the input parameters are correct, these routines will only
+** fail if an out-of-memory error occurs during a format conversion.
+** Only the following subset of interfaces are subject to out-of-memory
+** errors:
+**
+**
+** - sqlite3_column_blob()
+**
- sqlite3_column_text()
+**
- sqlite3_column_text16()
+**
- sqlite3_column_bytes()
+**
- sqlite3_column_bytes16()
+**
+**
+** If an out-of-memory error occurs, then the return value from these
+** routines is the same as if the column had contained an SQL NULL value.
+** Valid SQL NULL returns can be distinguished from out-of-memory errors
+** by invoking the [sqlite3_errcode()] immediately after the suspect
+** return value is obtained and before any
+** other SQLite interface is called on the same [database connection].
+ */
+// llgo:link (*Stmt).ColumnBlob C.sqlite3_column_blob
+func (recv_ *Stmt) ColumnBlob(iCol c.Int) c.Pointer {
+ return nil
+}
+
+// llgo:link (*Stmt).ColumnDouble C.sqlite3_column_double
+func (recv_ *Stmt) ColumnDouble(iCol c.Int) c.Double {
+ return 0
+}
+
+// llgo:link (*Stmt).ColumnInt C.sqlite3_column_int
+func (recv_ *Stmt) ColumnInt(iCol c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*Stmt).ColumnInt64 C.sqlite3_column_int64
+func (recv_ *Stmt) ColumnInt64(iCol c.Int) Int64 {
+ return 0
+}
+
+// llgo:link (*Stmt).ColumnText C.sqlite3_column_text
+func (recv_ *Stmt) ColumnText(iCol c.Int) *c.Char {
+ return nil
+}
+
+// llgo:link (*Stmt).ColumnText16 C.sqlite3_column_text16
+func (recv_ *Stmt) ColumnText16(iCol c.Int) c.Pointer {
+ return nil
+}
+
+// llgo:link (*Stmt).ColumnValue C.sqlite3_column_value
+func (recv_ *Stmt) ColumnValue(iCol c.Int) *Value {
+ return nil
+}
+
+// llgo:link (*Stmt).ColumnBytes C.sqlite3_column_bytes
+func (recv_ *Stmt) ColumnBytes(iCol c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*Stmt).ColumnBytes16 C.sqlite3_column_bytes16
+func (recv_ *Stmt) ColumnBytes16(iCol c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*Stmt).ColumnType C.sqlite3_column_type
+func (recv_ *Stmt) ColumnType(iCol c.Int) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Destroy A Prepared Statement Object
+** DESTRUCTOR: sqlite3_stmt
+**
+** ^The sqlite3_finalize() function is called to delete a [prepared statement].
+** ^If the most recent evaluation of the statement encountered no errors
+** or if the statement is never been evaluated, then sqlite3_finalize() returns
+** SQLITE_OK. ^If the most recent evaluation of statement S failed, then
+** sqlite3_finalize(S) returns the appropriate [error code] or
+** [extended error code].
+**
+** ^The sqlite3_finalize(S) routine can be called at any point during
+** the life cycle of [prepared statement] S:
+** before statement S is ever evaluated, after
+** one or more calls to [sqlite3_reset()], or after any call
+** to [sqlite3_step()] regardless of whether or not the statement has
+** completed execution.
+**
+** ^Invoking sqlite3_finalize() on a NULL pointer is a harmless no-op.
+**
+** The application must finalize every [prepared statement] in order to avoid
+** resource leaks. It is a grievous error for the application to try to use
+** a prepared statement after it has been finalized. Any use of a prepared
+** statement after it has been finalized can result in undefined and
+** undesirable behavior such as segfaults and heap corruption.
+ */
+// llgo:link (*Stmt).Close C.sqlite3_finalize
+func (recv_ *Stmt) Close() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Reset A Prepared Statement Object
+** METHOD: sqlite3_stmt
+**
+** The sqlite3_reset() function is called to reset a [prepared statement]
+** object back to its initial state, ready to be re-executed.
+** ^Any SQL statement variables that had values bound to them using
+** the [sqlite3_bind_blob | sqlite3_bind_*() API] retain their values.
+** Use [sqlite3_clear_bindings()] to reset the bindings.
+**
+** ^The [sqlite3_reset(S)] interface resets the [prepared statement] S
+** back to the beginning of its program.
+**
+** ^The return code from [sqlite3_reset(S)] indicates whether or not
+** the previous evaluation of prepared statement S completed successfully.
+** ^If [sqlite3_step(S)] has never before been called on S or if
+** [sqlite3_step(S)] has not been called since the previous call
+** to [sqlite3_reset(S)], then [sqlite3_reset(S)] will return
+** [SQLITE_OK].
+**
+** ^If the most recent call to [sqlite3_step(S)] for the
+** [prepared statement] S indicated an error, then
+** [sqlite3_reset(S)] returns an appropriate [error code].
+** ^The [sqlite3_reset(S)] interface might also return an [error code]
+** if there were no prior errors but the process of resetting
+** the prepared statement caused a new error. ^For example, if an
+** [INSERT] statement with a [RETURNING] clause is only stepped one time,
+** that one call to [sqlite3_step(S)] might return SQLITE_ROW but
+** the overall statement might still fail and the [sqlite3_reset(S)] call
+** might return SQLITE_BUSY if locking constraints prevent the
+** database change from committing. Therefore, it is important that
+** applications check the return code from [sqlite3_reset(S)] even if
+** no prior call to [sqlite3_step(S)] indicated a problem.
+**
+** ^The [sqlite3_reset(S)] interface does not change the values
+** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
+ */
+// llgo:link (*Stmt).Reset C.sqlite3_reset
+func (recv_ *Stmt) Reset() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Create Or Redefine SQL Functions
+** KEYWORDS: {function creation routines}
+** METHOD: sqlite3
+**
+** ^These functions (collectively known as "function creation routines")
+** are used to add SQL functions or aggregates or to redefine the behavior
+** of existing SQL functions or aggregates. The only differences between
+** the three "sqlite3_create_function*" routines are the text encoding
+** expected for the second parameter (the name of the function being
+** created) and the presence or absence of a destructor callback for
+** the application data pointer. Function sqlite3_create_window_function()
+** is similar, but allows the user to supply the extra callback functions
+** needed by [aggregate window functions].
+**
+** ^The first parameter is the [database connection] to which the SQL
+** function is to be added. ^If an application uses more than one database
+** connection then application-defined SQL functions must be added
+** to each database connection separately.
+**
+** ^The second parameter is the name of the SQL function to be created or
+** redefined. ^The length of the name is limited to 255 bytes in a UTF-8
+** representation, exclusive of the zero-terminator. ^Note that the name
+** length limit is in UTF-8 bytes, not characters nor UTF-16 bytes.
+** ^Any attempt to create a function with a longer name
+** will result in [SQLITE_MISUSE] being returned.
+**
+** ^The third parameter (nArg)
+** is the number of arguments that the SQL function or
+** aggregate takes. ^If this parameter is -1, then the SQL function or
+** aggregate may take any number of arguments between 0 and the limit
+** set by [sqlite3_limit]([SQLITE_LIMIT_FUNCTION_ARG]). If the third
+** parameter is less than -1 or greater than 127 then the behavior is
+** undefined.
+**
+** ^The fourth parameter, eTextRep, specifies what
+** [SQLITE_UTF8 | text encoding] this SQL function prefers for
+** its parameters. The application should set this parameter to
+** [SQLITE_UTF16LE] if the function implementation invokes
+** [sqlite3_value_text16le()] on an input, or [SQLITE_UTF16BE] if the
+** implementation invokes [sqlite3_value_text16be()] on an input, or
+** [SQLITE_UTF16] if [sqlite3_value_text16()] is used, or [SQLITE_UTF8]
+** otherwise. ^The same SQL function may be registered multiple times using
+** different preferred text encodings, with different implementations for
+** each encoding.
+** ^When multiple implementations of the same function are available, SQLite
+** will pick the one that involves the least amount of data conversion.
+**
+** ^The fourth parameter may optionally be ORed with [SQLITE_DETERMINISTIC]
+** to signal that the function will always return the same result given
+** the same inputs within a single SQL statement. Most SQL functions are
+** deterministic. The built-in [random()] SQL function is an example of a
+** function that is not deterministic. The SQLite query planner is able to
+** perform additional optimizations on deterministic functions, so use
+** of the [SQLITE_DETERMINISTIC] flag is recommended where possible.
+**
+** ^The fourth parameter may also optionally include the [SQLITE_DIRECTONLY]
+** flag, which if present prevents the function from being invoked from
+** within VIEWs, TRIGGERs, CHECK constraints, generated column expressions,
+** index expressions, or the WHERE clause of partial indexes.
+**
+** For best security, the [SQLITE_DIRECTONLY] flag is recommended for
+** all application-defined SQL functions that do not need to be
+** used inside of triggers, view, CHECK constraints, or other elements of
+** the database schema. This flags is especially recommended for SQL
+** functions that have side effects or reveal internal application state.
+** Without this flag, an attacker might be able to modify the schema of
+** a database file to include invocations of the function with parameters
+** chosen by the attacker, which the application will then execute when
+** the database file is opened and read.
+**
+** ^(The fifth parameter is an arbitrary pointer. The implementation of the
+** function can gain access to this pointer using [sqlite3_user_data()].)^
+**
+** ^The sixth, seventh and eighth parameters passed to the three
+** "sqlite3_create_function*" functions, xFunc, xStep and xFinal, are
+** pointers to C-language functions that implement the SQL function or
+** aggregate. ^A scalar SQL function requires an implementation of the xFunc
+** callback only; NULL pointers must be passed as the xStep and xFinal
+** parameters. ^An aggregate SQL function requires an implementation of xStep
+** and xFinal and NULL pointer must be passed for xFunc. ^To delete an existing
+** SQL function or aggregate, pass NULL pointers for all three function
+** callbacks.
+**
+** ^The sixth, seventh, eighth and ninth parameters (xStep, xFinal, xValue
+** and xInverse) passed to sqlite3_create_window_function are pointers to
+** C-language callbacks that implement the new function. xStep and xFinal
+** must both be non-NULL. xValue and xInverse may either both be NULL, in
+** which case a regular aggregate function is created, or must both be
+** non-NULL, in which case the new function may be used as either an aggregate
+** or aggregate window function. More details regarding the implementation
+** of aggregate window functions are
+** [user-defined window functions|available here].
+**
+** ^(If the final parameter to sqlite3_create_function_v2() or
+** sqlite3_create_window_function() is not NULL, then it is destructor for
+** the application data pointer. The destructor is invoked when the function
+** is deleted, either by being overloaded or when the database connection
+** closes.)^ ^The destructor is also invoked if the call to
+** sqlite3_create_function_v2() fails. ^When the destructor callback is
+** invoked, it is passed a single argument which is a copy of the application
+** data pointer which was the fifth parameter to sqlite3_create_function_v2().
+**
+** ^It is permitted to register multiple implementations of the same
+** functions with the same name but with either differing numbers of
+** arguments or differing preferred text encodings. ^SQLite will use
+** the implementation that most closely matches the way in which the
+** SQL function is used. ^A function implementation with a non-negative
+** nArg parameter is a better match than a function implementation with
+** a negative nArg. ^A function where the preferred text encoding
+** matches the database encoding is a better
+** match than a function where the encoding is different.
+** ^A function where the encoding difference is between UTF16le and UTF16be
+** is a closer match than a function where the encoding difference is
+** between UTF8 and UTF16.
+**
+** ^Built-in functions may be overloaded by new application-defined functions.
+**
+** ^An application-defined function is permitted to call other
+** SQLite interfaces. However, such calls must not
+** close the database connection nor finalize or reset the prepared
+** statement in which the function is running.
+ */
+// llgo:link (*Sqlite3).CreateFunction C.sqlite3_create_function
+func (recv_ *Sqlite3) CreateFunction(zFunctionName *c.Char, nArg c.Int, eTextRep c.Int, pApp c.Pointer, xFunc func(*Context, c.Int, **Value), xStep func(*Context, c.Int, **Value), xFinal func(*Context)) c.Int {
+ return 0
+}
+
+// llgo:link (*Sqlite3).CreateFunction16 C.sqlite3_create_function16
+func (recv_ *Sqlite3) CreateFunction16(zFunctionName c.Pointer, nArg c.Int, eTextRep c.Int, pApp c.Pointer, xFunc func(*Context, c.Int, **Value), xStep func(*Context, c.Int, **Value), xFinal func(*Context)) c.Int {
+ return 0
+}
+
+// llgo:link (*Sqlite3).CreateFunctionV2 C.sqlite3_create_function_v2
+func (recv_ *Sqlite3) CreateFunctionV2(zFunctionName *c.Char, nArg c.Int, eTextRep c.Int, pApp c.Pointer, xFunc func(*Context, c.Int, **Value), xStep func(*Context, c.Int, **Value), xFinal func(*Context), xDestroy func(c.Pointer)) c.Int {
+ return 0
+}
+
+// llgo:link (*Sqlite3).CreateWindowFunction C.sqlite3_create_window_function
+func (recv_ *Sqlite3) CreateWindowFunction(zFunctionName *c.Char, nArg c.Int, eTextRep c.Int, pApp c.Pointer, xStep func(*Context, c.Int, **Value), xFinal func(*Context), xValue func(*Context), xInverse func(*Context, c.Int, **Value), xDestroy func(c.Pointer)) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Deprecated Functions
+** DEPRECATED
+**
+** These functions are [deprecated]. In order to maintain
+** backwards compatibility with older code, these functions continue
+** to be supported. However, new applications should avoid
+** the use of these functions. To encourage programmers to avoid
+** these functions, we will not explain what they do.
+ */
+// llgo:link (*Context).AggregateCount C.sqlite3_aggregate_count
+func (recv_ *Context) AggregateCount() c.Int {
+ return 0
+}
+
+// llgo:link (*Stmt).Expired C.sqlite3_expired
+func (recv_ *Stmt) Expired() c.Int {
+ return 0
+}
+
+// llgo:link (*Stmt).TransferBindings C.sqlite3_transfer_bindings
+func (recv_ *Stmt) TransferBindings(*Stmt) c.Int {
+ return 0
+}
+
+//go:linkname GlobalRecover C.sqlite3_global_recover
+func GlobalRecover() c.Int
+
+//go:linkname ThreadCleanup C.sqlite3_thread_cleanup
+func ThreadCleanup()
+
+//go:linkname MemoryAlarm C.sqlite3_memory_alarm
+func MemoryAlarm(func(c.Pointer, Int64, c.Int), c.Pointer, Int64) c.Int
+
+/*
+** CAPI3REF: Obtaining SQL Values
+** METHOD: sqlite3_value
+**
+** Summary:
+**
+** | sqlite3_value_blob | → | BLOB value
+** |
| sqlite3_value_double | → | REAL value
+** |
| sqlite3_value_int | → | 32-bit INTEGER value
+** |
| sqlite3_value_int64 | → | 64-bit INTEGER value
+** |
| sqlite3_value_pointer | → | Pointer value
+** |
| sqlite3_value_text | → | UTF-8 TEXT value
+** |
| sqlite3_value_text16 | → | UTF-16 TEXT value in
+** the native byteorder
+** |
| sqlite3_value_text16be | → | UTF-16be TEXT value
+** |
| sqlite3_value_text16le | → | UTF-16le TEXT value
+** |
| | |
+** |
| sqlite3_value_bytes | → | Size of a BLOB
+** or a UTF-8 TEXT in bytes
+** |
| sqlite3_value_bytes16
+** | → | Size of UTF-16
+** TEXT in bytes
+** |
| sqlite3_value_type | → | Default
+** datatype of the value
+** |
| sqlite3_value_numeric_type
+** | → | Best numeric datatype of the value
+** |
| sqlite3_value_nochange
+** | → | True if the column is unchanged in an UPDATE
+** against a virtual table.
+** |
| sqlite3_value_frombind
+** | → | True if value originated from a [bound parameter]
+** |
+**
+** Details:
+**
+** These routines extract type, size, and content information from
+** [protected sqlite3_value] objects. Protected sqlite3_value objects
+** are used to pass parameter information into the functions that
+** implement [application-defined SQL functions] and [virtual tables].
+**
+** These routines work only with [protected sqlite3_value] objects.
+** Any attempt to use these routines on an [unprotected sqlite3_value]
+** is not threadsafe.
+**
+** ^These routines work just like the corresponding [column access functions]
+** except that these routines take a single [protected sqlite3_value] object
+** pointer instead of a [sqlite3_stmt*] pointer and an integer column number.
+**
+** ^The sqlite3_value_text16() interface extracts a UTF-16 string
+** in the native byte-order of the host machine. ^The
+** sqlite3_value_text16be() and sqlite3_value_text16le() interfaces
+** extract UTF-16 strings as big-endian and little-endian respectively.
+**
+** ^If [sqlite3_value] object V was initialized
+** using [sqlite3_bind_pointer(S,I,P,X,D)] or [sqlite3_result_pointer(C,P,X,D)]
+** and if X and Y are strings that compare equal according to strcmp(X,Y),
+** then sqlite3_value_pointer(V,Y) will return the pointer P. ^Otherwise,
+** sqlite3_value_pointer(V,Y) returns a NULL. The sqlite3_bind_pointer()
+** routine is part of the [pointer passing interface] added for SQLite 3.20.0.
+**
+** ^(The sqlite3_value_type(V) interface returns the
+** [SQLITE_INTEGER | datatype code] for the initial datatype of the
+** [sqlite3_value] object V. The returned value is one of [SQLITE_INTEGER],
+** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL].)^
+** Other interfaces might change the datatype for an sqlite3_value object.
+** For example, if the datatype is initially SQLITE_INTEGER and
+** sqlite3_value_text(V) is called to extract a text value for that
+** integer, then subsequent calls to sqlite3_value_type(V) might return
+** SQLITE_TEXT. Whether or not a persistent internal datatype conversion
+** occurs is undefined and may change from one release of SQLite to the next.
+**
+** ^(The sqlite3_value_numeric_type() interface attempts to apply
+** numeric affinity to the value. This means that an attempt is
+** made to convert the value to an integer or floating point. If
+** such a conversion is possible without loss of information (in other
+** words, if the value is a string that looks like a number)
+** then the conversion is performed. Otherwise no conversion occurs.
+** The [SQLITE_INTEGER | datatype] after conversion is returned.)^
+**
+** ^Within the [xUpdate] method of a [virtual table], the
+** sqlite3_value_nochange(X) interface returns true if and only if
+** the column corresponding to X is unchanged by the UPDATE operation
+** that the xUpdate method call was invoked to implement and if
+** and the prior [xColumn] method call that was invoked to extracted
+** the value for that column returned without setting a result (probably
+** because it queried [sqlite3_vtab_nochange()] and found that the column
+** was unchanging). ^Within an [xUpdate] method, any value for which
+** sqlite3_value_nochange(X) is true will in all other respects appear
+** to be a NULL value. If sqlite3_value_nochange(X) is invoked anywhere other
+** than within an [xUpdate] method call for an UPDATE statement, then
+** the return value is arbitrary and meaningless.
+**
+** ^The sqlite3_value_frombind(X) interface returns non-zero if the
+** value X originated from one of the [sqlite3_bind_int|sqlite3_bind()]
+** interfaces. ^If X comes from an SQL literal value, or a table column,
+** or an expression, then sqlite3_value_frombind(X) returns zero.
+**
+** Please pay particular attention to the fact that the pointer returned
+** from [sqlite3_value_blob()], [sqlite3_value_text()], or
+** [sqlite3_value_text16()] can be invalidated by a subsequent call to
+** [sqlite3_value_bytes()], [sqlite3_value_bytes16()], [sqlite3_value_text()],
+** or [sqlite3_value_text16()].
+**
+** These routines must be called from the same thread as
+** the SQL function that supplied the [sqlite3_value*] parameters.
+**
+** As long as the input parameter is correct, these routines can only
+** fail if an out-of-memory error occurs during a format conversion.
+** Only the following subset of interfaces are subject to out-of-memory
+** errors:
+**
+**
+** - sqlite3_value_blob()
+**
- sqlite3_value_text()
+**
- sqlite3_value_text16()
+**
- sqlite3_value_text16le()
+**
- sqlite3_value_text16be()
+**
- sqlite3_value_bytes()
+**
- sqlite3_value_bytes16()
+**
+**
+** If an out-of-memory error occurs, then the return value from these
+** routines is the same as if the column had contained an SQL NULL value.
+** Valid SQL NULL returns can be distinguished from out-of-memory errors
+** by invoking the [sqlite3_errcode()] immediately after the suspect
+** return value is obtained and before any
+** other SQLite interface is called on the same [database connection].
+ */
+// llgo:link (*Value).ValueBlob C.sqlite3_value_blob
+func (recv_ *Value) ValueBlob() c.Pointer {
+ return nil
+}
+
+// llgo:link (*Value).ValueDouble C.sqlite3_value_double
+func (recv_ *Value) ValueDouble() c.Double {
+ return 0
+}
+
+// llgo:link (*Value).ValueInt C.sqlite3_value_int
+func (recv_ *Value) ValueInt() c.Int {
+ return 0
+}
+
+// llgo:link (*Value).ValueInt64 C.sqlite3_value_int64
+func (recv_ *Value) ValueInt64() Int64 {
+ return 0
+}
+
+// llgo:link (*Value).ValuePointer C.sqlite3_value_pointer
+func (recv_ *Value) ValuePointer(*c.Char) c.Pointer {
+ return nil
+}
+
+// llgo:link (*Value).ValueText C.sqlite3_value_text
+func (recv_ *Value) ValueText() *c.Char {
+ return nil
+}
+
+// llgo:link (*Value).ValueText16 C.sqlite3_value_text16
+func (recv_ *Value) ValueText16() c.Pointer {
+ return nil
+}
+
+// llgo:link (*Value).ValueText16le C.sqlite3_value_text16le
+func (recv_ *Value) ValueText16le() c.Pointer {
+ return nil
+}
+
+// llgo:link (*Value).ValueText16be C.sqlite3_value_text16be
+func (recv_ *Value) ValueText16be() c.Pointer {
+ return nil
+}
+
+// llgo:link (*Value).ValueBytes C.sqlite3_value_bytes
+func (recv_ *Value) ValueBytes() c.Int {
+ return 0
+}
+
+// llgo:link (*Value).ValueBytes16 C.sqlite3_value_bytes16
+func (recv_ *Value) ValueBytes16() c.Int {
+ return 0
+}
+
+// llgo:link (*Value).ValueType C.sqlite3_value_type
+func (recv_ *Value) ValueType() c.Int {
+ return 0
+}
+
+// llgo:link (*Value).ValueNumericType C.sqlite3_value_numeric_type
+func (recv_ *Value) ValueNumericType() c.Int {
+ return 0
+}
+
+// llgo:link (*Value).ValueNochange C.sqlite3_value_nochange
+func (recv_ *Value) ValueNochange() c.Int {
+ return 0
+}
+
+// llgo:link (*Value).ValueFrombind C.sqlite3_value_frombind
+func (recv_ *Value) ValueFrombind() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Report the internal text encoding state of an sqlite3_value object
+** METHOD: sqlite3_value
+**
+** ^(The sqlite3_value_encoding(X) interface returns one of [SQLITE_UTF8],
+** [SQLITE_UTF16BE], or [SQLITE_UTF16LE] according to the current text encoding
+** of the value X, assuming that X has type TEXT.)^ If sqlite3_value_type(X)
+** returns something other than SQLITE_TEXT, then the return value from
+** sqlite3_value_encoding(X) is meaningless. ^Calls to
+** [sqlite3_value_text(X)], [sqlite3_value_text16(X)], [sqlite3_value_text16be(X)],
+** [sqlite3_value_text16le(X)], [sqlite3_value_bytes(X)], or
+** [sqlite3_value_bytes16(X)] might change the encoding of the value X and
+** thus change the return from subsequent calls to sqlite3_value_encoding(X).
+**
+** This routine is intended for used by applications that test and validate
+** the SQLite implementation. This routine is inquiring about the opaque
+** internal state of an [sqlite3_value] object. Ordinary applications should
+** not need to know what the internal state of an sqlite3_value object is and
+** hence should not need to use this interface.
+ */
+// llgo:link (*Value).ValueEncoding C.sqlite3_value_encoding
+func (recv_ *Value) ValueEncoding() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Finding The Subtype Of SQL Values
+** METHOD: sqlite3_value
+**
+** The sqlite3_value_subtype(V) function returns the subtype for
+** an [application-defined SQL function] argument V. The subtype
+** information can be used to pass a limited amount of context from
+** one SQL function to another. Use the [sqlite3_result_subtype()]
+** routine to set the subtype for the return value of an SQL function.
+**
+** Every [application-defined SQL function] that invokes this interface
+** should include the [SQLITE_SUBTYPE] property in the text
+** encoding argument when the function is [sqlite3_create_function|registered].
+** If the [SQLITE_SUBTYPE] property is omitted, then sqlite3_value_subtype()
+** might return zero instead of the upstream subtype in some corner cases.
+ */
+// llgo:link (*Value).ValueSubtype C.sqlite3_value_subtype
+func (recv_ *Value) ValueSubtype() c.Uint {
+ return 0
+}
+
+/*
+** CAPI3REF: Copy And Free SQL Values
+** METHOD: sqlite3_value
+**
+** ^The sqlite3_value_dup(V) interface makes a copy of the [sqlite3_value]
+** object D and returns a pointer to that copy. ^The [sqlite3_value] returned
+** is a [protected sqlite3_value] object even if the input is not.
+** ^The sqlite3_value_dup(V) interface returns NULL if V is NULL or if a
+** memory allocation fails. ^If V is a [pointer value], then the result
+** of sqlite3_value_dup(V) is a NULL value.
+**
+** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object
+** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer
+** then sqlite3_value_free(V) is a harmless no-op.
+ */
+// llgo:link (*Value).ValueDup C.sqlite3_value_dup
+func (recv_ *Value) ValueDup() *Value {
+ return nil
+}
+
+// llgo:link (*Value).ValueFree C.sqlite3_value_free
+func (recv_ *Value) ValueFree() {
+}
+
+/*
+** CAPI3REF: Obtain Aggregate Function Context
+** METHOD: sqlite3_context
+**
+** Implementations of aggregate SQL functions use this
+** routine to allocate memory for storing their state.
+**
+** ^The first time the sqlite3_aggregate_context(C,N) routine is called
+** for a particular aggregate function, SQLite allocates
+** N bytes of memory, zeroes out that memory, and returns a pointer
+** to the new memory. ^On second and subsequent calls to
+** sqlite3_aggregate_context() for the same aggregate function instance,
+** the same buffer is returned. Sqlite3_aggregate_context() is normally
+** called once for each invocation of the xStep callback and then one
+** last time when the xFinal callback is invoked. ^(When no rows match
+** an aggregate query, the xStep() callback of the aggregate function
+** implementation is never called and xFinal() is called exactly once.
+** In those cases, sqlite3_aggregate_context() might be called for the
+** first time from within xFinal().)^
+**
+** ^The sqlite3_aggregate_context(C,N) routine returns a NULL pointer
+** when first called if N is less than or equal to zero or if a memory
+** allocation error occurs.
+**
+** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is
+** determined by the N parameter on first successful call. Changing the
+** value of N in any subsequent call to sqlite3_aggregate_context() within
+** the same aggregate function instance will not resize the memory
+** allocation.)^ Within the xFinal callback, it is customary to set
+** N=0 in calls to sqlite3_aggregate_context(C,N) so that no
+** pointless memory allocations occur.
+**
+** ^SQLite automatically frees the memory allocated by
+** sqlite3_aggregate_context() when the aggregate query concludes.
+**
+** The first parameter must be a copy of the
+** [sqlite3_context | SQL function context] that is the first parameter
+** to the xStep or xFinal callback routine that implements the aggregate
+** function.
+**
+** This routine must be called from the same thread in which
+** the aggregate SQL function is running.
+ */
+// llgo:link (*Context).AggregateContext C.sqlite3_aggregate_context
+func (recv_ *Context) AggregateContext(nBytes c.Int) c.Pointer {
+ return nil
+}
+
+/*
+** CAPI3REF: User Data For Functions
+** METHOD: sqlite3_context
+**
+** ^The sqlite3_user_data() interface returns a copy of
+** the pointer that was the pUserData parameter (the 5th parameter)
+** of the [sqlite3_create_function()]
+** and [sqlite3_create_function16()] routines that originally
+** registered the application defined function.
+**
+** This routine must be called from the same thread in which
+** the application-defined function is running.
+ */
+// llgo:link (*Context).UserData C.sqlite3_user_data
+func (recv_ *Context) UserData() c.Pointer {
+ return nil
+}
+
+/*
+** CAPI3REF: Database Connection For Functions
+** METHOD: sqlite3_context
+**
+** ^The sqlite3_context_db_handle() interface returns a copy of
+** the pointer to the [database connection] (the 1st parameter)
+** of the [sqlite3_create_function()]
+** and [sqlite3_create_function16()] routines that originally
+** registered the application defined function.
+ */
+// llgo:link (*Context).ContextDbHandle C.sqlite3_context_db_handle
+func (recv_ *Context) ContextDbHandle() *Sqlite3 {
+ return nil
+}
+
+/*
+** CAPI3REF: Function Auxiliary Data
+** METHOD: sqlite3_context
+**
+** These functions may be used by (non-aggregate) SQL functions to
+** associate auxiliary data with argument values. If the same argument
+** value is passed to multiple invocations of the same SQL function during
+** query execution, under some circumstances the associated auxiliary data
+** might be preserved. An example of where this might be useful is in a
+** regular-expression matching function. The compiled version of the regular
+** expression can be stored as auxiliary data associated with the pattern string.
+** Then as long as the pattern string remains the same,
+** the compiled regular expression can be reused on multiple
+** invocations of the same function.
+**
+** ^The sqlite3_get_auxdata(C,N) interface returns a pointer to the auxiliary data
+** associated by the sqlite3_set_auxdata(C,N,P,X) function with the Nth argument
+** value to the application-defined function. ^N is zero for the left-most
+** function argument. ^If there is no auxiliary data
+** associated with the function argument, the sqlite3_get_auxdata(C,N) interface
+** returns a NULL pointer.
+**
+** ^The sqlite3_set_auxdata(C,N,P,X) interface saves P as auxiliary data for the
+** N-th argument of the application-defined function. ^Subsequent
+** calls to sqlite3_get_auxdata(C,N) return P from the most recent
+** sqlite3_set_auxdata(C,N,P,X) call if the auxiliary data is still valid or
+** NULL if the auxiliary data has been discarded.
+** ^After each call to sqlite3_set_auxdata(C,N,P,X) where X is not NULL,
+** SQLite will invoke the destructor function X with parameter P exactly
+** once, when the auxiliary data is discarded.
+** SQLite is free to discard the auxiliary data at any time, including:
+** - ^(when the corresponding function parameter changes)^, or
+**
- ^(when [sqlite3_reset()] or [sqlite3_finalize()] is called for the
+** SQL statement)^, or
+**
- ^(when sqlite3_set_auxdata() is invoked again on the same
+** parameter)^, or
+**
- ^(during the original sqlite3_set_auxdata() call when a memory
+** allocation error occurs.)^
+**
- ^(during the original sqlite3_set_auxdata() call if the function
+** is evaluated during query planning instead of during query execution,
+** as sometimes happens with [SQLITE_ENABLE_STAT4].)^
+**
+** Note the last two bullets in particular. The destructor X in
+** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before the
+** sqlite3_set_auxdata() interface even returns. Hence sqlite3_set_auxdata()
+** should be called near the end of the function implementation and the
+** function implementation should not make any use of P after
+** sqlite3_set_auxdata() has been called. Furthermore, a call to
+** sqlite3_get_auxdata() that occurs immediately after a corresponding call
+** to sqlite3_set_auxdata() might still return NULL if an out-of-memory
+** condition occurred during the sqlite3_set_auxdata() call or if the
+** function is being evaluated during query planning rather than during
+** query execution.
+**
+** ^(In practice, auxiliary data is preserved between function calls for
+** function parameters that are compile-time constants, including literal
+** values and [parameters] and expressions composed from the same.)^
+**
+** The value of the N parameter to these interfaces should be non-negative.
+** Future enhancements may make use of negative N values to define new
+** kinds of function caching behavior.
+**
+** These routines must be called from the same thread in which
+** the SQL function is running.
+**
+** See also: [sqlite3_get_clientdata()] and [sqlite3_set_clientdata()].
+ */
+// llgo:link (*Context).GetAuxdata C.sqlite3_get_auxdata
+func (recv_ *Context) GetAuxdata(N c.Int) c.Pointer {
+ return nil
+}
+
+// llgo:link (*Context).SetAuxdata C.sqlite3_set_auxdata
+func (recv_ *Context) SetAuxdata(N c.Int, __llgo_arg_1 c.Pointer, __llgo_arg_2 func(c.Pointer)) {
+}
+
+/*
+** CAPI3REF: Database Connection Client Data
+** METHOD: sqlite3
+**
+** These functions are used to associate one or more named pointers
+** with a [database connection].
+** A call to sqlite3_set_clientdata(D,N,P,X) causes the pointer P
+** to be attached to [database connection] D using name N. Subsequent
+** calls to sqlite3_get_clientdata(D,N) will return a copy of pointer P
+** or a NULL pointer if there were no prior calls to
+** sqlite3_set_clientdata() with the same values of D and N.
+** Names are compared using strcmp() and are thus case sensitive.
+**
+** If P and X are both non-NULL, then the destructor X is invoked with
+** argument P on the first of the following occurrences:
+**
+** - An out-of-memory error occurs during the call to
+** sqlite3_set_clientdata() which attempts to register pointer P.
+**
- A subsequent call to sqlite3_set_clientdata(D,N,P,X) is made
+** with the same D and N parameters.
+**
- The database connection closes. SQLite does not make any guarantees
+** about the order in which destructors are called, only that all
+** destructors will be called exactly once at some point during the
+** database connection closing process.
+**
+**
+** SQLite does not do anything with client data other than invoke
+** destructors on the client data at the appropriate time. The intended
+** use for client data is to provide a mechanism for wrapper libraries
+** to store additional information about an SQLite database connection.
+**
+** There is no limit (other than available memory) on the number of different
+** client data pointers (with different names) that can be attached to a
+** single database connection. However, the implementation is optimized
+** for the case of having only one or two different client data names.
+** Applications and wrapper libraries are discouraged from using more than
+** one client data name each.
+**
+** There is no way to enumerate the client data pointers
+** associated with a database connection. The N parameter can be thought
+** of as a secret key such that only code that knows the secret key is able
+** to access the associated data.
+**
+** Security Warning: These interfaces should not be exposed in scripting
+** languages or in other circumstances where it might be possible for an
+** an attacker to invoke them. Any agent that can invoke these interfaces
+** can probably also take control of the process.
+**
+** Database connection client data is only available for SQLite
+** version 3.44.0 ([dateof:3.44.0]) and later.
+**
+** See also: [sqlite3_set_auxdata()] and [sqlite3_get_auxdata()].
+ */
+// llgo:link (*Sqlite3).GetClientdata C.sqlite3_get_clientdata
+func (recv_ *Sqlite3) GetClientdata(*c.Char) c.Pointer {
+ return nil
+}
+
+// llgo:link (*Sqlite3).SetClientdata C.sqlite3_set_clientdata
+func (recv_ *Sqlite3) SetClientdata(*c.Char, c.Pointer, func(c.Pointer)) c.Int {
+ return 0
+}
+
+// llgo:type C
+type DestructorType func(c.Pointer)
+
+/*
+** CAPI3REF: Setting The Result Of An SQL Function
+** METHOD: sqlite3_context
+**
+** These routines are used by the xFunc or xFinal callbacks that
+** implement SQL functions and aggregates. See
+** [sqlite3_create_function()] and [sqlite3_create_function16()]
+** for additional information.
+**
+** These functions work very much like the [parameter binding] family of
+** functions used to bind values to host parameters in prepared statements.
+** Refer to the [SQL parameter] documentation for additional information.
+**
+** ^The sqlite3_result_blob() interface sets the result from
+** an application-defined function to be the BLOB whose content is pointed
+** to by the second parameter and which is N bytes long where N is the
+** third parameter.
+**
+** ^The sqlite3_result_zeroblob(C,N) and sqlite3_result_zeroblob64(C,N)
+** interfaces set the result of the application-defined function to be
+** a BLOB containing all zero bytes and N bytes in size.
+**
+** ^The sqlite3_result_double() interface sets the result from
+** an application-defined function to be a floating point value specified
+** by its 2nd argument.
+**
+** ^The sqlite3_result_error() and sqlite3_result_error16() functions
+** cause the implemented SQL function to throw an exception.
+** ^SQLite uses the string pointed to by the
+** 2nd parameter of sqlite3_result_error() or sqlite3_result_error16()
+** as the text of an error message. ^SQLite interprets the error
+** message string from sqlite3_result_error() as UTF-8. ^SQLite
+** interprets the string from sqlite3_result_error16() as UTF-16 using
+** the same [byte-order determination rules] as [sqlite3_bind_text16()].
+** ^If the third parameter to sqlite3_result_error()
+** or sqlite3_result_error16() is negative then SQLite takes as the error
+** message all text up through the first zero character.
+** ^If the third parameter to sqlite3_result_error() or
+** sqlite3_result_error16() is non-negative then SQLite takes that many
+** bytes (not characters) from the 2nd parameter as the error message.
+** ^The sqlite3_result_error() and sqlite3_result_error16()
+** routines make a private copy of the error message text before
+** they return. Hence, the calling function can deallocate or
+** modify the text after they return without harm.
+** ^The sqlite3_result_error_code() function changes the error code
+** returned by SQLite as a result of an error in a function. ^By default,
+** the error code is SQLITE_ERROR. ^A subsequent call to sqlite3_result_error()
+** or sqlite3_result_error16() resets the error code to SQLITE_ERROR.
+**
+** ^The sqlite3_result_error_toobig() interface causes SQLite to throw an
+** error indicating that a string or BLOB is too long to represent.
+**
+** ^The sqlite3_result_error_nomem() interface causes SQLite to throw an
+** error indicating that a memory allocation failed.
+**
+** ^The sqlite3_result_int() interface sets the return value
+** of the application-defined function to be the 32-bit signed integer
+** value given in the 2nd argument.
+** ^The sqlite3_result_int64() interface sets the return value
+** of the application-defined function to be the 64-bit signed integer
+** value given in the 2nd argument.
+**
+** ^The sqlite3_result_null() interface sets the return value
+** of the application-defined function to be NULL.
+**
+** ^The sqlite3_result_text(), sqlite3_result_text16(),
+** sqlite3_result_text16le(), and sqlite3_result_text16be() interfaces
+** set the return value of the application-defined function to be
+** a text string which is represented as UTF-8, UTF-16 native byte order,
+** UTF-16 little endian, or UTF-16 big endian, respectively.
+** ^The sqlite3_result_text64() interface sets the return value of an
+** application-defined function to be a text string in an encoding
+** specified by the fifth (and last) parameter, which must be one
+** of [SQLITE_UTF8], [SQLITE_UTF16], [SQLITE_UTF16BE], or [SQLITE_UTF16LE].
+** ^SQLite takes the text result from the application from
+** the 2nd parameter of the sqlite3_result_text* interfaces.
+** ^If the 3rd parameter to any of the sqlite3_result_text* interfaces
+** other than sqlite3_result_text64() is negative, then SQLite computes
+** the string length itself by searching the 2nd parameter for the first
+** zero character.
+** ^If the 3rd parameter to the sqlite3_result_text* interfaces
+** is non-negative, then as many bytes (not characters) of the text
+** pointed to by the 2nd parameter are taken as the application-defined
+** function result. If the 3rd parameter is non-negative, then it
+** must be the byte offset into the string where the NUL terminator would
+** appear if the string where NUL terminated. If any NUL characters occur
+** in the string at a byte offset that is less than the value of the 3rd
+** parameter, then the resulting string will contain embedded NULs and the
+** result of expressions operating on strings with embedded NULs is undefined.
+** ^If the 4th parameter to the sqlite3_result_text* interfaces
+** or sqlite3_result_blob is a non-NULL pointer, then SQLite calls that
+** function as the destructor on the text or BLOB result when it has
+** finished using that result.
+** ^If the 4th parameter to the sqlite3_result_text* interfaces or to
+** sqlite3_result_blob is the special constant SQLITE_STATIC, then SQLite
+** assumes that the text or BLOB result is in constant space and does not
+** copy the content of the parameter nor call a destructor on the content
+** when it has finished using that result.
+** ^If the 4th parameter to the sqlite3_result_text* interfaces
+** or sqlite3_result_blob is the special constant SQLITE_TRANSIENT
+** then SQLite makes a copy of the result into space obtained
+** from [sqlite3_malloc()] before it returns.
+**
+** ^For the sqlite3_result_text16(), sqlite3_result_text16le(), and
+** sqlite3_result_text16be() routines, and for sqlite3_result_text64()
+** when the encoding is not UTF8, if the input UTF16 begins with a
+** byte-order mark (BOM, U+FEFF) then the BOM is removed from the
+** string and the rest of the string is interpreted according to the
+** byte-order specified by the BOM. ^The byte-order specified by
+** the BOM at the beginning of the text overrides the byte-order
+** specified by the interface procedure. ^So, for example, if
+** sqlite3_result_text16le() is invoked with text that begins
+** with bytes 0xfe, 0xff (a big-endian byte-order mark) then the
+** first two bytes of input are skipped and the remaining input
+** is interpreted as UTF16BE text.
+**
+** ^For UTF16 input text to the sqlite3_result_text16(),
+** sqlite3_result_text16be(), sqlite3_result_text16le(), and
+** sqlite3_result_text64() routines, if the text contains invalid
+** UTF16 characters, the invalid characters might be converted
+** into the unicode replacement character, U+FFFD.
+**
+** ^The sqlite3_result_value() interface sets the result of
+** the application-defined function to be a copy of the
+** [unprotected sqlite3_value] object specified by the 2nd parameter. ^The
+** sqlite3_result_value() interface makes a copy of the [sqlite3_value]
+** so that the [sqlite3_value] specified in the parameter may change or
+** be deallocated after sqlite3_result_value() returns without harm.
+** ^A [protected sqlite3_value] object may always be used where an
+** [unprotected sqlite3_value] object is required, so either
+** kind of [sqlite3_value] object can be used with this interface.
+**
+** ^The sqlite3_result_pointer(C,P,T,D) interface sets the result to an
+** SQL NULL value, just like [sqlite3_result_null(C)], except that it
+** also associates the host-language pointer P or type T with that
+** NULL value such that the pointer can be retrieved within an
+** [application-defined SQL function] using [sqlite3_value_pointer()].
+** ^If the D parameter is not NULL, then it is a pointer to a destructor
+** for the P parameter. ^SQLite invokes D with P as its only argument
+** when SQLite is finished with P. The T parameter should be a static
+** string and preferably a string literal. The sqlite3_result_pointer()
+** routine is part of the [pointer passing interface] added for SQLite 3.20.0.
+**
+** If these routines are called from within the different thread
+** than the one containing the application-defined function that received
+** the [sqlite3_context] pointer, the results are undefined.
+ */
+// llgo:link (*Context).ResultBlob C.sqlite3_result_blob
+func (recv_ *Context) ResultBlob(c.Pointer, c.Int, func(c.Pointer)) {
+}
+
+// llgo:link (*Context).ResultBlob64 C.sqlite3_result_blob64
+func (recv_ *Context) ResultBlob64(c.Pointer, Uint64, func(c.Pointer)) {
+}
+
+// llgo:link (*Context).ResultDouble C.sqlite3_result_double
+func (recv_ *Context) ResultDouble(c.Double) {
+}
+
+// llgo:link (*Context).ResultError C.sqlite3_result_error
+func (recv_ *Context) ResultError(*c.Char, c.Int) {
+}
+
+// llgo:link (*Context).ResultError16 C.sqlite3_result_error16
+func (recv_ *Context) ResultError16(c.Pointer, c.Int) {
+}
+
+// llgo:link (*Context).ResultErrorToobig C.sqlite3_result_error_toobig
+func (recv_ *Context) ResultErrorToobig() {
+}
+
+// llgo:link (*Context).ResultErrorNomem C.sqlite3_result_error_nomem
+func (recv_ *Context) ResultErrorNomem() {
+}
+
+// llgo:link (*Context).ResultErrorCode C.sqlite3_result_error_code
+func (recv_ *Context) ResultErrorCode(c.Int) {
+}
+
+// llgo:link (*Context).ResultInt C.sqlite3_result_int
+func (recv_ *Context) ResultInt(c.Int) {
+}
+
+// llgo:link (*Context).ResultInt64 C.sqlite3_result_int64
+func (recv_ *Context) ResultInt64(Int64) {
+}
+
+// llgo:link (*Context).ResultNull C.sqlite3_result_null
+func (recv_ *Context) ResultNull() {
+}
+
+// llgo:link (*Context).ResultText C.sqlite3_result_text
+func (recv_ *Context) ResultText(*c.Char, c.Int, func(c.Pointer)) {
+}
+
+// llgo:link (*Context).ResultText64 C.sqlite3_result_text64
+func (recv_ *Context) ResultText64(__llgo_arg_0 *c.Char, __llgo_arg_1 Uint64, __llgo_arg_2 func(c.Pointer), encoding c.Char) {
+}
+
+// llgo:link (*Context).ResultText16 C.sqlite3_result_text16
+func (recv_ *Context) ResultText16(c.Pointer, c.Int, func(c.Pointer)) {
+}
+
+// llgo:link (*Context).ResultText16le C.sqlite3_result_text16le
+func (recv_ *Context) ResultText16le(c.Pointer, c.Int, func(c.Pointer)) {
+}
+
+// llgo:link (*Context).ResultText16be C.sqlite3_result_text16be
+func (recv_ *Context) ResultText16be(c.Pointer, c.Int, func(c.Pointer)) {
+}
+
+// llgo:link (*Context).ResultValue C.sqlite3_result_value
+func (recv_ *Context) ResultValue(*Value) {
+}
+
+// llgo:link (*Context).ResultPointer C.sqlite3_result_pointer
+func (recv_ *Context) ResultPointer(c.Pointer, *c.Char, func(c.Pointer)) {
+}
+
+// llgo:link (*Context).ResultZeroblob C.sqlite3_result_zeroblob
+func (recv_ *Context) ResultZeroblob(n c.Int) {
+}
+
+// llgo:link (*Context).ResultZeroblob64 C.sqlite3_result_zeroblob64
+func (recv_ *Context) ResultZeroblob64(n Uint64) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Setting The Subtype Of An SQL Function
+** METHOD: sqlite3_context
+**
+** The sqlite3_result_subtype(C,T) function causes the subtype of
+** the result from the [application-defined SQL function] with
+** [sqlite3_context] C to be the value T. Only the lower 8 bits
+** of the subtype T are preserved in current versions of SQLite;
+** higher order bits are discarded.
+** The number of subtype bytes preserved by SQLite might increase
+** in future releases of SQLite.
+**
+** Every [application-defined SQL function] that invokes this interface
+** should include the [SQLITE_RESULT_SUBTYPE] property in its
+** text encoding argument when the SQL function is
+** [sqlite3_create_function|registered]. If the [SQLITE_RESULT_SUBTYPE]
+** property is omitted from the function that invokes sqlite3_result_subtype(),
+** then in some cases the sqlite3_result_subtype() might fail to set
+** the result subtype.
+**
+** If SQLite is compiled with -DSQLITE_STRICT_SUBTYPE=1, then any
+** SQL function that invokes the sqlite3_result_subtype() interface
+** and that does not have the SQLITE_RESULT_SUBTYPE property will raise
+** an error. Future versions of SQLite might enable -DSQLITE_STRICT_SUBTYPE=1
+** by default.
+ */
+// llgo:link (*Context).ResultSubtype C.sqlite3_result_subtype
+func (recv_ *Context) ResultSubtype(c.Uint) {
+}
+
+/*
+** CAPI3REF: Define New Collating Sequences
+** METHOD: sqlite3
+**
+** ^These functions add, remove, or modify a [collation] associated
+** with the [database connection] specified as the first argument.
+**
+** ^The name of the collation is a UTF-8 string
+** for sqlite3_create_collation() and sqlite3_create_collation_v2()
+** and a UTF-16 string in native byte order for sqlite3_create_collation16().
+** ^Collation names that compare equal according to [sqlite3_strnicmp()] are
+** considered to be the same name.
+**
+** ^(The third argument (eTextRep) must be one of the constants:
+**
+** - [SQLITE_UTF8],
+**
- [SQLITE_UTF16LE],
+**
- [SQLITE_UTF16BE],
+**
- [SQLITE_UTF16], or
+**
- [SQLITE_UTF16_ALIGNED].
+**
)^
+** ^The eTextRep argument determines the encoding of strings passed
+** to the collating function callback, xCompare.
+** ^The [SQLITE_UTF16] and [SQLITE_UTF16_ALIGNED] values for eTextRep
+** force strings to be UTF16 with native byte order.
+** ^The [SQLITE_UTF16_ALIGNED] value for eTextRep forces strings to begin
+** on an even byte address.
+**
+** ^The fourth argument, pArg, is an application data pointer that is passed
+** through as the first argument to the collating function callback.
+**
+** ^The fifth argument, xCompare, is a pointer to the collating function.
+** ^Multiple collating functions can be registered using the same name but
+** with different eTextRep parameters and SQLite will use whichever
+** function requires the least amount of data transformation.
+** ^If the xCompare argument is NULL then the collating function is
+** deleted. ^When all collating functions having the same name are deleted,
+** that collation is no longer usable.
+**
+** ^The collating function callback is invoked with a copy of the pArg
+** application data pointer and with two strings in the encoding specified
+** by the eTextRep argument. The two integer parameters to the collating
+** function callback are the length of the two strings, in bytes. The collating
+** function must return an integer that is negative, zero, or positive
+** if the first string is less than, equal to, or greater than the second,
+** respectively. A collating function must always return the same answer
+** given the same inputs. If two or more collating functions are registered
+** to the same collation name (using different eTextRep values) then all
+** must give an equivalent answer when invoked with equivalent strings.
+** The collating function must obey the following properties for all
+** strings A, B, and C:
+**
+**
+** - If A==B then B==A.
+**
- If A==B and B==C then A==C.
+**
- If A<B THEN B>A.
+**
- If A<B and B<C then A<C.
+**
+**
+** If a collating function fails any of the above constraints and that
+** collating function is registered and used, then the behavior of SQLite
+** is undefined.
+**
+** ^The sqlite3_create_collation_v2() works like sqlite3_create_collation()
+** with the addition that the xDestroy callback is invoked on pArg when
+** the collating function is deleted.
+** ^Collating functions are deleted when they are overridden by later
+** calls to the collation creation functions or when the
+** [database connection] is closed using [sqlite3_close()].
+**
+** ^The xDestroy callback is not called if the
+** sqlite3_create_collation_v2() function fails. Applications that invoke
+** sqlite3_create_collation_v2() with a non-NULL xDestroy argument should
+** check the return code and dispose of the application data pointer
+** themselves rather than expecting SQLite to deal with it for them.
+** This is different from every other SQLite interface. The inconsistency
+** is unfortunate but cannot be changed without breaking backwards
+** compatibility.
+**
+** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
+ */
+// llgo:link (*Sqlite3).CreateCollation C.sqlite3_create_collation
+func (recv_ *Sqlite3) CreateCollation(zName *c.Char, eTextRep c.Int, pArg c.Pointer, xCompare func(c.Pointer, c.Int, c.Pointer, c.Int, c.Pointer) c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*Sqlite3).CreateCollationV2 C.sqlite3_create_collation_v2
+func (recv_ *Sqlite3) CreateCollationV2(zName *c.Char, eTextRep c.Int, pArg c.Pointer, xCompare func(c.Pointer, c.Int, c.Pointer, c.Int, c.Pointer) c.Int, xDestroy func(c.Pointer)) c.Int {
+ return 0
+}
+
+// llgo:link (*Sqlite3).CreateCollation16 C.sqlite3_create_collation16
+func (recv_ *Sqlite3) CreateCollation16(zName c.Pointer, eTextRep c.Int, pArg c.Pointer, xCompare func(c.Pointer, c.Int, c.Pointer, c.Int, c.Pointer) c.Int) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Collation Needed Callbacks
+** METHOD: sqlite3
+**
+** ^To avoid having to register all collation sequences before a database
+** can be used, a single callback function may be registered with the
+** [database connection] to be invoked whenever an undefined collation
+** sequence is required.
+**
+** ^If the function is registered using the sqlite3_collation_needed() API,
+** then it is passed the names of undefined collation sequences as strings
+** encoded in UTF-8. ^If sqlite3_collation_needed16() is used,
+** the names are passed as UTF-16 in machine native byte order.
+** ^A call to either function replaces the existing collation-needed callback.
+**
+** ^(When the callback is invoked, the first argument passed is a copy
+** of the second argument to sqlite3_collation_needed() or
+** sqlite3_collation_needed16(). The second argument is the database
+** connection. The third argument is one of [SQLITE_UTF8], [SQLITE_UTF16BE],
+** or [SQLITE_UTF16LE], indicating the most desirable form of the collation
+** sequence function required. The fourth parameter is the name of the
+** required collation sequence.)^
+**
+** The callback function should register the desired collation using
+** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
+** [sqlite3_create_collation_v2()].
+ */
+// llgo:link (*Sqlite3).CollationNeeded C.sqlite3_collation_needed
+func (recv_ *Sqlite3) CollationNeeded(c.Pointer, func(c.Pointer, *Sqlite3, c.Int, *c.Char)) c.Int {
+ return 0
+}
+
+// llgo:link (*Sqlite3).CollationNeeded16 C.sqlite3_collation_needed16
+func (recv_ *Sqlite3) CollationNeeded16(c.Pointer, func(c.Pointer, *Sqlite3, c.Int, c.Pointer)) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Suspend Execution For A Short Time
+**
+** The sqlite3_sleep() function causes the current thread to suspend execution
+** for at least a number of milliseconds specified in its parameter.
+**
+** If the operating system does not support sleep requests with
+** millisecond time resolution, then the time will be rounded up to
+** the nearest second. The number of milliseconds of sleep actually
+** requested from the operating system is returned.
+**
+** ^SQLite implements this interface by calling the xSleep()
+** method of the default [sqlite3_vfs] object. If the xSleep() method
+** of the default VFS is not implemented correctly, or not implemented at
+** all, then the behavior of sqlite3_sleep() may deviate from the description
+** in the previous paragraphs.
+**
+** If a negative argument is passed to sqlite3_sleep() the results vary by
+** VFS and operating system. Some system treat a negative argument as an
+** instruction to sleep forever. Others understand it to mean do not sleep
+** at all. ^In SQLite version 3.42.0 and later, a negative
+** argument passed into sqlite3_sleep() is changed to zero before it is relayed
+** down into the xSleep method of the VFS.
+ */
+//go:linkname Sleep C.sqlite3_sleep
+func Sleep(c.Int) c.Int
+
+/*
+** CAPI3REF: Test For Auto-Commit Mode
+** KEYWORDS: {autocommit mode}
+** METHOD: sqlite3
+**
+** ^The sqlite3_get_autocommit() interface returns non-zero or
+** zero if the given database connection is or is not in autocommit mode,
+** respectively. ^Autocommit mode is on by default.
+** ^Autocommit mode is disabled by a [BEGIN] statement.
+** ^Autocommit mode is re-enabled by a [COMMIT] or [ROLLBACK].
+**
+** If certain kinds of errors occur on a statement within a multi-statement
+** transaction (errors including [SQLITE_FULL], [SQLITE_IOERR],
+** [SQLITE_NOMEM], [SQLITE_BUSY], and [SQLITE_INTERRUPT]) then the
+** transaction might be rolled back automatically. The only way to
+** find out whether SQLite automatically rolled back the transaction after
+** an error is to use this function.
+**
+** If another thread changes the autocommit status of the database
+** connection while this routine is running, then the return value
+** is undefined.
+ */
+// llgo:link (*Sqlite3).GetAutocommit C.sqlite3_get_autocommit
+func (recv_ *Sqlite3) GetAutocommit() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Find The Database Handle Of A Prepared Statement
+** METHOD: sqlite3_stmt
+**
+** ^The sqlite3_db_handle interface returns the [database connection] handle
+** to which a [prepared statement] belongs. ^The [database connection]
+** returned by sqlite3_db_handle is the same [database connection]
+** that was the first argument
+** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
+** create the statement in the first place.
+ */
+// llgo:link (*Stmt).DbHandle C.sqlite3_db_handle
+func (recv_ *Stmt) DbHandle() *Sqlite3 {
+ return nil
+}
+
+/*
+** CAPI3REF: Return The Schema Name For A Database Connection
+** METHOD: sqlite3
+**
+** ^The sqlite3_db_name(D,N) interface returns a pointer to the schema name
+** for the N-th database on database connection D, or a NULL pointer of N is
+** out of range. An N value of 0 means the main database file. An N of 1 is
+** the "temp" schema. Larger values of N correspond to various ATTACH-ed
+** databases.
+**
+** Space to hold the string that is returned by sqlite3_db_name() is managed
+** by SQLite itself. The string might be deallocated by any operation that
+** changes the schema, including [ATTACH] or [DETACH] or calls to
+** [sqlite3_serialize()] or [sqlite3_deserialize()], even operations that
+** occur on a different thread. Applications that need to
+** remember the string long-term should make their own copy. Applications that
+** are accessing the same database connection simultaneously on multiple
+** threads should mutex-protect calls to this API and should make their own
+** private copy of the result prior to releasing the mutex.
+ */
+// llgo:link (*Sqlite3).DbName C.sqlite3_db_name
+func (recv_ *Sqlite3) DbName(N c.Int) *c.Char {
+ return nil
+}
+
+/*
+** CAPI3REF: Return The Filename For A Database Connection
+** METHOD: sqlite3
+**
+** ^The sqlite3_db_filename(D,N) interface returns a pointer to the filename
+** associated with database N of connection D.
+** ^If there is no attached database N on the database
+** connection D, or if database N is a temporary or in-memory database, then
+** this function will return either a NULL pointer or an empty string.
+**
+** ^The string value returned by this routine is owned and managed by
+** the database connection. ^The value will be valid until the database N
+** is [DETACH]-ed or until the database connection closes.
+**
+** ^The filename returned by this function is the output of the
+** xFullPathname method of the [VFS]. ^In other words, the filename
+** will be an absolute pathname, even if the filename used
+** to open the database originally was a URI or relative pathname.
+**
+** If the filename pointer returned by this routine is not NULL, then it
+** can be used as the filename input parameter to these routines:
+**
+** - [sqlite3_uri_parameter()]
+**
- [sqlite3_uri_boolean()]
+**
- [sqlite3_uri_int64()]
+**
- [sqlite3_filename_database()]
+**
- [sqlite3_filename_journal()]
+**
- [sqlite3_filename_wal()]
+**
+ */
+// llgo:link (*Sqlite3).DbFilename C.sqlite3_db_filename
+func (recv_ *Sqlite3) DbFilename(zDbName *c.Char) Filename {
+ return nil
+}
+
+/*
+** CAPI3REF: Determine if a database is read-only
+** METHOD: sqlite3
+**
+** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N
+** of connection D is read-only, 0 if it is read/write, or -1 if N is not
+** the name of a database on connection D.
+ */
+// llgo:link (*Sqlite3).DbReadonly C.sqlite3_db_readonly
+func (recv_ *Sqlite3) DbReadonly(zDbName *c.Char) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Determine the transaction state of a database
+** METHOD: sqlite3
+**
+** ^The sqlite3_txn_state(D,S) interface returns the current
+** [transaction state] of schema S in database connection D. ^If S is NULL,
+** then the highest transaction state of any schema on database connection D
+** is returned. Transaction states are (in order of lowest to highest):
+**
+** - SQLITE_TXN_NONE
+**
- SQLITE_TXN_READ
+**
- SQLITE_TXN_WRITE
+**
+** ^If the S argument to sqlite3_txn_state(D,S) is not the name of
+** a valid schema, then -1 is returned.
+ */
+// llgo:link (*Sqlite3).TxnState C.sqlite3_txn_state
+func (recv_ *Sqlite3) TxnState(zSchema *c.Char) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Find the next prepared statement
+** METHOD: sqlite3
+**
+** ^This interface returns a pointer to the next [prepared statement] after
+** pStmt associated with the [database connection] pDb. ^If pStmt is NULL
+** then this interface returns a pointer to the first prepared statement
+** associated with the database connection pDb. ^If no prepared statement
+** satisfies the conditions of this routine, it returns NULL.
+**
+** The [database connection] pointer D in a call to
+** [sqlite3_next_stmt(D,S)] must refer to an open database
+** connection and in particular must not be a NULL pointer.
+ */
+// llgo:link (*Sqlite3).NextStmt C.sqlite3_next_stmt
+func (recv_ *Sqlite3) NextStmt(pStmt *Stmt) *Stmt {
+ return nil
+}
+
+/*
+** CAPI3REF: Commit And Rollback Notification Callbacks
+** METHOD: sqlite3
+**
+** ^The sqlite3_commit_hook() interface registers a callback
+** function to be invoked whenever a transaction is [COMMIT | committed].
+** ^Any callback set by a previous call to sqlite3_commit_hook()
+** for the same database connection is overridden.
+** ^The sqlite3_rollback_hook() interface registers a callback
+** function to be invoked whenever a transaction is [ROLLBACK | rolled back].
+** ^Any callback set by a previous call to sqlite3_rollback_hook()
+** for the same database connection is overridden.
+** ^The pArg argument is passed through to the callback.
+** ^If the callback on a commit hook function returns non-zero,
+** then the commit is converted into a rollback.
+**
+** ^The sqlite3_commit_hook(D,C,P) and sqlite3_rollback_hook(D,C,P) functions
+** return the P argument from the previous call of the same function
+** on the same [database connection] D, or NULL for
+** the first call for each function on D.
+**
+** The commit and rollback hook callbacks are not reentrant.
+** The callback implementation must not do anything that will modify
+** the database connection that invoked the callback. Any actions
+** to modify the database connection must be deferred until after the
+** completion of the [sqlite3_step()] call that triggered the commit
+** or rollback hook in the first place.
+** Note that running any other SQL statements, including SELECT statements,
+** or merely calling [sqlite3_prepare_v2()] and [sqlite3_step()] will modify
+** the database connections for the meaning of "modify" in this paragraph.
+**
+** ^Registering a NULL function disables the callback.
+**
+** ^When the commit hook callback routine returns zero, the [COMMIT]
+** operation is allowed to continue normally. ^If the commit hook
+** returns non-zero, then the [COMMIT] is converted into a [ROLLBACK].
+** ^The rollback hook is invoked on a rollback that results from a commit
+** hook returning non-zero, just as it would be with any other rollback.
+**
+** ^For the purposes of this API, a transaction is said to have been
+** rolled back if an explicit "ROLLBACK" statement is executed, or
+** an error or constraint causes an implicit rollback to occur.
+** ^The rollback callback is not invoked if a transaction is
+** automatically rolled back because the database connection is closed.
+**
+** See also the [sqlite3_update_hook()] interface.
+ */
+// llgo:link (*Sqlite3).CommitHook C.sqlite3_commit_hook
+func (recv_ *Sqlite3) CommitHook(func(c.Pointer) c.Int, c.Pointer) c.Pointer {
+ return nil
+}
+
+// llgo:link (*Sqlite3).RollbackHook C.sqlite3_rollback_hook
+func (recv_ *Sqlite3) RollbackHook(func(c.Pointer), c.Pointer) c.Pointer {
+ return nil
+}
+
+/*
+** CAPI3REF: Autovacuum Compaction Amount Callback
+** METHOD: sqlite3
+**
+** ^The sqlite3_autovacuum_pages(D,C,P,X) interface registers a callback
+** function C that is invoked prior to each autovacuum of the database
+** file. ^The callback is passed a copy of the generic data pointer (P),
+** the schema-name of the attached database that is being autovacuumed,
+** the size of the database file in pages, the number of free pages,
+** and the number of bytes per page, respectively. The callback should
+** return the number of free pages that should be removed by the
+** autovacuum. ^If the callback returns zero, then no autovacuum happens.
+** ^If the value returned is greater than or equal to the number of
+** free pages, then a complete autovacuum happens.
+**
+** ^If there are multiple ATTACH-ed database files that are being
+** modified as part of a transaction commit, then the autovacuum pages
+** callback is invoked separately for each file.
+**
+**
The callback is not reentrant. The callback function should
+** not attempt to invoke any other SQLite interface. If it does, bad
+** things may happen, including segmentation faults and corrupt database
+** files. The callback function should be a simple function that
+** does some arithmetic on its input parameters and returns a result.
+**
+** ^The X parameter to sqlite3_autovacuum_pages(D,C,P,X) is an optional
+** destructor for the P parameter. ^If X is not NULL, then X(P) is
+** invoked whenever the database connection closes or when the callback
+** is overwritten by another invocation of sqlite3_autovacuum_pages().
+**
+**
^There is only one autovacuum pages callback per database connection.
+** ^Each call to the sqlite3_autovacuum_pages() interface overrides all
+** previous invocations for that database connection. ^If the callback
+** argument (C) to sqlite3_autovacuum_pages(D,C,P,X) is a NULL pointer,
+** then the autovacuum steps callback is canceled. The return value
+** from sqlite3_autovacuum_pages() is normally SQLITE_OK, but might
+** be some other error code if something goes wrong. The current
+** implementation will only return SQLITE_OK or SQLITE_MISUSE, but other
+** return codes might be added in future releases.
+**
+**
If no autovacuum pages callback is specified (the usual case) or
+** a NULL pointer is provided for the callback,
+** then the default behavior is to vacuum all free pages. So, in other
+** words, the default behavior is the same as if the callback function
+** were something like this:
+**
+**
+** unsigned int demonstration_autovac_pages_callback(
+** void *pClientData,
+** const char *zSchema,
+** unsigned int nDbPage,
+** unsigned int nFreePage,
+** unsigned int nBytePerPage
+** ){
+** return nFreePage;
+** }
+**
+ */
+// llgo:link (*Sqlite3).AutovacuumPages C.sqlite3_autovacuum_pages
+func (recv_ *Sqlite3) AutovacuumPages(func(c.Pointer, *c.Char, c.Uint, c.Uint, c.Uint) c.Uint, c.Pointer, func(c.Pointer)) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Data Change Notification Callbacks
+** METHOD: sqlite3
+**
+** ^The sqlite3_update_hook() interface registers a callback function
+** with the [database connection] identified by the first argument
+** to be invoked whenever a row is updated, inserted or deleted in
+** a [rowid table].
+** ^Any callback set by a previous call to this function
+** for the same database connection is overridden.
+**
+** ^The second argument is a pointer to the function to invoke when a
+** row is updated, inserted or deleted in a rowid table.
+** ^The first argument to the callback is a copy of the third argument
+** to sqlite3_update_hook().
+** ^The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE],
+** or [SQLITE_UPDATE], depending on the operation that caused the callback
+** to be invoked.
+** ^The third and fourth arguments to the callback contain pointers to the
+** database and table name containing the affected row.
+** ^The final callback parameter is the [rowid] of the row.
+** ^In the case of an update, this is the [rowid] after the update takes place.
+**
+** ^(The update hook is not invoked when internal system tables are
+** modified (i.e. sqlite_sequence).)^
+** ^The update hook is not invoked when [WITHOUT ROWID] tables are modified.
+**
+** ^In the current implementation, the update hook
+** is not invoked when conflicting rows are deleted because of an
+** [ON CONFLICT | ON CONFLICT REPLACE] clause. ^Nor is the update hook
+** invoked when rows are deleted using the [truncate optimization].
+** The exceptions defined in this paragraph might change in a future
+** release of SQLite.
+**
+** Whether the update hook is invoked before or after the
+** corresponding change is currently unspecified and may differ
+** depending on the type of change. Do not rely on the order of the
+** hook call with regards to the final result of the operation which
+** triggers the hook.
+**
+** The update hook implementation must not do anything that will modify
+** the database connection that invoked the update hook. Any actions
+** to modify the database connection must be deferred until after the
+** completion of the [sqlite3_step()] call that triggered the update hook.
+** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
+** database connections for the meaning of "modify" in this paragraph.
+**
+** ^The sqlite3_update_hook(D,C,P) function
+** returns the P argument from the previous call
+** on the same [database connection] D, or NULL for
+** the first call on D.
+**
+** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()],
+** and [sqlite3_preupdate_hook()] interfaces.
+ */
+// llgo:link (*Sqlite3).UpdateHook C.sqlite3_update_hook
+func (recv_ *Sqlite3) UpdateHook(func(c.Pointer, c.Int, *c.Char, *c.Char, Int64), c.Pointer) c.Pointer {
+ return nil
+}
+
+/*
+** CAPI3REF: Enable Or Disable Shared Pager Cache
+**
+** ^(This routine enables or disables the sharing of the database cache
+** and schema data structures between [database connection | connections]
+** to the same database. Sharing is enabled if the argument is true
+** and disabled if the argument is false.)^
+**
+** This interface is omitted if SQLite is compiled with
+** [-DSQLITE_OMIT_SHARED_CACHE]. The [-DSQLITE_OMIT_SHARED_CACHE]
+** compile-time option is recommended because the
+** [use of shared cache mode is discouraged].
+**
+** ^Cache sharing is enabled and disabled for an entire process.
+** This is a change as of SQLite [version 3.5.0] ([dateof:3.5.0]).
+** In prior versions of SQLite,
+** sharing was enabled or disabled for each thread separately.
+**
+** ^(The cache sharing mode set by this interface effects all subsequent
+** calls to [sqlite3_open()], [sqlite3_open_v2()], and [sqlite3_open16()].
+** Existing database connections continue to use the sharing mode
+** that was in effect at the time they were opened.)^
+**
+** ^(This routine returns [SQLITE_OK] if shared cache was enabled or disabled
+** successfully. An [error code] is returned otherwise.)^
+**
+** ^Shared cache is disabled by default. It is recommended that it stay
+** that way. In other words, do not use this routine. This interface
+** continues to be provided for historical compatibility, but its use is
+** discouraged. Any use of shared cache is discouraged. If shared cache
+** must be used, it is recommended that shared cache only be enabled for
+** individual database connections using the [sqlite3_open_v2()] interface
+** with the [SQLITE_OPEN_SHAREDCACHE] flag.
+**
+** Note: This method is disabled on MacOS X 10.7 and iOS version 5.0
+** and will always return SQLITE_MISUSE. On those systems,
+** shared cache mode should be enabled per-database connection via
+** [sqlite3_open_v2()] with [SQLITE_OPEN_SHAREDCACHE].
+**
+** This interface is threadsafe on processors where writing a
+** 32-bit integer is atomic.
+**
+** See Also: [SQLite Shared-Cache Mode]
+ */
+//go:linkname EnableSharedCache C.sqlite3_enable_shared_cache
+func EnableSharedCache(c.Int) c.Int
+
+/*
+** CAPI3REF: Attempt To Free Heap Memory
+**
+** ^The sqlite3_release_memory() interface attempts to free N bytes
+** of heap memory by deallocating non-essential memory allocations
+** held by the database library. Memory used to cache database
+** pages to improve performance is an example of non-essential memory.
+** ^sqlite3_release_memory() returns the number of bytes actually freed,
+** which might be more or less than the amount requested.
+** ^The sqlite3_release_memory() routine is a no-op returning zero
+** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT].
+**
+** See also: [sqlite3_db_release_memory()]
+ */
+//go:linkname ReleaseMemory C.sqlite3_release_memory
+func ReleaseMemory(c.Int) c.Int
+
+/*
+** CAPI3REF: Free Memory Used By A Database Connection
+** METHOD: sqlite3
+**
+** ^The sqlite3_db_release_memory(D) interface attempts to free as much heap
+** memory as possible from database connection D. Unlike the
+** [sqlite3_release_memory()] interface, this interface is in effect even
+** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is
+** omitted.
+**
+** See also: [sqlite3_release_memory()]
+ */
+// llgo:link (*Sqlite3).DbReleaseMemory C.sqlite3_db_release_memory
+func (recv_ *Sqlite3) DbReleaseMemory() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Impose A Limit On Heap Size
+**
+** These interfaces impose limits on the amount of heap memory that will be
+** by all database connections within a single process.
+**
+** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the
+** soft limit on the amount of heap memory that may be allocated by SQLite.
+** ^SQLite strives to keep heap memory utilization below the soft heap
+** limit by reducing the number of pages held in the page cache
+** as heap memory usages approaches the limit.
+** ^The soft heap limit is "soft" because even though SQLite strives to stay
+** below the limit, it will exceed the limit rather than generate
+** an [SQLITE_NOMEM] error. In other words, the soft heap limit
+** is advisory only.
+**
+** ^The sqlite3_hard_heap_limit64(N) interface sets a hard upper bound of
+** N bytes on the amount of memory that will be allocated. ^The
+** sqlite3_hard_heap_limit64(N) interface is similar to
+** sqlite3_soft_heap_limit64(N) except that memory allocations will fail
+** when the hard heap limit is reached.
+**
+** ^The return value from both sqlite3_soft_heap_limit64() and
+** sqlite3_hard_heap_limit64() is the size of
+** the heap limit prior to the call, or negative in the case of an
+** error. ^If the argument N is negative
+** then no change is made to the heap limit. Hence, the current
+** size of heap limits can be determined by invoking
+** sqlite3_soft_heap_limit64(-1) or sqlite3_hard_heap_limit(-1).
+**
+** ^Setting the heap limits to zero disables the heap limiter mechanism.
+**
+** ^The soft heap limit may not be greater than the hard heap limit.
+** ^If the hard heap limit is enabled and if sqlite3_soft_heap_limit(N)
+** is invoked with a value of N that is greater than the hard heap limit,
+** the soft heap limit is set to the value of the hard heap limit.
+** ^The soft heap limit is automatically enabled whenever the hard heap
+** limit is enabled. ^When sqlite3_hard_heap_limit64(N) is invoked and
+** the soft heap limit is outside the range of 1..N, then the soft heap
+** limit is set to N. ^Invoking sqlite3_soft_heap_limit64(0) when the
+** hard heap limit is enabled makes the soft heap limit equal to the
+** hard heap limit.
+**
+** The memory allocation limits can also be adjusted using
+** [PRAGMA soft_heap_limit] and [PRAGMA hard_heap_limit].
+**
+** ^(The heap limits are not enforced in the current implementation
+** if one or more of following conditions are true:
+**
+**
+** - The limit value is set to zero.
+**
- Memory accounting is disabled using a combination of the
+** [sqlite3_config]([SQLITE_CONFIG_MEMSTATUS],...) start-time option and
+** the [SQLITE_DEFAULT_MEMSTATUS] compile-time option.
+**
- An alternative page cache implementation is specified using
+** [sqlite3_config]([SQLITE_CONFIG_PCACHE2],...).
+**
- The page cache allocates from its own memory pool supplied
+** by [sqlite3_config]([SQLITE_CONFIG_PAGECACHE],...) rather than
+** from the heap.
+**
)^
+**
+** The circumstances under which SQLite will enforce the heap limits may
+** changes in future releases of SQLite.
+ */
+// llgo:link Int64.SoftHeapLimit64 C.sqlite3_soft_heap_limit64
+func (recv_ Int64) SoftHeapLimit64() Int64 {
+ return 0
+}
+
+// llgo:link Int64.HardHeapLimit64 C.sqlite3_hard_heap_limit64
+func (recv_ Int64) HardHeapLimit64() Int64 {
+ return 0
+}
+
+/*
+** CAPI3REF: Deprecated Soft Heap Limit Interface
+** DEPRECATED
+**
+** This is a deprecated version of the [sqlite3_soft_heap_limit64()]
+** interface. This routine is provided for historical compatibility
+** only. All new applications should use the
+** [sqlite3_soft_heap_limit64()] interface rather than this one.
+ */
+//go:linkname SoftHeapLimit C.sqlite3_soft_heap_limit
+func SoftHeapLimit(N c.Int)
+
+/*
+** CAPI3REF: Extract Metadata About A Column Of A Table
+** METHOD: sqlite3
+**
+** ^(The sqlite3_table_column_metadata(X,D,T,C,....) routine returns
+** information about column C of table T in database D
+** on [database connection] X.)^ ^The sqlite3_table_column_metadata()
+** interface returns SQLITE_OK and fills in the non-NULL pointers in
+** the final five arguments with appropriate values if the specified
+** column exists. ^The sqlite3_table_column_metadata() interface returns
+** SQLITE_ERROR if the specified column does not exist.
+** ^If the column-name parameter to sqlite3_table_column_metadata() is a
+** NULL pointer, then this routine simply checks for the existence of the
+** table and returns SQLITE_OK if the table exists and SQLITE_ERROR if it
+** does not. If the table name parameter T in a call to
+** sqlite3_table_column_metadata(X,D,T,C,...) is NULL then the result is
+** undefined behavior.
+**
+** ^The column is identified by the second, third and fourth parameters to
+** this function. ^(The second parameter is either the name of the database
+** (i.e. "main", "temp", or an attached database) containing the specified
+** table or NULL.)^ ^If it is NULL, then all attached databases are searched
+** for the table using the same algorithm used by the database engine to
+** resolve unqualified table references.
+**
+** ^The third and fourth parameters to this function are the table and column
+** name of the desired column, respectively.
+**
+** ^Metadata is returned by writing to the memory locations passed as the 5th
+** and subsequent parameters to this function. ^Any of these arguments may be
+** NULL, in which case the corresponding element of metadata is omitted.
+**
+** ^(
+**
+** | Parameter | Output Type | Description
+**
+** |
|---|
| 5th | const char* | Data type
+** |
| 6th | const char* | Name of default collation sequence
+** |
| 7th | int | True if column has a NOT NULL constraint
+** |
| 8th | int | True if column is part of the PRIMARY KEY
+** |
| 9th | int | True if column is [AUTOINCREMENT]
+** |
+**
)^
+**
+** ^The memory pointed to by the character pointers returned for the
+** declaration type and collation sequence is valid until the next
+** call to any SQLite API function.
+**
+** ^If the specified table is actually a view, an [error code] is returned.
+**
+** ^If the specified column is "rowid", "oid" or "_rowid_" and the table
+** is not a [WITHOUT ROWID] table and an
+** [INTEGER PRIMARY KEY] column has been explicitly declared, then the output
+** parameters are set for the explicitly declared column. ^(If there is no
+** [INTEGER PRIMARY KEY] column, then the outputs
+** for the [rowid] are set as follows:
+**
+**
+** data type: "INTEGER"
+** collation sequence: "BINARY"
+** not null: 0
+** primary key: 1
+** auto increment: 0
+**
)^
+**
+** ^This function causes all database schemas to be read from disk and
+** parsed, if that has not already been done, and returns an error if
+** any errors are encountered while loading the schema.
+ */
+// llgo:link (*Sqlite3).TableColumnMetadata C.sqlite3_table_column_metadata
+func (recv_ *Sqlite3) TableColumnMetadata(zDbName *c.Char, zTableName *c.Char, zColumnName *c.Char, pzDataType **c.Char, pzCollSeq **c.Char, pNotNull *c.Int, pPrimaryKey *c.Int, pAutoinc *c.Int) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Load An Extension
+** METHOD: sqlite3
+**
+** ^This interface loads an SQLite extension library from the named file.
+**
+** ^The sqlite3_load_extension() interface attempts to load an
+** [SQLite extension] library contained in the file zFile. If
+** the file cannot be loaded directly, attempts are made to load
+** with various operating-system specific extensions added.
+** So for example, if "samplelib" cannot be loaded, then names like
+** "samplelib.so" or "samplelib.dylib" or "samplelib.dll" might
+** be tried also.
+**
+** ^The entry point is zProc.
+** ^(zProc may be 0, in which case SQLite will try to come up with an
+** entry point name on its own. It first tries "sqlite3_extension_init".
+** If that does not work, it constructs a name "sqlite3_X_init" where the
+** X is consists of the lower-case equivalent of all ASCII alphabetic
+** characters in the filename from the last "/" to the first following
+** "." and omitting any initial "lib".)^
+** ^The sqlite3_load_extension() interface returns
+** [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong.
+** ^If an error occurs and pzErrMsg is not 0, then the
+** [sqlite3_load_extension()] interface shall attempt to
+** fill *pzErrMsg with error message text stored in memory
+** obtained from [sqlite3_malloc()]. The calling function
+** should free this memory by calling [sqlite3_free()].
+**
+** ^Extension loading must be enabled using
+** [sqlite3_enable_load_extension()] or
+** [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],1,NULL)
+** prior to calling this API,
+** otherwise an error will be returned.
+**
+** Security warning: It is recommended that the
+** [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method be used to enable only this
+** interface. The use of the [sqlite3_enable_load_extension()] interface
+** should be avoided. This will keep the SQL function [load_extension()]
+** disabled and prevent SQL injections from giving attackers
+** access to extension loading capabilities.
+**
+** See also the [load_extension() SQL function].
+ */
+// llgo:link (*Sqlite3).LoadExtension C.sqlite3_load_extension
+func (recv_ *Sqlite3) LoadExtension(zFile *c.Char, zProc *c.Char, pzErrMsg **c.Char) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Enable Or Disable Extension Loading
+** METHOD: sqlite3
+**
+** ^So as not to open security holes in older applications that are
+** unprepared to deal with [extension loading], and as a means of disabling
+** [extension loading] while evaluating user-entered SQL, the following API
+** is provided to turn the [sqlite3_load_extension()] mechanism on and off.
+**
+** ^Extension loading is off by default.
+** ^Call the sqlite3_enable_load_extension() routine with onoff==1
+** to turn extension loading on and call it with onoff==0 to turn
+** it back off again.
+**
+** ^This interface enables or disables both the C-API
+** [sqlite3_load_extension()] and the SQL function [load_extension()].
+** ^(Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..)
+** to enable or disable only the C-API.)^
+**
+** Security warning: It is recommended that extension loading
+** be enabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method
+** rather than this interface, so the [load_extension()] SQL function
+** remains disabled. This will prevent SQL injections from giving attackers
+** access to extension loading capabilities.
+ */
+// llgo:link (*Sqlite3).EnableLoadExtension C.sqlite3_enable_load_extension
+func (recv_ *Sqlite3) EnableLoadExtension(onoff c.Int) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Automatically Load Statically Linked Extensions
+**
+** ^This interface causes the xEntryPoint() function to be invoked for
+** each new [database connection] that is created. The idea here is that
+** xEntryPoint() is the entry point for a statically linked [SQLite extension]
+** that is to be automatically loaded into all new database connections.
+**
+** ^(Even though the function prototype shows that xEntryPoint() takes
+** no arguments and returns void, SQLite invokes xEntryPoint() with three
+** arguments and expects an integer result as if the signature of the
+** entry point where as follows:
+**
+**
+** int xEntryPoint(
+** sqlite3 *db,
+** const char **pzErrMsg,
+** const struct sqlite3_api_routines *pThunk
+** );
+**
)^
+**
+** If the xEntryPoint routine encounters an error, it should make *pzErrMsg
+** point to an appropriate error message (obtained from [sqlite3_mprintf()])
+** and return an appropriate [error code]. ^SQLite ensures that *pzErrMsg
+** is NULL before calling the xEntryPoint(). ^SQLite will invoke
+** [sqlite3_free()] on *pzErrMsg after xEntryPoint() returns. ^If any
+** xEntryPoint() returns an error, the [sqlite3_open()], [sqlite3_open16()],
+** or [sqlite3_open_v2()] call that provoked the xEntryPoint() will fail.
+**
+** ^Calling sqlite3_auto_extension(X) with an entry point X that is already
+** on the list of automatic extensions is a harmless no-op. ^No entry point
+** will be called more than once for each database connection that is opened.
+**
+** See also: [sqlite3_reset_auto_extension()]
+** and [sqlite3_cancel_auto_extension()]
+ */
+//go:linkname AutoExtension C.sqlite3_auto_extension
+func AutoExtension(xEntryPoint func()) c.Int
+
+/*
+** CAPI3REF: Cancel Automatic Extension Loading
+**
+** ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the
+** initialization routine X that was registered using a prior call to
+** [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)]
+** routine returns 1 if initialization routine X was successfully
+** unregistered and it returns 0 if X was not on the list of initialization
+** routines.
+ */
+//go:linkname CancelAutoExtension C.sqlite3_cancel_auto_extension
+func CancelAutoExtension(xEntryPoint func()) c.Int
+
+/*
+** CAPI3REF: Reset Automatic Extension Loading
+**
+** ^This interface disables all automatic extensions previously
+** registered using [sqlite3_auto_extension()].
+ */
+//go:linkname ResetAutoExtension C.sqlite3_reset_auto_extension
+func ResetAutoExtension()
+
+type Vtab struct {
+ PModule *Module
+ NRef c.Int
+ ZErrMsg *c.Char
+}
+
+type IndexInfo struct {
+ NConstraint c.Int
+ AConstraint *IndexConstraint
+ NOrderBy c.Int
+ AOrderBy *IndexOrderby
+ AConstraintUsage *IndexConstraintUsage
+ IdxNum c.Int
+ IdxStr *c.Char
+ NeedToFreeIdxStr c.Int
+ OrderByConsumed c.Int
+ EstimatedCost c.Double
+ EstimatedRows Int64
+ IdxFlags c.Int
+ ColUsed Uint64
+}
+
+type VtabCursor struct {
+ PVtab *Vtab
+}
+
+type Module struct {
+ IVersion c.Int
+ XCreate c.Pointer
+ XConnect c.Pointer
+ XBestIndex c.Pointer
+ XDisconnect c.Pointer
+ XDestroy c.Pointer
+ XOpen c.Pointer
+ XClose c.Pointer
+ XFilter c.Pointer
+ XNext c.Pointer
+ XEof c.Pointer
+ XColumn c.Pointer
+ XRowid c.Pointer
+ XUpdate c.Pointer
+ XBegin c.Pointer
+ XSync c.Pointer
+ XCommit c.Pointer
+ XRollback c.Pointer
+ XFindFunction c.Pointer
+ XRename c.Pointer
+ XSavepoint c.Pointer
+ XRelease c.Pointer
+ XRollbackTo c.Pointer
+ XShadowName c.Pointer
+ XIntegrity c.Pointer
+}
+
+type IndexConstraint struct {
+ IColumn c.Int
+ Op c.Char
+ Usable c.Char
+ ITermOffset c.Int
+}
+
+type IndexOrderby struct {
+ IColumn c.Int
+ Desc c.Char
+}
+
+/* Outputs */
+
+type IndexConstraintUsage struct {
+ ArgvIndex c.Int
+ Omit c.Char
+}
+
+/*
+** CAPI3REF: Register A Virtual Table Implementation
+** METHOD: sqlite3
+**
+** ^These routines are used to register a new [virtual table module] name.
+** ^Module names must be registered before
+** creating a new [virtual table] using the module and before using a
+** preexisting [virtual table] for the module.
+**
+** ^The module name is registered on the [database connection] specified
+** by the first parameter. ^The name of the module is given by the
+** second parameter. ^The third parameter is a pointer to
+** the implementation of the [virtual table module]. ^The fourth
+** parameter is an arbitrary client data pointer that is passed through
+** into the [xCreate] and [xConnect] methods of the virtual table module
+** when a new virtual table is be being created or reinitialized.
+**
+** ^The sqlite3_create_module_v2() interface has a fifth parameter which
+** is a pointer to a destructor for the pClientData. ^SQLite will
+** invoke the destructor function (if it is not NULL) when SQLite
+** no longer needs the pClientData pointer. ^The destructor will also
+** be invoked if the call to sqlite3_create_module_v2() fails.
+** ^The sqlite3_create_module()
+** interface is equivalent to sqlite3_create_module_v2() with a NULL
+** destructor.
+**
+** ^If the third parameter (the pointer to the sqlite3_module object) is
+** NULL then no new module is created and any existing modules with the
+** same name are dropped.
+**
+** See also: [sqlite3_drop_modules()]
+ */
+// llgo:link (*Sqlite3).CreateModule C.sqlite3_create_module
+func (recv_ *Sqlite3) CreateModule(zName *c.Char, p *Module, pClientData c.Pointer) c.Int {
+ return 0
+}
+
+// llgo:link (*Sqlite3).CreateModuleV2 C.sqlite3_create_module_v2
+func (recv_ *Sqlite3) CreateModuleV2(zName *c.Char, p *Module, pClientData c.Pointer, xDestroy func(c.Pointer)) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Remove Unnecessary Virtual Table Implementations
+** METHOD: sqlite3
+**
+** ^The sqlite3_drop_modules(D,L) interface removes all virtual
+** table modules from database connection D except those named on list L.
+** The L parameter must be either NULL or a pointer to an array of pointers
+** to strings where the array is terminated by a single NULL pointer.
+** ^If the L parameter is NULL, then all virtual table modules are removed.
+**
+** See also: [sqlite3_create_module()]
+ */
+// llgo:link (*Sqlite3).DropModules C.sqlite3_drop_modules
+func (recv_ *Sqlite3) DropModules(azKeep **c.Char) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Declare The Schema Of A Virtual Table
+**
+** ^The [xCreate] and [xConnect] methods of a
+** [virtual table module] call this interface
+** to declare the format (the names and datatypes of the columns) of
+** the virtual tables they implement.
+ */
+// llgo:link (*Sqlite3).DeclareVtab C.sqlite3_declare_vtab
+func (recv_ *Sqlite3) DeclareVtab(zSQL *c.Char) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Overload A Function For A Virtual Table
+** METHOD: sqlite3
+**
+** ^(Virtual tables can provide alternative implementations of functions
+** using the [xFindFunction] method of the [virtual table module].
+** But global versions of those functions
+** must exist in order to be overloaded.)^
+**
+** ^(This API makes sure a global version of a function with a particular
+** name and number of parameters exists. If no such function exists
+** before this API is called, a new function is created.)^ ^The implementation
+** of the new function always causes an exception to be thrown. So
+** the new function is not good for anything by itself. Its only
+** purpose is to be a placeholder function that can be overloaded
+** by a [virtual table].
+ */
+// llgo:link (*Sqlite3).OverloadFunction C.sqlite3_overload_function
+func (recv_ *Sqlite3) OverloadFunction(zFuncName *c.Char, nArg c.Int) c.Int {
+ return 0
+}
+
+type Blob struct {
+ Unused [8]uint8
+}
+
+/*
+** CAPI3REF: Open A BLOB For Incremental I/O
+** METHOD: sqlite3
+** CONSTRUCTOR: sqlite3_blob
+**
+** ^(This interfaces opens a [BLOB handle | handle] to the BLOB located
+** in row iRow, column zColumn, table zTable in database zDb;
+** in other words, the same BLOB that would be selected by:
+**
+**
+** SELECT zColumn FROM zDb.zTable WHERE [rowid] = iRow;
+**
)^
+**
+** ^(Parameter zDb is not the filename that contains the database, but
+** rather the symbolic name of the database. For attached databases, this is
+** the name that appears after the AS keyword in the [ATTACH] statement.
+** For the main database file, the database name is "main". For TEMP
+** tables, the database name is "temp".)^
+**
+** ^If the flags parameter is non-zero, then the BLOB is opened for read
+** and write access. ^If the flags parameter is zero, the BLOB is opened for
+** read-only access.
+**
+** ^(On success, [SQLITE_OK] is returned and the new [BLOB handle] is stored
+** in *ppBlob. Otherwise an [error code] is returned and, unless the error
+** code is SQLITE_MISUSE, *ppBlob is set to NULL.)^ ^This means that, provided
+** the API is not misused, it is always safe to call [sqlite3_blob_close()]
+** on *ppBlob after this function it returns.
+**
+** This function fails with SQLITE_ERROR if any of the following are true:
+**
+** - ^(Database zDb does not exist)^,
+**
- ^(Table zTable does not exist within database zDb)^,
+**
- ^(Table zTable is a WITHOUT ROWID table)^,
+**
- ^(Column zColumn does not exist)^,
+**
- ^(Row iRow is not present in the table)^,
+**
- ^(The specified column of row iRow contains a value that is not
+** a TEXT or BLOB value)^,
+**
- ^(Column zColumn is part of an index, PRIMARY KEY or UNIQUE
+** constraint and the blob is being opened for read/write access)^,
+**
- ^([foreign key constraints | Foreign key constraints] are enabled,
+** column zColumn is part of a [child key] definition and the blob is
+** being opened for read/write access)^.
+**
+**
+** ^Unless it returns SQLITE_MISUSE, this function sets the
+** [database connection] error code and message accessible via
+** [sqlite3_errcode()] and [sqlite3_errmsg()] and related functions.
+**
+** A BLOB referenced by sqlite3_blob_open() may be read using the
+** [sqlite3_blob_read()] interface and modified by using
+** [sqlite3_blob_write()]. The [BLOB handle] can be moved to a
+** different row of the same table using the [sqlite3_blob_reopen()]
+** interface. However, the column, table, or database of a [BLOB handle]
+** cannot be changed after the [BLOB handle] is opened.
+**
+** ^(If the row that a BLOB handle points to is modified by an
+** [UPDATE], [DELETE], or by [ON CONFLICT] side-effects
+** then the BLOB handle is marked as "expired".
+** This is true if any column of the row is changed, even a column
+** other than the one the BLOB handle is open on.)^
+** ^Calls to [sqlite3_blob_read()] and [sqlite3_blob_write()] for
+** an expired BLOB handle fail with a return code of [SQLITE_ABORT].
+** ^(Changes written into a BLOB prior to the BLOB expiring are not
+** rolled back by the expiration of the BLOB. Such changes will eventually
+** commit if the transaction continues to completion.)^
+**
+** ^Use the [sqlite3_blob_bytes()] interface to determine the size of
+** the opened blob. ^The size of a blob may not be changed by this
+** interface. Use the [UPDATE] SQL command to change the size of a
+** blob.
+**
+** ^The [sqlite3_bind_zeroblob()] and [sqlite3_result_zeroblob()] interfaces
+** and the built-in [zeroblob] SQL function may be used to create a
+** zero-filled blob to read or write using the incremental-blob interface.
+**
+** To avoid a resource leak, every open [BLOB handle] should eventually
+** be released by a call to [sqlite3_blob_close()].
+**
+** See also: [sqlite3_blob_close()],
+** [sqlite3_blob_reopen()], [sqlite3_blob_read()],
+** [sqlite3_blob_bytes()], [sqlite3_blob_write()].
+ */
+// llgo:link (*Sqlite3).BlobOpen C.sqlite3_blob_open
+func (recv_ *Sqlite3) BlobOpen(zDb *c.Char, zTable *c.Char, zColumn *c.Char, iRow Int64, flags c.Int, ppBlob **Blob) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Move a BLOB Handle to a New Row
+** METHOD: sqlite3_blob
+**
+** ^This function is used to move an existing [BLOB handle] so that it points
+** to a different row of the same database table. ^The new row is identified
+** by the rowid value passed as the second argument. Only the row can be
+** changed. ^The database, table and column on which the blob handle is open
+** remain the same. Moving an existing [BLOB handle] to a new row is
+** faster than closing the existing handle and opening a new one.
+**
+** ^(The new row must meet the same criteria as for [sqlite3_blob_open()] -
+** it must exist and there must be either a blob or text value stored in
+** the nominated column.)^ ^If the new row is not present in the table, or if
+** it does not contain a blob or text value, or if another error occurs, an
+** SQLite error code is returned and the blob handle is considered aborted.
+** ^All subsequent calls to [sqlite3_blob_read()], [sqlite3_blob_write()] or
+** [sqlite3_blob_reopen()] on an aborted blob handle immediately return
+** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle
+** always returns zero.
+**
+** ^This function sets the database handle error code and message.
+ */
+// llgo:link (*Blob).BlobReopen C.sqlite3_blob_reopen
+func (recv_ *Blob) BlobReopen(Int64) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Close A BLOB Handle
+** DESTRUCTOR: sqlite3_blob
+**
+** ^This function closes an open [BLOB handle]. ^(The BLOB handle is closed
+** unconditionally. Even if this routine returns an error code, the
+** handle is still closed.)^
+**
+** ^If the blob handle being closed was opened for read-write access, and if
+** the database is in auto-commit mode and there are no other open read-write
+** blob handles or active write statements, the current transaction is
+** committed. ^If an error occurs while committing the transaction, an error
+** code is returned and the transaction rolled back.
+**
+** Calling this function with an argument that is not a NULL pointer or an
+** open blob handle results in undefined behavior. ^Calling this routine
+** with a null pointer (such as would be returned by a failed call to
+** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function
+** is passed a valid open blob handle, the values returned by the
+** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning.
+ */
+// llgo:link (*Blob).BlobClose C.sqlite3_blob_close
+func (recv_ *Blob) BlobClose() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Return The Size Of An Open BLOB
+** METHOD: sqlite3_blob
+**
+** ^Returns the size in bytes of the BLOB accessible via the
+** successfully opened [BLOB handle] in its only argument. ^The
+** incremental blob I/O routines can only read or overwriting existing
+** blob content; they cannot change the size of a blob.
+**
+** This routine only works on a [BLOB handle] which has been created
+** by a prior successful call to [sqlite3_blob_open()] and which has not
+** been closed by [sqlite3_blob_close()]. Passing any other pointer in
+** to this routine results in undefined and probably undesirable behavior.
+ */
+// llgo:link (*Blob).BlobBytes C.sqlite3_blob_bytes
+func (recv_ *Blob) BlobBytes() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Read Data From A BLOB Incrementally
+** METHOD: sqlite3_blob
+**
+** ^(This function is used to read data from an open [BLOB handle] into a
+** caller-supplied buffer. N bytes of data are copied into buffer Z
+** from the open BLOB, starting at offset iOffset.)^
+**
+** ^If offset iOffset is less than N bytes from the end of the BLOB,
+** [SQLITE_ERROR] is returned and no data is read. ^If N or iOffset is
+** less than zero, [SQLITE_ERROR] is returned and no data is read.
+** ^The size of the blob (and hence the maximum value of N+iOffset)
+** can be determined using the [sqlite3_blob_bytes()] interface.
+**
+** ^An attempt to read from an expired [BLOB handle] fails with an
+** error code of [SQLITE_ABORT].
+**
+** ^(On success, sqlite3_blob_read() returns SQLITE_OK.
+** Otherwise, an [error code] or an [extended error code] is returned.)^
+**
+** This routine only works on a [BLOB handle] which has been created
+** by a prior successful call to [sqlite3_blob_open()] and which has not
+** been closed by [sqlite3_blob_close()]. Passing any other pointer in
+** to this routine results in undefined and probably undesirable behavior.
+**
+** See also: [sqlite3_blob_write()].
+ */
+// llgo:link (*Blob).BlobRead C.sqlite3_blob_read
+func (recv_ *Blob) BlobRead(Z c.Pointer, N c.Int, iOffset c.Int) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Write Data Into A BLOB Incrementally
+** METHOD: sqlite3_blob
+**
+** ^(This function is used to write data into an open [BLOB handle] from a
+** caller-supplied buffer. N bytes of data are copied from the buffer Z
+** into the open BLOB, starting at offset iOffset.)^
+**
+** ^(On success, sqlite3_blob_write() returns SQLITE_OK.
+** Otherwise, an [error code] or an [extended error code] is returned.)^
+** ^Unless SQLITE_MISUSE is returned, this function sets the
+** [database connection] error code and message accessible via
+** [sqlite3_errcode()] and [sqlite3_errmsg()] and related functions.
+**
+** ^If the [BLOB handle] passed as the first argument was not opened for
+** writing (the flags parameter to [sqlite3_blob_open()] was zero),
+** this function returns [SQLITE_READONLY].
+**
+** This function may only modify the contents of the BLOB; it is
+** not possible to increase the size of a BLOB using this API.
+** ^If offset iOffset is less than N bytes from the end of the BLOB,
+** [SQLITE_ERROR] is returned and no data is written. The size of the
+** BLOB (and hence the maximum value of N+iOffset) can be determined
+** using the [sqlite3_blob_bytes()] interface. ^If N or iOffset are less
+** than zero [SQLITE_ERROR] is returned and no data is written.
+**
+** ^An attempt to write to an expired [BLOB handle] fails with an
+** error code of [SQLITE_ABORT]. ^Writes to the BLOB that occurred
+** before the [BLOB handle] expired are not rolled back by the
+** expiration of the handle, though of course those changes might
+** have been overwritten by the statement that expired the BLOB handle
+** or by other independent statements.
+**
+** This routine only works on a [BLOB handle] which has been created
+** by a prior successful call to [sqlite3_blob_open()] and which has not
+** been closed by [sqlite3_blob_close()]. Passing any other pointer in
+** to this routine results in undefined and probably undesirable behavior.
+**
+** See also: [sqlite3_blob_read()].
+ */
+// llgo:link (*Blob).BlobWrite C.sqlite3_blob_write
+func (recv_ *Blob) BlobWrite(z c.Pointer, n c.Int, iOffset c.Int) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Virtual File System Objects
+**
+** A virtual filesystem (VFS) is an [sqlite3_vfs] object
+** that SQLite uses to interact
+** with the underlying operating system. Most SQLite builds come with a
+** single default VFS that is appropriate for the host computer.
+** New VFSes can be registered and existing VFSes can be unregistered.
+** The following interfaces are provided.
+**
+** ^The sqlite3_vfs_find() interface returns a pointer to a VFS given its name.
+** ^Names are case sensitive.
+** ^Names are zero-terminated UTF-8 strings.
+** ^If there is no match, a NULL pointer is returned.
+** ^If zVfsName is NULL then the default VFS is returned.
+**
+** ^New VFSes are registered with sqlite3_vfs_register().
+** ^Each new VFS becomes the default VFS if the makeDflt flag is set.
+** ^The same VFS can be registered multiple times without injury.
+** ^To make an existing VFS into the default VFS, register it again
+** with the makeDflt flag set. If two different VFSes with the
+** same name are registered, the behavior is undefined. If a
+** VFS is registered with a name that is NULL or an empty string,
+** then the behavior is undefined.
+**
+** ^Unregister a VFS with the sqlite3_vfs_unregister() interface.
+** ^(If the default VFS is unregistered, another VFS is chosen as
+** the default. The choice for the new VFS is arbitrary.)^
+ */
+//go:linkname VfsFind C.sqlite3_vfs_find
+func VfsFind(zVfsName *c.Char) *Vfs
+
+// llgo:link (*Vfs).VfsRegister C.sqlite3_vfs_register
+func (recv_ *Vfs) VfsRegister(makeDflt c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*Vfs).VfsUnregister C.sqlite3_vfs_unregister
+func (recv_ *Vfs) VfsUnregister() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Mutexes
+**
+** The SQLite core uses these routines for thread
+** synchronization. Though they are intended for internal
+** use by SQLite, code that links against SQLite is
+** permitted to use any of these routines.
+**
+** The SQLite source code contains multiple implementations
+** of these mutex routines. An appropriate implementation
+** is selected automatically at compile-time. The following
+** implementations are available in the SQLite core:
+**
+**
+** - SQLITE_MUTEX_PTHREADS
+**
- SQLITE_MUTEX_W32
+**
- SQLITE_MUTEX_NOOP
+**
+**
+** The SQLITE_MUTEX_NOOP implementation is a set of routines
+** that does no real locking and is appropriate for use in
+** a single-threaded application. The SQLITE_MUTEX_PTHREADS and
+** SQLITE_MUTEX_W32 implementations are appropriate for use on Unix
+** and Windows.
+**
+** If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor
+** macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex
+** implementation is included with the library. In this case the
+** application must supply a custom mutex implementation using the
+** [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function
+** before calling sqlite3_initialize() or any other public sqlite3_
+** function that calls sqlite3_initialize().
+**
+** ^The sqlite3_mutex_alloc() routine allocates a new
+** mutex and returns a pointer to it. ^The sqlite3_mutex_alloc()
+** routine returns NULL if it is unable to allocate the requested
+** mutex. The argument to sqlite3_mutex_alloc() must one of these
+** integer constants:
+**
+**
+** - SQLITE_MUTEX_FAST
+**
- SQLITE_MUTEX_RECURSIVE
+**
- SQLITE_MUTEX_STATIC_MAIN
+**
- SQLITE_MUTEX_STATIC_MEM
+**
- SQLITE_MUTEX_STATIC_OPEN
+**
- SQLITE_MUTEX_STATIC_PRNG
+**
- SQLITE_MUTEX_STATIC_LRU
+**
- SQLITE_MUTEX_STATIC_PMEM
+**
- SQLITE_MUTEX_STATIC_APP1
+**
- SQLITE_MUTEX_STATIC_APP2
+**
- SQLITE_MUTEX_STATIC_APP3
+**
- SQLITE_MUTEX_STATIC_VFS1
+**
- SQLITE_MUTEX_STATIC_VFS2
+**
- SQLITE_MUTEX_STATIC_VFS3
+**
+**
+** ^The first two constants (SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE)
+** cause sqlite3_mutex_alloc() to create
+** a new mutex. ^The new mutex is recursive when SQLITE_MUTEX_RECURSIVE
+** is used but not necessarily so when SQLITE_MUTEX_FAST is used.
+** The mutex implementation does not need to make a distinction
+** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does
+** not want to. SQLite will only request a recursive mutex in
+** cases where it really needs one. If a faster non-recursive mutex
+** implementation is available on the host platform, the mutex subsystem
+** might return such a mutex in response to SQLITE_MUTEX_FAST.
+**
+** ^The other allowed parameters to sqlite3_mutex_alloc() (anything other
+** than SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) each return
+** a pointer to a static preexisting mutex. ^Nine static mutexes are
+** used by the current version of SQLite. Future versions of SQLite
+** may add additional static mutexes. Static mutexes are for internal
+** use by SQLite only. Applications that use SQLite mutexes should
+** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or
+** SQLITE_MUTEX_RECURSIVE.
+**
+** ^Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST
+** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()
+** returns a different mutex on every call. ^For the static
+** mutex types, the same mutex is returned on every call that has
+** the same type number.
+**
+** ^The sqlite3_mutex_free() routine deallocates a previously
+** allocated dynamic mutex. Attempting to deallocate a static
+** mutex results in undefined behavior.
+**
+** ^The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
+** to enter a mutex. ^If another thread is already within the mutex,
+** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return
+** SQLITE_BUSY. ^The sqlite3_mutex_try() interface returns [SQLITE_OK]
+** upon successful entry. ^(Mutexes created using
+** SQLITE_MUTEX_RECURSIVE can be entered multiple times by the same thread.
+** In such cases, the
+** mutex must be exited an equal number of times before another thread
+** can enter.)^ If the same thread tries to enter any mutex other
+** than an SQLITE_MUTEX_RECURSIVE more than once, the behavior is undefined.
+**
+** ^(Some systems (for example, Windows 95) do not support the operation
+** implemented by sqlite3_mutex_try(). On those systems, sqlite3_mutex_try()
+** will always return SQLITE_BUSY. In most cases the SQLite core only uses
+** sqlite3_mutex_try() as an optimization, so this is acceptable
+** behavior. The exceptions are unix builds that set the
+** SQLITE_ENABLE_SETLK_TIMEOUT build option. In that case a working
+** sqlite3_mutex_try() is required.)^
+**
+** ^The sqlite3_mutex_leave() routine exits a mutex that was
+** previously entered by the same thread. The behavior
+** is undefined if the mutex is not currently entered by the
+** calling thread or is not currently allocated.
+**
+** ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(),
+** sqlite3_mutex_leave(), or sqlite3_mutex_free() is a NULL pointer,
+** then any of the four routines behaves as a no-op.
+**
+** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
+ */
+//go:linkname MutexAlloc C.sqlite3_mutex_alloc
+func MutexAlloc(c.Int) *Mutex
+
+// llgo:link (*Mutex).MutexFree C.sqlite3_mutex_free
+func (recv_ *Mutex) MutexFree() {
+}
+
+// llgo:link (*Mutex).MutexEnter C.sqlite3_mutex_enter
+func (recv_ *Mutex) MutexEnter() {
+}
+
+// llgo:link (*Mutex).MutexTry C.sqlite3_mutex_try
+func (recv_ *Mutex) MutexTry() c.Int {
+ return 0
+}
+
+// llgo:link (*Mutex).MutexLeave C.sqlite3_mutex_leave
+func (recv_ *Mutex) MutexLeave() {
+}
+
+type MutexMethods struct {
+ XMutexInit c.Pointer
+ XMutexEnd c.Pointer
+ XMutexAlloc c.Pointer
+ XMutexFree c.Pointer
+ XMutexEnter c.Pointer
+ XMutexTry c.Pointer
+ XMutexLeave c.Pointer
+ XMutexHeld c.Pointer
+ XMutexNotheld c.Pointer
+}
+
+/*
+** CAPI3REF: Retrieve the mutex for a database connection
+** METHOD: sqlite3
+**
+** ^This interface returns a pointer the [sqlite3_mutex] object that
+** serializes access to the [database connection] given in the argument
+** when the [threading mode] is Serialized.
+** ^If the [threading mode] is Single-thread or Multi-thread then this
+** routine returns a NULL pointer.
+ */
+// llgo:link (*Sqlite3).DbMutex C.sqlite3_db_mutex
+func (recv_ *Sqlite3) DbMutex() *Mutex {
+ return nil
+}
+
+/*
+** CAPI3REF: Low-Level Control Of Database Files
+** METHOD: sqlite3
+** KEYWORDS: {file control}
+**
+** ^The [sqlite3_file_control()] interface makes a direct call to the
+** xFileControl method for the [sqlite3_io_methods] object associated
+** with a particular database identified by the second argument. ^The
+** name of the database is "main" for the main database or "temp" for the
+** TEMP database, or the name that appears after the AS keyword for
+** databases that are added using the [ATTACH] SQL command.
+** ^A NULL pointer can be used in place of "main" to refer to the
+** main database file.
+** ^The third and fourth parameters to this routine
+** are passed directly through to the second and third parameters of
+** the xFileControl method. ^The return value of the xFileControl
+** method becomes the return value of this routine.
+**
+** A few opcodes for [sqlite3_file_control()] are handled directly
+** by the SQLite core and never invoke the
+** sqlite3_io_methods.xFileControl method.
+** ^The [SQLITE_FCNTL_FILE_POINTER] value for the op parameter causes
+** a pointer to the underlying [sqlite3_file] object to be written into
+** the space pointed to by the 4th parameter. The
+** [SQLITE_FCNTL_JOURNAL_POINTER] works similarly except that it returns
+** the [sqlite3_file] object associated with the journal file instead of
+** the main database. The [SQLITE_FCNTL_VFS_POINTER] opcode returns
+** a pointer to the underlying [sqlite3_vfs] object for the file.
+** The [SQLITE_FCNTL_DATA_VERSION] returns the data version counter
+** from the pager.
+**
+** ^If the second parameter (zDbName) does not match the name of any
+** open database file, then SQLITE_ERROR is returned. ^This error
+** code is not remembered and will not be recalled by [sqlite3_errcode()]
+** or [sqlite3_errmsg()]. The underlying xFileControl method might
+** also return SQLITE_ERROR. There is no way to distinguish between
+** an incorrect zDbName and an SQLITE_ERROR return from the underlying
+** xFileControl method.
+**
+** See also: [file control opcodes]
+ */
+// llgo:link (*Sqlite3).FileControl C.sqlite3_file_control
+func (recv_ *Sqlite3) FileControl(zDbName *c.Char, op c.Int, __llgo_arg_2 c.Pointer) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Testing Interface
+**
+** ^The sqlite3_test_control() interface is used to read out internal
+** state of SQLite and to inject faults into SQLite for testing
+** purposes. ^The first parameter is an operation code that determines
+** the number, meaning, and operation of all subsequent parameters.
+**
+** This interface is not for use by applications. It exists solely
+** for verifying the correct operation of the SQLite library. Depending
+** on how the SQLite library is compiled, this interface might not exist.
+**
+** The details of the operation codes, their meanings, the parameters
+** they take, and what they do are all subject to change without notice.
+** Unlike most of the SQLite API, this function is not guaranteed to
+** operate consistently from one release to the next.
+ */
+//go:linkname TestControl C.sqlite3_test_control
+func TestControl(op c.Int, __llgo_va_list ...interface{}) c.Int
+
+/*
+** CAPI3REF: SQL Keyword Checking
+**
+** These routines provide access to the set of SQL language keywords
+** recognized by SQLite. Applications can uses these routines to determine
+** whether or not a specific identifier needs to be escaped (for example,
+** by enclosing in double-quotes) so as not to confuse the parser.
+**
+** The sqlite3_keyword_count() interface returns the number of distinct
+** keywords understood by SQLite.
+**
+** The sqlite3_keyword_name(N,Z,L) interface finds the 0-based N-th keyword and
+** makes *Z point to that keyword expressed as UTF8 and writes the number
+** of bytes in the keyword into *L. The string that *Z points to is not
+** zero-terminated. The sqlite3_keyword_name(N,Z,L) routine returns
+** SQLITE_OK if N is within bounds and SQLITE_ERROR if not. If either Z
+** or L are NULL or invalid pointers then calls to
+** sqlite3_keyword_name(N,Z,L) result in undefined behavior.
+**
+** The sqlite3_keyword_check(Z,L) interface checks to see whether or not
+** the L-byte UTF8 identifier that Z points to is a keyword, returning non-zero
+** if it is and zero if not.
+**
+** The parser used by SQLite is forgiving. It is often possible to use
+** a keyword as an identifier as long as such use does not result in a
+** parsing ambiguity. For example, the statement
+** "CREATE TABLE BEGIN(REPLACE,PRAGMA,END);" is accepted by SQLite, and
+** creates a new table named "BEGIN" with three columns named
+** "REPLACE", "PRAGMA", and "END". Nevertheless, best practice is to avoid
+** using keywords as identifiers. Common techniques used to avoid keyword
+** name collisions include:
+**
+** - Put all identifier names inside double-quotes. This is the official
+** SQL way to escape identifier names.
+**
- Put identifier names inside [...]. This is not standard SQL,
+** but it is what SQL Server does and so lots of programmers use this
+** technique.
+**
- Begin every identifier with the letter "Z" as no SQL keywords start
+** with "Z".
+**
- Include a digit somewhere in every identifier name.
+**
+**
+** Note that the number of keywords understood by SQLite can depend on
+** compile-time options. For example, "VACUUM" is not a keyword if
+** SQLite is compiled with the [-DSQLITE_OMIT_VACUUM] option. Also,
+** new keywords may be added to future releases of SQLite.
+ */
+//go:linkname KeywordCount C.sqlite3_keyword_count
+func KeywordCount() c.Int
+
+//go:linkname KeywordName C.sqlite3_keyword_name
+func KeywordName(c.Int, **c.Char, *c.Int) c.Int
+
+//go:linkname KeywordCheck C.sqlite3_keyword_check
+func KeywordCheck(*c.Char, c.Int) c.Int
+
+type Str struct {
+ Unused [8]uint8
+}
+
+/*
+** CAPI3REF: Create A New Dynamic String Object
+** CONSTRUCTOR: sqlite3_str
+**
+** ^The [sqlite3_str_new(D)] interface allocates and initializes
+** a new [sqlite3_str] object. To avoid memory leaks, the object returned by
+** [sqlite3_str_new()] must be freed by a subsequent call to
+** [sqlite3_str_finish(X)].
+**
+** ^The [sqlite3_str_new(D)] interface always returns a pointer to a
+** valid [sqlite3_str] object, though in the event of an out-of-memory
+** error the returned object might be a special singleton that will
+** silently reject new text, always return SQLITE_NOMEM from
+** [sqlite3_str_errcode()], always return 0 for
+** [sqlite3_str_length()], and always return NULL from
+** [sqlite3_str_finish(X)]. It is always safe to use the value
+** returned by [sqlite3_str_new(D)] as the sqlite3_str parameter
+** to any of the other [sqlite3_str] methods.
+**
+** The D parameter to [sqlite3_str_new(D)] may be NULL. If the
+** D parameter in [sqlite3_str_new(D)] is not NULL, then the maximum
+** length of the string contained in the [sqlite3_str] object will be
+** the value set for [sqlite3_limit](D,[SQLITE_LIMIT_LENGTH]) instead
+** of [SQLITE_MAX_LENGTH].
+ */
+// llgo:link (*Sqlite3).StrNew C.sqlite3_str_new
+func (recv_ *Sqlite3) StrNew() *Str {
+ return nil
+}
+
+/*
+** CAPI3REF: Finalize A Dynamic String
+** DESTRUCTOR: sqlite3_str
+**
+** ^The [sqlite3_str_finish(X)] interface destroys the sqlite3_str object X
+** and returns a pointer to a memory buffer obtained from [sqlite3_malloc64()]
+** that contains the constructed string. The calling application should
+** pass the returned value to [sqlite3_free()] to avoid a memory leak.
+** ^The [sqlite3_str_finish(X)] interface may return a NULL pointer if any
+** errors were encountered during construction of the string. ^The
+** [sqlite3_str_finish(X)] interface will also return a NULL pointer if the
+** string in [sqlite3_str] object X is zero bytes long.
+ */
+// llgo:link (*Str).StrFinish C.sqlite3_str_finish
+func (recv_ *Str) StrFinish() *c.Char {
+ return nil
+}
+
+/*
+** CAPI3REF: Add Content To A Dynamic String
+** METHOD: sqlite3_str
+**
+** These interfaces add content to an sqlite3_str object previously obtained
+** from [sqlite3_str_new()].
+**
+** ^The [sqlite3_str_appendf(X,F,...)] and
+** [sqlite3_str_vappendf(X,F,V)] interfaces uses the [built-in printf]
+** functionality of SQLite to append formatted text onto the end of
+** [sqlite3_str] object X.
+**
+** ^The [sqlite3_str_append(X,S,N)] method appends exactly N bytes from string S
+** onto the end of the [sqlite3_str] object X. N must be non-negative.
+** S must contain at least N non-zero bytes of content. To append a
+** zero-terminated string in its entirety, use the [sqlite3_str_appendall()]
+** method instead.
+**
+** ^The [sqlite3_str_appendall(X,S)] method appends the complete content of
+** zero-terminated string S onto the end of [sqlite3_str] object X.
+**
+** ^The [sqlite3_str_appendchar(X,N,C)] method appends N copies of the
+** single-byte character C onto the end of [sqlite3_str] object X.
+** ^This method can be used, for example, to add whitespace indentation.
+**
+** ^The [sqlite3_str_reset(X)] method resets the string under construction
+** inside [sqlite3_str] object X back to zero bytes in length.
+**
+** These methods do not return a result code. ^If an error occurs, that fact
+** is recorded in the [sqlite3_str] object and can be recovered by a
+** subsequent call to [sqlite3_str_errcode(X)].
+ */
+//go:linkname StrAppendf C.sqlite3_str_appendf
+func StrAppendf(__llgo_arg_0 *Str, zFormat *c.Char, __llgo_va_list ...interface{})
+
+// llgo:link (*Str).StrVappendf C.sqlite3_str_vappendf
+func (recv_ *Str) StrVappendf(zFormat *c.Char, __llgo_arg_1 c.VaList) {
+}
+
+// llgo:link (*Str).StrAppend C.sqlite3_str_append
+func (recv_ *Str) StrAppend(zIn *c.Char, N c.Int) {
+}
+
+// llgo:link (*Str).StrAppendall C.sqlite3_str_appendall
+func (recv_ *Str) StrAppendall(zIn *c.Char) {
+}
+
+// llgo:link (*Str).StrAppendchar C.sqlite3_str_appendchar
+func (recv_ *Str) StrAppendchar(N c.Int, C c.Char) {
+}
+
+// llgo:link (*Str).StrReset C.sqlite3_str_reset
+func (recv_ *Str) StrReset() {
+}
+
+/*
+** CAPI3REF: Status Of A Dynamic String
+** METHOD: sqlite3_str
+**
+** These interfaces return the current status of an [sqlite3_str] object.
+**
+** ^If any prior errors have occurred while constructing the dynamic string
+** in sqlite3_str X, then the [sqlite3_str_errcode(X)] method will return
+** an appropriate error code. ^The [sqlite3_str_errcode(X)] method returns
+** [SQLITE_NOMEM] following any out-of-memory error, or
+** [SQLITE_TOOBIG] if the size of the dynamic string exceeds
+** [SQLITE_MAX_LENGTH], or [SQLITE_OK] if there have been no errors.
+**
+** ^The [sqlite3_str_length(X)] method returns the current length, in bytes,
+** of the dynamic string under construction in [sqlite3_str] object X.
+** ^The length returned by [sqlite3_str_length(X)] does not include the
+** zero-termination byte.
+**
+** ^The [sqlite3_str_value(X)] method returns a pointer to the current
+** content of the dynamic string under construction in X. The value
+** returned by [sqlite3_str_value(X)] is managed by the sqlite3_str object X
+** and might be freed or altered by any subsequent method on the same
+** [sqlite3_str] object. Applications must not used the pointer returned
+** [sqlite3_str_value(X)] after any subsequent method call on the same
+** object. ^Applications may change the content of the string returned
+** by [sqlite3_str_value(X)] as long as they do not write into any bytes
+** outside the range of 0 to [sqlite3_str_length(X)] and do not read or
+** write any byte after any subsequent sqlite3_str method call.
+ */
+// llgo:link (*Str).StrErrcode C.sqlite3_str_errcode
+func (recv_ *Str) StrErrcode() c.Int {
+ return 0
+}
+
+// llgo:link (*Str).StrLength C.sqlite3_str_length
+func (recv_ *Str) StrLength() c.Int {
+ return 0
+}
+
+// llgo:link (*Str).StrValue C.sqlite3_str_value
+func (recv_ *Str) StrValue() *c.Char {
+ return nil
+}
+
+/*
+** CAPI3REF: SQLite Runtime Status
+**
+** ^These interfaces are used to retrieve runtime status information
+** about the performance of SQLite, and optionally to reset various
+** highwater marks. ^The first argument is an integer code for
+** the specific parameter to measure. ^(Recognized integer codes
+** are of the form [status parameters | SQLITE_STATUS_...].)^
+** ^The current value of the parameter is returned into *pCurrent.
+** ^The highest recorded value is returned in *pHighwater. ^If the
+** resetFlag is true, then the highest record value is reset after
+** *pHighwater is written. ^(Some parameters do not record the highest
+** value. For those parameters
+** nothing is written into *pHighwater and the resetFlag is ignored.)^
+** ^(Other parameters record only the highwater mark and not the current
+** value. For these latter parameters nothing is written into *pCurrent.)^
+**
+** ^The sqlite3_status() and sqlite3_status64() routines return
+** SQLITE_OK on success and a non-zero [error code] on failure.
+**
+** If either the current value or the highwater mark is too large to
+** be represented by a 32-bit integer, then the values returned by
+** sqlite3_status() are undefined.
+**
+** See also: [sqlite3_db_status()]
+ */
+//go:linkname Status C.sqlite3_status
+func Status(op c.Int, pCurrent *c.Int, pHighwater *c.Int, resetFlag c.Int) c.Int
+
+//go:linkname Status64 C.sqlite3_status64
+func Status64(op c.Int, pCurrent *Int64, pHighwater *Int64, resetFlag c.Int) c.Int
+
+/*
+** CAPI3REF: Database Connection Status
+** METHOD: sqlite3
+**
+** ^This interface is used to retrieve runtime status information
+** about a single [database connection]. ^The first argument is the
+** database connection object to be interrogated. ^The second argument
+** is an integer constant, taken from the set of
+** [SQLITE_DBSTATUS options], that
+** determines the parameter to interrogate. The set of
+** [SQLITE_DBSTATUS options] is likely
+** to grow in future releases of SQLite.
+**
+** ^The current value of the requested parameter is written into *pCur
+** and the highest instantaneous value is written into *pHiwtr. ^If
+** the resetFlg is true, then the highest instantaneous value is
+** reset back down to the current value.
+**
+** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a
+** non-zero [error code] on failure.
+**
+** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
+ */
+// llgo:link (*Sqlite3).DbStatus C.sqlite3_db_status
+func (recv_ *Sqlite3) DbStatus(op c.Int, pCur *c.Int, pHiwtr *c.Int, resetFlg c.Int) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Prepared Statement Status
+** METHOD: sqlite3_stmt
+**
+** ^(Each prepared statement maintains various
+** [SQLITE_STMTSTATUS counters] that measure the number
+** of times it has performed specific operations.)^ These counters can
+** be used to monitor the performance characteristics of the prepared
+** statements. For example, if the number of table steps greatly exceeds
+** the number of table searches or result rows, that would tend to indicate
+** that the prepared statement is using a full table scan rather than
+** an index.
+**
+** ^(This interface is used to retrieve and reset counter values from
+** a [prepared statement]. The first argument is the prepared statement
+** object to be interrogated. The second argument
+** is an integer code for a specific [SQLITE_STMTSTATUS counter]
+** to be interrogated.)^
+** ^The current value of the requested counter is returned.
+** ^If the resetFlg is true, then the counter is reset to zero after this
+** interface call returns.
+**
+** See also: [sqlite3_status()] and [sqlite3_db_status()].
+ */
+// llgo:link (*Stmt).StmtStatus C.sqlite3_stmt_status
+func (recv_ *Stmt) StmtStatus(op c.Int, resetFlg c.Int) c.Int {
+ return 0
+}
+
+type Pcache struct {
+ Unused [8]uint8
+}
+
+type PcachePage struct {
+ PBuf c.Pointer
+ PExtra c.Pointer
+}
+
+type PcacheMethods2 struct {
+ IVersion c.Int
+ PArg c.Pointer
+ XInit c.Pointer
+ XShutdown c.Pointer
+ XCreate c.Pointer
+ XCachesize c.Pointer
+ XPagecount c.Pointer
+ XFetch c.Pointer
+ XUnpin c.Pointer
+ XRekey c.Pointer
+ XTruncate c.Pointer
+ XDestroy c.Pointer
+ XShrink c.Pointer
+}
+
+type PcacheMethods struct {
+ PArg c.Pointer
+ XInit c.Pointer
+ XShutdown c.Pointer
+ XCreate c.Pointer
+ XCachesize c.Pointer
+ XPagecount c.Pointer
+ XFetch c.Pointer
+ XUnpin c.Pointer
+ XRekey c.Pointer
+ XTruncate c.Pointer
+ XDestroy c.Pointer
+}
+
+type Backup struct {
+ Unused [8]uint8
+}
+
+/*
+** CAPI3REF: Online Backup API.
+**
+** The backup API copies the content of one database into another.
+** It is useful either for creating backups of databases or
+** for copying in-memory databases to or from persistent files.
+**
+** See Also: [Using the SQLite Online Backup API]
+**
+** ^SQLite holds a write transaction open on the destination database file
+** for the duration of the backup operation.
+** ^The source database is read-locked only while it is being read;
+** it is not locked continuously for the entire backup operation.
+** ^Thus, the backup may be performed on a live source database without
+** preventing other database connections from
+** reading or writing to the source database while the backup is underway.
+**
+** ^(To perform a backup operation:
+**
+** - sqlite3_backup_init() is called once to initialize the
+** backup,
+**
- sqlite3_backup_step() is called one or more times to transfer
+** the data between the two databases, and finally
+**
- sqlite3_backup_finish() is called to release all resources
+** associated with the backup operation.
+**
)^
+** There should be exactly one call to sqlite3_backup_finish() for each
+** successful call to sqlite3_backup_init().
+**
+** [[sqlite3_backup_init()]] sqlite3_backup_init()
+**
+** ^The D and N arguments to sqlite3_backup_init(D,N,S,M) are the
+** [database connection] associated with the destination database
+** and the database name, respectively.
+** ^The database name is "main" for the main database, "temp" for the
+** temporary database, or the name specified after the AS keyword in
+** an [ATTACH] statement for an attached database.
+** ^The S and M arguments passed to
+** sqlite3_backup_init(D,N,S,M) identify the [database connection]
+** and database name of the source database, respectively.
+** ^The source and destination [database connections] (parameters S and D)
+** must be different or else sqlite3_backup_init(D,N,S,M) will fail with
+** an error.
+**
+** ^A call to sqlite3_backup_init() will fail, returning NULL, if
+** there is already a read or read-write transaction open on the
+** destination database.
+**
+** ^If an error occurs within sqlite3_backup_init(D,N,S,M), then NULL is
+** returned and an error code and error message are stored in the
+** destination [database connection] D.
+** ^The error code and message for the failed call to sqlite3_backup_init()
+** can be retrieved using the [sqlite3_errcode()], [sqlite3_errmsg()], and/or
+** [sqlite3_errmsg16()] functions.
+** ^A successful call to sqlite3_backup_init() returns a pointer to an
+** [sqlite3_backup] object.
+** ^The [sqlite3_backup] object may be used with the sqlite3_backup_step() and
+** sqlite3_backup_finish() functions to perform the specified backup
+** operation.
+**
+** [[sqlite3_backup_step()]] sqlite3_backup_step()
+**
+** ^Function sqlite3_backup_step(B,N) will copy up to N pages between
+** the source and destination databases specified by [sqlite3_backup] object B.
+** ^If N is negative, all remaining source pages are copied.
+** ^If sqlite3_backup_step(B,N) successfully copies N pages and there
+** are still more pages to be copied, then the function returns [SQLITE_OK].
+** ^If sqlite3_backup_step(B,N) successfully finishes copying all pages
+** from source to destination, then it returns [SQLITE_DONE].
+** ^If an error occurs while running sqlite3_backup_step(B,N),
+** then an [error code] is returned. ^As well as [SQLITE_OK] and
+** [SQLITE_DONE], a call to sqlite3_backup_step() may return [SQLITE_READONLY],
+** [SQLITE_NOMEM], [SQLITE_BUSY], [SQLITE_LOCKED], or an
+** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] extended error code.
+**
+** ^(The sqlite3_backup_step() might return [SQLITE_READONLY] if
+**
+** - the destination database was opened read-only, or
+**
- the destination database is using write-ahead-log journaling
+** and the destination and source page sizes differ, or
+**
- the destination database is an in-memory database and the
+** destination and source page sizes differ.
+**
)^
+**
+** ^If sqlite3_backup_step() cannot obtain a required file-system lock, then
+** the [sqlite3_busy_handler | busy-handler function]
+** is invoked (if one is specified). ^If the
+** busy-handler returns non-zero before the lock is available, then
+** [SQLITE_BUSY] is returned to the caller. ^In this case the call to
+** sqlite3_backup_step() can be retried later. ^If the source
+** [database connection]
+** is being used to write to the source database when sqlite3_backup_step()
+** is called, then [SQLITE_LOCKED] is returned immediately. ^Again, in this
+** case the call to sqlite3_backup_step() can be retried later on. ^(If
+** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX], [SQLITE_NOMEM], or
+** [SQLITE_READONLY] is returned, then
+** there is no point in retrying the call to sqlite3_backup_step(). These
+** errors are considered fatal.)^ The application must accept
+** that the backup operation has failed and pass the backup operation handle
+** to the sqlite3_backup_finish() to release associated resources.
+**
+** ^The first call to sqlite3_backup_step() obtains an exclusive lock
+** on the destination file. ^The exclusive lock is not released until either
+** sqlite3_backup_finish() is called or the backup operation is complete
+** and sqlite3_backup_step() returns [SQLITE_DONE]. ^Every call to
+** sqlite3_backup_step() obtains a [shared lock] on the source database that
+** lasts for the duration of the sqlite3_backup_step() call.
+** ^Because the source database is not locked between calls to
+** sqlite3_backup_step(), the source database may be modified mid-way
+** through the backup process. ^If the source database is modified by an
+** external process or via a database connection other than the one being
+** used by the backup operation, then the backup will be automatically
+** restarted by the next call to sqlite3_backup_step(). ^If the source
+** database is modified by the using the same database connection as is used
+** by the backup operation, then the backup database is automatically
+** updated at the same time.
+**
+** [[sqlite3_backup_finish()]] sqlite3_backup_finish()
+**
+** When sqlite3_backup_step() has returned [SQLITE_DONE], or when the
+** application wishes to abandon the backup operation, the application
+** should destroy the [sqlite3_backup] by passing it to sqlite3_backup_finish().
+** ^The sqlite3_backup_finish() interfaces releases all
+** resources associated with the [sqlite3_backup] object.
+** ^If sqlite3_backup_step() has not yet returned [SQLITE_DONE], then any
+** active write-transaction on the destination database is rolled back.
+** The [sqlite3_backup] object is invalid
+** and may not be used following a call to sqlite3_backup_finish().
+**
+** ^The value returned by sqlite3_backup_finish is [SQLITE_OK] if no
+** sqlite3_backup_step() errors occurred, regardless or whether or not
+** sqlite3_backup_step() completed.
+** ^If an out-of-memory condition or IO error occurred during any prior
+** sqlite3_backup_step() call on the same [sqlite3_backup] object, then
+** sqlite3_backup_finish() returns the corresponding [error code].
+**
+** ^A return of [SQLITE_BUSY] or [SQLITE_LOCKED] from sqlite3_backup_step()
+** is not a permanent error and does not affect the return value of
+** sqlite3_backup_finish().
+**
+** [[sqlite3_backup_remaining()]] [[sqlite3_backup_pagecount()]]
+** sqlite3_backup_remaining() and sqlite3_backup_pagecount()
+**
+** ^The sqlite3_backup_remaining() routine returns the number of pages still
+** to be backed up at the conclusion of the most recent sqlite3_backup_step().
+** ^The sqlite3_backup_pagecount() routine returns the total number of pages
+** in the source database at the conclusion of the most recent
+** sqlite3_backup_step().
+** ^(The values returned by these functions are only updated by
+** sqlite3_backup_step(). If the source database is modified in a way that
+** changes the size of the source database or the number of pages remaining,
+** those changes are not reflected in the output of sqlite3_backup_pagecount()
+** and sqlite3_backup_remaining() until after the next
+** sqlite3_backup_step().)^
+**
+** Concurrent Usage of Database Handles
+**
+** ^The source [database connection] may be used by the application for other
+** purposes while a backup operation is underway or being initialized.
+** ^If SQLite is compiled and configured to support threadsafe database
+** connections, then the source database connection may be used concurrently
+** from within other threads.
+**
+** However, the application must guarantee that the destination
+** [database connection] is not passed to any other API (by any thread) after
+** sqlite3_backup_init() is called and before the corresponding call to
+** sqlite3_backup_finish(). SQLite does not currently check to see
+** if the application incorrectly accesses the destination [database connection]
+** and so no error code is reported, but the operations may malfunction
+** nevertheless. Use of the destination database connection while a
+** backup is in progress might also cause a mutex deadlock.
+**
+** If running in [shared cache mode], the application must
+** guarantee that the shared cache used by the destination database
+** is not accessed while the backup is running. In practice this means
+** that the application must guarantee that the disk file being
+** backed up to is not accessed by any connection within the process,
+** not just the specific connection that was passed to sqlite3_backup_init().
+**
+** The [sqlite3_backup] object itself is partially threadsafe. Multiple
+** threads may safely make multiple concurrent calls to sqlite3_backup_step().
+** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()
+** APIs are not strictly speaking threadsafe. If they are invoked at the
+** same time as another thread is invoking sqlite3_backup_step() it is
+** possible that they return invalid values.
+**
+** Alternatives To Using The Backup API
+**
+** Other techniques for safely creating a consistent backup of an SQLite
+** database include:
+**
+**
+** - The [VACUUM INTO] command.
+**
- The [sqlite3_rsync] utility program.
+**
+ */
+// llgo:link (*Sqlite3).BackupInit C.sqlite3_backup_init
+func (recv_ *Sqlite3) BackupInit(zDestName *c.Char, pSource *Sqlite3, zSourceName *c.Char) *Backup {
+ return nil
+}
+
+// llgo:link (*Backup).BackupStep C.sqlite3_backup_step
+func (recv_ *Backup) BackupStep(nPage c.Int) c.Int {
+ return 0
+}
+
+// llgo:link (*Backup).BackupFinish C.sqlite3_backup_finish
+func (recv_ *Backup) BackupFinish() c.Int {
+ return 0
+}
+
+// llgo:link (*Backup).BackupRemaining C.sqlite3_backup_remaining
+func (recv_ *Backup) BackupRemaining() c.Int {
+ return 0
+}
+
+// llgo:link (*Backup).BackupPagecount C.sqlite3_backup_pagecount
+func (recv_ *Backup) BackupPagecount() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Unlock Notification
+** METHOD: sqlite3
+**
+** ^When running in shared-cache mode, a database operation may fail with
+** an [SQLITE_LOCKED] error if the required locks on the shared-cache or
+** individual tables within the shared-cache cannot be obtained. See
+** [SQLite Shared-Cache Mode] for a description of shared-cache locking.
+** ^This API may be used to register a callback that SQLite will invoke
+** when the connection currently holding the required lock relinquishes it.
+** ^This API is only available if the library was compiled with the
+** [SQLITE_ENABLE_UNLOCK_NOTIFY] C-preprocessor symbol defined.
+**
+** See Also: [Using the SQLite Unlock Notification Feature].
+**
+** ^Shared-cache locks are released when a database connection concludes
+** its current transaction, either by committing it or rolling it back.
+**
+** ^When a connection (known as the blocked connection) fails to obtain a
+** shared-cache lock and SQLITE_LOCKED is returned to the caller, the
+** identity of the database connection (the blocking connection) that
+** has locked the required resource is stored internally. ^After an
+** application receives an SQLITE_LOCKED error, it may call the
+** sqlite3_unlock_notify() method with the blocked connection handle as
+** the first argument to register for a callback that will be invoked
+** when the blocking connections current transaction is concluded. ^The
+** callback is invoked from within the [sqlite3_step] or [sqlite3_close]
+** call that concludes the blocking connection's transaction.
+**
+** ^(If sqlite3_unlock_notify() is called in a multi-threaded application,
+** there is a chance that the blocking connection will have already
+** concluded its transaction by the time sqlite3_unlock_notify() is invoked.
+** If this happens, then the specified callback is invoked immediately,
+** from within the call to sqlite3_unlock_notify().)^
+**
+** ^If the blocked connection is attempting to obtain a write-lock on a
+** shared-cache table, and more than one other connection currently holds
+** a read-lock on the same table, then SQLite arbitrarily selects one of
+** the other connections to use as the blocking connection.
+**
+** ^(There may be at most one unlock-notify callback registered by a
+** blocked connection. If sqlite3_unlock_notify() is called when the
+** blocked connection already has a registered unlock-notify callback,
+** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is
+** called with a NULL pointer as its second argument, then any existing
+** unlock-notify callback is canceled. ^The blocked connections
+** unlock-notify callback may also be canceled by closing the blocked
+** connection using [sqlite3_close()].
+**
+** The unlock-notify callback is not reentrant. If an application invokes
+** any sqlite3_xxx API functions from within an unlock-notify callback, a
+** crash or deadlock may be the result.
+**
+** ^Unless deadlock is detected (see below), sqlite3_unlock_notify() always
+** returns SQLITE_OK.
+**
+** Callback Invocation Details
+**
+** When an unlock-notify callback is registered, the application provides a
+** single void* pointer that is passed to the callback when it is invoked.
+** However, the signature of the callback function allows SQLite to pass
+** it an array of void* context pointers. The first argument passed to
+** an unlock-notify callback is a pointer to an array of void* pointers,
+** and the second is the number of entries in the array.
+**
+** When a blocking connection's transaction is concluded, there may be
+** more than one blocked connection that has registered for an unlock-notify
+** callback. ^If two or more such blocked connections have specified the
+** same callback function, then instead of invoking the callback function
+** multiple times, it is invoked once with the set of void* context pointers
+** specified by the blocked connections bundled together into an array.
+** This gives the application an opportunity to prioritize any actions
+** related to the set of unblocked database connections.
+**
+** Deadlock Detection
+**
+** Assuming that after registering for an unlock-notify callback a
+** database waits for the callback to be issued before taking any further
+** action (a reasonable assumption), then using this API may cause the
+** application to deadlock. For example, if connection X is waiting for
+** connection Y's transaction to be concluded, and similarly connection
+** Y is waiting on connection X's transaction, then neither connection
+** will proceed and the system may remain deadlocked indefinitely.
+**
+** To avoid this scenario, the sqlite3_unlock_notify() performs deadlock
+** detection. ^If a given call to sqlite3_unlock_notify() would put the
+** system in a deadlocked state, then SQLITE_LOCKED is returned and no
+** unlock-notify callback is registered. The system is said to be in
+** a deadlocked state if connection A has registered for an unlock-notify
+** callback on the conclusion of connection B's transaction, and connection
+** B has itself registered for an unlock-notify callback when connection
+** A's transaction is concluded. ^Indirect deadlock is also detected, so
+** the system is also considered to be deadlocked if connection B has
+** registered for an unlock-notify callback on the conclusion of connection
+** C's transaction, where connection C is waiting on connection A. ^Any
+** number of levels of indirection are allowed.
+**
+** The "DROP TABLE" Exception
+**
+** When a call to [sqlite3_step()] returns SQLITE_LOCKED, it is almost
+** always appropriate to call sqlite3_unlock_notify(). There is however,
+** one exception. When executing a "DROP TABLE" or "DROP INDEX" statement,
+** SQLite checks if there are any currently executing SELECT statements
+** that belong to the same connection. If there are, SQLITE_LOCKED is
+** returned. In this case there is no "blocking connection", so invoking
+** sqlite3_unlock_notify() results in the unlock-notify callback being
+** invoked immediately. If the application then re-attempts the "DROP TABLE"
+** or "DROP INDEX" query, an infinite loop might be the result.
+**
+** One way around this problem is to check the extended error code returned
+** by an sqlite3_step() call. ^(If there is a blocking connection, then the
+** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in
+** the special "DROP TABLE/INDEX" case, the extended error code is just
+** SQLITE_LOCKED.)^
+ */
+// llgo:link (*Sqlite3).UnlockNotify C.sqlite3_unlock_notify
+func (recv_ *Sqlite3) UnlockNotify(xNotify func(*c.Pointer, c.Int), pNotifyArg c.Pointer) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: String Comparison
+**
+** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications
+** and extensions to compare the contents of two buffers containing UTF-8
+** strings in a case-independent fashion, using the same definition of "case
+** independence" that SQLite uses internally when comparing identifiers.
+ */
+//go:linkname Stricmp C.sqlite3_stricmp
+func Stricmp(*c.Char, *c.Char) c.Int
+
+//go:linkname Strnicmp C.sqlite3_strnicmp
+func Strnicmp(*c.Char, *c.Char, c.Int) c.Int
+
+/*
+** CAPI3REF: String Globbing
+*
+** ^The [sqlite3_strglob(P,X)] interface returns zero if and only if
+** string X matches the [GLOB] pattern P.
+** ^The definition of [GLOB] pattern matching used in
+** [sqlite3_strglob(P,X)] is the same as for the "X GLOB P" operator in the
+** SQL dialect understood by SQLite. ^The [sqlite3_strglob(P,X)] function
+** is case sensitive.
+**
+** Note that this routine returns zero on a match and non-zero if the strings
+** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
+**
+** See also: [sqlite3_strlike()].
+ */
+//go:linkname Strglob C.sqlite3_strglob
+func Strglob(zGlob *c.Char, zStr *c.Char) c.Int
+
+/*
+** CAPI3REF: String LIKE Matching
+*
+** ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if
+** string X matches the [LIKE] pattern P with escape character E.
+** ^The definition of [LIKE] pattern matching used in
+** [sqlite3_strlike(P,X,E)] is the same as for the "X LIKE P ESCAPE E"
+** operator in the SQL dialect understood by SQLite. ^For "X LIKE P" without
+** the ESCAPE clause, set the E parameter of [sqlite3_strlike(P,X,E)] to 0.
+** ^As with the LIKE operator, the [sqlite3_strlike(P,X,E)] function is case
+** insensitive - equivalent upper and lower case ASCII characters match
+** one another.
+**
+** ^The [sqlite3_strlike(P,X,E)] function matches Unicode characters, though
+** only ASCII characters are case folded.
+**
+** Note that this routine returns zero on a match and non-zero if the strings
+** do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()].
+**
+** See also: [sqlite3_strglob()].
+ */
+//go:linkname Strlike C.sqlite3_strlike
+func Strlike(zGlob *c.Char, zStr *c.Char, cEsc c.Uint) c.Int
+
+/*
+** CAPI3REF: Error Logging Interface
+**
+** ^The [sqlite3_log()] interface writes a message into the [error log]
+** established by the [SQLITE_CONFIG_LOG] option to [sqlite3_config()].
+** ^If logging is enabled, the zFormat string and subsequent arguments are
+** used with [sqlite3_snprintf()] to generate the final output string.
+**
+** The sqlite3_log() interface is intended for use by extensions such as
+** virtual tables, collating functions, and SQL functions. While there is
+** nothing to prevent an application from calling sqlite3_log(), doing so
+** is considered bad form.
+**
+** The zFormat string must not be NULL.
+**
+** To avoid deadlocks and other threading problems, the sqlite3_log() routine
+** will not use dynamically allocated memory. The log message is stored in
+** a fixed-length buffer on the stack. If the log message is longer than
+** a few hundred characters, it will be truncated to the length of the
+** buffer.
+ */
+//go:linkname Log C.sqlite3_log
+func Log(iErrCode c.Int, zFormat *c.Char, __llgo_va_list ...interface{})
+
+/*
+** CAPI3REF: Write-Ahead Log Commit Hook
+** METHOD: sqlite3
+**
+** ^The [sqlite3_wal_hook()] function is used to register a callback that
+** is invoked each time data is committed to a database in wal mode.
+**
+** ^(The callback is invoked by SQLite after the commit has taken place and
+** the associated write-lock on the database released)^, so the implementation
+** may read, write or [checkpoint] the database as required.
+**
+** ^The first parameter passed to the callback function when it is invoked
+** is a copy of the third parameter passed to sqlite3_wal_hook() when
+** registering the callback. ^The second is a copy of the database handle.
+** ^The third parameter is the name of the database that was written to -
+** either "main" or the name of an [ATTACH]-ed database. ^The fourth parameter
+** is the number of pages currently in the write-ahead log file,
+** including those that were just committed.
+**
+** The callback function should normally return [SQLITE_OK]. ^If an error
+** code is returned, that error will propagate back up through the
+** SQLite code base to cause the statement that provoked the callback
+** to report an error, though the commit will have still occurred. If the
+** callback returns [SQLITE_ROW] or [SQLITE_DONE], or if it returns a value
+** that does not correspond to any valid SQLite error code, the results
+** are undefined.
+**
+** A single database handle may have at most a single write-ahead log callback
+** registered at one time. ^Calling [sqlite3_wal_hook()] replaces any
+** previously registered write-ahead log callback. ^The return value is
+** a copy of the third parameter from the previous call, if any, or 0.
+** ^Note that the [sqlite3_wal_autocheckpoint()] interface and the
+** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will
+** overwrite any prior [sqlite3_wal_hook()] settings.
+ */
+// llgo:link (*Sqlite3).WalHook C.sqlite3_wal_hook
+func (recv_ *Sqlite3) WalHook(func(c.Pointer, *Sqlite3, *c.Char, c.Int) c.Int, c.Pointer) c.Pointer {
+ return nil
+}
+
+/*
+** CAPI3REF: Configure an auto-checkpoint
+** METHOD: sqlite3
+**
+** ^The [sqlite3_wal_autocheckpoint(D,N)] is a wrapper around
+** [sqlite3_wal_hook()] that causes any database on [database connection] D
+** to automatically [checkpoint]
+** after committing a transaction if there are N or
+** more frames in the [write-ahead log] file. ^Passing zero or
+** a negative value as the nFrame parameter disables automatic
+** checkpoints entirely.
+**
+** ^The callback registered by this function replaces any existing callback
+** registered using [sqlite3_wal_hook()]. ^Likewise, registering a callback
+** using [sqlite3_wal_hook()] disables the automatic checkpoint mechanism
+** configured by this function.
+**
+** ^The [wal_autocheckpoint pragma] can be used to invoke this interface
+** from SQL.
+**
+** ^Checkpoints initiated by this mechanism are
+** [sqlite3_wal_checkpoint_v2|PASSIVE].
+**
+** ^Every new [database connection] defaults to having the auto-checkpoint
+** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT]
+** pages. The use of this interface
+** is only necessary if the default setting is found to be suboptimal
+** for a particular application.
+ */
+// llgo:link (*Sqlite3).WalAutocheckpoint C.sqlite3_wal_autocheckpoint
+func (recv_ *Sqlite3) WalAutocheckpoint(N c.Int) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Checkpoint a database
+** METHOD: sqlite3
+**
+** ^(The sqlite3_wal_checkpoint(D,X) is equivalent to
+** [sqlite3_wal_checkpoint_v2](D,X,[SQLITE_CHECKPOINT_PASSIVE],0,0).)^
+**
+** In brief, sqlite3_wal_checkpoint(D,X) causes the content in the
+** [write-ahead log] for database X on [database connection] D to be
+** transferred into the database file and for the write-ahead log to
+** be reset. See the [checkpointing] documentation for addition
+** information.
+**
+** This interface used to be the only way to cause a checkpoint to
+** occur. But then the newer and more powerful [sqlite3_wal_checkpoint_v2()]
+** interface was added. This interface is retained for backwards
+** compatibility and as a convenience for applications that need to manually
+** start a callback but which do not need the full power (and corresponding
+** complication) of [sqlite3_wal_checkpoint_v2()].
+ */
+// llgo:link (*Sqlite3).WalCheckpoint C.sqlite3_wal_checkpoint
+func (recv_ *Sqlite3) WalCheckpoint(zDb *c.Char) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Checkpoint a database
+** METHOD: sqlite3
+**
+** ^(The sqlite3_wal_checkpoint_v2(D,X,M,L,C) interface runs a checkpoint
+** operation on database X of [database connection] D in mode M. Status
+** information is written back into integers pointed to by L and C.)^
+** ^(The M parameter must be a valid [checkpoint mode]:)^
+**
+**
+** - SQLITE_CHECKPOINT_PASSIVE
-
+** ^Checkpoint as many frames as possible without waiting for any database
+** readers or writers to finish, then sync the database file if all frames
+** in the log were checkpointed. ^The [busy-handler callback]
+** is never invoked in the SQLITE_CHECKPOINT_PASSIVE mode.
+** ^On the other hand, passive mode might leave the checkpoint unfinished
+** if there are concurrent readers or writers.
+**
+**
- SQLITE_CHECKPOINT_FULL
-
+** ^This mode blocks (it invokes the
+** [sqlite3_busy_handler|busy-handler callback]) until there is no
+** database writer and all readers are reading from the most recent database
+** snapshot. ^It then checkpoints all frames in the log file and syncs the
+** database file. ^This mode blocks new database writers while it is pending,
+** but new database readers are allowed to continue unimpeded.
+**
+**
- SQLITE_CHECKPOINT_RESTART
-
+** ^This mode works the same way as SQLITE_CHECKPOINT_FULL with the addition
+** that after checkpointing the log file it blocks (calls the
+** [busy-handler callback])
+** until all readers are reading from the database file only. ^This ensures
+** that the next writer will restart the log file from the beginning.
+** ^Like SQLITE_CHECKPOINT_FULL, this mode blocks new
+** database writer attempts while it is pending, but does not impede readers.
+**
+**
- SQLITE_CHECKPOINT_TRUNCATE
-
+** ^This mode works the same way as SQLITE_CHECKPOINT_RESTART with the
+** addition that it also truncates the log file to zero bytes just prior
+** to a successful return.
+**
+**
+** ^If pnLog is not NULL, then *pnLog is set to the total number of frames in
+** the log file or to -1 if the checkpoint could not run because
+** of an error or because the database is not in [WAL mode]. ^If pnCkpt is not
+** NULL,then *pnCkpt is set to the total number of checkpointed frames in the
+** log file (including any that were already checkpointed before the function
+** was called) or to -1 if the checkpoint could not run due to an error or
+** because the database is not in WAL mode. ^Note that upon successful
+** completion of an SQLITE_CHECKPOINT_TRUNCATE, the log file will have been
+** truncated to zero bytes and so both *pnLog and *pnCkpt will be set to zero.
+**
+** ^All calls obtain an exclusive "checkpoint" lock on the database file. ^If
+** any other process is running a checkpoint operation at the same time, the
+** lock cannot be obtained and SQLITE_BUSY is returned. ^Even if there is a
+** busy-handler configured, it will not be invoked in this case.
+**
+** ^The SQLITE_CHECKPOINT_FULL, RESTART and TRUNCATE modes also obtain the
+** exclusive "writer" lock on the database file. ^If the writer lock cannot be
+** obtained immediately, and a busy-handler is configured, it is invoked and
+** the writer lock retried until either the busy-handler returns 0 or the lock
+** is successfully obtained. ^The busy-handler is also invoked while waiting for
+** database readers as described above. ^If the busy-handler returns 0 before
+** the writer lock is obtained or while waiting for database readers, the
+** checkpoint operation proceeds from that point in the same way as
+** SQLITE_CHECKPOINT_PASSIVE - checkpointing as many frames as possible
+** without blocking any further. ^SQLITE_BUSY is returned in this case.
+**
+** ^If parameter zDb is NULL or points to a zero length string, then the
+** specified operation is attempted on all WAL databases [attached] to
+** [database connection] db. In this case the
+** values written to output parameters *pnLog and *pnCkpt are undefined. ^If
+** an SQLITE_BUSY error is encountered when processing one or more of the
+** attached WAL databases, the operation is still attempted on any remaining
+** attached databases and SQLITE_BUSY is returned at the end. ^If any other
+** error occurs while processing an attached database, processing is abandoned
+** and the error code is returned to the caller immediately. ^If no error
+** (SQLITE_BUSY or otherwise) is encountered while processing the attached
+** databases, SQLITE_OK is returned.
+**
+** ^If database zDb is the name of an attached database that is not in WAL
+** mode, SQLITE_OK is returned and both *pnLog and *pnCkpt set to -1. ^If
+** zDb is not NULL (or a zero length string) and is not the name of any
+** attached database, SQLITE_ERROR is returned to the caller.
+**
+** ^Unless it returns SQLITE_MISUSE,
+** the sqlite3_wal_checkpoint_v2() interface
+** sets the error information that is queried by
+** [sqlite3_errcode()] and [sqlite3_errmsg()].
+**
+** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface
+** from SQL.
+ */
+// llgo:link (*Sqlite3).WalCheckpointV2 C.sqlite3_wal_checkpoint_v2
+func (recv_ *Sqlite3) WalCheckpointV2(zDb *c.Char, eMode c.Int, pnLog *c.Int, pnCkpt *c.Int) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Virtual Table Interface Configuration
+**
+** This function may be called by either the [xConnect] or [xCreate] method
+** of a [virtual table] implementation to configure
+** various facets of the virtual table interface.
+**
+** If this interface is invoked outside the context of an xConnect or
+** xCreate virtual table method then the behavior is undefined.
+**
+** In the call sqlite3_vtab_config(D,C,...) the D parameter is the
+** [database connection] in which the virtual table is being created and
+** which is passed in as the first argument to the [xConnect] or [xCreate]
+** method that is invoking sqlite3_vtab_config(). The C parameter is one
+** of the [virtual table configuration options]. The presence and meaning
+** of parameters after C depend on which [virtual table configuration option]
+** is used.
+ */
+//go:linkname VtabConfig C.sqlite3_vtab_config
+func VtabConfig(__llgo_arg_0 *Sqlite3, op c.Int, __llgo_va_list ...interface{}) c.Int
+
+/*
+** CAPI3REF: Determine The Virtual Table Conflict Policy
+**
+** This function may only be called from within a call to the [xUpdate] method
+** of a [virtual table] implementation for an INSERT or UPDATE operation. ^The
+** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL],
+** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode
+** of the SQL statement that triggered the call to the [xUpdate] method of the
+** [virtual table].
+ */
+// llgo:link (*Sqlite3).VtabOnConflict C.sqlite3_vtab_on_conflict
+func (recv_ *Sqlite3) VtabOnConflict() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Determine If Virtual Table Column Access Is For UPDATE
+**
+** If the sqlite3_vtab_nochange(X) routine is called within the [xColumn]
+** method of a [virtual table], then it might return true if the
+** column is being fetched as part of an UPDATE operation during which the
+** column value will not change. The virtual table implementation can use
+** this hint as permission to substitute a return value that is less
+** expensive to compute and that the corresponding
+** [xUpdate] method understands as a "no-change" value.
+**
+** If the [xColumn] method calls sqlite3_vtab_nochange() and finds that
+** the column is not changed by the UPDATE statement, then the xColumn
+** method can optionally return without setting a result, without calling
+** any of the [sqlite3_result_int|sqlite3_result_xxxxx() interfaces].
+** In that case, [sqlite3_value_nochange(X)] will return true for the
+** same column in the [xUpdate] method.
+**
+** The sqlite3_vtab_nochange() routine is an optimization. Virtual table
+** implementations should continue to give a correct answer even if the
+** sqlite3_vtab_nochange() interface were to always return false. In the
+** current implementation, the sqlite3_vtab_nochange() interface does always
+** returns false for the enhanced [UPDATE FROM] statement.
+ */
+// llgo:link (*Context).VtabNochange C.sqlite3_vtab_nochange
+func (recv_ *Context) VtabNochange() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Determine The Collation For a Virtual Table Constraint
+** METHOD: sqlite3_index_info
+**
+** This function may only be called from within a call to the [xBestIndex]
+** method of a [virtual table]. This function returns a pointer to a string
+** that is the name of the appropriate collation sequence to use for text
+** comparisons on the constraint identified by its arguments.
+**
+** The first argument must be the pointer to the [sqlite3_index_info] object
+** that is the first parameter to the xBestIndex() method. The second argument
+** must be an index into the aConstraint[] array belonging to the
+** sqlite3_index_info structure passed to xBestIndex.
+**
+** Important:
+** The first parameter must be the same pointer that is passed into the
+** xBestMethod() method. The first parameter may not be a pointer to a
+** different [sqlite3_index_info] object, even an exact copy.
+**
+** The return value is computed as follows:
+**
+**
+** If the constraint comes from a WHERE clause expression that contains
+** a [COLLATE operator], then the name of the collation specified by
+** that COLLATE operator is returned.
+**
If there is no COLLATE operator, but the column that is the subject
+** of the constraint specifies an alternative collating sequence via
+** a [COLLATE clause] on the column definition within the CREATE TABLE
+** statement that was passed into [sqlite3_declare_vtab()], then the
+** name of that alternative collating sequence is returned.
+**
Otherwise, "BINARY" is returned.
+**
+ */
+// llgo:link (*IndexInfo).VtabCollation C.sqlite3_vtab_collation
+func (recv_ *IndexInfo) VtabCollation(c.Int) *c.Char {
+ return nil
+}
+
+/*
+** CAPI3REF: Determine if a virtual table query is DISTINCT
+** METHOD: sqlite3_index_info
+**
+** This API may only be used from within an [xBestIndex|xBestIndex method]
+** of a [virtual table] implementation. The result of calling this
+** interface from outside of xBestIndex() is undefined and probably harmful.
+**
+** ^The sqlite3_vtab_distinct() interface returns an integer between 0 and
+** 3. The integer returned by sqlite3_vtab_distinct()
+** gives the virtual table additional information about how the query
+** planner wants the output to be ordered. As long as the virtual table
+** can meet the ordering requirements of the query planner, it may set
+** the "orderByConsumed" flag.
+**
+**
+** ^If the sqlite3_vtab_distinct() interface returns 0, that means
+** that the query planner needs the virtual table to return all rows in the
+** sort order defined by the "nOrderBy" and "aOrderBy" fields of the
+** [sqlite3_index_info] object. This is the default expectation. If the
+** virtual table outputs all rows in sorted order, then it is always safe for
+** the xBestIndex method to set the "orderByConsumed" flag, regardless of
+** the return value from sqlite3_vtab_distinct().
+**
+** ^(If the sqlite3_vtab_distinct() interface returns 1, that means
+** that the query planner does not need the rows to be returned in sorted order
+** as long as all rows with the same values in all columns identified by the
+** "aOrderBy" field are adjacent.)^ This mode is used when the query planner
+** is doing a GROUP BY.
+**
+** ^(If the sqlite3_vtab_distinct() interface returns 2, that means
+** that the query planner does not need the rows returned in any particular
+** order, as long as rows with the same values in all columns identified
+** by "aOrderBy" are adjacent.)^ ^(Furthermore, when two or more rows
+** contain the same values for all columns identified by "colUsed", all but
+** one such row may optionally be omitted from the result.)^
+** The virtual table is not required to omit rows that are duplicates
+** over the "colUsed" columns, but if the virtual table can do that without
+** too much extra effort, it could potentially help the query to run faster.
+** This mode is used for a DISTINCT query.
+**
+** ^(If the sqlite3_vtab_distinct() interface returns 3, that means the
+** virtual table must return rows in the order defined by "aOrderBy" as
+** if the sqlite3_vtab_distinct() interface had returned 0. However if
+** two or more rows in the result have the same values for all columns
+** identified by "colUsed", then all but one such row may optionally be
+** omitted.)^ Like when the return value is 2, the virtual table
+** is not required to omit rows that are duplicates over the "colUsed"
+** columns, but if the virtual table can do that without
+** too much extra effort, it could potentially help the query to run faster.
+** This mode is used for queries
+** that have both DISTINCT and ORDER BY clauses.
+**
+**
+** The following table summarizes the conditions under which the
+** virtual table is allowed to set the "orderByConsumed" flag based on
+** the value returned by sqlite3_vtab_distinct(). This table is a
+** restatement of the previous four paragraphs:
+**
+**
+**
+** | sqlite3_vtab_distinct() return value
+** | Rows are returned in aOrderBy order
+** | Rows with the same value in all aOrderBy columns are adjacent
+** | Duplicates over all colUsed columns may be omitted
+** |
| 0 | yes | yes | no
+** |
| 1 | no | yes | no
+** |
| 2 | no | yes | yes
+** |
| 3 | yes | yes | yes
+** |
+**
+** ^For the purposes of comparing virtual table output values to see if the
+** values are same value for sorting purposes, two NULL values are considered
+** to be the same. In other words, the comparison operator is "IS"
+** (or "IS NOT DISTINCT FROM") and not "==".
+**
+** If a virtual table implementation is unable to meet the requirements
+** specified above, then it must not set the "orderByConsumed" flag in the
+** [sqlite3_index_info] object or an incorrect answer may result.
+**
+** ^A virtual table implementation is always free to return rows in any order
+** it wants, as long as the "orderByConsumed" flag is not set. ^When the
+** the "orderByConsumed" flag is unset, the query planner will add extra
+** [bytecode] to ensure that the final results returned by the SQL query are
+** ordered correctly. The use of the "orderByConsumed" flag and the
+** sqlite3_vtab_distinct() interface is merely an optimization. ^Careful
+** use of the sqlite3_vtab_distinct() interface and the "orderByConsumed"
+** flag might help queries against a virtual table to run faster. Being
+** overly aggressive and setting the "orderByConsumed" flag when it is not
+** valid to do so, on the other hand, might cause SQLite to return incorrect
+** results.
+ */
+// llgo:link (*IndexInfo).VtabDistinct C.sqlite3_vtab_distinct
+func (recv_ *IndexInfo) VtabDistinct() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Identify and handle IN constraints in xBestIndex
+**
+** This interface may only be used from within an
+** [xBestIndex|xBestIndex() method] of a [virtual table] implementation.
+** The result of invoking this interface from any other context is
+** undefined and probably harmful.
+**
+** ^(A constraint on a virtual table of the form
+** "[IN operator|column IN (...)]" is
+** communicated to the xBestIndex method as a
+** [SQLITE_INDEX_CONSTRAINT_EQ] constraint.)^ If xBestIndex wants to use
+** this constraint, it must set the corresponding
+** aConstraintUsage[].argvIndex to a positive integer. ^(Then, under
+** the usual mode of handling IN operators, SQLite generates [bytecode]
+** that invokes the [xFilter|xFilter() method] once for each value
+** on the right-hand side of the IN operator.)^ Thus the virtual table
+** only sees a single value from the right-hand side of the IN operator
+** at a time.
+**
+** In some cases, however, it would be advantageous for the virtual
+** table to see all values on the right-hand of the IN operator all at
+** once. The sqlite3_vtab_in() interfaces facilitates this in two ways:
+**
+**
+**
+** ^A call to sqlite3_vtab_in(P,N,-1) will return true (non-zero)
+** if and only if the [sqlite3_index_info|P->aConstraint][N] constraint
+** is an [IN operator] that can be processed all at once. ^In other words,
+** sqlite3_vtab_in() with -1 in the third argument is a mechanism
+** by which the virtual table can ask SQLite if all-at-once processing
+** of the IN operator is even possible.
+**
+**
+** ^A call to sqlite3_vtab_in(P,N,F) with F==1 or F==0 indicates
+** to SQLite that the virtual table does or does not want to process
+** the IN operator all-at-once, respectively. ^Thus when the third
+** parameter (F) is non-negative, this interface is the mechanism by
+** which the virtual table tells SQLite how it wants to process the
+** IN operator.
+**
+**
+** ^The sqlite3_vtab_in(P,N,F) interface can be invoked multiple times
+** within the same xBestIndex method call. ^For any given P,N pair,
+** the return value from sqlite3_vtab_in(P,N,F) will always be the same
+** within the same xBestIndex call. ^If the interface returns true
+** (non-zero), that means that the constraint is an IN operator
+** that can be processed all-at-once. ^If the constraint is not an IN
+** operator or cannot be processed all-at-once, then the interface returns
+** false.
+**
+** ^(All-at-once processing of the IN operator is selected if both of the
+** following conditions are met:
+**
+**
+** The P->aConstraintUsage[N].argvIndex value is set to a positive
+** integer. This is how the virtual table tells SQLite that it wants to
+** use the N-th constraint.
+**
+**
The last call to sqlite3_vtab_in(P,N,F) for which F was
+** non-negative had F>=1.
+**
)^
+**
+** ^If either or both of the conditions above are false, then SQLite uses
+** the traditional one-at-a-time processing strategy for the IN constraint.
+** ^If both conditions are true, then the argvIndex-th parameter to the
+** xFilter method will be an [sqlite3_value] that appears to be NULL,
+** but which can be passed to [sqlite3_vtab_in_first()] and
+** [sqlite3_vtab_in_next()] to find all values on the right-hand side
+** of the IN constraint.
+ */
+// llgo:link (*IndexInfo).VtabIn C.sqlite3_vtab_in
+func (recv_ *IndexInfo) VtabIn(iCons c.Int, bHandle c.Int) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Find all elements on the right-hand side of an IN constraint.
+**
+** These interfaces are only useful from within the
+** [xFilter|xFilter() method] of a [virtual table] implementation.
+** The result of invoking these interfaces from any other context
+** is undefined and probably harmful.
+**
+** The X parameter in a call to sqlite3_vtab_in_first(X,P) or
+** sqlite3_vtab_in_next(X,P) should be one of the parameters to the
+** xFilter method which invokes these routines, and specifically
+** a parameter that was previously selected for all-at-once IN constraint
+** processing use the [sqlite3_vtab_in()] interface in the
+** [xBestIndex|xBestIndex method]. ^(If the X parameter is not
+** an xFilter argument that was selected for all-at-once IN constraint
+** processing, then these routines return [SQLITE_ERROR].)^
+**
+** ^(Use these routines to access all values on the right-hand side
+** of the IN constraint using code like the following:
+**
+**
+** for(rc=sqlite3_vtab_in_first(pList, &pVal);
+** rc==SQLITE_OK && pVal;
+** rc=sqlite3_vtab_in_next(pList, &pVal)
+** ){
+** // do something with pVal
+** }
+** if( rc!=SQLITE_OK ){
+** // an error has occurred
+** }
+**
)^
+**
+** ^On success, the sqlite3_vtab_in_first(X,P) and sqlite3_vtab_in_next(X,P)
+** routines return SQLITE_OK and set *P to point to the first or next value
+** on the RHS of the IN constraint. ^If there are no more values on the
+** right hand side of the IN constraint, then *P is set to NULL and these
+** routines return [SQLITE_DONE]. ^The return value might be
+** some other value, such as SQLITE_NOMEM, in the event of a malfunction.
+**
+** The *ppOut values returned by these routines are only valid until the
+** next call to either of these routines or until the end of the xFilter
+** method from which these routines were called. If the virtual table
+** implementation needs to retain the *ppOut values for longer, it must make
+** copies. The *ppOut values are [protected sqlite3_value|protected].
+ */
+// llgo:link (*Value).VtabInFirst C.sqlite3_vtab_in_first
+func (recv_ *Value) VtabInFirst(ppOut **Value) c.Int {
+ return 0
+}
+
+// llgo:link (*Value).VtabInNext C.sqlite3_vtab_in_next
+func (recv_ *Value) VtabInNext(ppOut **Value) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Constraint values in xBestIndex()
+** METHOD: sqlite3_index_info
+**
+** This API may only be used from within the [xBestIndex|xBestIndex method]
+** of a [virtual table] implementation. The result of calling this interface
+** from outside of an xBestIndex method are undefined and probably harmful.
+**
+** ^When the sqlite3_vtab_rhs_value(P,J,V) interface is invoked from within
+** the [xBestIndex] method of a [virtual table] implementation, with P being
+** a copy of the [sqlite3_index_info] object pointer passed into xBestIndex and
+** J being a 0-based index into P->aConstraint[], then this routine
+** attempts to set *V to the value of the right-hand operand of
+** that constraint if the right-hand operand is known. ^If the
+** right-hand operand is not known, then *V is set to a NULL pointer.
+** ^The sqlite3_vtab_rhs_value(P,J,V) interface returns SQLITE_OK if
+** and only if *V is set to a value. ^The sqlite3_vtab_rhs_value(P,J,V)
+** inteface returns SQLITE_NOTFOUND if the right-hand side of the J-th
+** constraint is not available. ^The sqlite3_vtab_rhs_value() interface
+** can return an result code other than SQLITE_OK or SQLITE_NOTFOUND if
+** something goes wrong.
+**
+** The sqlite3_vtab_rhs_value() interface is usually only successful if
+** the right-hand operand of a constraint is a literal value in the original
+** SQL statement. If the right-hand operand is an expression or a reference
+** to some other column or a [host parameter], then sqlite3_vtab_rhs_value()
+** will probably return [SQLITE_NOTFOUND].
+**
+** ^(Some constraints, such as [SQLITE_INDEX_CONSTRAINT_ISNULL] and
+** [SQLITE_INDEX_CONSTRAINT_ISNOTNULL], have no right-hand operand. For such
+** constraints, sqlite3_vtab_rhs_value() always returns SQLITE_NOTFOUND.)^
+**
+** ^The [sqlite3_value] object returned in *V is a protected sqlite3_value
+** and remains valid for the duration of the xBestIndex method call.
+** ^When xBestIndex returns, the sqlite3_value object returned by
+** sqlite3_vtab_rhs_value() is automatically deallocated.
+**
+** The "_rhs_" in the name of this routine is an abbreviation for
+** "Right-Hand Side".
+ */
+// llgo:link (*IndexInfo).VtabRhsValue C.sqlite3_vtab_rhs_value
+func (recv_ *IndexInfo) VtabRhsValue(__llgo_arg_0 c.Int, ppVal **Value) c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Flush caches to disk mid-transaction
+** METHOD: sqlite3
+**
+** ^If a write-transaction is open on [database connection] D when the
+** [sqlite3_db_cacheflush(D)] interface invoked, any dirty
+** pages in the pager-cache that are not currently in use are written out
+** to disk. A dirty page may be in use if a database cursor created by an
+** active SQL statement is reading from it, or if it is page 1 of a database
+** file (page 1 is always "in use"). ^The [sqlite3_db_cacheflush(D)]
+** interface flushes caches for all schemas - "main", "temp", and
+** any [attached] databases.
+**
+** ^If this function needs to obtain extra database locks before dirty pages
+** can be flushed to disk, it does so. ^If those locks cannot be obtained
+** immediately and there is a busy-handler callback configured, it is invoked
+** in the usual manner. ^If the required lock still cannot be obtained, then
+** the database is skipped and an attempt made to flush any dirty pages
+** belonging to the next (if any) database. ^If any databases are skipped
+** because locks cannot be obtained, but no other error occurs, this
+** function returns SQLITE_BUSY.
+**
+** ^If any other error occurs while flushing dirty pages to disk (for
+** example an IO error or out-of-memory condition), then processing is
+** abandoned and an SQLite [error code] is returned to the caller immediately.
+**
+** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK.
+**
+** ^This function does not set the database handle error code or message
+** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions.
+ */
+// llgo:link (*Sqlite3).DbCacheflush C.sqlite3_db_cacheflush
+func (recv_ *Sqlite3) DbCacheflush() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Low-level system error code
+** METHOD: sqlite3
+**
+** ^Attempt to return the underlying operating system error code or error
+** number that caused the most recent I/O error or failure to open a file.
+** The return value is OS-dependent. For example, on unix systems, after
+** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be
+** called to get back the underlying "errno" that caused the problem, such
+** as ENOSPC, EAUTH, EISDIR, and so forth.
+ */
+// llgo:link (*Sqlite3).SystemErrno C.sqlite3_system_errno
+func (recv_ *Sqlite3) SystemErrno() c.Int {
+ return 0
+}
+
+/*
+** CAPI3REF: Database Snapshot
+** KEYWORDS: {snapshot} {sqlite3_snapshot}
+**
+** An instance of the snapshot object records the state of a [WAL mode]
+** database for some specific point in history.
+**
+** In [WAL mode], multiple [database connections] that are open on the
+** same database file can each be reading a different historical version
+** of the database file. When a [database connection] begins a read
+** transaction, that connection sees an unchanging copy of the database
+** as it existed for the point in time when the transaction first started.
+** Subsequent changes to the database from other connections are not seen
+** by the reader until a new read transaction is started.
+**
+** The sqlite3_snapshot object records state information about an historical
+** version of the database file so that it is possible to later open a new read
+** transaction that sees that historical version of the database rather than
+** the most recent version.
+ */
+type Snapshot struct {
+ Hidden [48]c.Char
+}
+
+/*
+** CAPI3REF: Serialize a database
+**
+** The sqlite3_serialize(D,S,P,F) interface returns a pointer to
+** memory that is a serialization of the S database on
+** [database connection] D. If S is a NULL pointer, the main database is used.
+** If P is not a NULL pointer, then the size of the database in bytes
+** is written into *P.
+**
+** For an ordinary on-disk database file, the serialization is just a
+** copy of the disk file. For an in-memory database or a "TEMP" database,
+** the serialization is the same sequence of bytes which would be written
+** to disk if that database where backed up to disk.
+**
+** The usual case is that sqlite3_serialize() copies the serialization of
+** the database into memory obtained from [sqlite3_malloc64()] and returns
+** a pointer to that memory. The caller is responsible for freeing the
+** returned value to avoid a memory leak. However, if the F argument
+** contains the SQLITE_SERIALIZE_NOCOPY bit, then no memory allocations
+** are made, and the sqlite3_serialize() function will return a pointer
+** to the contiguous memory representation of the database that SQLite
+** is currently using for that database, or NULL if the no such contiguous
+** memory representation of the database exists. A contiguous memory
+** representation of the database will usually only exist if there has
+** been a prior call to [sqlite3_deserialize(D,S,...)] with the same
+** values of D and S.
+** The size of the database is written into *P even if the
+** SQLITE_SERIALIZE_NOCOPY bit is set but no contiguous copy
+** of the database exists.
+**
+** After the call, if the SQLITE_SERIALIZE_NOCOPY bit had been set,
+** the returned buffer content will remain accessible and unchanged
+** until either the next write operation on the connection or when
+** the connection is closed, and applications must not modify the
+** buffer. If the bit had been clear, the returned buffer will not
+** be accessed by SQLite after the call.
+**
+** A call to sqlite3_serialize(D,S,P,F) might return NULL even if the
+** SQLITE_SERIALIZE_NOCOPY bit is omitted from argument F if a memory
+** allocation error occurs.
+**
+** This interface is omitted if SQLite is compiled with the
+** [SQLITE_OMIT_DESERIALIZE] option.
+ */
+// llgo:link (*Sqlite3).Serialize C.sqlite3_serialize
+func (recv_ *Sqlite3) Serialize(zSchema *c.Char, piSize *Int64, mFlags c.Uint) *c.Char {
+ return nil
+}
+
+/*
+** CAPI3REF: Deserialize a database
+**
+** The sqlite3_deserialize(D,S,P,N,M,F) interface causes the
+** [database connection] D to disconnect from database S and then
+** reopen S as an in-memory database based on the serialization contained
+** in P. The serialized database P is N bytes in size. M is the size of
+** the buffer P, which might be larger than N. If M is larger than N, and
+** the SQLITE_DESERIALIZE_READONLY bit is not set in F, then SQLite is
+** permitted to add content to the in-memory database as long as the total
+** size does not exceed M bytes.
+**
+** If the SQLITE_DESERIALIZE_FREEONCLOSE bit is set in F, then SQLite will
+** invoke sqlite3_free() on the serialization buffer when the database
+** connection closes. If the SQLITE_DESERIALIZE_RESIZEABLE bit is set, then
+** SQLite will try to increase the buffer size using sqlite3_realloc64()
+** if writes on the database cause it to grow larger than M bytes.
+**
+** Applications must not modify the buffer P or invalidate it before
+** the database connection D is closed.
+**
+** The sqlite3_deserialize() interface will fail with SQLITE_BUSY if the
+** database is currently in a read transaction or is involved in a backup
+** operation.
+**
+** It is not possible to deserialized into the TEMP database. If the
+** S argument to sqlite3_deserialize(D,S,P,N,M,F) is "temp" then the
+** function returns SQLITE_ERROR.
+**
+** The deserialized database should not be in [WAL mode]. If the database
+** is in WAL mode, then any attempt to use the database file will result
+** in an [SQLITE_CANTOPEN] error. The application can set the
+** [file format version numbers] (bytes 18 and 19) of the input database P
+** to 0x01 prior to invoking sqlite3_deserialize(D,S,P,N,M,F) to force the
+** database file into rollback mode and work around this limitation.
+**
+** If sqlite3_deserialize(D,S,P,N,M,F) fails for any reason and if the
+** SQLITE_DESERIALIZE_FREEONCLOSE bit is set in argument F, then
+** [sqlite3_free()] is invoked on argument P prior to returning.
+**
+** This interface is omitted if SQLite is compiled with the
+** [SQLITE_OMIT_DESERIALIZE] option.
+ */
+// llgo:link (*Sqlite3).Deserialize C.sqlite3_deserialize
+func (recv_ *Sqlite3) Deserialize(zSchema *c.Char, pData *c.Char, szDb Int64, szBuf Int64, mFlags c.Uint) c.Int {
+ return 0
+}
+
+type RtreeGeometry struct {
+ PContext c.Pointer
+ NParam c.Int
+ AParam *RtreeDbl
+ PUser c.Pointer
+ XDelUser c.Pointer
+}
+
+type RtreeQueryInfo struct {
+ PContext c.Pointer
+ NParam c.Int
+ AParam *RtreeDbl
+ PUser c.Pointer
+ XDelUser c.Pointer
+ ACoord *RtreeDbl
+ AnQueue *c.Uint
+ NCoord c.Int
+ ILevel c.Int
+ MxLevel c.Int
+ IRowid Int64
+ RParentScore RtreeDbl
+ EParentWithin c.Int
+ EWithin c.Int
+ RScore RtreeDbl
+ ApSqlParam **Value
+}
+type RtreeDbl c.Double
+
+/*
+** Register a geometry callback named zGeom that can be used as part of an
+** R-Tree geometry query as follows:
+**
+** SELECT ... FROM WHERE MATCH $zGeom(... params ...)
+ */
+// llgo:link (*Sqlite3).RtreeGeometryCallback C.sqlite3_rtree_geometry_callback
+func (recv_ *Sqlite3) RtreeGeometryCallback(zGeom *c.Char, xGeom func(*RtreeGeometry, c.Int, *RtreeDbl, *c.Int) c.Int, pContext c.Pointer) c.Int {
+ return 0
+}
+
+/*
+** Register a 2nd-generation geometry callback named zScore that can be
+** used as part of an R-Tree geometry query as follows:
+**
+** SELECT ... FROM WHERE MATCH $zQueryFunc(... params ...)
+ */
+// llgo:link (*Sqlite3).RtreeQueryCallback C.sqlite3_rtree_query_callback
+func (recv_ *Sqlite3) RtreeQueryCallback(zQueryFunc *c.Char, xQueryFunc func(*RtreeQueryInfo) c.Int, pContext c.Pointer, xDestructor func(c.Pointer)) c.Int {
+ return 0
+}
+
+type Fts5ExtensionApi struct {
+ IVersion c.Int
+ XUserData c.Pointer
+ XColumnCount c.Pointer
+ XRowCount c.Pointer
+ XColumnTotalSize c.Pointer
+ XTokenize c.Pointer
+ XPhraseCount c.Pointer
+ XPhraseSize c.Pointer
+ XInstCount c.Pointer
+ XInst c.Pointer
+ XRowid c.Pointer
+ XColumnText c.Pointer
+ XColumnSize c.Pointer
+ XQueryPhrase c.Pointer
+ XSetAuxdata c.Pointer
+ XGetAuxdata c.Pointer
+ XPhraseFirst c.Pointer
+ XPhraseNext c.Pointer
+ XPhraseFirstColumn c.Pointer
+ XPhraseNextColumn c.Pointer
+ XQueryToken c.Pointer
+ XInstToken c.Pointer
+ XColumnLocale c.Pointer
+ XTokenizeV2 c.Pointer
+}
+
+type Fts5Context struct {
+ Unused [8]uint8
+}
+
+type Fts5PhraseIter struct {
+ A *c.Char
+ B *c.Char
+}
+
+// llgo:type C
+type Fts5ExtensionFunction func(*Fts5ExtensionApi, *Fts5Context, *Context, c.Int, **Value)
+
+type Fts5Tokenizer struct {
+ Unused [8]uint8
+}
+
+type Fts5TokenizerV2 struct {
+ IVersion c.Int
+ XCreate c.Pointer
+ XDelete c.Pointer
+ XTokenize c.Pointer
+}
+
+type Fts5Tokenizer__1 struct {
+ XCreate c.Pointer
+ XDelete c.Pointer
+ XTokenize c.Pointer
+}
+
+type Fts5Api struct {
+ IVersion c.Int
+ XCreateTokenizer c.Pointer
+ XFindTokenizer c.Pointer
+ XCreateFunction c.Pointer
+ XCreateTokenizerV2 c.Pointer
+ XFindTokenizerV2 c.Pointer
+}
diff --git a/sqlite3/sqlite3_autogen_link.go b/sqlite3/sqlite3_autogen_link.go
new file mode 100644
index 0000000..0b4f488
--- /dev/null
+++ b/sqlite3/sqlite3_autogen_link.go
@@ -0,0 +1,5 @@
+package sqlite3
+
+import _ "github.com/goplus/lib/c"
+
+const LLGoPackage string = "link: $(pkg-config --libs sqlite3);"
diff --git a/sqlite3/sqlite3ext.go b/sqlite3/sqlite3ext.go
new file mode 100644
index 0000000..aac9c33
--- /dev/null
+++ b/sqlite3/sqlite3ext.go
@@ -0,0 +1,9 @@
+package sqlite3
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+// llgo:type C
+type LoadextEntry func(*Sqlite3, **c.Char, *ApiRoutines) c.Int
diff --git a/uthash/llcppg.cfg b/uthash/llcppg.cfg
new file mode 100644
index 0000000..ffa597a
--- /dev/null
+++ b/uthash/llcppg.cfg
@@ -0,0 +1,13 @@
+{
+ "name": "uthash",
+ "cflags": "$(pkg-config --cflags uthash)",
+ "libs": "$(pkg-config --libs uthash)",
+ "include": [
+ "utringbuffer.h",
+ "utarray.h",
+ "uthash.h",
+ "utlist.h",
+ "utstack.h",
+ "utstring.h"
+ ]
+}
diff --git a/uthash/llpkg.cfg b/uthash/llpkg.cfg
new file mode 100644
index 0000000..4d6e2ed
--- /dev/null
+++ b/uthash/llpkg.cfg
@@ -0,0 +1,8 @@
+{
+ "upstream": {
+ "package": {
+ "name": "uthash",
+ "version": "2.3.0"
+ }
+ }
+}
\ No newline at end of file
diff --git a/uthash/uthash.pc b/uthash/uthash.pc
new file mode 100644
index 0000000..b47fdc2
--- /dev/null
+++ b/uthash/uthash.pc
@@ -0,0 +1,7 @@
+prefix=/Users/admin/.conan2/p/uthas127d6e4105036/p
+includedir=${prefix}/include
+
+Name: uthash
+Description: Conan package: uthash
+Version: 2.3.0
+Cflags: -I"${includedir}"
diff --git a/zlib/_demo/crc32demo/demo.go b/zlib/_demo/crc32demo/demo.go
new file mode 100644
index 0000000..7615486
--- /dev/null
+++ b/zlib/_demo/crc32demo/demo.go
@@ -0,0 +1,18 @@
+package main
+
+import (
+ "fmt"
+ "unsafe"
+
+ "github.com/goplus/llpkg/zlib"
+)
+
+func main() {
+ ul := zlib.ULong(0)
+ data := "Hello world"
+ res := ul.Crc32Z(
+ (*zlib.Bytef)(unsafe.Pointer(unsafe.StringData(data))),
+ zlib.ZSizeT(uintptr(len(data))),
+ )
+ fmt.Printf("%08x\n", res)
+}
diff --git a/zlib/_demo/efficiency/efficiency.go b/zlib/_demo/efficiency/efficiency.go
new file mode 100644
index 0000000..9bd8a57
--- /dev/null
+++ b/zlib/_demo/efficiency/efficiency.go
@@ -0,0 +1,39 @@
+package main
+
+import (
+ "unsafe"
+
+ "github.com/goplus/llpkg/zlib"
+
+ "github.com/goplus/lib/c"
+)
+
+func main() {
+ txt := []byte("zlib is a software library used for data compression. It was created by Jean-loup Gailly and Mark Adler and first released in 1995. zlib is designed to be a free, legally unencumbered—that is, not covered by any patents—alternative to the proprietary DEFLATE compression algorithm, which is often used in software applications for data compression.The library provides functions to compress and decompress data using the DEFLATE algorithm, which is a combination of the LZ77 algorithm and Huffman coding. zlib is notable for its versatility; it can be used in a wide range of applications, from web servers and web clients compressing HTTP data, to the compression of data for storage or transmission in various file formats, such as PNG, ZIP, and GZIP.")
+ txtLen := zlib.ULong(len(txt))
+
+ for level := 0; level <= 9; level++ {
+ cmpSize := zlib.ULongf(zlib.CompressBound(txtLen))
+ cmpData := make([]byte, int(cmpSize))
+ data := (*zlib.Bytef)(unsafe.Pointer(unsafe.SliceData(cmpData)))
+ source := (*zlib.Bytef)(unsafe.Pointer(unsafe.SliceData(txt)))
+ res := zlib.Compress2(data, &cmpSize, source, txtLen, c.Int(level))
+ if res != zlib.OK {
+ c.Printf(c.Str("\nCompression failed at level %d: %d\n"), level, res)
+ continue
+ }
+
+ c.Printf(c.Str("Compression level %d: Text length = %d, Compressed size = %d\n"), level, txtLen, cmpSize)
+
+ ucmpSize := zlib.ULongf(txtLen)
+ ucmp := make([]byte, int(ucmpSize))
+ ucmpData := (*zlib.Bytef)(unsafe.Pointer(unsafe.SliceData(ucmp)))
+ cmpSource := (*zlib.Bytef)(unsafe.Pointer(unsafe.SliceData(cmpData)))
+
+ unRes := zlib.Uncompress(ucmpData, &ucmpSize, cmpSource, zlib.ULong(cmpSize))
+ if unRes != zlib.OK {
+ c.Printf(c.Str("\nDecompression failed at level %d: %d\n"), level, unRes)
+ continue
+ }
+ }
+}
diff --git a/zlib/_demo/normal/normal.go b/zlib/_demo/normal/normal.go
new file mode 100644
index 0000000..e69eb2c
--- /dev/null
+++ b/zlib/_demo/normal/normal.go
@@ -0,0 +1,44 @@
+package main
+
+import (
+ "unsafe"
+
+ "github.com/goplus/llpkg/zlib"
+
+ "github.com/goplus/lib/c"
+)
+
+func main() {
+ txt := []byte("zlib is a software library used for data compression. It was created by Jean-loup Gailly and Mark Adler and first released in 1995. zlib is designed to be a free, legally unencumbered—that is, not covered by any patents—alternative to the proprietary DEFLATE compression algorithm, which is often used in software applications for data compression.The library provides functions to compress and decompress data using the DEFLATE algorithm, which is a combination of the LZ77 algorithm and Huffman coding. zlib is notable for its versatility; it can be used in a wide range of applications, from web servers and web clients compressing HTTP data, to the compression of data for storage or transmission in various file formats, such as PNG, ZIP, and GZIP.")
+ txtLen := zlib.ULong(len(txt))
+
+ cmpSize := zlib.ULongf(zlib.CompressBound(txtLen))
+ cmpData := make([]byte, int(cmpSize))
+ data := (*zlib.Bytef)(unsafe.Pointer(unsafe.SliceData(cmpData)))
+ txtData := (*zlib.Bytef)(unsafe.Pointer(unsafe.SliceData(txt)))
+
+ res := zlib.Compress(data, &cmpSize, txtData, txtLen)
+ if res != zlib.OK {
+ c.Printf(c.Str("\nCompression failed: %d\n"), res)
+ return
+ }
+
+ c.Printf(c.Str("Text length = %d, Compressed size = %d\n"), txtLen, cmpSize)
+
+ ucmpSize := zlib.ULongf(txtLen)
+ ucmp := make([]byte, int(ucmpSize))
+ ucmpPtr := (*zlib.Bytef)(unsafe.Pointer(unsafe.SliceData(ucmp)))
+
+ unRes := zlib.Uncompress(ucmpPtr, &ucmpSize, data, zlib.ULong(cmpSize))
+ c.Printf(c.Str("Decompression result = %d, Decompressed size %d\n"), unRes, ucmpSize)
+
+ if unRes != zlib.OK {
+ c.Printf(c.Str("\nDecompression failed: %d\n"), unRes)
+ return
+ }
+
+ c.Printf(c.Str("Decompressed data: \n"))
+ for i := 0; i < int(ucmpSize); i++ {
+ c.Printf(c.Str("%c"), ucmp[i])
+ }
+}
diff --git a/zlib/go.mod b/zlib/go.mod
new file mode 100644
index 0000000..46b9aa6
--- /dev/null
+++ b/zlib/go.mod
@@ -0,0 +1,5 @@
+module github.com/goplus/llpkg/zlib
+
+go 1.20
+
+require github.com/goplus/lib v0.2.0
diff --git a/zlib/go.sum b/zlib/go.sum
new file mode 100644
index 0000000..512980a
--- /dev/null
+++ b/zlib/go.sum
@@ -0,0 +1,2 @@
+github.com/goplus/lib v0.2.0 h1:AjqkN1XK5H23wZMMlpaUYAMCDAdSBQ2NMFrLtSh7W4g=
+github.com/goplus/lib v0.2.0/go.mod h1:SgJv3oPqLLHCu0gcL46ejOP3x7/2ry2Jtxu7ta32kp0=
diff --git a/zlib/llcppg.cfg b/zlib/llcppg.cfg
new file mode 100644
index 0000000..acb218f
--- /dev/null
+++ b/zlib/llcppg.cfg
@@ -0,0 +1,20 @@
+{
+ "name": "zlib",
+ "cflags": "$(pkg-config --cflags zlib)",
+ "libs": "$(pkg-config --libs zlib)",
+ "include": [
+ "zlib.h",
+ "zconf.h"
+ ],
+ "trimPrefixes": ["Z_","ZLIB_", "zlib"],
+ "cplusplus": false,
+ "deps": ["c/os"],
+ "keepUnderScore": false,
+ "symMap":{
+ "compress":"Compress",
+ "compress2":"Compress2",
+ "uncompress":"Uncompress",
+ "uncompress2":"Uncompress2",
+ "compressBound":"CompressBound"
+ }
+}
diff --git a/zlib/llcppg.pub b/zlib/llcppg.pub
new file mode 100644
index 0000000..a43151e
--- /dev/null
+++ b/zlib/llcppg.pub
@@ -0,0 +1,26 @@
+Byte
+Bytef
+alloc_func AllocFunc
+charf Charf
+free_func FreeFunc
+gzFile GzFile
+gzFile_s GzFileS
+gz_header GzHeader
+gz_header_s GzHeaderS
+gz_headerp GzHeaderp
+in_func InFunc
+internal_state InternalState
+intf Intf
+out_func OutFunc
+uInt UInt
+uIntf UIntf
+uLong ULong
+uLongf ULongf
+voidp Voidp
+voidpc Voidpc
+voidpf Voidpf
+z_crc_t ZCrcT
+z_size_t ZSizeT
+z_stream ZStream
+z_stream_s ZStreamS
+z_streamp ZStreamp
\ No newline at end of file
diff --git a/zlib/llpkg.cfg b/zlib/llpkg.cfg
new file mode 100644
index 0000000..dfdf09c
--- /dev/null
+++ b/zlib/llpkg.cfg
@@ -0,0 +1,8 @@
+{
+ "upstream": {
+ "package": {
+ "name": "zlib",
+ "version": "1.3.1"
+ }
+ }
+}
\ No newline at end of file
diff --git a/zlib/zconf.go b/zlib/zconf.go
new file mode 100644
index 0000000..1a86311
--- /dev/null
+++ b/zlib/zconf.go
@@ -0,0 +1,23 @@
+package zlib
+
+import (
+ "github.com/goplus/lib/c"
+ _ "unsafe"
+)
+
+const MAX_MEM_LEVEL = 9
+const MAX_WBITS = 15
+
+type ZSizeT c.SizeT
+type Byte c.Char
+type UInt c.Uint
+type ULong c.Ulong
+type Bytef Byte
+type Charf c.Char
+type Intf c.Int
+type UIntf UInt
+type ULongf ULong
+type Voidpc c.Pointer
+type Voidpf c.Pointer
+type Voidp c.Pointer
+type ZCrcT c.Uint
diff --git a/zlib/zlib.go b/zlib/zlib.go
new file mode 100644
index 0000000..48a051d
--- /dev/null
+++ b/zlib/zlib.go
@@ -0,0 +1,1518 @@
+package zlib
+
+import (
+ "github.com/goplus/lib/c"
+ "github.com/goplus/lib/c/os"
+ _ "unsafe"
+)
+
+const VERSION = "1.3.1"
+const VERNUM = 0x1310
+const VER_MAJOR = 1
+const VER_MINOR = 3
+const VER_REVISION = 1
+const VER_SUBREVISION = 0
+const NO_FLUSH = 0
+const PARTIAL_FLUSH = 1
+const SYNC_FLUSH = 2
+const FULL_FLUSH = 3
+const FINISH = 4
+const BLOCK = 5
+const TREES = 6
+const OK = 0
+const STREAM_END = 1
+const NEED_DICT = 2
+const NO_COMPRESSION = 0
+const BEST_SPEED = 1
+const BEST_COMPRESSION = 9
+const FILTERED = 1
+const HUFFMAN_ONLY = 2
+const RLE = 3
+const FIXED = 4
+const DEFAULT_STRATEGY = 0
+const BINARY = 0
+const TEXT = 1
+const UNKNOWN = 2
+const DEFLATED = 8
+const NULL = 0
+
+// llgo:type C
+type AllocFunc func(Voidpf, UInt, UInt) Voidpf
+
+// llgo:type C
+type FreeFunc func(Voidpf, Voidpf)
+
+type InternalState struct {
+ Unused [8]uint8
+}
+
+type ZStreamS struct {
+ NextIn *Bytef
+ AvailIn UInt
+ TotalIn ULong
+ NextOut *Bytef
+ AvailOut UInt
+ TotalOut ULong
+ Msg *c.Char
+ State *InternalState
+ Zalloc AllocFunc
+ Zfree FreeFunc
+ Opaque Voidpf
+ DataType c.Int
+ Adler ULong
+ Reserved ULong
+}
+type ZStream ZStreamS
+type ZStreamp *ZStream
+
+/*
+ gzip header information passed to and from zlib routines. See RFC 1952
+
+for more details on the meanings of these fields.
+*/
+type GzHeaderS struct {
+ Text c.Int
+ Time ULong
+ Xflags c.Int
+ Os c.Int
+ Extra *Bytef
+ ExtraLen UInt
+ ExtraMax UInt
+ Name *Bytef
+ NameMax UInt
+ Comment *Bytef
+ CommMax UInt
+ Hcrc c.Int
+ Done c.Int
+}
+type GzHeader GzHeaderS
+type GzHeaderp *GzHeader
+
+/* basic functions */
+//go:linkname Version C.zlibVersion
+func Version() *c.Char
+
+/*
+ZEXTERN int ZEXPORT deflateInit(z_streamp strm, int level);
+
+ Initializes the internal stream state for compression. The fields
+ zalloc, zfree and opaque must be initialized before by the caller. If
+ zalloc and zfree are set to Z_NULL, deflateInit updates them to use default
+ allocation functions. total_in, total_out, adler, and msg are initialized.
+
+ The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
+ 1 gives best speed, 9 gives best compression, 0 gives no compression at all
+ (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION
+ requests a default compromise between speed and compression (currently
+ equivalent to level 6).
+
+ deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_STREAM_ERROR if level is not a valid compression level, or
+ Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
+ with the version assumed by the caller (ZLIB_VERSION). msg is set to null
+ if there is no error message. deflateInit does not perform any compression:
+ this will be done by deflate().
+*/
+//go:linkname Deflate C.deflate
+func Deflate(strm ZStreamp, flush c.Int) c.Int
+
+/*
+ deflate compresses as much data as possible, and stops when the input
+ buffer becomes empty or the output buffer becomes full. It may introduce
+ some output latency (reading input without producing any output) except when
+ forced to flush.
+
+ The detailed semantics are as follows. deflate performs one or both of the
+ following actions:
+
+ - Compress more input starting at next_in and update next_in and avail_in
+ accordingly. If not all input can be processed (because there is not
+ enough room in the output buffer), next_in and avail_in are updated and
+ processing will resume at this point for the next call of deflate().
+
+ - Generate more output starting at next_out and update next_out and avail_out
+ accordingly. This action is forced if the parameter flush is non zero.
+ Forcing flush frequently degrades the compression ratio, so this parameter
+ should be set only when necessary. Some output may be provided even if
+ flush is zero.
+
+ Before the call of deflate(), the application should ensure that at least
+ one of the actions is possible, by providing more input and/or consuming more
+ output, and updating avail_in or avail_out accordingly; avail_out should
+ never be zero before the call. The application can consume the compressed
+ output when it wants, for example when the output buffer is full (avail_out
+ == 0), or after each call of deflate(). If deflate returns Z_OK and with
+ zero avail_out, it must be called again after making room in the output
+ buffer because there might be more output pending. See deflatePending(),
+ which can be used if desired to determine whether or not there is more output
+ in that case.
+
+ Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
+ decide how much data to accumulate before producing output, in order to
+ maximize compression.
+
+ If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
+ flushed to the output buffer and the output is aligned on a byte boundary, so
+ that the decompressor can get all input data available so far. (In
+ particular avail_in is zero after the call if enough output space has been
+ provided before the call.) Flushing may degrade compression for some
+ compression algorithms and so it should be used only when necessary. This
+ completes the current deflate block and follows it with an empty stored block
+ that is three bits plus filler bits to the next byte, followed by four bytes
+ (00 00 ff ff).
+
+ If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the
+ output buffer, but the output is not aligned to a byte boundary. All of the
+ input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
+ This completes the current deflate block and follows it with an empty fixed
+ codes block that is 10 bits long. This assures that enough bytes are output
+ in order for the decompressor to finish the block before the empty fixed
+ codes block.
+
+ If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
+ for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to
+ seven bits of the current block are held to be written as the next byte after
+ the next deflate block is completed. In this case, the decompressor may not
+ be provided enough bits at this point in order to complete decompression of
+ the data provided so far to the compressor. It may need to wait for the next
+ block to be emitted. This is for advanced applications that need to control
+ the emission of deflate blocks.
+
+ If flush is set to Z_FULL_FLUSH, all output is flushed as with
+ Z_SYNC_FLUSH, and the compression state is reset so that decompression can
+ restart from this point if previous compressed data has been damaged or if
+ random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
+ compression.
+
+ If deflate returns with avail_out == 0, this function must be called again
+ with the same value of the flush parameter and more output space (updated
+ avail_out), until the flush is complete (deflate returns with non-zero
+ avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
+ avail_out is greater than six when the flush marker begins, in order to avoid
+ repeated flush markers upon calling deflate() again when avail_out == 0.
+
+ If the parameter flush is set to Z_FINISH, pending input is processed,
+ pending output is flushed and deflate returns with Z_STREAM_END if there was
+ enough output space. If deflate returns with Z_OK or Z_BUF_ERROR, this
+ function must be called again with Z_FINISH and more output space (updated
+ avail_out) but no more input data, until it returns with Z_STREAM_END or an
+ error. After deflate has returned Z_STREAM_END, the only possible operations
+ on the stream are deflateReset or deflateEnd.
+
+ Z_FINISH can be used in the first deflate call after deflateInit if all the
+ compression is to be done in a single step. In order to complete in one
+ call, avail_out must be at least the value returned by deflateBound (see
+ below). Then deflate is guaranteed to return Z_STREAM_END. If not enough
+ output space is provided, deflate will not return Z_STREAM_END, and it must
+ be called again as described above.
+
+ deflate() sets strm->adler to the Adler-32 checksum of all input read
+ so far (that is, total_in bytes). If a gzip stream is being generated, then
+ strm->adler will be the CRC-32 checksum of the input read so far. (See
+ deflateInit2 below.)
+
+ deflate() may update strm->data_type if it can make a good guess about
+ the input data type (Z_BINARY or Z_TEXT). If in doubt, the data is
+ considered binary. This field is only for information purposes and does not
+ affect the compression algorithm in any manner.
+
+ deflate() returns Z_OK if some progress has been made (more input
+ processed or more output produced), Z_STREAM_END if all input has been
+ consumed and all output has been produced (only when flush is set to
+ Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
+ if next_in or next_out was Z_NULL or the state was inadvertently written over
+ by the application), or Z_BUF_ERROR if no progress is possible (for example
+ avail_in or avail_out was zero). Note that Z_BUF_ERROR is not fatal, and
+ deflate() can be called again with more input and more output space to
+ continue compressing.
+*/
+//go:linkname DeflateEnd C.deflateEnd
+func DeflateEnd(strm ZStreamp) c.Int
+
+/*
+ZEXTERN int ZEXPORT inflateInit(z_streamp strm);
+
+ Initializes the internal stream state for decompression. The fields
+ next_in, avail_in, zalloc, zfree and opaque must be initialized before by
+ the caller. In the current version of inflate, the provided input is not
+ read or consumed. The allocation of a sliding window will be deferred to
+ the first call of inflate (if the decompression does not complete on the
+ first call). If zalloc and zfree are set to Z_NULL, inflateInit updates
+ them to use default allocation functions. total_in, total_out, adler, and
+ msg are initialized.
+
+ inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+ version assumed by the caller, or Z_STREAM_ERROR if the parameters are
+ invalid, such as a null pointer to the structure. msg is set to null if
+ there is no error message. inflateInit does not perform any decompression.
+ Actual decompression will be done by inflate(). So next_in, and avail_in,
+ next_out, and avail_out are unused and unchanged. The current
+ implementation of inflateInit() does not process any header information --
+ that is deferred until inflate() is called.
+*/
+//go:linkname Inflate C.inflate
+func Inflate(strm ZStreamp, flush c.Int) c.Int
+
+/*
+ inflate decompresses as much data as possible, and stops when the input
+ buffer becomes empty or the output buffer becomes full. It may introduce
+ some output latency (reading input without producing any output) except when
+ forced to flush.
+
+ The detailed semantics are as follows. inflate performs one or both of the
+ following actions:
+
+ - Decompress more input starting at next_in and update next_in and avail_in
+ accordingly. If not all input can be processed (because there is not
+ enough room in the output buffer), then next_in and avail_in are updated
+ accordingly, and processing will resume at this point for the next call of
+ inflate().
+
+ - Generate more output starting at next_out and update next_out and avail_out
+ accordingly. inflate() provides as much output as possible, until there is
+ no more input data or no more space in the output buffer (see below about
+ the flush parameter).
+
+ Before the call of inflate(), the application should ensure that at least
+ one of the actions is possible, by providing more input and/or consuming more
+ output, and updating the next_* and avail_* values accordingly. If the
+ caller of inflate() does not provide both available input and available
+ output space, it is possible that there will be no progress made. The
+ application can consume the uncompressed output when it wants, for example
+ when the output buffer is full (avail_out == 0), or after each call of
+ inflate(). If inflate returns Z_OK and with zero avail_out, it must be
+ called again after making room in the output buffer because there might be
+ more output pending.
+
+ The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH,
+ Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much
+ output as possible to the output buffer. Z_BLOCK requests that inflate()
+ stop if and when it gets to the next deflate block boundary. When decoding
+ the zlib or gzip format, this will cause inflate() to return immediately
+ after the header and before the first block. When doing a raw inflate,
+ inflate() will go ahead and process the first block, and will return when it
+ gets to the end of that block, or when it runs out of data.
+
+ The Z_BLOCK option assists in appending to or combining deflate streams.
+ To assist in this, on return inflate() always sets strm->data_type to the
+ number of unused bits in the last byte taken from strm->next_in, plus 64 if
+ inflate() is currently decoding the last block in the deflate stream, plus
+ 128 if inflate() returned immediately after decoding an end-of-block code or
+ decoding the complete header up to just before the first byte of the deflate
+ stream. The end-of-block will not be indicated until all of the uncompressed
+ data from that block has been written to strm->next_out. The number of
+ unused bits may in general be greater than seven, except when bit 7 of
+ data_type is set, in which case the number of unused bits will be less than
+ eight. data_type is set as noted here every time inflate() returns for all
+ flush options, and so can be used to determine the amount of currently
+ consumed input in bits.
+
+ The Z_TREES option behaves as Z_BLOCK does, but it also returns when the
+ end of each deflate block header is reached, before any actual data in that
+ block is decoded. This allows the caller to determine the length of the
+ deflate block header for later use in random access within a deflate block.
+ 256 is added to the value of strm->data_type when inflate() returns
+ immediately after reaching the end of the deflate block header.
+
+ inflate() should normally be called until it returns Z_STREAM_END or an
+ error. However if all decompression is to be performed in a single step (a
+ single call of inflate), the parameter flush should be set to Z_FINISH. In
+ this case all pending input is processed and all pending output is flushed;
+ avail_out must be large enough to hold all of the uncompressed data for the
+ operation to complete. (The size of the uncompressed data may have been
+ saved by the compressor for this purpose.) The use of Z_FINISH is not
+ required to perform an inflation in one step. However it may be used to
+ inform inflate that a faster approach can be used for the single inflate()
+ call. Z_FINISH also informs inflate to not maintain a sliding window if the
+ stream completes, which reduces inflate's memory footprint. If the stream
+ does not complete, either because not all of the stream is provided or not
+ enough output space is provided, then a sliding window will be allocated and
+ inflate() can be called again to continue the operation as if Z_NO_FLUSH had
+ been used.
+
+ In this implementation, inflate() always flushes as much output as
+ possible to the output buffer, and always uses the faster approach on the
+ first call. So the effects of the flush parameter in this implementation are
+ on the return value of inflate() as noted below, when inflate() returns early
+ when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of
+ memory for a sliding window when Z_FINISH is used.
+
+ If a preset dictionary is needed after this call (see inflateSetDictionary
+ below), inflate sets strm->adler to the Adler-32 checksum of the dictionary
+ chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
+ strm->adler to the Adler-32 checksum of all output produced so far (that is,
+ total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
+ below. At the end of the stream, inflate() checks that its computed Adler-32
+ checksum is equal to that saved by the compressor and returns Z_STREAM_END
+ only if the checksum is correct.
+
+ inflate() can decompress and check either zlib-wrapped or gzip-wrapped
+ deflate data. The header type is detected automatically, if requested when
+ initializing with inflateInit2(). Any information contained in the gzip
+ header is not retained unless inflateGetHeader() is used. When processing
+ gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output
+ produced so far. The CRC-32 is checked against the gzip trailer, as is the
+ uncompressed length, modulo 2^32.
+
+ inflate() returns Z_OK if some progress has been made (more input processed
+ or more output produced), Z_STREAM_END if the end of the compressed data has
+ been reached and all uncompressed output has been produced, Z_NEED_DICT if a
+ preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
+ corrupted (input stream not conforming to the zlib format or incorrect check
+ value, in which case strm->msg points to a string with a more specific
+ error), Z_STREAM_ERROR if the stream structure was inconsistent (for example
+ next_in or next_out was Z_NULL, or the state was inadvertently written over
+ by the application), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR
+ if no progress was possible or if there was not enough room in the output
+ buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
+ inflate() can be called again with more input and more output space to
+ continue decompressing. If Z_DATA_ERROR is returned, the application may
+ then call inflateSync() to look for a good compression block if a partial
+ recovery of the data is to be attempted.
+*/
+//go:linkname InflateEnd C.inflateEnd
+func InflateEnd(strm ZStreamp) c.Int
+
+/*
+ZEXTERN int ZEXPORT deflateInit2(z_streamp strm,
+ int level,
+ int method,
+ int windowBits,
+ int memLevel,
+ int strategy);
+
+ This is another version of deflateInit with more compression options. The
+ fields zalloc, zfree and opaque must be initialized before by the caller.
+
+ The method parameter is the compression method. It must be Z_DEFLATED in
+ this version of the library.
+
+ The windowBits parameter is the base two logarithm of the window size
+ (the size of the history buffer). It should be in the range 8..15 for this
+ version of the library. Larger values of this parameter result in better
+ compression at the expense of memory usage. The default value is 15 if
+ deflateInit is used instead.
+
+ For the current implementation of deflate(), a windowBits value of 8 (a
+ window size of 256 bytes) is not supported. As a result, a request for 8
+ will result in 9 (a 512-byte window). In that case, providing 8 to
+ inflateInit2() will result in an error when the zlib header with 9 is
+ checked against the initialization of inflate(). The remedy is to not use 8
+ with deflateInit2() with this initialization, or at least in that case use 9
+ with inflateInit2().
+
+ windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
+ determines the window size. deflate() will then generate raw deflate data
+ with no zlib header or trailer, and will not compute a check value.
+
+ windowBits can also be greater than 15 for optional gzip encoding. Add
+ 16 to windowBits to write a simple gzip header and trailer around the
+ compressed data instead of a zlib wrapper. The gzip header will have no
+ file name, no extra data, no comment, no modification time (set to zero), no
+ header crc, and the operating system will be set to the appropriate value,
+ if the operating system was determined at compile time. If a gzip stream is
+ being written, strm->adler is a CRC-32 instead of an Adler-32.
+
+ For raw deflate or gzip encoding, a request for a 256-byte window is
+ rejected as invalid, since only the zlib header provides a means of
+ transmitting the window size to the decompressor.
+
+ The memLevel parameter specifies how much memory should be allocated
+ for the internal compression state. memLevel=1 uses minimum memory but is
+ slow and reduces compression ratio; memLevel=9 uses maximum memory for
+ optimal speed. The default value is 8. See zconf.h for total memory usage
+ as a function of windowBits and memLevel.
+
+ The strategy parameter is used to tune the compression algorithm. Use the
+ value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
+ filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
+ string match), or Z_RLE to limit match distances to one (run-length
+ encoding). Filtered data consists mostly of small values with a somewhat
+ random distribution. In this case, the compression algorithm is tuned to
+ compress them better. The effect of Z_FILTERED is to force more Huffman
+ coding and less string matching; it is somewhat intermediate between
+ Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as
+ fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The
+ strategy parameter only affects the compression ratio but not the
+ correctness of the compressed output even if it is not set appropriately.
+ Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler
+ decoder for special applications.
+
+ deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid
+ method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is
+ incompatible with the version assumed by the caller (ZLIB_VERSION). msg is
+ set to null if there is no error message. deflateInit2 does not perform any
+ compression: this will be done by deflate().
+*/
+//go:linkname DeflateSetDictionary C.deflateSetDictionary
+func DeflateSetDictionary(strm ZStreamp, dictionary *Bytef, dictLength UInt) c.Int
+
+/*
+ Initializes the compression dictionary from the given byte sequence
+ without producing any compressed output. When using the zlib format, this
+ function must be called immediately after deflateInit, deflateInit2 or
+ deflateReset, and before any call of deflate. When doing raw deflate, this
+ function must be called either before any call of deflate, or immediately
+ after the completion of a deflate block, i.e. after all input has been
+ consumed and all output has been delivered when using any of the flush
+ options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The
+ compressor and decompressor must use exactly the same dictionary (see
+ inflateSetDictionary).
+
+ The dictionary should consist of strings (byte sequences) that are likely
+ to be encountered later in the data to be compressed, with the most commonly
+ used strings preferably put towards the end of the dictionary. Using a
+ dictionary is most useful when the data to be compressed is short and can be
+ predicted with good accuracy; the data can then be compressed better than
+ with the default empty dictionary.
+
+ Depending on the size of the compression data structures selected by
+ deflateInit or deflateInit2, a part of the dictionary may in effect be
+ discarded, for example if the dictionary is larger than the window size
+ provided in deflateInit or deflateInit2. Thus the strings most likely to be
+ useful should be put at the end of the dictionary, not at the front. In
+ addition, the current implementation of deflate will use at most the window
+ size minus 262 bytes of the provided dictionary.
+
+ Upon return of this function, strm->adler is set to the Adler-32 value
+ of the dictionary; the decompressor may later use this value to determine
+ which dictionary has been used by the compressor. (The Adler-32 value
+ applies to the whole dictionary even if only a subset of the dictionary is
+ actually used by the compressor.) If a raw deflate was requested, then the
+ Adler-32 value is not computed and strm->adler is not set.
+
+ deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
+ parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
+ inconsistent (for example if deflate has already been called for this stream
+ or if not at a block boundary for raw deflate). deflateSetDictionary does
+ not perform any compression: this will be done by deflate().
+*/
+//go:linkname DeflateGetDictionary C.deflateGetDictionary
+func DeflateGetDictionary(strm ZStreamp, dictionary *Bytef, dictLength *UInt) c.Int
+
+/*
+ Returns the sliding dictionary being maintained by deflate. dictLength is
+ set to the number of bytes in the dictionary, and that many bytes are copied
+ to dictionary. dictionary must have enough space, where 32768 bytes is
+ always enough. If deflateGetDictionary() is called with dictionary equal to
+ Z_NULL, then only the dictionary length is returned, and nothing is copied.
+ Similarly, if dictLength is Z_NULL, then it is not set.
+
+ deflateGetDictionary() may return a length less than the window size, even
+ when more than the window size in input has been provided. It may return up
+ to 258 bytes less in that case, due to how zlib's implementation of deflate
+ manages the sliding window and lookahead for matches, where matches can be
+ up to 258 bytes long. If the application needs the last window-size bytes of
+ input, then that would need to be saved by the application outside of zlib.
+
+ deflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
+ stream state is inconsistent.
+*/
+//go:linkname DeflateCopy C.deflateCopy
+func DeflateCopy(dest ZStreamp, source ZStreamp) c.Int
+
+/*
+ Sets the destination stream as a complete copy of the source stream.
+
+ This function can be useful when several compression strategies will be
+ tried, for example when there are several ways of pre-processing the input
+ data with a filter. The streams that will be discarded should then be freed
+ by calling deflateEnd. Note that deflateCopy duplicates the internal
+ compression state which can be quite large, so this strategy is slow and can
+ consume lots of memory.
+
+ deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+ (such as zalloc being Z_NULL). msg is left unchanged in both source and
+ destination.
+*/
+//go:linkname DeflateReset C.deflateReset
+func DeflateReset(strm ZStreamp) c.Int
+
+/*
+ This function is equivalent to deflateEnd followed by deflateInit, but
+ does not free and reallocate the internal compression state. The stream
+ will leave the compression level and any other attributes that may have been
+ set unchanged. total_in, total_out, adler, and msg are initialized.
+
+ deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being Z_NULL).
+*/
+//go:linkname DeflateParams C.deflateParams
+func DeflateParams(strm ZStreamp, level c.Int, strategy c.Int) c.Int
+
+/*
+ Dynamically update the compression level and compression strategy. The
+ interpretation of level and strategy is as in deflateInit2(). This can be
+ used to switch between compression and straight copy of the input data, or
+ to switch to a different kind of input data requiring a different strategy.
+ If the compression approach (which is a function of the level) or the
+ strategy is changed, and if there have been any deflate() calls since the
+ state was initialized or reset, then the input available so far is
+ compressed with the old level and strategy using deflate(strm, Z_BLOCK).
+ There are three approaches for the compression levels 0, 1..3, and 4..9
+ respectively. The new level and strategy will take effect at the next call
+ of deflate().
+
+ If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does
+ not have enough output space to complete, then the parameter change will not
+ take effect. In this case, deflateParams() can be called again with the
+ same parameters and more output space to try again.
+
+ In order to assure a change in the parameters on the first try, the
+ deflate stream should be flushed using deflate() with Z_BLOCK or other flush
+ request until strm.avail_out is not zero, before calling deflateParams().
+ Then no more input data should be provided before the deflateParams() call.
+ If this is done, the old level and strategy will be applied to the data
+ compressed before deflateParams(), and the new level and strategy will be
+ applied to the data compressed after deflateParams().
+
+ deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream
+ state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if
+ there was not enough output space to complete the compression of the
+ available input data before a change in the strategy or approach. Note that
+ in the case of a Z_BUF_ERROR, the parameters are not changed. A return
+ value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be
+ retried with more output space.
+*/
+//go:linkname DeflateTune C.deflateTune
+func DeflateTune(strm ZStreamp, good_length c.Int, max_lazy c.Int, nice_length c.Int, max_chain c.Int) c.Int
+
+/*
+ Fine tune deflate's internal compression parameters. This should only be
+ used by someone who understands the algorithm used by zlib's deflate for
+ searching for the best matching string, and even then only by the most
+ fanatic optimizer trying to squeeze out the last compressed bit for their
+ specific input data. Read the deflate.c source code for the meaning of the
+ max_lazy, good_length, nice_length, and max_chain parameters.
+
+ deflateTune() can be called after deflateInit() or deflateInit2(), and
+ returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
+*/
+//go:linkname DeflateBound C.deflateBound
+func DeflateBound(strm ZStreamp, sourceLen ULong) ULong
+
+/*
+ deflateBound() returns an upper bound on the compressed size after
+ deflation of sourceLen bytes. It must be called after deflateInit() or
+ deflateInit2(), and after deflateSetHeader(), if used. This would be used
+ to allocate an output buffer for deflation in a single pass, and so would be
+ called before deflate(). If that first deflate() call is provided the
+ sourceLen input bytes, an output buffer allocated to the size returned by
+ deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed
+ to return Z_STREAM_END. Note that it is possible for the compressed size to
+ be larger than the value returned by deflateBound() if flush options other
+ than Z_FINISH or Z_NO_FLUSH are used.
+*/
+//go:linkname DeflatePending C.deflatePending
+func DeflatePending(strm ZStreamp, pending *c.Uint, bits *c.Int) c.Int
+
+/*
+ deflatePending() returns the number of bytes and bits of output that have
+ been generated, but not yet provided in the available output. The bytes not
+ provided would be due to the available output space having being consumed.
+ The number of bits of output not provided are between 0 and 7, where they
+ await more bits to join them in order to fill out a full byte. If pending
+ or bits are Z_NULL, then those values are not set.
+
+ deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+//go:linkname DeflatePrime C.deflatePrime
+func DeflatePrime(strm ZStreamp, bits c.Int, value c.Int) c.Int
+
+/*
+ deflatePrime() inserts bits in the deflate output stream. The intent
+ is that this function is used to start off the deflate output with the bits
+ leftover from a previous deflate stream when appending to it. As such, this
+ function can only be used for raw deflate, and must be used before the first
+ deflate() call after a deflateInit2() or deflateReset(). bits must be less
+ than or equal to 16, and that many of the least significant bits of value
+ will be inserted in the output.
+
+ deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough
+ room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the
+ source stream state was inconsistent.
+*/
+//go:linkname DeflateSetHeader C.deflateSetHeader
+func DeflateSetHeader(strm ZStreamp, head GzHeaderp) c.Int
+
+/*
+ZEXTERN int ZEXPORT inflateInit2(z_streamp strm,
+ int windowBits);
+
+ This is another version of inflateInit with an extra parameter. The
+ fields next_in, avail_in, zalloc, zfree and opaque must be initialized
+ before by the caller.
+
+ The windowBits parameter is the base two logarithm of the maximum window
+ size (the size of the history buffer). It should be in the range 8..15 for
+ this version of the library. The default value is 15 if inflateInit is used
+ instead. windowBits must be greater than or equal to the windowBits value
+ provided to deflateInit2() while compressing, or it must be equal to 15 if
+ deflateInit2() was not used. If a compressed stream with a larger window
+ size is given as input, inflate() will return with the error code
+ Z_DATA_ERROR instead of trying to allocate a larger window.
+
+ windowBits can also be zero to request that inflate use the window size in
+ the zlib header of the compressed stream.
+
+ windowBits can also be -8..-15 for raw inflate. In this case, -windowBits
+ determines the window size. inflate() will then process raw deflate data,
+ not looking for a zlib or gzip header, not generating a check value, and not
+ looking for any check values for comparison at the end of the stream. This
+ is for use with other formats that use the deflate compressed data format
+ such as zip. Those formats provide their own check values. If a custom
+ format is developed using the raw deflate format for compressed data, it is
+ recommended that a check value such as an Adler-32 or a CRC-32 be applied to
+ the uncompressed data as is done in the zlib, gzip, and zip formats. For
+ most applications, the zlib format should be used as is. Note that comments
+ above on the use in deflateInit2() applies to the magnitude of windowBits.
+
+ windowBits can also be greater than 15 for optional gzip decoding. Add
+ 32 to windowBits to enable zlib and gzip decoding with automatic header
+ detection, or add 16 to decode only the gzip format (the zlib format will
+ return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a
+ CRC-32 instead of an Adler-32. Unlike the gunzip utility and gzread() (see
+ below), inflate() will *not* automatically decode concatenated gzip members.
+ inflate() will return Z_STREAM_END at the end of the gzip member. The state
+ would need to be reset to continue decoding a subsequent gzip member. This
+ *must* be done if there is more data after a gzip member, in order for the
+ decompression to be compliant with the gzip standard (RFC 1952).
+
+ inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+ version assumed by the caller, or Z_STREAM_ERROR if the parameters are
+ invalid, such as a null pointer to the structure. msg is set to null if
+ there is no error message. inflateInit2 does not perform any decompression
+ apart from possibly reading the zlib header if present: actual decompression
+ will be done by inflate(). (So next_in and avail_in may be modified, but
+ next_out and avail_out are unused and unchanged.) The current implementation
+ of inflateInit2() does not process any header information -- that is
+ deferred until inflate() is called.
+*/
+//go:linkname InflateSetDictionary C.inflateSetDictionary
+func InflateSetDictionary(strm ZStreamp, dictionary *Bytef, dictLength UInt) c.Int
+
+/*
+ Initializes the decompression dictionary from the given uncompressed byte
+ sequence. This function must be called immediately after a call of inflate,
+ if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
+ can be determined from the Adler-32 value returned by that call of inflate.
+ The compressor and decompressor must use exactly the same dictionary (see
+ deflateSetDictionary). For raw inflate, this function can be called at any
+ time to set the dictionary. If the provided dictionary is smaller than the
+ window and there is already data in the window, then the provided dictionary
+ will amend what's there. The application must insure that the dictionary
+ that was used for compression is provided.
+
+ inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
+ parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
+ inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
+ expected one (incorrect Adler-32 value). inflateSetDictionary does not
+ perform any decompression: this will be done by subsequent calls of
+ inflate().
+*/
+//go:linkname InflateGetDictionary C.inflateGetDictionary
+func InflateGetDictionary(strm ZStreamp, dictionary *Bytef, dictLength *UInt) c.Int
+
+/*
+ Returns the sliding dictionary being maintained by inflate. dictLength is
+ set to the number of bytes in the dictionary, and that many bytes are copied
+ to dictionary. dictionary must have enough space, where 32768 bytes is
+ always enough. If inflateGetDictionary() is called with dictionary equal to
+ Z_NULL, then only the dictionary length is returned, and nothing is copied.
+ Similarly, if dictLength is Z_NULL, then it is not set.
+
+ inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
+ stream state is inconsistent.
+*/
+//go:linkname InflateSync C.inflateSync
+func InflateSync(strm ZStreamp) c.Int
+
+/*
+ Skips invalid compressed data until a possible full flush point (see above
+ for the description of deflate with Z_FULL_FLUSH) can be found, or until all
+ available input is skipped. No output is provided.
+
+ inflateSync searches for a 00 00 FF FF pattern in the compressed data.
+ All full flush points have this pattern, but not all occurrences of this
+ pattern are full flush points.
+
+ inflateSync returns Z_OK if a possible full flush point has been found,
+ Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point
+ has been found, or Z_STREAM_ERROR if the stream structure was inconsistent.
+ In the success case, the application may save the current value of total_in
+ which indicates where valid compressed data was found. In the error case,
+ the application may repeatedly call inflateSync, providing more input each
+ time, until success or end of the input data.
+*/
+//go:linkname InflateCopy C.inflateCopy
+func InflateCopy(dest ZStreamp, source ZStreamp) c.Int
+
+/*
+ Sets the destination stream as a complete copy of the source stream.
+
+ This function can be useful when randomly accessing a large stream. The
+ first pass through the stream can periodically record the inflate state,
+ allowing restarting inflate at those points when randomly accessing the
+ stream.
+
+ inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+ (such as zalloc being Z_NULL). msg is left unchanged in both source and
+ destination.
+*/
+//go:linkname InflateReset C.inflateReset
+func InflateReset(strm ZStreamp) c.Int
+
+/*
+ This function is equivalent to inflateEnd followed by inflateInit,
+ but does not free and reallocate the internal decompression state. The
+ stream will keep attributes that may have been set by inflateInit2.
+ total_in, total_out, adler, and msg are initialized.
+
+ inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being Z_NULL).
+*/
+//go:linkname InflateReset2 C.inflateReset2
+func InflateReset2(strm ZStreamp, windowBits c.Int) c.Int
+
+/*
+ This function is the same as inflateReset, but it also permits changing
+ the wrap and window size requests. The windowBits parameter is interpreted
+ the same as it is for inflateInit2. If the window size is changed, then the
+ memory allocated for the window is freed, and the window will be reallocated
+ by inflate() if needed.
+
+ inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being Z_NULL), or if
+ the windowBits parameter is invalid.
+*/
+//go:linkname InflatePrime C.inflatePrime
+func InflatePrime(strm ZStreamp, bits c.Int, value c.Int) c.Int
+
+/*
+ This function inserts bits in the inflate input stream. The intent is
+ that this function is used to start inflating at a bit position in the
+ middle of a byte. The provided bits will be used before any bytes are used
+ from next_in. This function should only be used with raw inflate, and
+ should be used before the first inflate() call after inflateInit2() or
+ inflateReset(). bits must be less than or equal to 16, and that many of the
+ least significant bits of value will be inserted in the input.
+
+ If bits is negative, then the input stream bit buffer is emptied. Then
+ inflatePrime() can be called again to put bits in the buffer. This is used
+ to clear out bits leftover after feeding inflate a block description prior
+ to feeding inflate codes.
+
+ inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+//go:linkname InflateMark C.inflateMark
+func InflateMark(strm ZStreamp) c.Long
+
+/*
+ This function returns two values, one in the lower 16 bits of the return
+ value, and the other in the remaining upper bits, obtained by shifting the
+ return value down 16 bits. If the upper value is -1 and the lower value is
+ zero, then inflate() is currently decoding information outside of a block.
+ If the upper value is -1 and the lower value is non-zero, then inflate is in
+ the middle of a stored block, with the lower value equaling the number of
+ bytes from the input remaining to copy. If the upper value is not -1, then
+ it is the number of bits back from the current bit position in the input of
+ the code (literal or length/distance pair) currently being processed. In
+ that case the lower value is the number of bytes already emitted for that
+ code.
+
+ A code is being processed if inflate is waiting for more input to complete
+ decoding of the code, or if it has completed decoding but is waiting for
+ more output space to write the literal or match data.
+
+ inflateMark() is used to mark locations in the input data for random
+ access, which may be at bit positions, and to note those cases where the
+ output of a code may span boundaries of random access blocks. The current
+ location in the input stream can be determined from avail_in and data_type
+ as noted in the description for the Z_BLOCK flush parameter for inflate.
+
+ inflateMark returns the value noted above, or -65536 if the provided
+ source stream state was inconsistent.
+*/
+//go:linkname InflateGetHeader C.inflateGetHeader
+func InflateGetHeader(strm ZStreamp, head GzHeaderp) c.Int
+
+// llgo:type C
+type InFunc func(c.Pointer, **c.Char) c.Uint
+
+// llgo:type C
+type OutFunc func(c.Pointer, *c.Char, c.Uint) c.Int
+
+//go:linkname InflateBack C.inflateBack
+func InflateBack(strm ZStreamp, in InFunc, in_desc c.Pointer, out OutFunc, out_desc c.Pointer) c.Int
+
+/*
+ inflateBack() does a raw inflate with a single call using a call-back
+ interface for input and output. This is potentially more efficient than
+ inflate() for file i/o applications, in that it avoids copying between the
+ output and the sliding window by simply making the window itself the output
+ buffer. inflate() can be faster on modern CPUs when used with large
+ buffers. inflateBack() trusts the application to not change the output
+ buffer passed by the output function, at least until inflateBack() returns.
+
+ inflateBackInit() must be called first to allocate the internal state
+ and to initialize the state with the user-provided window buffer.
+ inflateBack() may then be used multiple times to inflate a complete, raw
+ deflate stream with each call. inflateBackEnd() is then called to free the
+ allocated state.
+
+ A raw deflate stream is one with no zlib or gzip header or trailer.
+ This routine would normally be used in a utility that reads zip or gzip
+ files and writes out uncompressed files. The utility would decode the
+ header and process the trailer on its own, hence this routine expects only
+ the raw deflate stream to decompress. This is different from the default
+ behavior of inflate(), which expects a zlib header and trailer around the
+ deflate stream.
+
+ inflateBack() uses two subroutines supplied by the caller that are then
+ called by inflateBack() for input and output. inflateBack() calls those
+ routines until it reads a complete deflate stream and writes out all of the
+ uncompressed data, or until it encounters an error. The function's
+ parameters and return types are defined above in the in_func and out_func
+ typedefs. inflateBack() will call in(in_desc, &buf) which should return the
+ number of bytes of provided input, and a pointer to that input in buf. If
+ there is no input available, in() must return zero -- buf is ignored in that
+ case -- and inflateBack() will return a buffer error. inflateBack() will
+ call out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].
+ out() should return zero on success, or non-zero on failure. If out()
+ returns non-zero, inflateBack() will return with an error. Neither in() nor
+ out() are permitted to change the contents of the window provided to
+ inflateBackInit(), which is also the buffer that out() uses to write from.
+ The length written by out() will be at most the window size. Any non-zero
+ amount of input may be provided by in().
+
+ For convenience, inflateBack() can be provided input on the first call by
+ setting strm->next_in and strm->avail_in. If that input is exhausted, then
+ in() will be called. Therefore strm->next_in must be initialized before
+ calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called
+ immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in
+ must also be initialized, and then if strm->avail_in is not zero, input will
+ initially be taken from strm->next_in[0 .. strm->avail_in - 1].
+
+ The in_desc and out_desc parameters of inflateBack() is passed as the
+ first parameter of in() and out() respectively when they are called. These
+ descriptors can be optionally used to pass any information that the caller-
+ supplied in() and out() functions need to do their job.
+
+ On return, inflateBack() will set strm->next_in and strm->avail_in to
+ pass back any unused input that was provided by the last in() call. The
+ return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
+ if in() or out() returned an error, Z_DATA_ERROR if there was a format error
+ in the deflate stream (in which case strm->msg is set to indicate the nature
+ of the error), or Z_STREAM_ERROR if the stream was not properly initialized.
+ In the case of Z_BUF_ERROR, an input or output error can be distinguished
+ using strm->next_in which will be Z_NULL only if in() returned an error. If
+ strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning
+ non-zero. (in() will always be called before out(), so strm->next_in is
+ assured to be defined if out() returns non-zero.) Note that inflateBack()
+ cannot return Z_OK.
+*/
+//go:linkname InflateBackEnd C.inflateBackEnd
+func InflateBackEnd(strm ZStreamp) c.Int
+
+/*
+ All memory allocated by inflateBackInit() is freed.
+
+ inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
+ state was inconsistent.
+*/
+//go:linkname CompileFlags C.zlibCompileFlags
+func CompileFlags() ULong
+
+/*
+ The following utility functions are implemented on top of the basic
+ stream-oriented functions. To simplify the interface, some default options
+ are assumed (compression level and memory usage, standard memory allocation
+ functions). The source code of these utility functions can be modified if
+ you need special options.
+*/
+//go:linkname Compress C.compress
+func Compress(dest *Bytef, destLen *ULongf, source *Bytef, sourceLen ULong) c.Int
+
+/*
+ Compresses the source buffer into the destination buffer. sourceLen is
+ the byte length of the source buffer. Upon entry, destLen is the total size
+ of the destination buffer, which must be at least the value returned by
+ compressBound(sourceLen). Upon exit, destLen is the actual size of the
+ compressed data. compress() is equivalent to compress2() with a level
+ parameter of Z_DEFAULT_COMPRESSION.
+
+ compress returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_BUF_ERROR if there was not enough room in the output
+ buffer.
+*/
+//go:linkname Compress2 C.compress2
+func Compress2(dest *Bytef, destLen *ULongf, source *Bytef, sourceLen ULong, level c.Int) c.Int
+
+/*
+ Compresses the source buffer into the destination buffer. The level
+ parameter has the same meaning as in deflateInit. sourceLen is the byte
+ length of the source buffer. Upon entry, destLen is the total size of the
+ destination buffer, which must be at least the value returned by
+ compressBound(sourceLen). Upon exit, destLen is the actual size of the
+ compressed data.
+
+ compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_BUF_ERROR if there was not enough room in the output buffer,
+ Z_STREAM_ERROR if the level parameter is invalid.
+*/
+//go:linkname CompressBound C.compressBound
+func CompressBound(sourceLen ULong) ULong
+
+/*
+ compressBound() returns an upper bound on the compressed size after
+ compress() or compress2() on sourceLen bytes. It would be used before a
+ compress() or compress2() call to allocate the destination buffer.
+*/
+//go:linkname Uncompress C.uncompress
+func Uncompress(dest *Bytef, destLen *ULongf, source *Bytef, sourceLen ULong) c.Int
+
+/*
+ Decompresses the source buffer into the destination buffer. sourceLen is
+ the byte length of the source buffer. Upon entry, destLen is the total size
+ of the destination buffer, which must be large enough to hold the entire
+ uncompressed data. (The size of the uncompressed data must have been saved
+ previously by the compressor and transmitted to the decompressor by some
+ mechanism outside the scope of this compression library.) Upon exit, destLen
+ is the actual size of the uncompressed data.
+
+ uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_BUF_ERROR if there was not enough room in the output
+ buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In
+ the case where there is not enough room, uncompress() will fill the output
+ buffer with the uncompressed data up to that point.
+*/
+//go:linkname Uncompress2 C.uncompress2
+func Uncompress2(dest *Bytef, destLen *ULongf, source *Bytef, sourceLen *ULong) c.Int
+
+type GzFileS struct {
+ Have c.Uint
+ Next *c.Char
+ Pos os.OffT
+}
+type GzFile *GzFileS
+
+/*
+ZEXTERN gzFile ZEXPORT gzopen(const char *path, const char *mode);
+
+ Open the gzip (.gz) file at path for reading and decompressing, or
+ compressing and writing. The mode parameter is as in fopen ("rb" or "wb")
+ but can also include a compression level ("wb9") or a strategy: 'f' for
+ filtered data as in "wb6f", 'h' for Huffman-only compression as in "wb1h",
+ 'R' for run-length encoding as in "wb1R", or 'F' for fixed code compression
+ as in "wb9F". (See the description of deflateInit2 for more information
+ about the strategy parameter.) 'T' will request transparent writing or
+ appending with no compression and not using the gzip format.
+
+ "a" can be used instead of "w" to request that the gzip stream that will
+ be written be appended to the file. "+" will result in an error, since
+ reading and writing to the same gzip file is not supported. The addition of
+ "x" when writing will create the file exclusively, which fails if the file
+ already exists. On systems that support it, the addition of "e" when
+ reading or writing will set the flag to close the file on an execve() call.
+
+ These functions, as well as gzip, will read and decode a sequence of gzip
+ streams in a file. The append function of gzopen() can be used to create
+ such a file. (Also see gzflush() for another way to do this.) When
+ appending, gzopen does not test whether the file begins with a gzip stream,
+ nor does it look for the end of the gzip streams to begin appending. gzopen
+ will simply append a gzip stream to the existing file.
+
+ gzopen can be used to read a file which is not in gzip format; in this
+ case gzread will directly read from the file without decompression. When
+ reading, this will be detected automatically by looking for the magic two-
+ byte gzip header.
+
+ gzopen returns NULL if the file could not be opened, if there was
+ insufficient memory to allocate the gzFile state, or if an invalid mode was
+ specified (an 'r', 'w', or 'a' was not provided, or '+' was provided).
+ errno can be checked to determine if the reason gzopen failed was that the
+ file could not be opened.
+*/
+//go:linkname Gzdopen C.gzdopen
+func Gzdopen(fd c.Int, mode *c.Char) GzFile
+
+/*
+ Associate a gzFile with the file descriptor fd. File descriptors are
+ obtained from calls like open, dup, creat, pipe or fileno (if the file has
+ been previously opened with fopen). The mode parameter is as in gzopen.
+
+ The next call of gzclose on the returned gzFile will also close the file
+ descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
+ fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd,
+ mode);. The duplicated descriptor should be saved to avoid a leak, since
+ gzdopen does not close fd if it fails. If you are using fileno() to get the
+ file descriptor from a FILE *, then you will have to use dup() to avoid
+ double-close()ing the file descriptor. Both gzclose() and fclose() will
+ close the associated file descriptor, so they need to have different file
+ descriptors.
+
+ gzdopen returns NULL if there was insufficient memory to allocate the
+ gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not
+ provided, or '+' was provided), or if fd is -1. The file descriptor is not
+ used until the next gz* read, write, seek, or close operation, so gzdopen
+ will not detect if fd is invalid (unless fd is -1).
+*/
+//go:linkname Gzbuffer C.gzbuffer
+func Gzbuffer(file GzFile, size c.Uint) c.Int
+
+/*
+ Set the internal buffer size used by this library's functions for file to
+ size. The default buffer size is 8192 bytes. This function must be called
+ after gzopen() or gzdopen(), and before any other calls that read or write
+ the file. The buffer memory allocation is always deferred to the first read
+ or write. Three times that size in buffer space is allocated. A larger
+ buffer size of, for example, 64K or 128K bytes will noticeably increase the
+ speed of decompression (reading).
+
+ The new buffer size also affects the maximum length for gzprintf().
+
+ gzbuffer() returns 0 on success, or -1 on failure, such as being called
+ too late.
+*/
+//go:linkname Gzsetparams C.gzsetparams
+func Gzsetparams(file GzFile, level c.Int, strategy c.Int) c.Int
+
+/*
+ Dynamically update the compression level and strategy for file. See the
+ description of deflateInit2 for the meaning of these parameters. Previously
+ provided data is flushed before applying the parameter changes.
+
+ gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not
+ opened for writing, Z_ERRNO if there is an error writing the flushed data,
+ or Z_MEM_ERROR if there is a memory allocation error.
+*/
+//go:linkname Gzread C.gzread
+func Gzread(file GzFile, buf Voidp, len c.Uint) c.Int
+
+/*
+ Read and decompress up to len uncompressed bytes from file into buf. If
+ the input file is not in gzip format, gzread copies the given number of
+ bytes into the buffer directly from the file.
+
+ After reaching the end of a gzip stream in the input, gzread will continue
+ to read, looking for another gzip stream. Any number of gzip streams may be
+ concatenated in the input file, and will all be decompressed by gzread().
+ If something other than a gzip stream is encountered after a gzip stream,
+ that remaining trailing garbage is ignored (and no error is returned).
+
+ gzread can be used to read a gzip file that is being concurrently written.
+ Upon reaching the end of the input, gzread will return with the available
+ data. If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then
+ gzclearerr can be used to clear the end of file indicator in order to permit
+ gzread to be tried again. Z_OK indicates that a gzip stream was completed
+ on the last gzread. Z_BUF_ERROR indicates that the input file ended in the
+ middle of a gzip stream. Note that gzread does not return -1 in the event
+ of an incomplete gzip stream. This error is deferred until gzclose(), which
+ will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip
+ stream. Alternatively, gzerror can be used before gzclose to detect this
+ case.
+
+ gzread returns the number of uncompressed bytes actually read, less than
+ len for end of file, or -1 for error. If len is too large to fit in an int,
+ then nothing is read, -1 is returned, and the error state is set to
+ Z_STREAM_ERROR.
+*/
+//go:linkname Gzfread C.gzfread
+func Gzfread(buf Voidp, size ZSizeT, nitems ZSizeT, file GzFile) ZSizeT
+
+/*
+ Read and decompress up to nitems items of size size from file into buf,
+ otherwise operating as gzread() does. This duplicates the interface of
+ stdio's fread(), with size_t request and return types. If the library
+ defines size_t, then z_size_t is identical to size_t. If not, then z_size_t
+ is an unsigned integer type that can contain a pointer.
+
+ gzfread() returns the number of full items read of size size, or zero if
+ the end of the file was reached and a full item could not be read, or if
+ there was an error. gzerror() must be consulted if zero is returned in
+ order to determine if there was an error. If the multiplication of size and
+ nitems overflows, i.e. the product does not fit in a z_size_t, then nothing
+ is read, zero is returned, and the error state is set to Z_STREAM_ERROR.
+
+ In the event that the end of file is reached and only a partial item is
+ available at the end, i.e. the remaining uncompressed data length is not a
+ multiple of size, then the final partial item is nevertheless read into buf
+ and the end-of-file flag is set. The length of the partial item read is not
+ provided, but could be inferred from the result of gztell(). This behavior
+ is the same as the behavior of fread() implementations in common libraries,
+ but it prevents the direct use of gzfread() to read a concurrently written
+ file, resetting and retrying on end-of-file, when size is not 1.
+*/
+//go:linkname Gzwrite C.gzwrite
+func Gzwrite(file GzFile, buf Voidpc, len c.Uint) c.Int
+
+/*
+ Compress and write the len uncompressed bytes at buf to file. gzwrite
+ returns the number of uncompressed bytes written or 0 in case of error.
+*/
+//go:linkname Gzfwrite C.gzfwrite
+func Gzfwrite(buf Voidpc, size ZSizeT, nitems ZSizeT, file GzFile) ZSizeT
+
+/*
+ Compress and write nitems items of size size from buf to file, duplicating
+ the interface of stdio's fwrite(), with size_t request and return types. If
+ the library defines size_t, then z_size_t is identical to size_t. If not,
+ then z_size_t is an unsigned integer type that can contain a pointer.
+
+ gzfwrite() returns the number of full items written of size size, or zero
+ if there was an error. If the multiplication of size and nitems overflows,
+ i.e. the product does not fit in a z_size_t, then nothing is written, zero
+ is returned, and the error state is set to Z_STREAM_ERROR.
+*/
+//go:linkname Gzprintf C.gzprintf
+func Gzprintf(file GzFile, format *c.Char, __llgo_va_list ...interface{}) c.Int
+
+/*
+ Convert, format, compress, and write the arguments (...) to file under
+ control of the string format, as in fprintf. gzprintf returns the number of
+ uncompressed bytes actually written, or a negative zlib error code in case
+ of error. The number of uncompressed bytes written is limited to 8191, or
+ one less than the buffer size given to gzbuffer(). The caller should assure
+ that this limit is not exceeded. If it is exceeded, then gzprintf() will
+ return an error (0) with nothing written. In this case, there may also be a
+ buffer overflow with unpredictable consequences, which is possible only if
+ zlib was compiled with the insecure functions sprintf() or vsprintf(),
+ because the secure snprintf() or vsnprintf() functions were not available.
+ This can be determined using zlibCompileFlags().
+*/
+//go:linkname Gzputs C.gzputs
+func Gzputs(file GzFile, s *c.Char) c.Int
+
+/*
+ Compress and write the given null-terminated string s to file, excluding
+ the terminating null character.
+
+ gzputs returns the number of characters written, or -1 in case of error.
+*/
+//go:linkname Gzgets C.gzgets
+func Gzgets(file GzFile, buf *c.Char, len c.Int) *c.Char
+
+/*
+ Read and decompress bytes from file into buf, until len-1 characters are
+ read, or until a newline character is read and transferred to buf, or an
+ end-of-file condition is encountered. If any characters are read or if len
+ is one, the string is terminated with a null character. If no characters
+ are read due to an end-of-file or len is less than one, then the buffer is
+ left untouched.
+
+ gzgets returns buf which is a null-terminated string, or it returns NULL
+ for end-of-file or in case of error. If there was an error, the contents at
+ buf are indeterminate.
+*/
+//go:linkname Gzputc C.gzputc
+func Gzputc(file GzFile, c c.Int) c.Int
+
+/*
+ Compress and write c, converted to an unsigned char, into file. gzputc
+ returns the value that was written, or -1 in case of error.
+*/
+//go:linkname Gzgetc C.gzgetc
+func Gzgetc(file GzFile) c.Int
+
+/*
+ Read and decompress one byte from file. gzgetc returns this byte or -1
+ in case of end of file or error. This is implemented as a macro for speed.
+ As such, it does not do all of the checking the other functions do. I.e.
+ it does not check to see if file is NULL, nor whether the structure file
+ points to has been clobbered or not.
+*/
+//go:linkname Gzungetc C.gzungetc
+func Gzungetc(c c.Int, file GzFile) c.Int
+
+/*
+ Push c back onto the stream for file to be read as the first character on
+ the next read. At least one character of push-back is always allowed.
+ gzungetc() returns the character pushed, or -1 on failure. gzungetc() will
+ fail if c is -1, and may fail if a character has been pushed but not read
+ yet. If gzungetc is used immediately after gzopen or gzdopen, at least the
+ output buffer size of pushed characters is allowed. (See gzbuffer above.)
+ The pushed character will be discarded if the stream is repositioned with
+ gzseek() or gzrewind().
+*/
+//go:linkname Gzflush C.gzflush
+func Gzflush(file GzFile, flush c.Int) c.Int
+
+/*
+ZEXTERN z_off_t ZEXPORT gzseek(gzFile file,
+ z_off_t offset, int whence);
+
+ Set the starting position to offset relative to whence for the next gzread
+ or gzwrite on file. The offset represents a number of bytes in the
+ uncompressed data stream. The whence parameter is defined as in lseek(2);
+ the value SEEK_END is not supported.
+
+ If the file is opened for reading, this function is emulated but can be
+ extremely slow. If the file is opened for writing, only forward seeks are
+ supported; gzseek then compresses a sequence of zeroes up to the new
+ starting position.
+
+ gzseek returns the resulting offset location as measured in bytes from
+ the beginning of the uncompressed stream, or -1 in case of error, in
+ particular if the file is opened for writing and the new starting position
+ would be before the current position.
+*/
+//go:linkname Gzrewind C.gzrewind
+func Gzrewind(file GzFile) c.Int
+
+/*
+ZEXTERN z_off_t ZEXPORT gzoffset(gzFile file);
+
+ Return the current compressed (actual) read or write offset of file. This
+ offset includes the count of bytes that precede the gzip stream, for example
+ when appending or when using gzdopen() for reading. When reading, the
+ offset does not include as yet unused buffered input. This information can
+ be used for a progress indicator. On error, gzoffset() returns -1.
+*/
+//go:linkname Gzeof C.gzeof
+func Gzeof(file GzFile) c.Int
+
+/*
+ Return true (1) if the end-of-file indicator for file has been set while
+ reading, false (0) otherwise. Note that the end-of-file indicator is set
+ only if the read tried to go past the end of the input, but came up short.
+ Therefore, just like feof(), gzeof() may return false even if there is no
+ more data to read, in the event that the last read request was for the exact
+ number of bytes remaining in the input file. This will happen if the input
+ file size is an exact multiple of the buffer size.
+
+ If gzeof() returns true, then the read functions will return no more data,
+ unless the end-of-file indicator is reset by gzclearerr() and the input file
+ has grown since the previous end of file was detected.
+*/
+//go:linkname Gzdirect C.gzdirect
+func Gzdirect(file GzFile) c.Int
+
+/*
+ Return true (1) if file is being copied directly while reading, or false
+ (0) if file is a gzip stream being decompressed.
+
+ If the input file is empty, gzdirect() will return true, since the input
+ does not contain a gzip stream.
+
+ If gzdirect() is used immediately after gzopen() or gzdopen() it will
+ cause buffers to be allocated to allow reading the file to determine if it
+ is a gzip file. Therefore if gzbuffer() is used, it should be called before
+ gzdirect().
+
+ When writing, gzdirect() returns true (1) if transparent writing was
+ requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note:
+ gzdirect() is not needed when writing. Transparent writing must be
+ explicitly requested, so the application already knows the answer. When
+ linking statically, using gzdirect() will include all of the zlib code for
+ gzip file reading and decompression, which may not be desired.)
+*/
+//go:linkname Gzclose C.gzclose
+func Gzclose(file GzFile) c.Int
+
+/*
+ Flush all pending output for file, if necessary, close file and
+ deallocate the (de)compression state. Note that once file is closed, you
+ cannot call gzerror with file, since its structures have been deallocated.
+ gzclose must not be called more than once on the same file, just as free
+ must not be called more than once on the same allocation.
+
+ gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a
+ file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the
+ last read ended in the middle of a gzip stream, or Z_OK on success.
+*/
+//go:linkname GzcloseR C.gzclose_r
+func GzcloseR(file GzFile) c.Int
+
+//go:linkname GzcloseW C.gzclose_w
+func GzcloseW(file GzFile) c.Int
+
+/*
+ Same as gzclose(), but gzclose_r() is only for use when reading, and
+ gzclose_w() is only for use when writing or appending. The advantage to
+ using these instead of gzclose() is that they avoid linking in zlib
+ compression or decompression code that is not used when only reading or only
+ writing respectively. If gzclose() is used, then both compression and
+ decompression code will be included the application when linking to a static
+ zlib library.
+*/
+//go:linkname Gzerror C.gzerror
+func Gzerror(file GzFile, errnum *c.Int) *c.Char
+
+/*
+ Return the error message for the last error which occurred on file.
+ errnum is set to zlib error number. If an error occurred in the file system
+ and not in the compression library, errnum is set to Z_ERRNO and the
+ application may consult errno to get the exact error code.
+
+ The application must not modify the returned string. Future calls to
+ this function may invalidate the previously returned string. If file is
+ closed, then the string previously returned by gzerror will no longer be
+ available.
+
+ gzerror() should be used to distinguish errors from end-of-file for those
+ functions above that do not distinguish those cases in their return values.
+*/
+//go:linkname Gzclearerr C.gzclearerr
+func Gzclearerr(file GzFile)
+
+/*
+ These functions are not related to compression but are exported
+ anyway because they might be useful in applications using the compression
+ library.
+*/
+// llgo:link ULong.Adler32 C.adler32
+func (recv_ ULong) Adler32(buf *Bytef, len UInt) ULong {
+ return 0
+}
+
+/*
+ Update a running Adler-32 checksum with the bytes buf[0..len-1] and
+ return the updated checksum. An Adler-32 value is in the range of a 32-bit
+ unsigned integer. If buf is Z_NULL, this function returns the required
+ initial value for the checksum.
+
+ An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed
+ much faster.
+
+ Usage example:
+
+ uLong adler = adler32(0L, Z_NULL, 0);
+
+ while (read_buffer(buffer, length) != EOF) {
+ adler = adler32(adler, buffer, length);
+ }
+ if (adler != original_adler) error();
+*/
+// llgo:link ULong.Adler32Z C.adler32_z
+func (recv_ ULong) Adler32Z(buf *Bytef, len ZSizeT) ULong {
+ return 0
+}
+
+/*
+ZEXTERN uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2,
+ z_off_t len2);
+
+ Combine two Adler-32 checksums into one. For two sequences of bytes, seq1
+ and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
+ each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of
+ seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note
+ that the z_off_t type (like off_t) is a signed integer. If len2 is
+ negative, the result has no meaning or utility.
+*/
+// llgo:link ULong.Crc32 C.crc32
+func (recv_ ULong) Crc32(buf *Bytef, len UInt) ULong {
+ return 0
+}
+
+/*
+ Update a running CRC-32 with the bytes buf[0..len-1] and return the
+ updated CRC-32. A CRC-32 value is in the range of a 32-bit unsigned integer.
+ If buf is Z_NULL, this function returns the required initial value for the
+ crc. Pre- and post-conditioning (one's complement) is performed within this
+ function so it shouldn't be done by the application.
+
+ Usage example:
+
+ uLong crc = crc32(0L, Z_NULL, 0);
+
+ while (read_buffer(buffer, length) != EOF) {
+ crc = crc32(crc, buffer, length);
+ }
+ if (crc != original_crc) error();
+*/
+// llgo:link ULong.Crc32Z C.crc32_z
+func (recv_ ULong) Crc32Z(buf *Bytef, len ZSizeT) ULong {
+ return 0
+}
+
+/*
+ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t len2);
+
+ Return the operator corresponding to length len2, to be used with
+ crc32_combine_op(). len2 must be non-negative.
+*/
+// llgo:link ULong.Crc32CombineOp C.crc32_combine_op
+func (recv_ ULong) Crc32CombineOp(crc2 ULong, op ULong) ULong {
+ return 0
+}
+
+/* deflateInit and inflateInit are macros to allow checking the zlib version
+ * and the compiler's view of z_stream:
+ */
+//go:linkname DeflateInit_ C.deflateInit_
+func DeflateInit_(strm ZStreamp, level c.Int, version *c.Char, stream_size c.Int) c.Int
+
+//go:linkname InflateInit_ C.inflateInit_
+func InflateInit_(strm ZStreamp, version *c.Char, stream_size c.Int) c.Int
+
+//go:linkname DeflateInit2_ C.deflateInit2_
+func DeflateInit2_(strm ZStreamp, level c.Int, method c.Int, windowBits c.Int, memLevel c.Int, strategy c.Int, version *c.Char, stream_size c.Int) c.Int
+
+//go:linkname InflateInit2_ C.inflateInit2_
+func InflateInit2_(strm ZStreamp, windowBits c.Int, version *c.Char, stream_size c.Int) c.Int
+
+//go:linkname InflateBackInit_ C.inflateBackInit_
+func InflateBackInit_(strm ZStreamp, windowBits c.Int, window *c.Char, version *c.Char, stream_size c.Int) c.Int
+
+//go:linkname Gzgetc_ C.gzgetc_
+func Gzgetc_(file GzFile) c.Int
+
+//go:linkname Gzopen C.gzopen
+func Gzopen(*c.Char, *c.Char) GzFile
+
+//go:linkname Gzseek C.gzseek
+func Gzseek(GzFile, os.OffT, c.Int) os.OffT
+
+//go:linkname Gztell C.gztell
+func Gztell(GzFile) os.OffT
+
+//go:linkname Gzoffset C.gzoffset
+func Gzoffset(GzFile) os.OffT
+
+// llgo:link ULong.Adler32Combine C.adler32_combine
+func (recv_ ULong) Adler32Combine(ULong, os.OffT) ULong {
+ return 0
+}
+
+// llgo:link ULong.Crc32Combine C.crc32_combine
+func (recv_ ULong) Crc32Combine(ULong, os.OffT) ULong {
+ return 0
+}
+
+//go:linkname Crc32CombineGen C.crc32_combine_gen
+func Crc32CombineGen(os.OffT) ULong
+
+/* undocumented functions */
+//go:linkname ZError C.zError
+func ZError(c.Int) *c.Char
+
+//go:linkname InflateSyncPoint C.inflateSyncPoint
+func InflateSyncPoint(ZStreamp) c.Int
+
+//go:linkname GetCrcTable C.get_crc_table
+func GetCrcTable() *ZCrcT
+
+//go:linkname InflateUndermine C.inflateUndermine
+func InflateUndermine(ZStreamp, c.Int) c.Int
+
+//go:linkname InflateValidate C.inflateValidate
+func InflateValidate(ZStreamp, c.Int) c.Int
+
+//go:linkname InflateCodesUsed C.inflateCodesUsed
+func InflateCodesUsed(ZStreamp) c.Ulong
+
+//go:linkname InflateResetKeep C.inflateResetKeep
+func InflateResetKeep(ZStreamp) c.Int
+
+//go:linkname DeflateResetKeep C.deflateResetKeep
+func DeflateResetKeep(ZStreamp) c.Int
+
+//go:linkname Gzvprintf C.gzvprintf
+func Gzvprintf(file GzFile, format *c.Char, va c.VaList) c.Int
diff --git a/zlib/zlib_autogen_link.go b/zlib/zlib_autogen_link.go
new file mode 100644
index 0000000..d74d3ea
--- /dev/null
+++ b/zlib/zlib_autogen_link.go
@@ -0,0 +1,8 @@
+package zlib
+
+import (
+ _ "github.com/goplus/lib/c"
+ _ "github.com/goplus/lib/c/os"
+)
+
+const LLGoPackage string = "link: $(pkg-config --libs zlib);"